{
  "openapi": "3.0.3",
  "info": {
    "title": "API Rivil",
    "version": "1.0.0",
    "description": "Autentificare: antetul `Authorization: Bearer <cheie>`. Resursele afișate depind de modulele active în companie; câmpurile personalizate ale companiei sunt incluse în `custom_fields`."
  },
  "servers": [
    {
      "url": "https://erp.rivil.app"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "clients": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "display_name": {
            "type": "string",
            "description": "Nume"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Email"
          },
          "phone": {
            "type": "string",
            "description": "Telefon"
          },
          "party_kind": {
            "type": "string",
            "enum": [
              "person",
              "company"
            ],
            "description": "Tip client"
          },
          "custom_fields": {
            "type": "object",
            "description": "Câmpurile personalizate ale companiei, ca obiect cheie-valoare (vezi „Câmpuri personalizate”).",
            "properties": {}
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "deleted_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ștergerii; gol pentru înregistrările active."
          },
          "price_list_id": {
            "type": "string",
            "format": "uuid",
            "description": "Listă de prețuri"
          },
          "blocked": {
            "type": "boolean",
            "description": "Blocat"
          },
          "blocked_reason": {
            "type": "string",
            "description": "Motiv blocare"
          },
          "messages_opt_out": {
            "type": "boolean",
            "description": "Fără mesaje promoționale"
          },
          "acquisition_source": {
            "type": "string",
            "enum": [
              "recommendation",
              "online",
              "social",
              "passing",
              "ad",
              "other"
            ],
            "description": "De unde a aflat de noi"
          },
          "referred_by_party_id": {
            "type": "string",
            "format": "uuid",
            "description": "Recomandat de client"
          },
          "referred_by_employee_id": {
            "type": "string",
            "format": "uuid",
            "description": "Recomandat de angajat"
          },
          "client_status": {
            "type": "string",
            "enum": [
              "active",
              "inactive",
              "vip"
            ],
            "description": "Status"
          }
        }
      },
      "clients_input": {
        "type": "object",
        "properties": {
          "display_name": {
            "type": "string",
            "description": "Nume"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Email"
          },
          "phone": {
            "type": "string",
            "description": "Telefon"
          },
          "party_kind": {
            "type": "string",
            "enum": [
              "person",
              "company"
            ],
            "description": "Tip client"
          },
          "price_list_id": {
            "type": "string",
            "format": "uuid",
            "description": "Listă de prețuri"
          },
          "blocked": {
            "type": "boolean",
            "description": "Blocat"
          },
          "blocked_reason": {
            "type": "string",
            "description": "Motiv blocare"
          },
          "messages_opt_out": {
            "type": "boolean",
            "description": "Fără mesaje promoționale"
          },
          "acquisition_source": {
            "type": "string",
            "enum": [
              "recommendation",
              "online",
              "social",
              "passing",
              "ad",
              "other"
            ],
            "description": "De unde a aflat de noi"
          },
          "referred_by_party_id": {
            "type": "string",
            "format": "uuid",
            "description": "Recomandat de client"
          },
          "referred_by_employee_id": {
            "type": "string",
            "format": "uuid",
            "description": "Recomandat de angajat"
          },
          "client_status": {
            "type": "string",
            "enum": [
              "active",
              "inactive",
              "vip"
            ],
            "description": "Status"
          }
        },
        "required": [
          "display_name",
          "party_kind"
        ]
      },
      "locations": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "org_unit_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "Denumire"
          },
          "code": {
            "type": "string",
            "description": "Cod"
          },
          "address": {
            "type": "string",
            "description": "Adresă (stradă, număr)"
          },
          "city": {
            "type": "string",
            "description": "Oraș / localitate"
          },
          "timezone": {
            "type": "string",
            "description": "Fus orar"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "custom_fields": {
            "type": "object",
            "description": "Câmpurile personalizate ale companiei, ca obiect cheie-valoare (vezi „Câmpuri personalizate”).",
            "properties": {}
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "country": {
            "type": "string",
            "description": "Țara"
          },
          "county": {
            "type": "string",
            "description": "Județ / regiune"
          },
          "slug": {
            "type": "string"
          },
          "legal_entity_id": {
            "type": "string",
            "format": "uuid",
            "description": "Firmă"
          },
          "external_code": {
            "type": "string",
            "description": "Cod extern"
          },
          "hide_in_quick_filter": {
            "type": "boolean",
            "description": "Ascunde în filtrul rapid"
          },
          "invoice_series": {
            "type": "string",
            "description": "Serie facturi (gol = seria firmei)"
          },
          "sms_address": {
            "type": "string"
          },
          "sms_address_map": {
            "type": "string"
          },
          "sms_phone": {
            "type": "string"
          }
        }
      },
      "locations_input": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Denumire"
          },
          "code": {
            "type": "string",
            "description": "Cod"
          },
          "address": {
            "type": "string",
            "description": "Adresă (stradă, număr)"
          },
          "city": {
            "type": "string",
            "description": "Oraș / localitate"
          },
          "timezone": {
            "type": "string",
            "description": "Fus orar"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "country": {
            "type": "string",
            "description": "Țara"
          },
          "county": {
            "type": "string",
            "description": "Județ / regiune"
          },
          "legal_entity_id": {
            "type": "string",
            "format": "uuid",
            "description": "Firmă"
          },
          "external_code": {
            "type": "string",
            "description": "Cod extern"
          },
          "hide_in_quick_filter": {
            "type": "boolean",
            "description": "Ascunde în filtrul rapid"
          },
          "invoice_series": {
            "type": "string",
            "description": "Serie facturi (gol = seria firmei)"
          }
        },
        "required": [
          "name"
        ]
      },
      "appointments": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "party_id": {
            "type": "string",
            "format": "uuid",
            "description": "Client"
          },
          "location_id": {
            "type": "string",
            "format": "uuid",
            "description": "Locație"
          },
          "resource_id": {
            "type": "string",
            "format": "uuid",
            "description": "Resursă"
          },
          "employee_id": {
            "type": "string",
            "format": "uuid",
            "description": "Specialist"
          },
          "appointment_type_id": {
            "type": "string",
            "format": "uuid",
            "description": "Serviciu"
          },
          "starts_at": {
            "type": "string",
            "format": "date-time",
            "description": "Început"
          },
          "ends_at": {
            "type": "string",
            "format": "date-time",
            "description": "Sfârșit"
          },
          "status": {
            "type": "string",
            "enum": [
              "requested",
              "rejected",
              "scheduled",
              "confirmed",
              "arrived",
              "in_progress",
              "completed",
              "no_show",
              "cancelled",
              "rescheduled"
            ],
            "description": "Status"
          },
          "notes": {
            "type": "string",
            "description": "Observații"
          },
          "custom_fields": {
            "type": "object",
            "description": "Câmpurile personalizate ale companiei, ca obiect cheie-valoare (vezi „Câmpuri personalizate”).",
            "properties": {}
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "series_id": {
            "type": "string",
            "format": "uuid"
          },
          "series_index": {
            "type": "integer"
          },
          "source": {
            "type": "string"
          },
          "reminder_sent_at": {
            "type": "string",
            "format": "date-time"
          },
          "client_package_id": {
            "type": "string",
            "format": "uuid"
          },
          "booking_group_id": {
            "type": "string",
            "format": "uuid"
          },
          "group_index": {
            "type": "integer"
          },
          "answers": {
            "type": "object"
          },
          "consents": {
            "type": "object"
          },
          "allow_overlap": {
            "type": "boolean"
          },
          "reject_reason": {
            "type": "string"
          },
          "decided_at": {
            "type": "string",
            "format": "date-time"
          },
          "reschedule_count": {
            "type": "integer"
          },
          "cancel_reason": {
            "type": "string",
            "description": "Detalii anulare"
          },
          "cancelled_by": {
            "type": "string"
          },
          "attribution": {
            "type": "object"
          },
          "cancel_reason_code": {
            "type": "string",
            "enum": [
              "client_request",
              "staff_request",
              "unavailable",
              "resource_issue",
              "no_contact",
              "late",
              "other"
            ],
            "description": "Motiv anulare / neprezentare"
          },
          "delivery_mode": {
            "type": "string",
            "enum": [
              "on_site",
              "video",
              "phone"
            ],
            "description": "Cum se desfășoară"
          },
          "insurer_id": {
            "type": "string",
            "format": "uuid",
            "description": "Asigurator"
          },
          "payment_method": {
            "type": "string"
          },
          "payment_status": {
            "type": "string"
          },
          "payment_due": {
            "type": "number"
          },
          "payment_paid": {
            "type": "number"
          },
          "lang": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "status_by": {
            "type": "string"
          },
          "meet_url": {
            "type": "string",
            "format": "uri",
            "description": "Link Meet"
          },
          "co_employee_ids": {
            "type": "array",
            "description": "Alți specialiști"
          }
        }
      },
      "appointments_input": {
        "type": "object",
        "properties": {
          "party_id": {
            "type": "string",
            "format": "uuid",
            "description": "Client"
          },
          "location_id": {
            "type": "string",
            "format": "uuid",
            "description": "Locație"
          },
          "resource_id": {
            "type": "string",
            "format": "uuid",
            "description": "Resursă"
          },
          "employee_id": {
            "type": "string",
            "format": "uuid",
            "description": "Specialist"
          },
          "appointment_type_id": {
            "type": "string",
            "format": "uuid",
            "description": "Serviciu"
          },
          "starts_at": {
            "type": "string",
            "format": "date-time",
            "description": "Început"
          },
          "ends_at": {
            "type": "string",
            "format": "date-time",
            "description": "Sfârșit"
          },
          "status": {
            "type": "string",
            "enum": [
              "requested",
              "rejected",
              "scheduled",
              "confirmed",
              "arrived",
              "in_progress",
              "completed",
              "no_show",
              "cancelled",
              "rescheduled"
            ],
            "description": "Status"
          },
          "notes": {
            "type": "string",
            "description": "Observații"
          },
          "cancel_reason": {
            "type": "string",
            "description": "Detalii anulare"
          },
          "cancel_reason_code": {
            "type": "string",
            "enum": [
              "client_request",
              "staff_request",
              "unavailable",
              "resource_issue",
              "no_contact",
              "late",
              "other"
            ],
            "description": "Motiv anulare / neprezentare"
          },
          "delivery_mode": {
            "type": "string",
            "enum": [
              "on_site",
              "video",
              "phone"
            ],
            "description": "Cum se desfășoară"
          },
          "insurer_id": {
            "type": "string",
            "format": "uuid",
            "description": "Asigurator"
          },
          "meet_url": {
            "type": "string",
            "format": "uri",
            "description": "Link Meet"
          },
          "co_employee_ids": {
            "type": "array",
            "description": "Alți specialiști"
          }
        },
        "required": [
          "party_id",
          "starts_at",
          "ends_at"
        ]
      },
      "resources": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "location_id": {
            "type": "string",
            "format": "uuid",
            "description": "Locație"
          },
          "name": {
            "type": "string",
            "description": "Denumire"
          },
          "resource_type": {
            "type": "string",
            "enum": [
              "chair",
              "room",
              "equipment",
              "generic"
            ],
            "description": "Tip"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "custom_fields": {
            "type": "object",
            "description": "Câmpurile personalizate ale companiei, ca obiect cheie-valoare (vezi „Câmpuri personalizate”).",
            "properties": {}
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "code": {
            "type": "string",
            "description": "Cod"
          },
          "description": {
            "type": "string",
            "description": "Descriere"
          },
          "access_mode": {
            "type": "string",
            "enum": [
              "open",
              "assigned"
            ],
            "description": "Cine o poate folosi"
          },
          "used_by": {
            "type": "string"
          },
          "accommodation_type_id": {
            "type": "string",
            "format": "uuid"
          },
          "cleaning_state": {
            "type": "string"
          }
        }
      },
      "resources_input": {
        "type": "object",
        "properties": {
          "location_id": {
            "type": "string",
            "format": "uuid",
            "description": "Locație"
          },
          "name": {
            "type": "string",
            "description": "Denumire"
          },
          "resource_type": {
            "type": "string",
            "enum": [
              "chair",
              "room",
              "equipment",
              "generic"
            ],
            "description": "Tip"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "code": {
            "type": "string",
            "description": "Cod"
          },
          "description": {
            "type": "string",
            "description": "Descriere"
          },
          "access_mode": {
            "type": "string",
            "enum": [
              "open",
              "assigned"
            ],
            "description": "Cine o poate folosi"
          }
        },
        "required": [
          "name"
        ]
      },
      "services": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string",
            "description": "Denumire"
          },
          "duration_minutes": {
            "type": "number",
            "description": "Durată (minute)"
          },
          "color": {
            "type": "string",
            "description": "Culoare în calendar"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "custom_fields": {
            "type": "object",
            "description": "Câmpurile personalizate ale companiei, ca obiect cheie-valoare (vezi „Câmpuri personalizate”).",
            "properties": {}
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "description": {
            "type": "string",
            "description": "Descriere"
          },
          "category": {
            "type": "string",
            "description": "Categorie"
          },
          "price": {
            "type": "number",
            "description": "Preț standard (fără TVA)"
          },
          "buffer_after_minutes": {
            "type": "number",
            "description": "Pauză după (minute, gol = implicit)"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "buffer_before_minutes": {
            "type": "number",
            "description": "Pauză înainte (minute, gol = implicit)"
          },
          "setup_minutes": {
            "type": "number",
            "description": "Pregătire resursă (minute)"
          },
          "cleanup_minutes": {
            "type": "number",
            "description": "Curățare resursă (minute)"
          },
          "support_note": {
            "type": "string",
            "description": "Cine pregătește / curăță"
          },
          "vat_rate": {
            "type": "number",
            "description": "TVA (%)"
          },
          "service_code": {
            "type": "string",
            "description": "Cod serviciu"
          },
          "bookable_online": {
            "type": "boolean",
            "description": "Se poate rezerva online"
          },
          "approval_mode": {
            "type": "string",
            "enum": [
              "default",
              "auto",
              "manual"
            ],
            "description": "Confirmarea rezervărilor online"
          },
          "cancel_before_hours": {
            "type": "number",
            "description": "Anulare / mutare online cu cel puțin (ore înainte, gol = setarea companiei)"
          },
          "image_key": {
            "type": "string"
          },
          "resource_types": {
            "type": "array"
          },
          "invoice_label": {
            "type": "string",
            "description": "Denumire pe factură (gol = denumirea serviciului)"
          },
          "online_meeting": {
            "type": "boolean",
            "description": "Link Meet pe programare (cere calendarul Google al specialistului)"
          },
          "delivery_mode": {
            "type": "string",
            "enum": [
              "on_site",
              "video",
              "phone"
            ],
            "description": "Cum se desfășoară"
          },
          "invite_client": {
            "type": "boolean",
            "description": "Invită clientul în evenimentul din Google Calendar (primește invitația pe email)"
          },
          "all_specialists": {
            "type": "boolean",
            "description": "La rezervările online intră toți specialiștii serviciului liberi la acea oră (nu doar unul)"
          }
        }
      },
      "services_input": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Denumire"
          },
          "duration_minutes": {
            "type": "number",
            "description": "Durată (minute)"
          },
          "color": {
            "type": "string",
            "description": "Culoare în calendar"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "description": {
            "type": "string",
            "description": "Descriere"
          },
          "category": {
            "type": "string",
            "description": "Categorie"
          },
          "price": {
            "type": "number",
            "description": "Preț standard (fără TVA)"
          },
          "buffer_after_minutes": {
            "type": "number",
            "description": "Pauză după (minute, gol = implicit)"
          },
          "buffer_before_minutes": {
            "type": "number",
            "description": "Pauză înainte (minute, gol = implicit)"
          },
          "setup_minutes": {
            "type": "number",
            "description": "Pregătire resursă (minute)"
          },
          "cleanup_minutes": {
            "type": "number",
            "description": "Curățare resursă (minute)"
          },
          "support_note": {
            "type": "string",
            "description": "Cine pregătește / curăță"
          },
          "vat_rate": {
            "type": "number",
            "description": "TVA (%)"
          },
          "service_code": {
            "type": "string",
            "description": "Cod serviciu"
          },
          "bookable_online": {
            "type": "boolean",
            "description": "Se poate rezerva online"
          },
          "approval_mode": {
            "type": "string",
            "enum": [
              "default",
              "auto",
              "manual"
            ],
            "description": "Confirmarea rezervărilor online"
          },
          "cancel_before_hours": {
            "type": "number",
            "description": "Anulare / mutare online cu cel puțin (ore înainte, gol = setarea companiei)"
          },
          "invoice_label": {
            "type": "string",
            "description": "Denumire pe factură (gol = denumirea serviciului)"
          },
          "online_meeting": {
            "type": "boolean",
            "description": "Link Meet pe programare (cere calendarul Google al specialistului)"
          },
          "delivery_mode": {
            "type": "string",
            "enum": [
              "on_site",
              "video",
              "phone"
            ],
            "description": "Cum se desfășoară"
          },
          "invite_client": {
            "type": "boolean",
            "description": "Invită clientul în evenimentul din Google Calendar (primește invitația pe email)"
          },
          "all_specialists": {
            "type": "boolean",
            "description": "La rezervările online intră toți specialiștii serviciului liberi la acea oră (nu doar unul)"
          }
        },
        "required": [
          "name",
          "duration_minutes"
        ]
      },
      "products": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "sku": {
            "type": "string",
            "description": "Cod (SKU)"
          },
          "name": {
            "type": "string",
            "description": "Denumire"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "custom_fields": {
            "type": "object",
            "description": "Câmpurile personalizate ale companiei, ca obiect cheie-valoare (vezi „Câmpuri personalizate”).",
            "properties": {}
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "category": {
            "type": "string",
            "description": "Categorie"
          },
          "unit": {
            "type": "string",
            "enum": [
              "buc",
              "set",
              "cutie",
              "pachet",
              "ml",
              "l",
              "g",
              "kg",
              "m"
            ],
            "description": "Unitate de măsură"
          },
          "barcode": {
            "type": "string",
            "description": "Cod de bare"
          },
          "brand": {
            "type": "string",
            "description": "Producător"
          },
          "description": {
            "type": "string",
            "description": "Descriere"
          },
          "min_stock": {
            "type": "number",
            "description": "Stoc minim (alertă)"
          },
          "reorder_qty": {
            "type": "number",
            "description": "Cantitate de reaprovizionare"
          },
          "track_lots": {
            "type": "boolean",
            "description": "Urmărește loturi și date de expirare"
          },
          "avg_cost": {
            "type": "number"
          },
          "sale_price": {
            "type": "number",
            "description": "Preț normal (fără TVA)"
          },
          "vat_rate": {
            "type": "number",
            "description": "TVA (%)"
          },
          "is_stockable": {
            "type": "boolean",
            "description": "Are evidență de stoc"
          },
          "preferred_supplier_id": {
            "type": "string",
            "format": "uuid",
            "description": "Furnizor preferat"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "purchase_unit": {
            "type": "string",
            "description": "Unitate de achiziție (ex. cutie)"
          },
          "purchase_factor": {
            "type": "number",
            "description": "Unități de stoc într-o unitate de achiziție (ex. 100)"
          },
          "kind": {
            "type": "string",
            "enum": [
              "consumable",
              "resale",
              "both"
            ],
            "description": "Tip"
          },
          "parent_product_id": {
            "type": "string",
            "format": "uuid"
          },
          "variant_options": {
            "type": "object"
          },
          "weight_grams": {
            "type": "number",
            "description": "Greutate (g)"
          },
          "length_mm": {
            "type": "number",
            "description": "Lungime (mm)"
          },
          "width_mm": {
            "type": "number",
            "description": "Lățime (mm)"
          },
          "height_mm": {
            "type": "number",
            "description": "Înălțime (mm)"
          },
          "allow_backorder": {
            "type": "boolean",
            "description": "Permite backorder (comandă fără stoc)"
          },
          "is_kit": {
            "type": "boolean",
            "description": "Kit (compus din alte produse)"
          },
          "returnable": {
            "type": "boolean",
            "description": "Returnabil"
          },
          "has_variants": {
            "type": "boolean",
            "description": "Produs cu variante (prețul se setează pe fiecare variantă)"
          },
          "online_availability": {
            "type": "string",
            "enum": [
              "in_stock",
              "out_of_stock",
              "preorder"
            ],
            "description": "Disponibilitate în magazin"
          },
          "stock_type": {
            "type": "string",
            "enum": [
              "goods",
              "raw_materials",
              "consumables",
              "inventory_items",
              "finished_goods",
              "semi_finished",
              "packaging"
            ],
            "description": "Tip de stoc (cont)"
          },
          "nc_code": {
            "type": "string",
            "description": "Cod NC (vamal)"
          },
          "profile_data": {
            "type": "object"
          }
        }
      },
      "products_input": {
        "type": "object",
        "properties": {
          "sku": {
            "type": "string",
            "description": "Cod (SKU)"
          },
          "name": {
            "type": "string",
            "description": "Denumire"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "category": {
            "type": "string",
            "description": "Categorie"
          },
          "unit": {
            "type": "string",
            "enum": [
              "buc",
              "set",
              "cutie",
              "pachet",
              "ml",
              "l",
              "g",
              "kg",
              "m"
            ],
            "description": "Unitate de măsură"
          },
          "barcode": {
            "type": "string",
            "description": "Cod de bare"
          },
          "brand": {
            "type": "string",
            "description": "Producător"
          },
          "description": {
            "type": "string",
            "description": "Descriere"
          },
          "min_stock": {
            "type": "number",
            "description": "Stoc minim (alertă)"
          },
          "reorder_qty": {
            "type": "number",
            "description": "Cantitate de reaprovizionare"
          },
          "track_lots": {
            "type": "boolean",
            "description": "Urmărește loturi și date de expirare"
          },
          "sale_price": {
            "type": "number",
            "description": "Preț normal (fără TVA)"
          },
          "vat_rate": {
            "type": "number",
            "description": "TVA (%)"
          },
          "is_stockable": {
            "type": "boolean",
            "description": "Are evidență de stoc"
          },
          "preferred_supplier_id": {
            "type": "string",
            "format": "uuid",
            "description": "Furnizor preferat"
          },
          "purchase_unit": {
            "type": "string",
            "description": "Unitate de achiziție (ex. cutie)"
          },
          "purchase_factor": {
            "type": "number",
            "description": "Unități de stoc într-o unitate de achiziție (ex. 100)"
          },
          "kind": {
            "type": "string",
            "enum": [
              "consumable",
              "resale",
              "both"
            ],
            "description": "Tip"
          },
          "weight_grams": {
            "type": "number",
            "description": "Greutate (g)"
          },
          "length_mm": {
            "type": "number",
            "description": "Lungime (mm)"
          },
          "width_mm": {
            "type": "number",
            "description": "Lățime (mm)"
          },
          "height_mm": {
            "type": "number",
            "description": "Înălțime (mm)"
          },
          "allow_backorder": {
            "type": "boolean",
            "description": "Permite backorder (comandă fără stoc)"
          },
          "is_kit": {
            "type": "boolean",
            "description": "Kit (compus din alte produse)"
          },
          "returnable": {
            "type": "boolean",
            "description": "Returnabil"
          },
          "has_variants": {
            "type": "boolean",
            "description": "Produs cu variante (prețul se setează pe fiecare variantă)"
          },
          "online_availability": {
            "type": "string",
            "enum": [
              "in_stock",
              "out_of_stock",
              "preorder"
            ],
            "description": "Disponibilitate în magazin"
          },
          "stock_type": {
            "type": "string",
            "enum": [
              "goods",
              "raw_materials",
              "consumables",
              "inventory_items",
              "finished_goods",
              "semi_finished",
              "packaging"
            ],
            "description": "Tip de stoc (cont)"
          },
          "nc_code": {
            "type": "string",
            "description": "Cod NC (vamal)"
          }
        },
        "required": [
          "name"
        ]
      },
      "warehouses": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string",
            "description": "Denumire"
          },
          "code": {
            "type": "string",
            "description": "Cod"
          },
          "kind": {
            "type": "string",
            "enum": [
              "main",
              "consumption",
              "mobile",
              "quarantine"
            ],
            "description": "Tip"
          },
          "location_id": {
            "type": "string",
            "format": "uuid",
            "description": "Locație"
          },
          "responsible_employee_id": {
            "type": "string",
            "format": "uuid",
            "description": "Responsabil"
          },
          "is_default": {
            "type": "boolean",
            "description": "Depozit implicit (intrări și consum)"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "note": {
            "type": "string",
            "description": "Observații"
          },
          "custom_fields": {
            "type": "object",
            "description": "Câmpurile personalizate ale companiei, ca obiect cheie-valoare (vezi „Câmpuri personalizate”).",
            "properties": {}
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "sell_online": {
            "type": "boolean"
          },
          "legal_entity_id": {
            "type": "string",
            "format": "uuid",
            "description": "Firmă (gestiunea contabilă)"
          },
          "stock_account": {
            "type": "string",
            "description": "Cont de stoc propriu (ex. 371.01)"
          },
          "valuation": {
            "type": "string",
            "enum": [
              "cost",
              "retail"
            ],
            "description": "Evidență (gestiunea contabilă)"
          }
        }
      },
      "warehouses_input": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Denumire"
          },
          "code": {
            "type": "string",
            "description": "Cod"
          },
          "kind": {
            "type": "string",
            "enum": [
              "main",
              "consumption",
              "mobile",
              "quarantine"
            ],
            "description": "Tip"
          },
          "location_id": {
            "type": "string",
            "format": "uuid",
            "description": "Locație"
          },
          "responsible_employee_id": {
            "type": "string",
            "format": "uuid",
            "description": "Responsabil"
          },
          "is_default": {
            "type": "boolean",
            "description": "Depozit implicit (intrări și consum)"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "note": {
            "type": "string",
            "description": "Observații"
          },
          "legal_entity_id": {
            "type": "string",
            "format": "uuid",
            "description": "Firmă (gestiunea contabilă)"
          },
          "stock_account": {
            "type": "string",
            "description": "Cont de stoc propriu (ex. 371.01)"
          },
          "valuation": {
            "type": "string",
            "enum": [
              "cost",
              "retail"
            ],
            "description": "Evidență (gestiunea contabilă)"
          }
        },
        "required": [
          "name"
        ]
      },
      "suppliers": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string",
            "description": "Denumire"
          },
          "cui": {
            "type": "string",
            "description": "CUI"
          },
          "nr_reg_com": {
            "type": "string",
            "description": "Nr. Reg. Com."
          },
          "platitor_tva": {
            "type": "boolean",
            "description": "Plătitor de TVA"
          },
          "adresa": {
            "type": "string",
            "description": "Adresă"
          },
          "localitate": {
            "type": "string",
            "description": "Localitate"
          },
          "judet": {
            "type": "string",
            "description": "Județ"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Email (comenzi)"
          },
          "phone": {
            "type": "string",
            "description": "Telefon"
          },
          "website": {
            "type": "string",
            "format": "uri",
            "description": "Website"
          },
          "contact_name": {
            "type": "string",
            "description": "Persoană de contact"
          },
          "iban": {
            "type": "string",
            "description": "IBAN"
          },
          "bank": {
            "type": "string",
            "description": "Banca"
          },
          "payment_terms_days": {
            "type": "number",
            "description": "Termen de plată (zile)"
          },
          "lead_time_days": {
            "type": "number",
            "description": "Termen de livrare (zile)"
          },
          "min_order_value": {
            "type": "number",
            "description": "Comandă minimă (lei)"
          },
          "rating": {
            "type": "number",
            "description": "Evaluare (1–5)"
          },
          "notes": {
            "type": "string",
            "description": "Observații"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "custom_fields": {
            "type": "object",
            "description": "Câmpurile personalizate ale companiei, ca obiect cheie-valoare (vezi „Câmpuri personalizate”).",
            "properties": {}
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "suppliers_input": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Denumire"
          },
          "cui": {
            "type": "string",
            "description": "CUI"
          },
          "nr_reg_com": {
            "type": "string",
            "description": "Nr. Reg. Com."
          },
          "platitor_tva": {
            "type": "boolean",
            "description": "Plătitor de TVA"
          },
          "adresa": {
            "type": "string",
            "description": "Adresă"
          },
          "localitate": {
            "type": "string",
            "description": "Localitate"
          },
          "judet": {
            "type": "string",
            "description": "Județ"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Email (comenzi)"
          },
          "phone": {
            "type": "string",
            "description": "Telefon"
          },
          "website": {
            "type": "string",
            "format": "uri",
            "description": "Website"
          },
          "contact_name": {
            "type": "string",
            "description": "Persoană de contact"
          },
          "iban": {
            "type": "string",
            "description": "IBAN"
          },
          "bank": {
            "type": "string",
            "description": "Banca"
          },
          "payment_terms_days": {
            "type": "number",
            "description": "Termen de plată (zile)"
          },
          "lead_time_days": {
            "type": "number",
            "description": "Termen de livrare (zile)"
          },
          "min_order_value": {
            "type": "number",
            "description": "Comandă minimă (lei)"
          },
          "rating": {
            "type": "number",
            "description": "Evaluare (1–5)"
          },
          "notes": {
            "type": "string",
            "description": "Observații"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          }
        },
        "required": [
          "name"
        ]
      },
      "employees": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "location_id": {
            "type": "string",
            "format": "uuid",
            "description": "Locație principală"
          },
          "job_title": {
            "type": "string",
            "description": "Funcție"
          },
          "hire_date": {
            "type": "string",
            "format": "date",
            "description": "Data angajării"
          },
          "terminate_date": {
            "type": "string",
            "format": "date",
            "description": "Data încetării"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "custom_fields": {
            "type": "object",
            "description": "Câmpurile personalizate ale companiei, ca obiect cheie-valoare (vezi „Câmpuri personalizate”).",
            "properties": {}
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "full_name": {
            "type": "string",
            "description": "Nume complet"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Email"
          },
          "phone": {
            "type": "string",
            "description": "Telefon"
          },
          "payload_user_id": {
            "type": "string",
            "format": "uuid",
            "description": "Cont de login"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "photo_key": {
            "type": "string"
          },
          "accepts_clients": {
            "type": "boolean",
            "description": "Primește clienți la programări (poate fi rezervat)"
          },
          "max_parallel": {
            "type": "integer"
          },
          "department_id": {
            "type": "string",
            "format": "uuid",
            "description": "Departament"
          },
          "manager_id": {
            "type": "string",
            "format": "uuid",
            "description": "Superior ierarhic"
          }
        }
      },
      "employees_input": {
        "type": "object",
        "properties": {
          "location_id": {
            "type": "string",
            "format": "uuid",
            "description": "Locație principală"
          },
          "job_title": {
            "type": "string",
            "description": "Funcție"
          },
          "hire_date": {
            "type": "string",
            "format": "date",
            "description": "Data angajării"
          },
          "terminate_date": {
            "type": "string",
            "format": "date",
            "description": "Data încetării"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "full_name": {
            "type": "string",
            "description": "Nume complet"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Email"
          },
          "phone": {
            "type": "string",
            "description": "Telefon"
          },
          "payload_user_id": {
            "type": "string",
            "format": "uuid",
            "description": "Cont de login"
          },
          "accepts_clients": {
            "type": "boolean",
            "description": "Primește clienți la programări (poate fi rezervat)"
          },
          "department_id": {
            "type": "string",
            "format": "uuid",
            "description": "Departament"
          },
          "manager_id": {
            "type": "string",
            "format": "uuid",
            "description": "Superior ierarhic"
          }
        },
        "required": [
          "full_name"
        ]
      },
      "projects": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "party_id": {
            "type": "string",
            "format": "uuid",
            "description": "Client"
          },
          "location_id": {
            "type": "string",
            "format": "uuid",
            "description": "Locație"
          },
          "title": {
            "type": "string",
            "description": "Titlu"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "on_hold",
              "done",
              "cancelled"
            ],
            "description": "Status"
          },
          "custom_fields": {
            "type": "object",
            "description": "Câmpurile personalizate ale companiei, ca obiect cheie-valoare (vezi „Câmpuri personalizate”).",
            "properties": {}
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "code": {
            "type": "string",
            "description": "Cod"
          },
          "description": {
            "type": "string",
            "description": "Descriere"
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "normal",
              "high",
              "urgent"
            ],
            "description": "Prioritate"
          },
          "start_date": {
            "type": "string",
            "format": "date",
            "description": "Început"
          },
          "end_date": {
            "type": "string",
            "format": "date",
            "description": "Sfârșit estimat"
          },
          "budget": {
            "type": "number",
            "description": "Valoare / buget"
          },
          "created_by": {
            "type": "string"
          },
          "recurrence": {
            "type": "object"
          },
          "recurrence_next": {
            "type": "string",
            "format": "date"
          },
          "recurrence_parent": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "projects_input": {
        "type": "object",
        "properties": {
          "party_id": {
            "type": "string",
            "format": "uuid",
            "description": "Client"
          },
          "location_id": {
            "type": "string",
            "format": "uuid",
            "description": "Locație"
          },
          "title": {
            "type": "string",
            "description": "Titlu"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "on_hold",
              "done",
              "cancelled"
            ],
            "description": "Status"
          },
          "code": {
            "type": "string",
            "description": "Cod"
          },
          "description": {
            "type": "string",
            "description": "Descriere"
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "normal",
              "high",
              "urgent"
            ],
            "description": "Prioritate"
          },
          "start_date": {
            "type": "string",
            "format": "date",
            "description": "Început"
          },
          "end_date": {
            "type": "string",
            "format": "date",
            "description": "Sfârșit estimat"
          },
          "budget": {
            "type": "number",
            "description": "Valoare / buget"
          }
        },
        "required": [
          "title"
        ]
      },
      "contracts": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "number": {
            "type": "string"
          },
          "title": {
            "type": "string",
            "description": "Titlu"
          },
          "kind": {
            "type": "string",
            "enum": [
              "client",
              "supplier",
              "employee",
              "other"
            ],
            "description": "Tip"
          },
          "party_id": {
            "type": "string",
            "format": "uuid",
            "description": "Client"
          },
          "supplier_id": {
            "type": "string",
            "format": "uuid",
            "description": "Furnizor"
          },
          "employee_id": {
            "type": "string",
            "format": "uuid",
            "description": "Angajat"
          },
          "counterparty": {
            "type": "string",
            "description": "Altă parte contractantă"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "expired",
              "terminated"
            ],
            "description": "Status"
          },
          "start_date": {
            "type": "string",
            "format": "date",
            "description": "Început"
          },
          "end_date": {
            "type": "string",
            "format": "date",
            "description": "Sfârșit"
          },
          "auto_renew": {
            "type": "boolean",
            "description": "Reînnoire automată"
          },
          "renew_months": {
            "type": "number",
            "description": "Reînnoire (luni)"
          },
          "notice_days": {
            "type": "number",
            "description": "Preaviz (zile)"
          },
          "value": {
            "type": "number",
            "description": "Valoare"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "billing_period": {
            "type": "string",
            "enum": [
              "one_time",
              "monthly",
              "quarterly",
              "yearly"
            ],
            "description": "Facturare"
          },
          "description": {
            "type": "string",
            "description": "Descriere"
          },
          "terminated_at": {
            "type": "string",
            "format": "date"
          },
          "terminated_reason": {
            "type": "string"
          },
          "expiry_notified_at": {
            "type": "string",
            "format": "date-time"
          },
          "custom_fields": {
            "type": "object",
            "description": "Câmpurile personalizate ale companiei, ca obiect cheie-valoare (vezi „Câmpuri personalizate”).",
            "properties": {}
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "legal_entity_id": {
            "type": "string",
            "format": "uuid",
            "description": "Firmă"
          },
          "billing_day": {
            "type": "integer"
          },
          "billing_day_end": {
            "type": "integer"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "contracts_input": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Titlu"
          },
          "kind": {
            "type": "string",
            "enum": [
              "client",
              "supplier",
              "employee",
              "other"
            ],
            "description": "Tip"
          },
          "party_id": {
            "type": "string",
            "format": "uuid",
            "description": "Client"
          },
          "supplier_id": {
            "type": "string",
            "format": "uuid",
            "description": "Furnizor"
          },
          "employee_id": {
            "type": "string",
            "format": "uuid",
            "description": "Angajat"
          },
          "counterparty": {
            "type": "string",
            "description": "Altă parte contractantă"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "expired",
              "terminated"
            ],
            "description": "Status"
          },
          "start_date": {
            "type": "string",
            "format": "date",
            "description": "Început"
          },
          "end_date": {
            "type": "string",
            "format": "date",
            "description": "Sfârșit"
          },
          "auto_renew": {
            "type": "boolean",
            "description": "Reînnoire automată"
          },
          "renew_months": {
            "type": "number",
            "description": "Reînnoire (luni)"
          },
          "notice_days": {
            "type": "number",
            "description": "Preaviz (zile)"
          },
          "value": {
            "type": "number",
            "description": "Valoare"
          },
          "billing_period": {
            "type": "string",
            "enum": [
              "one_time",
              "monthly",
              "quarterly",
              "yearly"
            ],
            "description": "Facturare"
          },
          "description": {
            "type": "string",
            "description": "Descriere"
          },
          "legal_entity_id": {
            "type": "string",
            "format": "uuid",
            "description": "Firmă"
          }
        },
        "required": [
          "title",
          "kind",
          "legal_entity_id"
        ]
      },
      "expenses": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "cost_center_id": {
            "type": "string",
            "format": "uuid",
            "description": "Centru de cost"
          },
          "title": {
            "type": "string",
            "description": "Descriere"
          },
          "amount": {
            "type": "number",
            "description": "Sumă (RON)"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "spent_at": {
            "type": "string",
            "format": "date",
            "description": "Data"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "Proiect"
          },
          "vendor": {
            "type": "string",
            "description": "Furnizor / beneficiar"
          },
          "note": {
            "type": "string",
            "description": "Notă"
          },
          "created_by": {
            "type": "string"
          },
          "category": {
            "type": "string",
            "description": "Categorie"
          },
          "payment_method": {
            "type": "string",
            "enum": [
              "transfer",
              "cash",
              "card",
              "other"
            ],
            "description": "Plată"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "custom_fields": {
            "type": "object",
            "description": "Câmpurile personalizate ale companiei, ca obiect cheie-valoare (vezi „Câmpuri personalizate”).",
            "properties": {}
          },
          "legal_entity_id": {
            "type": "string",
            "format": "uuid",
            "description": "Firmă"
          },
          "vat_amount": {
            "type": "number",
            "description": "Din care TVA"
          }
        }
      },
      "expenses_input": {
        "type": "object",
        "properties": {
          "cost_center_id": {
            "type": "string",
            "format": "uuid",
            "description": "Centru de cost"
          },
          "title": {
            "type": "string",
            "description": "Descriere"
          },
          "amount": {
            "type": "number",
            "description": "Sumă (RON)"
          },
          "spent_at": {
            "type": "string",
            "format": "date",
            "description": "Data"
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "Proiect"
          },
          "vendor": {
            "type": "string",
            "description": "Furnizor / beneficiar"
          },
          "note": {
            "type": "string",
            "description": "Notă"
          },
          "category": {
            "type": "string",
            "description": "Categorie"
          },
          "payment_method": {
            "type": "string",
            "enum": [
              "transfer",
              "cash",
              "card",
              "other"
            ],
            "description": "Plată"
          },
          "legal_entity_id": {
            "type": "string",
            "format": "uuid",
            "description": "Firmă"
          },
          "vat_amount": {
            "type": "number",
            "description": "Din care TVA"
          }
        },
        "required": [
          "title",
          "amount",
          "spent_at",
          "legal_entity_id"
        ]
      },
      "cost_centers": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string",
            "description": "Denumire"
          },
          "location_id": {
            "type": "string",
            "format": "uuid",
            "description": "Locație"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "code": {
            "type": "string",
            "description": "Cod"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "custom_fields": {
            "type": "object",
            "description": "Câmpurile personalizate ale companiei, ca obiect cheie-valoare (vezi „Câmpuri personalizate”).",
            "properties": {}
          }
        }
      },
      "cost_centers_input": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Denumire"
          },
          "location_id": {
            "type": "string",
            "format": "uuid",
            "description": "Locație"
          },
          "code": {
            "type": "string",
            "description": "Cod"
          }
        },
        "required": [
          "name"
        ]
      },
      "fiscal_registers": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string",
            "description": "Denumire"
          },
          "location_id": {
            "type": "string",
            "format": "uuid",
            "description": "Locație"
          },
          "driver": {
            "type": "string",
            "enum": [
              "fiscalnet",
              "fisco",
              "datecs"
            ],
            "description": "Driver"
          },
          "delivery": {
            "type": "string",
            "enum": [
              "file",
              "http"
            ],
            "description": "Trimitere"
          },
          "file_name": {
            "type": "string",
            "description": "Numele fișierului ({nr} sau %COD_BON_FISCAL = numărul bonului)"
          },
          "http_url": {
            "type": "string",
            "description": "Adresa driverului (gol = implicită)"
          },
          "department": {
            "type": "number",
            "description": "Departament"
          },
          "vat_group_standard": {
            "type": "number",
            "description": "Grupa TVA standard (21%)"
          },
          "vat_group_reduced": {
            "type": "number",
            "description": "Grupa TVA redusă (11%)"
          },
          "vat_group_exempt": {
            "type": "number",
            "description": "Grupa scutit de TVA"
          },
          "pay_code_cash": {
            "type": "number",
            "description": "Cod plată numerar (gol = implicit)"
          },
          "pay_code_card": {
            "type": "number",
            "description": "Cod plată card (gol = implicit)"
          },
          "name_max": {
            "type": "number",
            "description": "Lungimea denumirii pe bon"
          },
          "print_diacritics": {
            "type": "boolean",
            "description": "Diacritice pe bon"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "custom_fields": {
            "type": "object",
            "description": "Câmpurile personalizate ale companiei, ca obiect cheie-valoare (vezi „Câmpuri personalizate”).",
            "properties": {}
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "code": {
            "type": "string",
            "description": "Cod casă (în numele fișierului: {casa})"
          },
          "promo_message": {
            "type": "string",
            "description": "Mesaj la finalul bonului"
          },
          "show_discount": {
            "type": "boolean",
            "description": "Reducerea pe rând separat"
          },
          "group_items": {
            "type": "boolean",
            "description": "Grupează serviciile identice"
          }
        }
      },
      "fiscal_registers_input": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Denumire"
          },
          "location_id": {
            "type": "string",
            "format": "uuid",
            "description": "Locație"
          },
          "driver": {
            "type": "string",
            "enum": [
              "fiscalnet",
              "fisco",
              "datecs"
            ],
            "description": "Driver"
          },
          "delivery": {
            "type": "string",
            "enum": [
              "file",
              "http"
            ],
            "description": "Trimitere"
          },
          "file_name": {
            "type": "string",
            "description": "Numele fișierului ({nr} sau %COD_BON_FISCAL = numărul bonului)"
          },
          "http_url": {
            "type": "string",
            "description": "Adresa driverului (gol = implicită)"
          },
          "department": {
            "type": "number",
            "description": "Departament"
          },
          "vat_group_standard": {
            "type": "number",
            "description": "Grupa TVA standard (21%)"
          },
          "vat_group_reduced": {
            "type": "number",
            "description": "Grupa TVA redusă (11%)"
          },
          "vat_group_exempt": {
            "type": "number",
            "description": "Grupa scutit de TVA"
          },
          "pay_code_cash": {
            "type": "number",
            "description": "Cod plată numerar (gol = implicit)"
          },
          "pay_code_card": {
            "type": "number",
            "description": "Cod plată card (gol = implicit)"
          },
          "name_max": {
            "type": "number",
            "description": "Lungimea denumirii pe bon"
          },
          "print_diacritics": {
            "type": "boolean",
            "description": "Diacritice pe bon"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "code": {
            "type": "string",
            "description": "Cod casă (în numele fișierului: {casa})"
          },
          "promo_message": {
            "type": "string",
            "description": "Mesaj la finalul bonului"
          },
          "show_discount": {
            "type": "boolean",
            "description": "Reducerea pe rând separat"
          },
          "group_items": {
            "type": "boolean",
            "description": "Grupează serviciile identice"
          }
        },
        "required": [
          "name",
          "driver",
          "delivery"
        ]
      },
      "time_cards": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "employee_id": {
            "type": "string",
            "format": "uuid",
            "description": "Angajat"
          },
          "code": {
            "type": "string",
            "description": "Codul cartelei"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "note": {
            "type": "string",
            "description": "Notă"
          },
          "last_scan_at": {
            "type": "string",
            "format": "date-time"
          },
          "custom_fields": {
            "type": "object",
            "description": "Câmpurile personalizate ale companiei, ca obiect cheie-valoare (vezi „Câmpuri personalizate”).",
            "properties": {}
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "time_cards_input": {
        "type": "object",
        "properties": {
          "employee_id": {
            "type": "string",
            "format": "uuid",
            "description": "Angajat"
          },
          "code": {
            "type": "string",
            "description": "Codul cartelei"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "note": {
            "type": "string",
            "description": "Notă"
          }
        },
        "required": [
          "employee_id",
          "code"
        ]
      },
      "budgets": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "cost_center_id": {
            "type": "string",
            "format": "uuid",
            "description": "Centru de cost"
          },
          "name": {
            "type": "string",
            "description": "Denumire"
          },
          "amount": {
            "type": "number",
            "description": "Buget (RON)"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "period_start": {
            "type": "string",
            "format": "date",
            "description": "Început"
          },
          "period_end": {
            "type": "string",
            "format": "date",
            "description": "Sfârșit"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "category": {
            "type": "string",
            "description": "Categorie cheltuieli"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "custom_fields": {
            "type": "object",
            "description": "Câmpurile personalizate ale companiei, ca obiect cheie-valoare (vezi „Câmpuri personalizate”).",
            "properties": {}
          }
        }
      },
      "budgets_input": {
        "type": "object",
        "properties": {
          "cost_center_id": {
            "type": "string",
            "format": "uuid",
            "description": "Centru de cost"
          },
          "name": {
            "type": "string",
            "description": "Denumire"
          },
          "amount": {
            "type": "number",
            "description": "Buget (RON)"
          },
          "period_start": {
            "type": "string",
            "format": "date",
            "description": "Început"
          },
          "period_end": {
            "type": "string",
            "format": "date",
            "description": "Sfârșit"
          },
          "category": {
            "type": "string",
            "description": "Categorie cheltuieli"
          }
        },
        "required": [
          "name",
          "amount",
          "period_start",
          "period_end"
        ]
      },
      "job_postings": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string",
            "description": "Titlul postului"
          },
          "department": {
            "type": "string",
            "description": "Departament"
          },
          "location_id": {
            "type": "string",
            "format": "uuid",
            "description": "Locație"
          },
          "employment_type": {
            "type": "string",
            "enum": [
              "full_time",
              "part_time",
              "contract",
              "internship",
              "seasonal"
            ],
            "description": "Tip de angajare"
          },
          "work_mode": {
            "type": "string",
            "enum": [
              "onsite",
              "hybrid",
              "remote"
            ],
            "description": "Mod de lucru"
          },
          "description": {
            "type": "string",
            "description": "Descrierea postului"
          },
          "requirements": {
            "type": "string",
            "description": "Cerințe"
          },
          "benefits": {
            "type": "string",
            "description": "Beneficii"
          },
          "salary_min": {
            "type": "number",
            "description": "Salariu de la"
          },
          "salary_max": {
            "type": "number",
            "description": "Salariu până la"
          },
          "salary_currency": {
            "type": "string"
          },
          "show_salary": {
            "type": "boolean",
            "description": "Arată salariul public"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "open",
              "paused",
              "closed"
            ],
            "description": "Status"
          },
          "closes_at": {
            "type": "string",
            "format": "date",
            "description": "Aplicări până la"
          },
          "published_at": {
            "type": "string",
            "format": "date-time"
          },
          "questions": {
            "type": "object"
          },
          "custom_fields": {
            "type": "object",
            "description": "Câmpurile personalizate ale companiei, ca obiect cheie-valoare (vezi „Câmpuri personalizate”).",
            "properties": {}
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "team": {
            "type": "string",
            "description": "Echipa"
          },
          "level": {
            "type": "string",
            "description": "Nivel (ex. Junior, Senior)"
          },
          "positions": {
            "type": "number",
            "description": "Număr de posturi"
          },
          "apply_mode": {
            "type": "string",
            "enum": [
              "form",
              "external",
              "email"
            ],
            "description": "Cum se aplică"
          },
          "external_url": {
            "type": "string",
            "format": "uri",
            "description": "Link de aplicare (dacă aplicarea e pe alt site)"
          },
          "contact_email": {
            "type": "string",
            "format": "email",
            "description": "Email de contact (aplicare prin email)"
          },
          "internal_note": {
            "type": "string",
            "description": "Notă internă (nu se vede public)"
          },
          "featured": {
            "type": "boolean",
            "description": "Promovat (apare primul)"
          },
          "cover_url": {
            "type": "string",
            "format": "uri",
            "description": "Imagine de copertă (link)"
          },
          "sections": {
            "type": "object"
          },
          "form_key": {
            "type": "string"
          },
          "pipeline_key": {
            "type": "string"
          },
          "publish_at": {
            "type": "string",
            "format": "date-time",
            "description": "Publică automat la"
          },
          "visibility": {
            "type": "string",
            "enum": [
              "public",
              "unlisted"
            ],
            "description": "Vizibilitate"
          },
          "salary_period": {
            "type": "string",
            "enum": [
              "hour",
              "month",
              "year"
            ],
            "description": "Salariu pe"
          },
          "extra_location_ids": {
            "type": "array"
          },
          "hybrid_days": {
            "type": "number",
            "description": "Zile la birou (hibrid)"
          },
          "starts_at": {
            "type": "string",
            "format": "date",
            "description": "Data de început"
          },
          "seo": {
            "type": "object"
          },
          "tags": {
            "type": "array"
          }
        }
      },
      "job_postings_input": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Titlul postului"
          },
          "department": {
            "type": "string",
            "description": "Departament"
          },
          "location_id": {
            "type": "string",
            "format": "uuid",
            "description": "Locație"
          },
          "employment_type": {
            "type": "string",
            "enum": [
              "full_time",
              "part_time",
              "contract",
              "internship",
              "seasonal"
            ],
            "description": "Tip de angajare"
          },
          "work_mode": {
            "type": "string",
            "enum": [
              "onsite",
              "hybrid",
              "remote"
            ],
            "description": "Mod de lucru"
          },
          "description": {
            "type": "string",
            "description": "Descrierea postului"
          },
          "requirements": {
            "type": "string",
            "description": "Cerințe"
          },
          "benefits": {
            "type": "string",
            "description": "Beneficii"
          },
          "salary_min": {
            "type": "number",
            "description": "Salariu de la"
          },
          "salary_max": {
            "type": "number",
            "description": "Salariu până la"
          },
          "show_salary": {
            "type": "boolean",
            "description": "Arată salariul public"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "open",
              "paused",
              "closed"
            ],
            "description": "Status"
          },
          "closes_at": {
            "type": "string",
            "format": "date",
            "description": "Aplicări până la"
          },
          "team": {
            "type": "string",
            "description": "Echipa"
          },
          "level": {
            "type": "string",
            "description": "Nivel (ex. Junior, Senior)"
          },
          "positions": {
            "type": "number",
            "description": "Număr de posturi"
          },
          "apply_mode": {
            "type": "string",
            "enum": [
              "form",
              "external",
              "email"
            ],
            "description": "Cum se aplică"
          },
          "external_url": {
            "type": "string",
            "format": "uri",
            "description": "Link de aplicare (dacă aplicarea e pe alt site)"
          },
          "contact_email": {
            "type": "string",
            "format": "email",
            "description": "Email de contact (aplicare prin email)"
          },
          "internal_note": {
            "type": "string",
            "description": "Notă internă (nu se vede public)"
          },
          "featured": {
            "type": "boolean",
            "description": "Promovat (apare primul)"
          },
          "cover_url": {
            "type": "string",
            "format": "uri",
            "description": "Imagine de copertă (link)"
          },
          "publish_at": {
            "type": "string",
            "format": "date-time",
            "description": "Publică automat la"
          },
          "visibility": {
            "type": "string",
            "enum": [
              "public",
              "unlisted"
            ],
            "description": "Vizibilitate"
          },
          "salary_period": {
            "type": "string",
            "enum": [
              "hour",
              "month",
              "year"
            ],
            "description": "Salariu pe"
          },
          "hybrid_days": {
            "type": "number",
            "description": "Zile la birou (hibrid)"
          },
          "starts_at": {
            "type": "string",
            "format": "date",
            "description": "Data de început"
          }
        },
        "required": [
          "title",
          "employment_type",
          "work_mode",
          "status",
          "apply_mode",
          "visibility"
        ]
      },
      "org_units": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "parent_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "unit_type": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "org_units_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "location_hours": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "location_id": {
            "type": "string",
            "format": "uuid"
          },
          "weekday": {
            "type": "integer"
          },
          "open_time": {
            "type": "string",
            "format": "time"
          },
          "close_time": {
            "type": "string",
            "format": "time"
          },
          "min_staff": {
            "type": "integer"
          }
        }
      },
      "location_hours_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "waitlist": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "location_id": {
            "type": "string",
            "format": "uuid"
          },
          "appointment_type_id": {
            "type": "string",
            "format": "uuid"
          },
          "preferred_from": {
            "type": "string",
            "format": "date-time"
          },
          "preferred_to": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "service_ids": {
            "type": "array"
          },
          "contact": {
            "type": "object"
          },
          "note": {
            "type": "string"
          },
          "attribution": {
            "type": "object"
          },
          "notified_at": {
            "type": "string",
            "format": "date-time"
          },
          "notify_count": {
            "type": "integer"
          },
          "source": {
            "type": "string"
          }
        }
      },
      "waitlist_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "price_lists": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "is_default": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "sort_order": {
            "type": "integer"
          }
        }
      },
      "price_lists_input": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          }
        },
        "required": [
          "name"
        ]
      },
      "service_prices": {
        "type": "object",
        "properties": {
          "service_id": {
            "type": "string",
            "format": "uuid"
          },
          "price_list_id": {
            "type": "string",
            "format": "uuid"
          },
          "price": {
            "type": "number"
          }
        }
      },
      "service_prices_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "service_packages": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "service_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "sessions": {
            "type": "number"
          },
          "price": {
            "type": "number"
          },
          "interval_days": {
            "type": "number"
          },
          "valid_days": {
            "type": "number"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "service_packages_input": {
        "type": "object",
        "properties": {
          "service_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "sessions": {
            "type": "number"
          },
          "price": {
            "type": "number"
          },
          "interval_days": {
            "type": "number"
          },
          "valid_days": {
            "type": "number"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          }
        },
        "required": [
          "service_id",
          "name",
          "sessions"
        ]
      },
      "product_barcodes": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "factor": {
            "type": "number"
          },
          "label": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "product_barcodes_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "stock_movements": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "warehouse_id": {
            "type": "string",
            "format": "uuid"
          },
          "lot_id": {
            "type": "string"
          },
          "qty": {
            "type": "number"
          },
          "unit_cost": {
            "type": "number"
          },
          "kind": {
            "type": "string"
          },
          "ref_type": {
            "type": "string"
          },
          "ref_id": {
            "type": "string",
            "format": "uuid"
          },
          "transfer_id": {
            "type": "string",
            "format": "uuid"
          },
          "note": {
            "type": "string"
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "voided": {
            "type": "boolean"
          },
          "cost_fixed": {
            "type": "boolean"
          },
          "value_adj": {
            "type": "number"
          },
          "reverses_id": {
            "type": "string",
            "format": "uuid"
          },
          "retail_price": {
            "type": "number"
          },
          "retail_vat": {
            "type": "number"
          },
          "retail_adj": {
            "type": "number"
          },
          "from_warehouse_id": {
            "type": "string"
          },
          "to_warehouse_id": {
            "type": "string"
          },
          "counted": {
            "type": "number"
          },
          "lot_code": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "format": "date"
          }
        }
      },
      "stock_movements_input": {
        "type": "object",
        "properties": {
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "warehouse_id": {
            "type": "string",
            "format": "uuid"
          },
          "lot_id": {
            "type": "string"
          },
          "qty": {
            "type": "number"
          },
          "unit_cost": {
            "type": "number"
          },
          "kind": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "from_warehouse_id": {
            "type": "string"
          },
          "to_warehouse_id": {
            "type": "string"
          },
          "counted": {
            "type": "number"
          },
          "lot_code": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "format": "date"
          }
        },
        "required": [
          "product_id",
          "kind"
        ]
      },
      "stock_lots": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "lot_code": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "format": "date"
          },
          "received_at": {
            "type": "string",
            "format": "date"
          },
          "supplier_id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "status": {
            "type": "string"
          },
          "status_note": {
            "type": "string"
          },
          "status_at": {
            "type": "string",
            "format": "date-time"
          },
          "status_by": {
            "type": "string"
          }
        }
      },
      "stock_lots_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "supplier_contacts": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "supplier_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "supplier_contacts_input": {
        "type": "object",
        "properties": {
          "supplier_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          }
        },
        "required": [
          "supplier_id",
          "name"
        ]
      },
      "supplier_products": {
        "type": "object",
        "properties": {
          "supplier_id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "supplier_sku": {
            "type": "string"
          },
          "price": {
            "type": "number"
          },
          "min_qty": {
            "type": "number"
          },
          "lead_time_days": {
            "type": "integer"
          },
          "is_preferred": {
            "type": "boolean"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "supplier_products_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "supplier_price_history": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "supplier_id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "price": {
            "type": "number"
          },
          "source": {
            "type": "string"
          },
          "ref_id": {
            "type": "string",
            "format": "uuid"
          },
          "recorded_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "supplier_price_history_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "purchase_orders": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "number": {
            "type": "string"
          },
          "supplier_id": {
            "type": "string",
            "format": "uuid"
          },
          "warehouse_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "order_date": {
            "type": "string",
            "format": "date"
          },
          "expected_date": {
            "type": "string",
            "format": "date"
          },
          "note": {
            "type": "string"
          },
          "sent_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "submitted_at": {
            "type": "string",
            "format": "date-time"
          },
          "submitted_by": {
            "type": "string"
          },
          "decided_at": {
            "type": "string",
            "format": "date-time"
          },
          "decided_by": {
            "type": "string"
          },
          "decision_note": {
            "type": "string"
          },
          "lines": {
            "type": "array"
          }
        }
      },
      "purchase_orders_input": {
        "type": "object",
        "properties": {
          "supplier_id": {
            "type": "string",
            "format": "uuid"
          },
          "warehouse_id": {
            "type": "string",
            "format": "uuid"
          },
          "order_date": {
            "type": "string",
            "format": "date"
          },
          "expected_date": {
            "type": "string",
            "format": "date"
          },
          "note": {
            "type": "string"
          },
          "lines": {
            "type": "array"
          }
        },
        "required": [
          "supplier_id",
          "lines"
        ]
      },
      "purchase_order_lines": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "order_id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "qty_ordered": {
            "type": "number"
          },
          "qty_received": {
            "type": "number"
          },
          "unit_cost": {
            "type": "number"
          },
          "sort_order": {
            "type": "integer"
          }
        }
      },
      "purchase_order_lines_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "goods_receipts": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "number": {
            "type": "string"
          },
          "order_id": {
            "type": "string"
          },
          "supplier_id": {
            "type": "string",
            "format": "uuid"
          },
          "warehouse_id": {
            "type": "string",
            "format": "uuid"
          },
          "doc_number": {
            "type": "string"
          },
          "doc_date": {
            "type": "string",
            "format": "date"
          },
          "received_at": {
            "type": "string",
            "format": "date"
          },
          "note": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "lines": {
            "type": "array"
          }
        }
      },
      "goods_receipts_input": {
        "type": "object",
        "properties": {
          "order_id": {
            "type": "string"
          },
          "supplier_id": {
            "type": "string",
            "format": "uuid"
          },
          "warehouse_id": {
            "type": "string",
            "format": "uuid"
          },
          "doc_number": {
            "type": "string"
          },
          "doc_date": {
            "type": "string",
            "format": "date"
          },
          "note": {
            "type": "string"
          },
          "lines": {
            "type": "array"
          }
        },
        "required": [
          "lines"
        ]
      },
      "supplier_invoices": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "supplier_id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": "string"
          },
          "issue_date": {
            "type": "string",
            "format": "date"
          },
          "due_date": {
            "type": "string",
            "format": "date"
          },
          "net_amount": {
            "type": "number"
          },
          "vat_amount": {
            "type": "number"
          },
          "total": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "receipt_id": {
            "type": "string"
          },
          "order_id": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "cancelled_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "vat_breakdown": {
            "type": "object"
          },
          "intra_eu": {
            "type": "boolean"
          },
          "reverse_charge": {
            "type": "boolean"
          },
          "legal_entity_id": {
            "type": "string",
            "format": "uuid"
          },
          "net": {
            "type": "number"
          },
          "vat": {
            "type": "number"
          }
        }
      },
      "supplier_invoices_input": {
        "type": "object",
        "properties": {
          "supplier_id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": "string"
          },
          "issue_date": {
            "type": "string",
            "format": "date"
          },
          "due_date": {
            "type": "string",
            "format": "date"
          },
          "total": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "receipt_id": {
            "type": "string"
          },
          "order_id": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "intra_eu": {
            "type": "boolean"
          },
          "reverse_charge": {
            "type": "boolean"
          },
          "net": {
            "type": "number"
          },
          "vat": {
            "type": "number"
          }
        },
        "required": [
          "supplier_id",
          "number",
          "issue_date"
        ]
      },
      "supplier_payments": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "invoice_id": {
            "type": "string",
            "format": "uuid"
          },
          "paid_at": {
            "type": "string",
            "format": "date"
          },
          "amount": {
            "type": "number"
          },
          "method": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "cashbook_book_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "supplier_payments_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "invoices": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "issue_date": {
            "type": "string",
            "format": "date"
          },
          "due_date": {
            "type": "string",
            "format": "date"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "note": {
            "type": "string"
          },
          "series": {
            "type": "string"
          },
          "number": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "external_url": {
            "type": "string"
          },
          "issued_at": {
            "type": "string",
            "format": "date-time"
          },
          "cancelled_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "credit_for": {
            "type": "string",
            "format": "uuid"
          },
          "reversed_by": {
            "type": "string",
            "format": "uuid"
          },
          "proforma_id": {
            "type": "string",
            "format": "uuid"
          },
          "intra_eu": {
            "type": "boolean"
          },
          "reverse_charge": {
            "type": "boolean"
          },
          "exchange_rate": {
            "type": "number"
          },
          "legal_entity_id": {
            "type": "string"
          },
          "is_advance": {
            "type": "boolean"
          },
          "rate_date": {
            "type": "string",
            "format": "date"
          },
          "warehouse_id": {
            "type": "string",
            "format": "uuid"
          },
          "stock_document_id": {
            "type": "string",
            "format": "uuid"
          },
          "series_choice": {
            "type": "string"
          },
          "lines": {
            "type": "array"
          }
        }
      },
      "invoices_input": {
        "type": "object",
        "properties": {
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "issue_date": {
            "type": "string",
            "format": "date"
          },
          "due_date": {
            "type": "string",
            "format": "date"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "note": {
            "type": "string"
          },
          "intra_eu": {
            "type": "boolean"
          },
          "reverse_charge": {
            "type": "boolean"
          },
          "exchange_rate": {
            "type": "number"
          },
          "legal_entity_id": {
            "type": "string"
          },
          "rate_date": {
            "type": "string",
            "format": "date"
          },
          "warehouse_id": {
            "type": "string",
            "format": "uuid"
          },
          "series_choice": {
            "type": "string"
          },
          "lines": {
            "type": "array"
          }
        },
        "required": [
          "party_id",
          "lines"
        ]
      },
      "proformas": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "number": {
            "type": "string"
          },
          "issue_date": {
            "type": "string",
            "format": "date"
          },
          "valid_until": {
            "type": "string",
            "format": "date"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "note": {
            "type": "string"
          },
          "invoice_id": {
            "type": "string",
            "format": "uuid"
          },
          "issued_at": {
            "type": "string",
            "format": "date-time"
          },
          "cancelled_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "legal_entity_id": {
            "type": "string"
          },
          "exchange_rate": {
            "type": "number"
          },
          "rate_date": {
            "type": "string",
            "format": "date"
          },
          "kind": {
            "type": "string"
          },
          "lines": {
            "type": "array"
          }
        }
      },
      "proformas_input": {
        "type": "object",
        "properties": {
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "issue_date": {
            "type": "string",
            "format": "date"
          },
          "valid_until": {
            "type": "string",
            "format": "date"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "note": {
            "type": "string"
          },
          "legal_entity_id": {
            "type": "string"
          },
          "exchange_rate": {
            "type": "number"
          },
          "rate_date": {
            "type": "string",
            "format": "date"
          },
          "kind": {
            "type": "string"
          },
          "lines": {
            "type": "array"
          }
        },
        "required": [
          "party_id",
          "lines"
        ]
      },
      "proforma_lines": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "proforma_id": {
            "type": "string",
            "format": "uuid"
          },
          "description": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "qty": {
            "type": "number"
          },
          "unit_price": {
            "type": "number"
          },
          "discount_pct": {
            "type": "number"
          },
          "vat_rate": {
            "type": "number"
          },
          "is_service": {
            "type": "boolean"
          },
          "service_id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "appointment_id": {
            "type": "string",
            "format": "uuid"
          },
          "client_package_id": {
            "type": "string",
            "format": "uuid"
          },
          "sort_order": {
            "type": "integer"
          },
          "client_service_id": {
            "type": "string",
            "format": "uuid"
          },
          "points_entry_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "proforma_lines_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "proforma_payments": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "proforma_id": {
            "type": "string",
            "format": "uuid"
          },
          "paid_at": {
            "type": "string",
            "format": "date"
          },
          "amount": {
            "type": "number"
          },
          "method": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "cashbook_book_id": {
            "type": "string",
            "format": "uuid"
          },
          "invoice_id": {
            "type": "string",
            "format": "uuid"
          },
          "gift_card_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "proforma_payments_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "invoice_lines": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "invoice_id": {
            "type": "string",
            "format": "uuid"
          },
          "description": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "qty": {
            "type": "number"
          },
          "unit_price": {
            "type": "number"
          },
          "vat_rate": {
            "type": "number"
          },
          "is_service": {
            "type": "boolean"
          },
          "service_id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "appointment_id": {
            "type": "string",
            "format": "uuid"
          },
          "client_package_id": {
            "type": "string",
            "format": "uuid"
          },
          "sort_order": {
            "type": "integer"
          },
          "discount_pct": {
            "type": "number"
          },
          "exemption_reason": {
            "type": "string"
          },
          "advance_invoice_id": {
            "type": "string",
            "format": "uuid"
          },
          "client_service_id": {
            "type": "string",
            "format": "uuid"
          },
          "unit_cost": {
            "type": "number"
          },
          "points_entry_id": {
            "type": "string",
            "format": "uuid"
          },
          "shop_credit_order_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "invoice_lines_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "payments": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "invoice_id": {
            "type": "string",
            "format": "uuid"
          },
          "paid_at": {
            "type": "string",
            "format": "date"
          },
          "amount": {
            "type": "number"
          },
          "method": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "cashbook_book_id": {
            "type": "string",
            "format": "uuid"
          },
          "gift_card_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "payments_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "client_packages": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "package_id": {
            "type": "string"
          },
          "service_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "sessions_total": {
            "type": "integer"
          },
          "price": {
            "type": "number"
          },
          "interval_days": {
            "type": "integer"
          },
          "purchased_at": {
            "type": "string",
            "format": "date"
          },
          "expires_at": {
            "type": "string",
            "format": "date"
          },
          "cancelled_at": {
            "type": "string",
            "format": "date-time"
          },
          "note": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "sessions": {
            "type": "number"
          }
        }
      },
      "client_packages_input": {
        "type": "object",
        "properties": {
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "package_id": {
            "type": "string"
          },
          "service_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "price": {
            "type": "number"
          },
          "purchased_at": {
            "type": "string",
            "format": "date"
          },
          "note": {
            "type": "string"
          },
          "sessions": {
            "type": "number"
          }
        },
        "required": [
          "party_id"
        ]
      },
      "client_services": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "service_id": {
            "type": "string",
            "format": "uuid"
          },
          "description": {
            "type": "string"
          },
          "employee_id": {
            "type": "string",
            "format": "uuid"
          },
          "location_id": {
            "type": "string",
            "format": "uuid"
          },
          "appointment_id": {
            "type": "string"
          },
          "performed_on": {
            "type": "string",
            "format": "date"
          },
          "qty": {
            "type": "number"
          },
          "unit_price": {
            "type": "number"
          },
          "vat_rate": {
            "type": "number"
          },
          "discount_pct": {
            "type": "number"
          },
          "is_special": {
            "type": "boolean"
          },
          "created_by": {
            "type": "string"
          },
          "created_by_name": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "subscription_id": {
            "type": "string",
            "format": "uuid"
          },
          "base_price": {
            "type": "number"
          }
        }
      },
      "client_services_input": {
        "type": "object",
        "properties": {
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "service_id": {
            "type": "string",
            "format": "uuid"
          },
          "description": {
            "type": "string"
          },
          "employee_id": {
            "type": "string",
            "format": "uuid"
          },
          "location_id": {
            "type": "string",
            "format": "uuid"
          },
          "appointment_id": {
            "type": "string"
          },
          "performed_on": {
            "type": "string",
            "format": "date"
          },
          "qty": {
            "type": "number"
          },
          "unit_price": {
            "type": "number"
          },
          "vat_rate": {
            "type": "number"
          },
          "discount_pct": {
            "type": "number"
          }
        },
        "required": [
          "party_id",
          "employee_id",
          "location_id",
          "performed_on"
        ]
      },
      "quotes": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "number": {
            "type": "string"
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "issue_date": {
            "type": "string",
            "format": "date"
          },
          "valid_until": {
            "type": "string",
            "format": "date"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "intro": {
            "type": "string"
          },
          "terms": {
            "type": "string"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "invoice_id": {
            "type": "string",
            "format": "uuid"
          },
          "sent_at": {
            "type": "string",
            "format": "date-time"
          },
          "decided_at": {
            "type": "string",
            "format": "date-time"
          },
          "decided_via": {
            "type": "string"
          },
          "decided_by": {
            "type": "string"
          },
          "decided_note": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "lines": {
            "type": "array"
          }
        }
      },
      "quotes_input": {
        "type": "object",
        "properties": {
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "issue_date": {
            "type": "string",
            "format": "date"
          },
          "valid_until": {
            "type": "string",
            "format": "date"
          },
          "intro": {
            "type": "string"
          },
          "terms": {
            "type": "string"
          },
          "lines": {
            "type": "array"
          }
        },
        "required": [
          "party_id",
          "title",
          "lines"
        ]
      },
      "quote_lines": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "quote_id": {
            "type": "string",
            "format": "uuid"
          },
          "description": {
            "type": "string"
          },
          "service_id": {
            "type": "string",
            "format": "uuid"
          },
          "unit": {
            "type": "string"
          },
          "qty": {
            "type": "number"
          },
          "unit_price": {
            "type": "number"
          },
          "discount_pct": {
            "type": "number"
          },
          "vat_rate": {
            "type": "number"
          },
          "sort_order": {
            "type": "integer"
          }
        }
      },
      "quote_lines_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "contract_events": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "contract_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "actor": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "contract_events_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "employee_contracts": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "employee_id": {
            "type": "string",
            "format": "uuid"
          },
          "contract_type": {
            "type": "string"
          },
          "valid_from": {
            "type": "string",
            "format": "date"
          },
          "valid_to": {
            "type": "string",
            "format": "date"
          },
          "weekly_hours": {
            "type": "number"
          },
          "pay_type": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "amount_basis": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "location_ids": {
            "type": "array"
          },
          "notes": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "legal_entity_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "employee_contracts_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "absence_requests": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "employee_id": {
            "type": "string",
            "format": "uuid"
          },
          "type_id": {
            "type": "string"
          },
          "start_date": {
            "type": "string",
            "format": "date"
          },
          "end_date": {
            "type": "string",
            "format": "date"
          },
          "half_day": {
            "type": "string"
          },
          "days": {
            "type": "number"
          },
          "reason": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "requested_by": {
            "type": "string"
          },
          "decided_by": {
            "type": "string"
          },
          "decided_at": {
            "type": "string",
            "format": "date-time"
          },
          "decision_note": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "start": {
            "type": "string",
            "format": "date"
          },
          "end": {
            "type": "string",
            "format": "date"
          }
        }
      },
      "absence_requests_input": {
        "type": "object",
        "properties": {
          "employee_id": {
            "type": "string",
            "format": "uuid"
          },
          "type_id": {
            "type": "string"
          },
          "half_day": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "start": {
            "type": "string",
            "format": "date"
          },
          "end": {
            "type": "string",
            "format": "date"
          }
        },
        "required": [
          "employee_id",
          "type_id",
          "start"
        ]
      },
      "absence_types": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "counts_as": {
            "type": "string"
          },
          "requires_approval": {
            "type": "boolean"
          },
          "uses_allowance": {
            "type": "boolean"
          },
          "days_per_year": {
            "type": "number"
          },
          "allow_half_day": {
            "type": "boolean"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "sort_order": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "label_i18n": {
            "type": "string"
          }
        }
      },
      "absence_types_input": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "counts_as": {
            "type": "string"
          },
          "requires_approval": {
            "type": "boolean"
          },
          "uses_allowance": {
            "type": "boolean"
          },
          "days_per_year": {
            "type": "number"
          },
          "allow_half_day": {
            "type": "boolean"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "label_i18n": {
            "type": "string"
          }
        },
        "required": [
          "label"
        ]
      },
      "leave_allowances": {
        "type": "object",
        "properties": {
          "employee_id": {
            "type": "string",
            "format": "uuid"
          },
          "type_id": {
            "type": "string",
            "format": "uuid"
          },
          "year": {
            "type": "integer"
          },
          "days": {
            "type": "number"
          }
        }
      },
      "leave_allowances_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "shifts": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "employee_id": {
            "type": "string",
            "format": "uuid"
          },
          "location_id": {
            "type": "string"
          },
          "shift_date": {
            "type": "string",
            "format": "date"
          },
          "start_time": {
            "type": "string",
            "format": "time"
          },
          "end_time": {
            "type": "string",
            "format": "time"
          },
          "kind": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "resource_id": {
            "type": "string"
          },
          "template_id": {
            "type": "string",
            "format": "uuid"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "start": {
            "type": "string"
          },
          "end": {
            "type": "string"
          }
        }
      },
      "shifts_input": {
        "type": "object",
        "properties": {
          "employee_id": {
            "type": "string",
            "format": "uuid"
          },
          "location_id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "resource_id": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "start": {
            "type": "string"
          },
          "end": {
            "type": "string"
          }
        },
        "required": [
          "employee_id",
          "date",
          "start",
          "end"
        ]
      },
      "time_entries": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "payload_user_id": {
            "type": "string"
          },
          "work_date": {
            "type": "string",
            "format": "date"
          },
          "kind": {
            "type": "string"
          },
          "started_at": {
            "type": "string",
            "format": "date-time"
          },
          "ended_at": {
            "type": "string",
            "format": "date-time"
          },
          "minutes": {
            "type": "number"
          },
          "project_id": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "employee_id": {
            "type": "string",
            "format": "uuid"
          },
          "task_id": {
            "type": "string",
            "format": "uuid"
          },
          "billing_run_id": {
            "type": "string",
            "format": "uuid"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          }
        }
      },
      "time_entries_input": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "minutes": {
            "type": "number"
          },
          "project_id": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "employee_id": {
            "type": "string",
            "format": "uuid"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          }
        },
        "required": [
          "kind",
          "employee_id",
          "date"
        ]
      },
      "time_card_scans": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "card_id": {
            "type": "string",
            "format": "uuid"
          },
          "employee_id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "result": {
            "type": "string"
          },
          "time_entry_id": {
            "type": "string",
            "format": "uuid"
          },
          "source": {
            "type": "string"
          },
          "scanned_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "time_card_scans_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "fiscal_receipts": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "seq": {
            "type": "integer"
          },
          "register_id": {
            "type": "string",
            "format": "uuid"
          },
          "source": {
            "type": "string"
          },
          "source_id": {
            "type": "string",
            "format": "uuid"
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "method": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "items": {
            "type": "object"
          },
          "commands": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "receipt_number": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "attempts": {
            "type": "integer"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "sent_at": {
            "type": "string",
            "format": "date-time"
          },
          "printed_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "created_by_name": {
            "type": "string"
          }
        }
      },
      "fiscal_receipts_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "fiscal_operations": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "seq": {
            "type": "integer"
          },
          "register_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "receipt_id": {
            "type": "string",
            "format": "uuid"
          },
          "commands": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "receipt_number": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "attempts": {
            "type": "integer"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "sent_at": {
            "type": "string",
            "format": "date-time"
          },
          "printed_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "created_by_name": {
            "type": "string"
          },
          "cashbook_book_id": {
            "type": "string",
            "format": "uuid"
          },
          "cashbook_posted": {
            "type": "boolean"
          },
          "cashbook_entry_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "fiscal_operations_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "tasks": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "board_id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "priority": {
            "type": "string"
          },
          "due_at": {
            "type": "string",
            "format": "date-time"
          },
          "assignee_payload_user_id": {
            "type": "string"
          },
          "creator_payload_user_id": {
            "type": "string"
          },
          "custom_fields": {
            "type": "object",
            "description": "Câmpurile personalizate ale companiei, ca obiect cheie-valoare (vezi „Câmpuri personalizate”).",
            "properties": {}
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "position": {
            "type": "number"
          },
          "labels": {
            "type": "array"
          },
          "completed_at": {
            "type": "string",
            "format": "date-time"
          },
          "result": {
            "type": "string"
          },
          "phase_id": {
            "type": "string",
            "format": "uuid"
          },
          "recurrence": {
            "type": "object"
          },
          "recurrence_parent": {
            "type": "string",
            "format": "uuid"
          },
          "department_id": {
            "type": "string",
            "format": "uuid"
          },
          "contract_line_id": {
            "type": "string",
            "format": "uuid"
          },
          "billable": {
            "type": "boolean"
          },
          "deliverable_id": {
            "type": "string",
            "format": "uuid"
          },
          "context": {
            "type": "object"
          }
        }
      },
      "tasks_input": {
        "type": "object",
        "properties": {
          "board_id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "priority": {
            "type": "string"
          },
          "labels": {
            "type": "array"
          },
          "result": {
            "type": "string"
          }
        },
        "required": [
          "board_id",
          "title"
        ]
      },
      "task_boards": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string"
          },
          "board_type": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "description": {
            "type": "string"
          },
          "columns": {
            "type": "array"
          },
          "is_archived": {
            "type": "boolean"
          },
          "sort_order": {
            "type": "integer"
          },
          "created_by": {
            "type": "string"
          },
          "department_id": {
            "type": "string"
          }
        }
      },
      "task_boards_input": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "columns": {
            "type": "array"
          },
          "department_id": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ]
      },
      "task_comments": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "task_id": {
            "type": "string"
          },
          "author_id": {
            "type": "string"
          },
          "author_name": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "task_comments_input": {
        "type": "object",
        "properties": {
          "task_id": {
            "type": "string"
          },
          "body": {
            "type": "string"
          }
        },
        "required": [
          "task_id",
          "body"
        ]
      },
      "task_checklist_items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "task_id": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "done": {
            "type": "boolean"
          },
          "position": {
            "type": "integer"
          }
        }
      },
      "task_checklist_items_input": {
        "type": "object",
        "properties": {
          "task_id": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "done": {
            "type": "boolean"
          }
        },
        "required": [
          "task_id",
          "text"
        ]
      },
      "project_phases": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "service_id": {
            "type": "string",
            "format": "uuid"
          },
          "planned_date": {
            "type": "string",
            "format": "date"
          },
          "amount": {
            "type": "number"
          },
          "done": {
            "type": "boolean"
          },
          "done_at": {
            "type": "string",
            "format": "date-time"
          },
          "sort_order": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "recurrence": {
            "type": "string"
          },
          "recurrence_parent": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "project_phases_input": {
        "type": "object",
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "service_id": {
            "type": "string",
            "format": "uuid"
          },
          "planned_date": {
            "type": "string",
            "format": "date"
          },
          "amount": {
            "type": "number"
          },
          "done": {
            "type": "boolean"
          },
          "recurrence": {
            "type": "string"
          }
        },
        "required": [
          "project_id",
          "title"
        ]
      },
      "records": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "template_id": {
            "type": "string"
          },
          "template_name": {
            "type": "string"
          },
          "appointment_id": {
            "type": "string"
          },
          "employee_id": {
            "type": "string",
            "format": "uuid"
          },
          "entry_date": {
            "type": "string",
            "format": "date"
          },
          "title": {
            "type": "string"
          },
          "data": {
            "type": "string"
          },
          "locked": {
            "type": "boolean"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_by": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "date": {
            "type": "string",
            "format": "date"
          }
        }
      },
      "records_input": {
        "type": "object",
        "properties": {
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "template_id": {
            "type": "string"
          },
          "appointment_id": {
            "type": "string"
          },
          "employee_id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "data": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date"
          }
        },
        "required": [
          "party_id",
          "template_id"
        ]
      },
      "record_templates": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "fields": {
            "type": "array"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "sort_order": {
            "type": "number"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "design": {
            "type": "string"
          },
          "medical": {
            "type": "boolean"
          }
        }
      },
      "record_templates_input": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "fields": {
            "type": "array"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "sort_order": {
            "type": "number"
          },
          "design": {
            "type": "string"
          },
          "medical": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "fields"
        ]
      },
      "feedback": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "request_id": {
            "type": "string",
            "format": "uuid"
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "employee_id": {
            "type": "string",
            "format": "uuid"
          },
          "location_id": {
            "type": "string",
            "format": "uuid"
          },
          "service_id": {
            "type": "string",
            "format": "uuid"
          },
          "nps": {
            "type": "integer"
          },
          "comment": {
            "type": "string"
          },
          "answers": {
            "type": "object"
          },
          "consent_public": {
            "type": "boolean"
          },
          "published": {
            "type": "boolean"
          },
          "handled": {
            "type": "boolean"
          },
          "handled_by": {
            "type": "string"
          },
          "handled_at": {
            "type": "string",
            "format": "date-time"
          },
          "handled_note": {
            "type": "string"
          },
          "google_clicked": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "author_name": {
            "type": "string"
          },
          "author_email": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "survey_key": {
            "type": "string"
          },
          "form_snapshot": {
            "type": "object"
          },
          "consents": {
            "type": "object"
          },
          "author_phone": {
            "type": "string"
          },
          "tags": {
            "type": "array"
          },
          "rules_applied": {
            "type": "object"
          },
          "escalate_at": {
            "type": "string",
            "format": "date-time"
          },
          "escalate_rule": {
            "type": "string"
          },
          "escalated_at": {
            "type": "string",
            "format": "date-time"
          },
          "flagged": {
            "type": "boolean"
          },
          "flag_reason": {
            "type": "string"
          },
          "published_at": {
            "type": "string",
            "format": "date-time"
          },
          "assigned_to": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "public_reply": {
            "type": "string"
          },
          "public_reply_at": {
            "type": "string",
            "format": "date-time"
          },
          "replied_at": {
            "type": "string",
            "format": "date-time"
          },
          "utm": {
            "type": "object"
          },
          "support_ticket_id": {
            "type": "string",
            "format": "uuid"
          },
          "ticket_id": {
            "type": "string",
            "format": "uuid"
          },
          "ticket_claim_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "feedback_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "feedback_requests": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "appointment_id": {
            "type": "string",
            "format": "uuid"
          },
          "employee_id": {
            "type": "string",
            "format": "uuid"
          },
          "location_id": {
            "type": "string",
            "format": "uuid"
          },
          "service_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "sent_at": {
            "type": "string",
            "format": "date-time"
          },
          "answered_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "survey_key": {
            "type": "string"
          },
          "channel": {
            "type": "string"
          },
          "reminder_count": {
            "type": "integer"
          },
          "last_reminder_at": {
            "type": "string",
            "format": "date-time"
          },
          "opened_at": {
            "type": "string",
            "format": "date-time"
          },
          "started_at": {
            "type": "string",
            "format": "date-time"
          },
          "event_id": {
            "type": "string",
            "format": "uuid"
          },
          "recipient_name": {
            "type": "string"
          },
          "recipient_email": {
            "type": "string"
          }
        }
      },
      "feedback_requests_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "documents": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "folder_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "tags": {
            "type": "array"
          },
          "visibility": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "format": "date"
          },
          "owner_id": {
            "type": "string"
          },
          "owner_name": {
            "type": "string"
          },
          "current_version": {
            "type": "integer"
          },
          "archived": {
            "type": "boolean"
          },
          "expiry_notified_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "esign_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "content_base64": {
            "type": "string"
          },
          "link_type": {
            "type": "string"
          },
          "link_id": {
            "type": "string"
          }
        }
      },
      "documents_input": {
        "type": "object",
        "properties": {
          "folder_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "tags": {
            "type": "array"
          },
          "visibility": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "format": "date"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "content_base64": {
            "type": "string"
          },
          "link_type": {
            "type": "string"
          },
          "link_id": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "type",
          "content_base64"
        ]
      },
      "document_folders": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "parent_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "sort_order": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "document_folders_input": {
        "type": "object",
        "properties": {
          "parent_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ]
      },
      "document_versions": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "document_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer"
          },
          "file_name": {
            "type": "string"
          },
          "mime_type": {
            "type": "string"
          },
          "size_bytes": {
            "type": "integer"
          },
          "note": {
            "type": "string"
          },
          "uploaded_by": {
            "type": "string"
          },
          "uploaded_name": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "document_versions_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "document_templates": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "design": {
            "type": "object"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "sort_order": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "kind": {
            "type": "string"
          },
          "file_key": {
            "type": "string"
          },
          "file_name": {
            "type": "string"
          },
          "mime_type": {
            "type": "string"
          },
          "size_bytes": {
            "type": "integer"
          },
          "scope": {
            "type": "string"
          },
          "docx": {
            "type": "string"
          }
        }
      },
      "document_templates_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "job_applications": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "posting_id": {
            "type": "string",
            "format": "uuid"
          },
          "posting_title": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "answers": {
            "type": "object"
          },
          "stage": {
            "type": "string"
          },
          "rating": {
            "type": "integer"
          },
          "rejected_reason": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "consent_at": {
            "type": "string",
            "format": "date-time"
          },
          "employee_id": {
            "type": "string",
            "format": "uuid"
          },
          "cv_file_id": {
            "type": "string",
            "format": "uuid"
          },
          "cv_name": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "form_snapshot": {
            "type": "object"
          },
          "consents": {
            "type": "object"
          },
          "extra": {
            "type": "object"
          },
          "files": {
            "type": "object"
          },
          "form_key": {
            "type": "string"
          },
          "score": {
            "type": "number"
          },
          "tags": {
            "type": "array"
          },
          "assigned_to": {
            "type": "string"
          },
          "utm": {
            "type": "object"
          },
          "talent": {
            "type": "boolean"
          },
          "flagged": {
            "type": "boolean"
          },
          "withdrawn_at": {
            "type": "string",
            "format": "date-time"
          },
          "anonymized_at": {
            "type": "string",
            "format": "date-time"
          },
          "stage_entered_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_activity_at": {
            "type": "string",
            "format": "date-time"
          },
          "first_response_at": {
            "type": "string",
            "format": "date-time"
          },
          "auto_reject_at": {
            "type": "string",
            "format": "date-time"
          },
          "auto_reject_reason": {
            "type": "string"
          },
          "sla_alerted_at": {
            "type": "string",
            "format": "date-time"
          },
          "lang": {
            "type": "string"
          }
        }
      },
      "job_applications_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "job_application_events": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "application_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "actor": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "job_application_events_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "accommodation_reservations": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "number": {
            "type": "string"
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "guest_name": {
            "type": "string"
          },
          "guest_email": {
            "type": "string",
            "format": "email"
          },
          "guest_phone": {
            "type": "string"
          },
          "type_id": {
            "type": "string"
          },
          "unit_id": {
            "type": "string"
          },
          "check_in": {
            "type": "string",
            "format": "date"
          },
          "check_out": {
            "type": "string",
            "format": "date"
          },
          "adults": {
            "type": "number"
          },
          "children": {
            "type": "number"
          },
          "status": {
            "type": "string"
          },
          "total": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "price_breakdown": {
            "type": "object"
          },
          "source": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "occupies_from": {
            "type": "string",
            "format": "date-time"
          },
          "occupies_until": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "payment_choice": {
            "type": "string"
          },
          "proforma_id": {
            "type": "string",
            "format": "uuid"
          },
          "external_uid": {
            "type": "string"
          },
          "feed_id": {
            "type": "string",
            "format": "uuid"
          },
          "feedback_request_id": {
            "type": "string",
            "format": "uuid"
          },
          "promo_code": {
            "type": "string"
          },
          "discount": {
            "type": "number"
          },
          "group_id": {
            "type": "string",
            "format": "uuid"
          },
          "child_ages": {
            "type": "array"
          }
        }
      },
      "accommodation_reservations_input": {
        "type": "object",
        "properties": {
          "guest_name": {
            "type": "string"
          },
          "guest_email": {
            "type": "string",
            "format": "email"
          },
          "guest_phone": {
            "type": "string"
          },
          "type_id": {
            "type": "string"
          },
          "unit_id": {
            "type": "string"
          },
          "check_in": {
            "type": "string",
            "format": "date"
          },
          "check_out": {
            "type": "string",
            "format": "date"
          },
          "adults": {
            "type": "number"
          },
          "children": {
            "type": "number"
          },
          "status": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          }
        },
        "required": [
          "guest_name",
          "type_id",
          "check_in",
          "check_out"
        ]
      },
      "accommodation_types": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "short_description": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "max_adults": {
            "type": "number"
          },
          "max_children": {
            "type": "number"
          },
          "max_guests": {
            "type": "number"
          },
          "beds": {
            "type": "string"
          },
          "area_m2": {
            "type": "number"
          },
          "amenities": {
            "type": "array"
          },
          "base_price": {
            "type": "number"
          },
          "check_in_time": {
            "type": "string"
          },
          "check_out_time": {
            "type": "string"
          },
          "min_nights": {
            "type": "number"
          },
          "policies": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "sort_order": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "included_guests": {
            "type": "integer"
          },
          "extra_adult_price": {
            "type": "number"
          },
          "extra_child_price": {
            "type": "number"
          },
          "free_child_age": {
            "type": "integer"
          }
        }
      },
      "accommodation_types_input": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "short_description": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "max_adults": {
            "type": "number"
          },
          "max_children": {
            "type": "number"
          },
          "max_guests": {
            "type": "number"
          },
          "beds": {
            "type": "string"
          },
          "area_m2": {
            "type": "number"
          },
          "amenities": {
            "type": "array"
          },
          "base_price": {
            "type": "number"
          },
          "check_in_time": {
            "type": "string"
          },
          "check_out_time": {
            "type": "string"
          },
          "min_nights": {
            "type": "number"
          },
          "policies": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          }
        },
        "required": [
          "name",
          "base_price"
        ]
      },
      "accommodation_units": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "location_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "resource_type": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "custom_fields": {
            "type": "object",
            "description": "Câmpurile personalizate ale companiei, ca obiect cheie-valoare (vezi „Câmpuri personalizate”).",
            "properties": {}
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "code": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "access_mode": {
            "type": "string"
          },
          "used_by": {
            "type": "string"
          },
          "accommodation_type_id": {
            "type": "string",
            "format": "uuid"
          },
          "cleaning_state": {
            "type": "string"
          },
          "type_id": {
            "type": "string"
          },
          "resource_id": {
            "type": "string"
          }
        }
      },
      "accommodation_units_input": {
        "type": "object",
        "properties": {
          "location_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "code": {
            "type": "string"
          },
          "type_id": {
            "type": "string"
          },
          "resource_id": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ]
      },
      "accommodation_rates": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "type_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "valid_from": {
            "type": "string",
            "format": "date"
          },
          "valid_to": {
            "type": "string",
            "format": "date"
          },
          "weekdays": {
            "type": "array"
          },
          "price": {
            "type": "number"
          },
          "min_nights": {
            "type": "integer"
          },
          "priority": {
            "type": "integer"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "accommodation_rates_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "accommodation_payments": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "reservation_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "note": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "provider": {
            "type": "string"
          },
          "external_id": {
            "type": "string"
          },
          "checkout_url": {
            "type": "string"
          }
        }
      },
      "accommodation_payments_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "accommodation_promos": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "code": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "value": {
            "type": "number"
          },
          "valid_from": {
            "type": "string",
            "format": "date"
          },
          "valid_to": {
            "type": "string",
            "format": "date"
          },
          "min_nights": {
            "type": "number"
          },
          "uses_limit": {
            "type": "number"
          },
          "used": {
            "type": "integer"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "accommodation_promos_input": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "value": {
            "type": "number"
          },
          "valid_from": {
            "type": "string",
            "format": "date"
          },
          "valid_to": {
            "type": "string",
            "format": "date"
          },
          "min_nights": {
            "type": "number"
          },
          "uses_limit": {
            "type": "number"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          }
        },
        "required": [
          "code",
          "value"
        ]
      },
      "reception_agents": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "voice": {
            "type": "string"
          },
          "tone": {
            "type": "string"
          },
          "greeting": {
            "type": "string"
          },
          "instructions": {
            "type": "string"
          },
          "permissions": {
            "type": "array"
          },
          "transfer_phone": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "provider_agent_id": {
            "type": "string"
          },
          "sync_status": {
            "type": "string"
          },
          "sync_error": {
            "type": "string"
          },
          "synced_at": {
            "type": "string",
            "format": "date-time"
          },
          "monthly_limit_minutes": {
            "type": "integer"
          }
        }
      },
      "reception_agents_input": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "voice": {
            "type": "string"
          },
          "tone": {
            "type": "string"
          },
          "greeting": {
            "type": "string"
          },
          "instructions": {
            "type": "string"
          },
          "permissions": {
            "type": "array"
          },
          "transfer_phone": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          }
        },
        "required": [
          "name"
        ]
      },
      "reception_locations": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "agent_id": {
            "type": "string"
          },
          "location_id": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "greeting": {
            "type": "string"
          },
          "transfer_phone": {
            "type": "string"
          },
          "service_ids": {
            "type": "array"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "reception_locations_input": {
        "type": "object",
        "properties": {
          "agent_id": {
            "type": "string"
          },
          "location_id": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "greeting": {
            "type": "string"
          },
          "transfer_phone": {
            "type": "string"
          },
          "service_ids": {
            "type": "array"
          }
        },
        "required": [
          "agent_id",
          "location_id"
        ]
      },
      "reception_numbers": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "agent_id": {
            "type": "string",
            "format": "uuid"
          },
          "location_id": {
            "type": "string",
            "format": "uuid"
          },
          "channel": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "provider_ref": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "forwarded_from": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "carrier_ref": {
            "type": "string"
          }
        }
      },
      "reception_numbers_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "reception_conversations": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "agent_id": {
            "type": "string",
            "format": "uuid"
          },
          "number_id": {
            "type": "string",
            "format": "uuid"
          },
          "location_id": {
            "type": "string",
            "format": "uuid"
          },
          "channel": {
            "type": "string"
          },
          "caller_phone": {
            "type": "string"
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "outcome": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "events": {
            "type": "object"
          },
          "appointment_ids": {
            "type": "array"
          },
          "duration_seconds": {
            "type": "integer"
          },
          "message_count": {
            "type": "integer"
          },
          "provider": {
            "type": "string"
          },
          "provider_ref": {
            "type": "string"
          },
          "is_test": {
            "type": "boolean"
          },
          "started_at": {
            "type": "string",
            "format": "date-time"
          },
          "ended_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "handled_by": {
            "type": "string"
          },
          "last_message_at": {
            "type": "string",
            "format": "date-time"
          },
          "ticket_id": {
            "type": "string",
            "format": "uuid"
          },
          "ticket_claim_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "reception_conversations_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "auction_events": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "starts_at": {
            "type": "string",
            "format": "date"
          },
          "venue": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "goal": {
            "type": "number"
          },
          "raised_offset": {
            "type": "number"
          },
          "phone_bidding": {
            "type": "boolean"
          },
          "site_url": {
            "type": "string"
          },
          "stage": {
            "type": "string"
          },
          "current_lot_id": {
            "type": "string",
            "format": "uuid"
          },
          "paddle_levels": {
            "type": "array"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "payment_account_id": {
            "type": "string"
          },
          "sms_device_id": {
            "type": "string"
          },
          "smtp_id": {
            "type": "string"
          },
          "screen_title": {
            "type": "string"
          },
          "screen_text": {
            "type": "string"
          },
          "show_levels": {
            "type": "boolean"
          },
          "donors_mode": {
            "type": "string"
          },
          "donors_count": {
            "type": "number"
          },
          "site_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "auction_events_input": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "starts_at": {
            "type": "string",
            "format": "date"
          },
          "venue": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "goal": {
            "type": "number"
          },
          "raised_offset": {
            "type": "number"
          },
          "phone_bidding": {
            "type": "boolean"
          },
          "site_url": {
            "type": "string"
          },
          "paddle_levels": {
            "type": "array"
          },
          "payment_account_id": {
            "type": "string"
          },
          "sms_device_id": {
            "type": "string"
          },
          "smtp_id": {
            "type": "string"
          },
          "screen_title": {
            "type": "string"
          },
          "screen_text": {
            "type": "string"
          },
          "show_levels": {
            "type": "boolean"
          },
          "donors_mode": {
            "type": "string"
          },
          "donors_count": {
            "type": "number"
          }
        },
        "required": [
          "name"
        ]
      },
      "auction_lots": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "event_id": {
            "type": "string"
          },
          "product_id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "position": {
            "type": "number"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "donor": {
            "type": "string"
          },
          "estimate": {
            "type": "number"
          },
          "start_price": {
            "type": "number"
          },
          "step": {
            "type": "number"
          },
          "status": {
            "type": "string"
          },
          "going": {
            "type": "integer"
          },
          "current_amount": {
            "type": "number"
          },
          "leader_bidder_id": {
            "type": "string",
            "format": "uuid"
          },
          "ends_at": {
            "type": "string",
            "format": "date"
          },
          "sold_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "quantity": {
            "type": "number"
          },
          "round": {
            "type": "integer"
          }
        }
      },
      "auction_lots_input": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string"
          },
          "product_id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "position": {
            "type": "number"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "donor": {
            "type": "string"
          },
          "estimate": {
            "type": "number"
          },
          "start_price": {
            "type": "number"
          },
          "step": {
            "type": "number"
          },
          "ends_at": {
            "type": "string",
            "format": "date"
          },
          "quantity": {
            "type": "number"
          }
        },
        "required": [
          "event_id"
        ]
      },
      "auction_bidders": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "event_id": {
            "type": "string"
          },
          "paddle": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "table_label": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "auction_bidders_input": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string"
          },
          "paddle": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "table_label": {
            "type": "string"
          }
        },
        "required": [
          "event_id",
          "name"
        ]
      },
      "auction_sponsors": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "event_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "logo_url": {
            "type": "string"
          },
          "website": {
            "type": "string"
          },
          "position": {
            "type": "number"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "auction_sponsors_input": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "logo_url": {
            "type": "string"
          },
          "website": {
            "type": "string"
          },
          "position": {
            "type": "number"
          }
        },
        "required": [
          "event_id",
          "name"
        ]
      },
      "auction_awards": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "event_id": {
            "type": "string",
            "format": "uuid"
          },
          "lot_id": {
            "type": "string",
            "format": "uuid"
          },
          "bidder_id": {
            "type": "string",
            "format": "uuid"
          },
          "amount": {
            "type": "number"
          },
          "round": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "auction_awards_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "auction_bids": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "event_id": {
            "type": "string",
            "format": "uuid"
          },
          "lot_id": {
            "type": "string",
            "format": "uuid"
          },
          "bidder_id": {
            "type": "string",
            "format": "uuid"
          },
          "amount": {
            "type": "number"
          },
          "source": {
            "type": "string"
          },
          "voided": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "round": {
            "type": "integer"
          }
        }
      },
      "auction_bids_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "auction_payments": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "event_id": {
            "type": "string",
            "format": "uuid"
          },
          "bidder_id": {
            "type": "string",
            "format": "uuid"
          },
          "amount": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "method": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "external_id": {
            "type": "string"
          },
          "checkout_url": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "auction_payments_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "support_tickets": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "number": {
            "type": "integer"
          },
          "subject": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "priority": {
            "type": "string"
          },
          "assignee_user_id": {
            "type": "string"
          },
          "team_id": {
            "type": "string"
          },
          "party_id": {
            "type": "string"
          },
          "visitor_name": {
            "type": "string"
          },
          "visitor_email": {
            "type": "string"
          },
          "visitor_phone": {
            "type": "string"
          },
          "visitor_meta": {
            "type": "object"
          },
          "first_response_due_at": {
            "type": "string",
            "format": "date-time"
          },
          "resolve_due_at": {
            "type": "string",
            "format": "date-time"
          },
          "first_responded_at": {
            "type": "string",
            "format": "date-time"
          },
          "resolved_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_message_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_customer_message_at": {
            "type": "string",
            "format": "date-time"
          },
          "agent_last_read_at": {
            "type": "string",
            "format": "date-time"
          },
          "csat_score": {
            "type": "integer"
          },
          "csat_comment": {
            "type": "string"
          },
          "csat_at": {
            "type": "string",
            "format": "date-time"
          },
          "csat_feedback_response_id": {
            "type": "string",
            "format": "uuid"
          },
          "merged_into_id": {
            "type": "string",
            "format": "uuid"
          },
          "search_tsv": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "sla_paused_at": {
            "type": "string",
            "format": "date-time"
          },
          "sla_paused_ms": {
            "type": "integer"
          },
          "shop_return_id": {
            "type": "string",
            "format": "uuid"
          },
          "return_claim_at": {
            "type": "string",
            "format": "date-time"
          },
          "body": {
            "type": "string"
          }
        }
      },
      "support_tickets_input": {
        "type": "object",
        "properties": {
          "subject": {
            "type": "string"
          },
          "priority": {
            "type": "string"
          },
          "assignee_user_id": {
            "type": "string"
          },
          "team_id": {
            "type": "string"
          },
          "party_id": {
            "type": "string"
          },
          "visitor_name": {
            "type": "string"
          },
          "visitor_email": {
            "type": "string"
          },
          "visitor_phone": {
            "type": "string"
          },
          "body": {
            "type": "string"
          }
        },
        "required": [
          "body"
        ]
      },
      "support_threads": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "ticket_id": {
            "type": "string",
            "format": "uuid"
          },
          "channel": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "email_message_id": {
            "type": "string"
          },
          "email_in_reply_to": {
            "type": "string"
          }
        }
      },
      "support_threads_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "support_messages": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "thread_id": {
            "type": "string",
            "format": "uuid"
          },
          "ticket_id": {
            "type": "string",
            "format": "uuid"
          },
          "author_kind": {
            "type": "string"
          },
          "author_user_id": {
            "type": "string"
          },
          "author_name": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "internal": {
            "type": "boolean"
          },
          "media_ids": {
            "type": "array"
          },
          "attachments": {
            "type": "object"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "support_messages_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "support_labels": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "support_labels_input": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "color": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ]
      },
      "support_teams": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string"
          },
          "member_ids": {
            "type": "array"
          },
          "round_robin_cursor": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "department_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "support_teams_input": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "member_ids": {
            "type": "array"
          }
        },
        "required": [
          "name"
        ]
      },
      "support_canned_replies": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "support_canned_replies_input": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          }
        },
        "required": [
          "title",
          "body"
        ]
      },
      "support_articles": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "category_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "locales": {
            "type": "object"
          },
          "media_ids": {
            "type": "array"
          },
          "published_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "support_articles_input": {
        "type": "object",
        "properties": {
          "category_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "media_ids": {
            "type": "array"
          }
        },
        "required": [
          "title"
        ]
      },
      "support_article_categories": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "position": {
            "type": "number"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "support_article_categories_input": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "position": {
            "type": "number"
          }
        },
        "required": [
          "name"
        ]
      },
      "accommodation_discounts": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "threshold": {
            "type": "number"
          },
          "percent": {
            "type": "number"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "accommodation_discounts_input": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "threshold": {
            "type": "number"
          },
          "percent": {
            "type": "number"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          }
        },
        "required": [
          "name",
          "kind",
          "threshold",
          "percent"
        ]
      },
      "accommodation_ical_feeds": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "unit_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "last_synced_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_error": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "accommodation_ical_feeds_input": {
        "type": "object",
        "properties": {
          "unit_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "unit_id",
          "name",
          "url"
        ]
      },
      "booking_blocks": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "employee_id": {
            "type": "string"
          },
          "location_id": {
            "type": "string"
          },
          "starts_at": {
            "type": "string",
            "format": "date-time"
          },
          "ends_at": {
            "type": "string",
            "format": "date-time"
          },
          "reason": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "resource_id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "group_id": {
            "type": "string",
            "format": "uuid"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "date_to": {
            "type": "string",
            "format": "date"
          },
          "all_day": {
            "type": "boolean"
          },
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          }
        }
      },
      "booking_blocks_input": {
        "type": "object",
        "properties": {
          "employee_id": {
            "type": "string"
          },
          "location_id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "resource_id": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "date_to": {
            "type": "string",
            "format": "date"
          },
          "all_day": {
            "type": "boolean"
          },
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          }
        },
        "required": [
          "date"
        ]
      },
      "location_closures": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "location_id": {
            "type": "string"
          },
          "date_from": {
            "type": "string",
            "format": "date"
          },
          "date_to": {
            "type": "string",
            "format": "date"
          },
          "reason": {
            "type": "string"
          },
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          }
        }
      },
      "location_closures_input": {
        "type": "object",
        "properties": {
          "location_id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          }
        },
        "required": [
          "from"
        ]
      },
      "service_combos": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "service_ids": {
            "type": "array"
          },
          "duration_minutes": {
            "type": "number"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "service_combos_input": {
        "type": "object",
        "properties": {
          "service_ids": {
            "type": "array"
          },
          "duration_minutes": {
            "type": "number"
          }
        },
        "required": [
          "service_ids",
          "duration_minutes"
        ]
      },
      "product_listings": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "channel_id": {
            "type": "string"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "seo_title": {
            "type": "string"
          },
          "seo_description": {
            "type": "string"
          },
          "seo_image_url": {
            "type": "string",
            "format": "uri"
          },
          "status": {
            "type": "string"
          },
          "published_at": {
            "type": "string",
            "format": "date-time"
          },
          "price_mode": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "short_description": {
            "type": "string"
          },
          "content_tabs": {
            "type": "array"
          },
          "publish_at": {
            "type": "string",
            "format": "date-time"
          },
          "custom": {
            "type": "array"
          }
        }
      },
      "product_listings_input": {
        "type": "object",
        "properties": {
          "channel_id": {
            "type": "string"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "seo_title": {
            "type": "string"
          },
          "seo_description": {
            "type": "string"
          },
          "seo_image_url": {
            "type": "string",
            "format": "uri"
          },
          "status": {
            "type": "string"
          },
          "price_mode": {
            "type": "string"
          },
          "short_description": {
            "type": "string"
          },
          "content_tabs": {
            "type": "array"
          },
          "publish_at": {
            "type": "string",
            "format": "date-time"
          },
          "custom": {
            "type": "array"
          }
        },
        "required": [
          "channel_id",
          "product_id"
        ]
      },
      "shop_collections": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "parent_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "position": {
            "type": "number"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "custom_fields": {
            "type": "object",
            "description": "Câmpurile personalizate ale companiei, ca obiect cheie-valoare (vezi „Câmpuri personalizate”).",
            "properties": {}
          },
          "channel_ids": {
            "type": "array"
          },
          "product_ids": {
            "type": "array"
          }
        }
      },
      "shop_collections_input": {
        "type": "object",
        "properties": {
          "parent_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "position": {
            "type": "number"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "channel_ids": {
            "type": "array"
          },
          "product_ids": {
            "type": "array"
          }
        },
        "required": [
          "name"
        ]
      },
      "cashbook_books": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "book": {
            "type": "string"
          },
          "legal_entity_id": {
            "type": "string"
          },
          "location_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "iban": {
            "type": "string"
          },
          "bank_name": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "opening_balance": {
            "type": "number"
          },
          "opening_date": {
            "type": "string",
            "format": "date"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "cashbook_books_input": {
        "type": "object",
        "properties": {
          "book": {
            "type": "string"
          },
          "legal_entity_id": {
            "type": "string"
          },
          "location_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "iban": {
            "type": "string"
          },
          "bank_name": {
            "type": "string"
          },
          "opening_balance": {
            "type": "number"
          },
          "opening_date": {
            "type": "string",
            "format": "date"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          }
        },
        "required": [
          "book",
          "name"
        ]
      },
      "cashbook_entries": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "book_id": {
            "type": "string"
          },
          "entry_date": {
            "type": "string",
            "format": "date"
          },
          "doc_number": {
            "type": "string"
          },
          "direction": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "explanation": {
            "type": "string"
          },
          "counterparty": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "reverses_id": {
            "type": "string",
            "format": "uuid"
          },
          "transfer_pair_id": {
            "type": "string",
            "format": "uuid"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "category": {
            "type": "string"
          },
          "party_id": {
            "type": "string"
          },
          "annex_number": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "created_by_name": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "cashbook_entries_input": {
        "type": "object",
        "properties": {
          "book_id": {
            "type": "string"
          },
          "entry_date": {
            "type": "string",
            "format": "date"
          },
          "doc_number": {
            "type": "string"
          },
          "direction": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "explanation": {
            "type": "string"
          },
          "counterparty": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "party_id": {
            "type": "string"
          },
          "annex_number": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          }
        },
        "required": [
          "book_id",
          "direction",
          "amount",
          "explanation"
        ]
      },
      "departments": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "parent_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "manager_id": {
            "type": "string",
            "format": "uuid"
          },
          "cost_center_id": {
            "type": "string",
            "format": "uuid"
          },
          "sort_order": {
            "type": "number"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "departments_input": {
        "type": "object",
        "properties": {
          "parent_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "manager_id": {
            "type": "string",
            "format": "uuid"
          },
          "cost_center_id": {
            "type": "string",
            "format": "uuid"
          },
          "sort_order": {
            "type": "number"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          }
        },
        "required": [
          "name"
        ]
      },
      "employee_resources": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "employee_id": {
            "type": "string",
            "format": "uuid"
          },
          "resource_id": {
            "type": "string",
            "format": "uuid"
          },
          "mode": {
            "type": "string"
          },
          "weekdays": {
            "type": "array"
          },
          "start_time": {
            "type": "string",
            "format": "time"
          },
          "end_time": {
            "type": "string",
            "format": "time"
          }
        }
      },
      "employee_resources_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "leave_adjustments": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "employee_id": {
            "type": "string",
            "format": "uuid"
          },
          "type_id": {
            "type": "string"
          },
          "year": {
            "type": "number"
          },
          "days": {
            "type": "number"
          },
          "reason": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "leave_adjustments_input": {
        "type": "object",
        "properties": {
          "employee_id": {
            "type": "string",
            "format": "uuid"
          },
          "type_id": {
            "type": "string"
          },
          "year": {
            "type": "number"
          },
          "days": {
            "type": "number"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "employee_id",
          "type_id",
          "year",
          "days"
        ]
      },
      "contract_lines": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "contract_id": {
            "type": "string",
            "format": "uuid"
          },
          "service_id": {
            "type": "string",
            "format": "uuid"
          },
          "bundle_id": {
            "type": "string",
            "format": "uuid"
          },
          "description": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "qty": {
            "type": "number"
          },
          "unit": {
            "type": "string"
          },
          "unit_price": {
            "type": "number"
          },
          "vat_rate": {
            "type": "number"
          },
          "frequency": {
            "type": "string"
          },
          "estimated_hours": {
            "type": "number"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "sort_order": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "cost_amount": {
            "type": "number"
          },
          "markup_type": {
            "type": "string"
          },
          "markup_value": {
            "type": "number"
          },
          "assignee_ids": {
            "type": "array"
          }
        }
      },
      "contract_lines_input": {
        "type": "object",
        "properties": {
          "contract_id": {
            "type": "string",
            "format": "uuid"
          },
          "service_id": {
            "type": "string",
            "format": "uuid"
          },
          "description": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "qty": {
            "type": "number"
          },
          "unit": {
            "type": "string"
          },
          "unit_price": {
            "type": "number"
          },
          "vat_rate": {
            "type": "number"
          },
          "frequency": {
            "type": "string"
          },
          "estimated_hours": {
            "type": "number"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "cost_amount": {
            "type": "number"
          },
          "markup_type": {
            "type": "string"
          },
          "markup_value": {
            "type": "number"
          },
          "assignee_ids": {
            "type": "array"
          }
        },
        "required": [
          "contract_id",
          "description"
        ]
      },
      "contract_deliverables": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "line_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "per_period": {
            "type": "number"
          },
          "frequency": {
            "type": "string"
          },
          "carry_over": {
            "type": "boolean"
          },
          "start_date": {
            "type": "string",
            "format": "date"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "sort_order": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "contract_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "contract_deliverables_input": {
        "type": "object",
        "properties": {
          "line_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "per_period": {
            "type": "number"
          },
          "frequency": {
            "type": "string"
          },
          "carry_over": {
            "type": "boolean"
          },
          "start_date": {
            "type": "string",
            "format": "date"
          },
          "contract_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "line_id",
          "title",
          "contract_id"
        ]
      },
      "contract_deliveries": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "deliverable_id": {
            "type": "string",
            "format": "uuid"
          },
          "delivered_on": {
            "type": "string",
            "format": "date"
          },
          "qty": {
            "type": "integer"
          },
          "note": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "contract_deliveries_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "contract_line_costs": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "line_id": {
            "type": "string",
            "format": "uuid"
          },
          "period_start": {
            "type": "string",
            "format": "date"
          },
          "description": {
            "type": "string"
          },
          "supplier": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "contract_line_costs_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "contract_billing_runs": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "contract_id": {
            "type": "string",
            "format": "uuid"
          },
          "frequency": {
            "type": "string"
          },
          "period_start": {
            "type": "string",
            "format": "date"
          },
          "period_end": {
            "type": "string",
            "format": "date"
          },
          "due_date": {
            "type": "string",
            "format": "date"
          },
          "skipped": {
            "type": "boolean"
          },
          "invoice_id": {
            "type": "string",
            "format": "uuid"
          },
          "notified_upcoming_at": {
            "type": "string",
            "format": "date-time"
          },
          "notified_late_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "due_until": {
            "type": "string",
            "format": "date"
          }
        }
      },
      "contract_billing_runs_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "activity_reports": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "number": {
            "type": "string"
          },
          "contract_id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "period_start": {
            "type": "string",
            "format": "date"
          },
          "period_end": {
            "type": "string",
            "format": "date"
          },
          "summary": {
            "type": "string"
          },
          "include_signature": {
            "type": "boolean"
          },
          "invoice_id": {
            "type": "string",
            "format": "uuid"
          },
          "share_invoice": {
            "type": "boolean"
          },
          "deliverables": {
            "type": "object"
          },
          "status": {
            "type": "string"
          },
          "sent_at": {
            "type": "string",
            "format": "date-time"
          },
          "sent_to": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "activity_reports_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "activity_report_items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "report_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string"
          },
          "task_id": {
            "type": "string",
            "format": "uuid"
          },
          "delivery_id": {
            "type": "string",
            "format": "uuid"
          },
          "description": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "line_label": {
            "type": "string"
          },
          "done_on": {
            "type": "string",
            "format": "date"
          },
          "hours": {
            "type": "number"
          },
          "included": {
            "type": "boolean"
          },
          "sort_order": {
            "type": "integer"
          }
        }
      },
      "activity_report_items_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "party_roles": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "role_key": {
            "type": "string"
          },
          "is_primary": {
            "type": "boolean"
          }
        }
      },
      "party_roles_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "recalls": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "recall_type": {
            "type": "string"
          },
          "due_date": {
            "type": "string",
            "format": "date"
          },
          "status": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "done_at": {
            "type": "string",
            "format": "date-time"
          },
          "custom_fields": {
            "type": "object",
            "description": "Câmpurile personalizate ale companiei, ca obiect cheie-valoare (vezi „Câmpuri personalizate”).",
            "properties": {}
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "recalls_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "appointment_labels": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "appointment_id": {
            "type": "string",
            "format": "uuid"
          },
          "label_code": {
            "type": "string"
          },
          "set_at": {
            "type": "string",
            "format": "date-time"
          },
          "set_by": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "removed_at": {
            "type": "string",
            "format": "date-time"
          },
          "removed_by": {
            "type": "string"
          }
        }
      },
      "appointment_labels_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "appointment_status_log": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Identificator unic (UUID)."
          },
          "appointment_id": {
            "type": "string",
            "format": "uuid"
          },
          "from_status": {
            "type": "string"
          },
          "to_status": {
            "type": "string"
          },
          "changed_at": {
            "type": "string",
            "format": "date-time"
          },
          "changed_by": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "appointment_status_log_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "location_services": {
        "type": "object",
        "properties": {
          "location_id": {
            "type": "string",
            "format": "uuid"
          },
          "service_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "location_services_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "location_travel": {
        "type": "object",
        "properties": {
          "from_location_id": {
            "type": "string",
            "format": "uuid"
          },
          "to_location_id": {
            "type": "string",
            "format": "uuid"
          },
          "minutes": {
            "type": "integer"
          }
        }
      },
      "location_travel_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "resource_schedules": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "resource_id": {
            "type": "string",
            "format": "uuid"
          },
          "weekday": {
            "type": "integer"
          },
          "start_time": {
            "type": "string",
            "format": "time"
          },
          "end_time": {
            "type": "string",
            "format": "time"
          }
        }
      },
      "resource_schedules_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "schedule_templates": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "employee_id": {
            "type": "string",
            "format": "uuid"
          },
          "location_id": {
            "type": "string",
            "format": "uuid"
          },
          "weekday": {
            "type": "integer"
          },
          "start_time": {
            "type": "string",
            "format": "time"
          },
          "end_time": {
            "type": "string",
            "format": "time"
          },
          "valid_from": {
            "type": "string",
            "format": "date"
          },
          "valid_to": {
            "type": "string",
            "format": "date"
          },
          "resource_id": {
            "type": "string",
            "format": "uuid"
          },
          "repeat_weeks": {
            "type": "integer"
          },
          "note": {
            "type": "string"
          }
        }
      },
      "schedule_templates_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "service_bundles": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "items": {
            "type": "array"
          }
        }
      },
      "service_bundles_input": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "items": {
            "type": "array"
          }
        },
        "required": [
          "name",
          "items"
        ]
      },
      "service_bundle_items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "bundle_id": {
            "type": "string",
            "format": "uuid"
          },
          "service_id": {
            "type": "string",
            "format": "uuid"
          },
          "qty": {
            "type": "number"
          },
          "unit": {
            "type": "string"
          },
          "unit_price": {
            "type": "number"
          },
          "kind": {
            "type": "string"
          },
          "sort_order": {
            "type": "integer"
          }
        }
      },
      "service_bundle_items_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "service_materials": {
        "type": "object",
        "properties": {
          "service_id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "qty": {
            "type": "number"
          }
        }
      },
      "service_materials_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "service_resources": {
        "type": "object",
        "properties": {
          "service_id": {
            "type": "string",
            "format": "uuid"
          },
          "resource_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "service_resources_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "service_specialists": {
        "type": "object",
        "properties": {
          "service_id": {
            "type": "string",
            "format": "uuid"
          },
          "employee_id": {
            "type": "string",
            "format": "uuid"
          },
          "duration_minutes": {
            "type": "integer"
          },
          "fee_mode": {
            "type": "string"
          },
          "fee_value": {
            "type": "number"
          }
        }
      },
      "service_specialists_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "product_attributes": {
        "type": "object",
        "properties": {
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "key": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "product_attributes_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "product_components": {
        "type": "object",
        "properties": {
          "kit_product_id": {
            "type": "string",
            "format": "uuid"
          },
          "component_product_id": {
            "type": "string",
            "format": "uuid"
          },
          "qty": {
            "type": "number"
          }
        }
      },
      "product_components_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "product_price_history": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "price_list_id": {
            "type": "string",
            "format": "uuid"
          },
          "price": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "valid_from": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "product_price_history_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "stock_levels": {
        "type": "object",
        "properties": {
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "warehouse_id": {
            "type": "string",
            "format": "uuid"
          },
          "on_hand": {
            "type": "number"
          }
        }
      },
      "stock_levels_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "stock_reservations": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "qty": {
            "type": "number"
          },
          "source": {
            "type": "string"
          },
          "source_id": {
            "type": "string"
          },
          "channel_id": {
            "type": "string",
            "format": "uuid"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "stock_reservations_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "fx_rates": {
        "type": "object",
        "properties": {
          "rate_date": {
            "type": "string",
            "format": "date"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "rate": {
            "type": "number"
          }
        }
      },
      "fx_rates_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "tax_declarations": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "kind": {
            "type": "string"
          },
          "period": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "xml": {
            "type": "string"
          },
          "summary": {
            "type": "object"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "tax_declarations_input": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "period": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "kind",
          "period"
        ]
      },
      "job_evaluations": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "application_id": {
            "type": "string",
            "format": "uuid"
          },
          "interview_id": {
            "type": "string",
            "format": "uuid"
          },
          "evaluator": {
            "type": "string"
          },
          "scores": {
            "type": "object"
          },
          "total": {
            "type": "number"
          },
          "recommendation": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "job_evaluations_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "job_interviews": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "application_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "starts_at": {
            "type": "string",
            "format": "date-time"
          },
          "duration_min": {
            "type": "integer"
          },
          "place": {
            "type": "string"
          },
          "link": {
            "type": "string"
          },
          "interviewers": {
            "type": "array"
          },
          "offered": {
            "type": "object"
          },
          "note": {
            "type": "string"
          },
          "reminder_sent_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "tasks_claim_at": {
            "type": "string",
            "format": "date-time"
          },
          "tasks_created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "job_interviews_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "library_links": {
        "type": "object",
        "properties": {
          "document_id": {
            "type": "string",
            "format": "uuid"
          },
          "entity_type": {
            "type": "string"
          },
          "entity_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "library_links_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "esign_documents": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "number": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "design": {
            "type": "object"
          },
          "status": {
            "type": "string"
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "template_id": {
            "type": "string"
          },
          "source_type": {
            "type": "string"
          },
          "source_id": {
            "type": "string",
            "format": "uuid"
          },
          "ordered": {
            "type": "boolean"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "message": {
            "type": "string"
          },
          "revision": {
            "type": "integer"
          },
          "revision_of": {
            "type": "string",
            "format": "uuid"
          },
          "created_by": {
            "type": "string"
          },
          "created_name": {
            "type": "string"
          },
          "sent_at": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "type": "string",
            "format": "date-time"
          },
          "voided_at": {
            "type": "string",
            "format": "date-time"
          },
          "void_reason": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "docx": {
            "type": "string"
          },
          "send_mode": {
            "type": "string"
          },
          "verify_mode": {
            "type": "string"
          },
          "remind_days": {
            "type": "number"
          },
          "last_reminded_at": {
            "type": "string",
            "format": "date-time"
          },
          "expiry_notified_at": {
            "type": "string",
            "format": "date-time"
          },
          "lang": {
            "type": "string"
          },
          "fields": {
            "type": "object"
          },
          "pdf_status": {
            "type": "string"
          },
          "pdf_attempts": {
            "type": "integer"
          },
          "signed_pdf_sha256": {
            "type": "string"
          },
          "certificate_sha256": {
            "type": "string"
          },
          "completion_claimed_at": {
            "type": "string",
            "format": "date-time"
          },
          "done_mailed_at": {
            "type": "string",
            "format": "date-time"
          },
          "sealed": {
            "type": "boolean"
          },
          "timestamped": {
            "type": "boolean"
          },
          "source_pdf": {
            "type": "string"
          },
          "page_count": {
            "type": "integer"
          },
          "placements": {
            "type": "object"
          },
          "pdf_base64": {
            "type": "string"
          },
          "contract_id": {
            "type": "string",
            "format": "uuid"
          },
          "signers": {
            "type": "array"
          }
        }
      },
      "esign_documents_input": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "template_id": {
            "type": "string"
          },
          "ordered": {
            "type": "boolean"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "message": {
            "type": "string"
          },
          "verify_mode": {
            "type": "string"
          },
          "remind_days": {
            "type": "number"
          },
          "pdf_base64": {
            "type": "string"
          },
          "contract_id": {
            "type": "string",
            "format": "uuid"
          },
          "signers": {
            "type": "array"
          }
        },
        "required": []
      },
      "esign_signers": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "document_id": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "sort_order": {
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "emailed_at": {
            "type": "string",
            "format": "date-time"
          },
          "viewed_at": {
            "type": "string",
            "format": "date-time"
          },
          "signed_at": {
            "type": "string",
            "format": "date-time"
          },
          "signature": {
            "type": "string"
          },
          "signed_name": {
            "type": "string"
          },
          "ip": {
            "type": "string"
          },
          "user_agent": {
            "type": "string"
          },
          "decline_reason": {
            "type": "string"
          },
          "task_id": {
            "type": "string",
            "format": "uuid"
          },
          "phone": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "step": {
            "type": "integer"
          },
          "consent_version": {
            "type": "integer"
          },
          "consent_text": {
            "type": "string"
          },
          "consented_at": {
            "type": "string",
            "format": "date-time"
          },
          "lang": {
            "type": "string"
          },
          "verified_at": {
            "type": "string",
            "format": "date-time"
          },
          "verified_method": {
            "type": "string"
          },
          "link_version": {
            "type": "integer"
          }
        }
      },
      "esign_signers_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "task_activity": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "task_id": {
            "type": "string",
            "format": "uuid"
          },
          "actor_id": {
            "type": "string"
          },
          "actor_name": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "task_activity_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "task_links": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "task_id": {
            "type": "string",
            "format": "uuid"
          },
          "entity_type": {
            "type": "string"
          },
          "entity_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string"
          }
        }
      },
      "task_links_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "task_watchers": {
        "type": "object",
        "properties": {
          "task_id": {
            "type": "string",
            "format": "uuid"
          },
          "user_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "task_watchers_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "media_items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string"
          },
          "alt": {
            "type": "string"
          },
          "public_url": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "width": {
            "type": "integer"
          },
          "height": {
            "type": "integer"
          },
          "size_bytes": {
            "type": "integer"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "file_type": {
            "type": "string"
          },
          "public_link": {
            "type": "string"
          }
        }
      },
      "media_items_input": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "alt": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ]
      },
      "product_media": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "variant_product_id": {
            "type": "string",
            "format": "uuid"
          },
          "public_url": {
            "type": "string"
          },
          "alt": {
            "type": "string"
          },
          "position": {
            "type": "integer"
          },
          "width": {
            "type": "integer"
          },
          "height": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "media_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "product_media_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "product_option_values": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "option_id": {
            "type": "string",
            "format": "uuid"
          },
          "value": {
            "type": "string"
          },
          "position": {
            "type": "integer"
          },
          "term_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "product_option_values_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "shop_accounts": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "channel_id": {
            "type": "string",
            "format": "uuid"
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string"
          },
          "email_verified_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_login_at": {
            "type": "string",
            "format": "date-time"
          },
          "marketing_consent": {
            "type": "object"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "status": {
            "type": "string"
          },
          "portal_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "shop_accounts_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "shop_addresses": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "channel_id": {
            "type": "string",
            "format": "uuid"
          },
          "label": {
            "type": "string"
          },
          "data": {
            "type": "object"
          },
          "is_default": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "shop_addresses_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "shop_credit_entries": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "channel_id": {
            "type": "string",
            "format": "uuid"
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "amount": {
            "type": "number"
          },
          "reason": {
            "type": "string"
          },
          "order_id": {
            "type": "string",
            "format": "uuid"
          },
          "gift_card_id": {
            "type": "string",
            "format": "uuid"
          },
          "note": {
            "type": "string"
          },
          "actor": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "bucket": {
            "type": "string"
          }
        }
      },
      "shop_credit_entries_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "shop_order_events": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "order_id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string"
          },
          "data": {
            "type": "object"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "actor": {
            "type": "string"
          }
        }
      },
      "shop_order_events_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "shop_order_messages": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "order_id": {
            "type": "string",
            "format": "uuid"
          },
          "direction": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "author": {
            "type": "string"
          },
          "read_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "shop_order_messages_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "shop_product_reviews": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "channel_id": {
            "type": "string"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "order_id": {
            "type": "string",
            "format": "uuid"
          },
          "order_line_id": {
            "type": "string",
            "format": "uuid"
          },
          "account_id": {
            "type": "string",
            "format": "uuid"
          },
          "party_id": {
            "type": "string"
          },
          "rating": {
            "type": "number"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "company_reply": {
            "type": "string"
          },
          "report_count": {
            "type": "integer"
          },
          "invite_expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "published_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "author_name": {
            "type": "string"
          },
          "source": {
            "type": "string"
          }
        }
      },
      "shop_product_reviews_input": {
        "type": "object",
        "properties": {
          "channel_id": {
            "type": "string"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "party_id": {
            "type": "string"
          },
          "rating": {
            "type": "number"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "company_reply": {
            "type": "string"
          },
          "author_name": {
            "type": "string"
          }
        },
        "required": [
          "product_id",
          "rating"
        ]
      },
      "shop_quote_requests": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "channel_id": {
            "type": "string"
          },
          "quote_id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "company": {
            "type": "string"
          },
          "cui": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "product_ids": {
            "type": "array"
          },
          "status": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "shop_quote_requests_input": {
        "type": "object",
        "properties": {
          "channel_id": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "company": {
            "type": "string"
          },
          "cui": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "product_ids": {
            "type": "array"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "channel_id",
          "email"
        ]
      },
      "shop_return_lines": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "return_id": {
            "type": "string",
            "format": "uuid"
          },
          "order_line_id": {
            "type": "string",
            "format": "uuid"
          },
          "qty": {
            "type": "integer"
          },
          "condition": {
            "type": "string"
          }
        }
      },
      "shop_return_lines_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "shop_shipment_lines": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "shipment_id": {
            "type": "string",
            "format": "uuid"
          },
          "order_line_id": {
            "type": "string",
            "format": "uuid"
          },
          "qty": {
            "type": "integer"
          }
        }
      },
      "shop_shipment_lines_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "shop_shipment_parcels": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "shipment_id": {
            "type": "string",
            "format": "uuid"
          },
          "parcel_no": {
            "type": "integer"
          },
          "weight_g": {
            "type": "integer"
          },
          "dims": {
            "type": "object"
          },
          "awb_number": {
            "type": "string"
          }
        }
      },
      "shop_shipment_parcels_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "shop_stock_alerts": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "channel_id": {
            "type": "string"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "consent_text": {
            "type": "string"
          },
          "consent_version": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "notified_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "state": {
            "type": "string"
          }
        }
      },
      "shop_stock_alerts_input": {
        "type": "object",
        "properties": {
          "channel_id": {
            "type": "string"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "state": {
            "type": "string"
          }
        },
        "required": [
          "channel_id",
          "product_id",
          "email"
        ]
      },
      "shop_translations": {
        "type": "object",
        "properties": {
          "channel_id": {
            "type": "string",
            "format": "uuid"
          },
          "text_id": {
            "type": "string"
          },
          "lang": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "shop_translations_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "crm_activity": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "lead_id": {
            "type": "string",
            "format": "uuid"
          },
          "deal_id": {
            "type": "string",
            "format": "uuid"
          },
          "created_by": {
            "type": "string",
            "format": "uuid"
          },
          "event_type": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "prev_step_id": {
            "type": "string",
            "format": "uuid"
          },
          "new_step_id": {
            "type": "string",
            "format": "uuid"
          },
          "prev_status_id": {
            "type": "string",
            "format": "uuid"
          },
          "new_status_id": {
            "type": "string",
            "format": "uuid"
          },
          "scheduled_followup_at": {
            "type": "string",
            "format": "date-time"
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "crm_activity_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "record_profiles": {
        "type": "object",
        "properties": {
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "template_id": {
            "type": "string",
            "format": "uuid"
          },
          "data": {
            "type": "object"
          },
          "updated_by": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "record_profiles_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "record_entry_versions": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "entry_id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "data": {
            "type": "object"
          },
          "changed_by": {
            "type": "string"
          },
          "changed_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "record_entry_versions_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "message_templates": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "key": {
            "type": "string"
          },
          "channel": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "sort_order": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "message_templates_input": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "channel": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          }
        },
        "required": [
          "key",
          "channel",
          "body"
        ]
      },
      "message_lists": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "params": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "message_lists_input": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "params": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "kind"
        ]
      },
      "suppressions": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "channel": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "suppressions_input": {
        "type": "object",
        "properties": {
          "channel": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "channel",
          "address"
        ]
      },
      "contact_consents": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "channel": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "granted": {
            "type": "boolean"
          },
          "source": {
            "type": "string"
          },
          "proof": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "contact_consents_input": {
        "type": "object",
        "properties": {
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "channel": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "granted": {
            "type": "boolean"
          },
          "source": {
            "type": "string"
          },
          "proof": {
            "type": "string"
          }
        },
        "required": [
          "channel",
          "address",
          "granted",
          "source"
        ]
      },
      "message_batches": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "label": {
            "type": "string"
          },
          "template_key": {
            "type": "string"
          },
          "channel": {
            "type": "string"
          },
          "purpose": {
            "type": "string"
          },
          "marketing": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "total": {
            "type": "integer"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "finished_at": {
            "type": "string",
            "format": "date-time"
          },
          "campaign_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "message_batches_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "campaigns": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "blocks": {
            "type": "string"
          },
          "list_ref": {
            "type": "string"
          },
          "smtp_id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time"
          },
          "batch_id": {
            "type": "string",
            "format": "uuid"
          },
          "pause_reason": {
            "type": "string"
          },
          "started_at": {
            "type": "string",
            "format": "date-time"
          },
          "finished_at": {
            "type": "string",
            "format": "date-time"
          },
          "version": {
            "type": "integer"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "channel": {
            "type": "string"
          },
          "sms_body": {
            "type": "string"
          },
          "attribution_days": {
            "type": "number"
          }
        }
      },
      "campaigns_input": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "blocks": {
            "type": "string"
          },
          "list_ref": {
            "type": "string"
          },
          "smtp_id": {
            "type": "string"
          },
          "channel": {
            "type": "string"
          },
          "sms_body": {
            "type": "string"
          },
          "attribution_days": {
            "type": "number"
          }
        },
        "required": [
          "name"
        ]
      },
      "shop_import_sources": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "channel_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "source_type": {
            "type": "string"
          },
          "auth_header": {
            "type": "string"
          },
          "field_map": {
            "type": "string"
          },
          "frequency": {
            "type": "string"
          },
          "update_stock": {
            "type": "boolean"
          },
          "update_price": {
            "type": "boolean"
          },
          "update_content": {
            "type": "boolean"
          },
          "missing_action": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "last_run_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "shop_import_sources_input": {
        "type": "object",
        "properties": {
          "channel_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "field_map": {
            "type": "string"
          },
          "frequency": {
            "type": "string"
          },
          "update_stock": {
            "type": "boolean"
          },
          "update_price": {
            "type": "boolean"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "channel_id",
          "name"
        ]
      },
      "shop_orders": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "number": {
            "type": "string"
          },
          "channel_id": {
            "type": "string"
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "account_id": {
            "type": "string",
            "format": "uuid"
          },
          "cart_id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phone": {
            "type": "string"
          },
          "billing_address": {
            "type": "object"
          },
          "shipping_address": {
            "type": "object"
          },
          "order_status": {
            "type": "string"
          },
          "payment_status": {
            "type": "string"
          },
          "fulfillment_status": {
            "type": "string"
          },
          "payment_method": {
            "type": "string"
          },
          "shipping_rate_id": {
            "type": "string",
            "format": "uuid"
          },
          "shipping_name": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "subtotal": {
            "type": "number"
          },
          "discount_total": {
            "type": "number"
          },
          "shipping_total": {
            "type": "number"
          },
          "cod_fee": {
            "type": "number"
          },
          "tax_total": {
            "type": "number"
          },
          "total": {
            "type": "number"
          },
          "source": {
            "type": "string"
          },
          "external_ref": {
            "type": "string"
          },
          "invoice_id": {
            "type": "string",
            "format": "uuid"
          },
          "customer_note": {
            "type": "string"
          },
          "internal_note": {
            "type": "string"
          },
          "is_test": {
            "type": "boolean"
          },
          "legal_versions": {
            "type": "object"
          },
          "attribution": {
            "type": "object"
          },
          "version": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "discount_id": {
            "type": "string",
            "format": "uuid"
          },
          "custom_fields": {
            "type": "object",
            "description": "Câmpurile personalizate ale companiei, ca obiect cheie-valoare (vezi „Câmpuri personalizate”).",
            "properties": {}
          },
          "shipping": {
            "type": "string"
          },
          "billing": {
            "type": "string"
          },
          "lines": {
            "type": "array"
          },
          "shipping_gross": {
            "type": "number"
          },
          "cod_fee_gross": {
            "type": "number"
          }
        }
      },
      "shop_orders_input": {
        "type": "object",
        "properties": {
          "channel_id": {
            "type": "string"
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phone": {
            "type": "string"
          },
          "payment_method": {
            "type": "string"
          },
          "customer_note": {
            "type": "string"
          },
          "shipping": {
            "type": "string"
          },
          "billing": {
            "type": "string"
          },
          "lines": {
            "type": "array"
          },
          "shipping_gross": {
            "type": "number"
          },
          "cod_fee_gross": {
            "type": "number"
          }
        },
        "required": [
          "channel_id",
          "email",
          "shipping",
          "lines"
        ]
      },
      "shop_order_lines": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "order_id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "sku": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "qty": {
            "type": "integer"
          },
          "unit_price": {
            "type": "number"
          },
          "tax_included": {
            "type": "boolean"
          },
          "vat_rate": {
            "type": "number"
          },
          "discount": {
            "type": "number"
          },
          "line_total": {
            "type": "number"
          },
          "kit_components": {
            "type": "object"
          },
          "position": {
            "type": "integer"
          },
          "unit_cost": {
            "type": "number"
          }
        }
      },
      "shop_order_lines_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "shop_order_payments": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "order_id": {
            "type": "string",
            "format": "uuid"
          },
          "method": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "external_id": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "status": {
            "type": "string"
          },
          "checkout_url": {
            "type": "string"
          },
          "meta": {
            "type": "object"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "shop_order_payments_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "shop_shipments": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "order_id": {
            "type": "string",
            "format": "uuid"
          },
          "warehouse_id": {
            "type": "string",
            "format": "uuid"
          },
          "courier": {
            "type": "string"
          },
          "service": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          },
          "awb_number": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "cod_amount": {
            "type": "number"
          },
          "price": {
            "type": "number"
          },
          "pickup_point": {
            "type": "object"
          },
          "external_id": {
            "type": "string"
          },
          "tracking": {
            "type": "object"
          },
          "error": {
            "type": "string"
          },
          "test_mode": {
            "type": "boolean"
          },
          "stock_issued_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "delivered_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "shop_shipments_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "shop_returns": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "channel_id": {
            "type": "string",
            "format": "uuid"
          },
          "order_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "staff_note": {
            "type": "string"
          },
          "requested_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "shop_returns_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "shop_attributes": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "position": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "custom_fields": {
            "type": "object",
            "description": "Câmpurile personalizate ale companiei, ca obiect cheie-valoare (vezi „Câmpuri personalizate”).",
            "properties": {}
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "shop_attributes_input": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ]
      },
      "shop_attribute_terms": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "attribute_id": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "image_url": {
            "type": "string",
            "format": "uri"
          },
          "position": {
            "type": "integer"
          }
        }
      },
      "shop_attribute_terms_input": {
        "type": "object",
        "properties": {
          "attribute_id": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "image_url": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "attribute_id",
          "value"
        ]
      },
      "product_options": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "position": {
            "type": "integer"
          },
          "attribute_id": {
            "type": "string",
            "format": "uuid"
          },
          "for_variants": {
            "type": "boolean"
          }
        }
      },
      "product_options_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "shop_channels": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "channel_type": {
            "type": "string"
          },
          "marketplace_provider": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "price_list_id": {
            "type": "string",
            "format": "uuid"
          },
          "legal_entity_id": {
            "type": "string"
          },
          "warehouse_ids": {
            "type": "array"
          },
          "allowed_domains": {
            "type": "array"
          },
          "test_mode": {
            "type": "boolean"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "site_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "shop_channels_input": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "channel_type": {
            "type": "string"
          },
          "marketplace_provider": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "price_list_id": {
            "type": "string",
            "format": "uuid"
          },
          "legal_entity_id": {
            "type": "string"
          },
          "warehouse_ids": {
            "type": "array"
          },
          "allowed_domains": {
            "type": "array"
          },
          "test_mode": {
            "type": "boolean"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          }
        },
        "required": [
          "name"
        ]
      },
      "product_prices": {
        "type": "object",
        "properties": {
          "price_list_id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "price": {
            "type": "number"
          },
          "compare_at_price": {
            "type": "number"
          },
          "tax_included": {
            "type": "boolean"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "promo_starts_at": {
            "type": "string",
            "format": "date-time"
          },
          "promo_ends_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "product_prices_input": {
        "type": "object",
        "properties": {
          "price_list_id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "price": {
            "type": "number"
          },
          "compare_at_price": {
            "type": "number"
          },
          "tax_included": {
            "type": "boolean"
          },
          "promo_starts_at": {
            "type": "string",
            "format": "date-time"
          },
          "promo_ends_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "price_list_id",
          "product_id",
          "price"
        ]
      },
      "shop_discounts": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "code": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "value": {
            "type": "number"
          },
          "applicability": {
            "type": "string"
          },
          "target_ids": {
            "type": "array"
          },
          "min_order": {
            "type": "number"
          },
          "starts_at": {
            "type": "string",
            "format": "date-time"
          },
          "ends_at": {
            "type": "string",
            "format": "date-time"
          },
          "max_uses": {
            "type": "number"
          },
          "max_per_customer": {
            "type": "number"
          },
          "channel_ids": {
            "type": "array"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "customer_ids": {
            "type": "array"
          },
          "customer_emails": {
            "type": "array"
          }
        }
      },
      "shop_discounts_input": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "value": {
            "type": "number"
          },
          "applicability": {
            "type": "string"
          },
          "target_ids": {
            "type": "array"
          },
          "min_order": {
            "type": "number"
          },
          "starts_at": {
            "type": "string",
            "format": "date-time"
          },
          "ends_at": {
            "type": "string",
            "format": "date-time"
          },
          "max_uses": {
            "type": "number"
          },
          "max_per_customer": {
            "type": "number"
          },
          "channel_ids": {
            "type": "array"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "customer_ids": {
            "type": "array"
          },
          "customer_emails": {
            "type": "array"
          }
        },
        "required": [
          "type"
        ]
      },
      "shop_shipping_zones": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "channel_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "counties": {
            "type": "array"
          }
        }
      },
      "shop_shipping_zones_input": {
        "type": "object",
        "properties": {
          "channel_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "counties": {
            "type": "array"
          }
        },
        "required": [
          "channel_id",
          "name"
        ]
      },
      "shop_shipping_rates": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "zone_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "suggested_courier": {
            "type": "string"
          },
          "min_order_value": {
            "type": "number"
          },
          "max_order_value": {
            "type": "number"
          },
          "min_weight_g": {
            "type": "number"
          },
          "max_weight_g": {
            "type": "number"
          },
          "price": {
            "type": "number"
          },
          "free_above": {
            "type": "number"
          },
          "cod_fee": {
            "type": "number"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "position": {
            "type": "number"
          }
        }
      },
      "shop_shipping_rates_input": {
        "type": "object",
        "properties": {
          "zone_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "suggested_courier": {
            "type": "string"
          },
          "min_order_value": {
            "type": "number"
          },
          "max_order_value": {
            "type": "number"
          },
          "min_weight_g": {
            "type": "number"
          },
          "max_weight_g": {
            "type": "number"
          },
          "price": {
            "type": "number"
          },
          "free_above": {
            "type": "number"
          },
          "cod_fee": {
            "type": "number"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "position": {
            "type": "number"
          }
        },
        "required": [
          "zone_id",
          "name",
          "price"
        ]
      },
      "content_sites": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "default_lang": {
            "type": "string"
          },
          "languages": {
            "type": "array"
          },
          "preview_url": {
            "type": "string"
          },
          "embed_domains": {
            "type": "array"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "form_settings": {
            "type": "array"
          },
          "events_order_url": {
            "type": "string"
          },
          "events_invite_url": {
            "type": "string"
          }
        }
      },
      "content_sites_input": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "default_lang": {
            "type": "string"
          },
          "languages": {
            "type": "array"
          },
          "preview_url": {
            "type": "string"
          },
          "embed_domains": {
            "type": "array"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "form_settings": {
            "type": "array"
          }
        },
        "required": [
          "name"
        ]
      },
      "content_types": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "site_id": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "label_singular": {
            "type": "string"
          },
          "label_plural": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "supports": {
            "type": "array"
          },
          "singleton": {
            "type": "boolean"
          },
          "url_pattern": {
            "type": "string"
          },
          "list_columns": {
            "type": "array"
          },
          "schema": {
            "type": "array"
          },
          "schema_version": {
            "type": "number"
          },
          "template_key": {
            "type": "string"
          },
          "sort_order": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "content_types_input": {
        "type": "object",
        "properties": {
          "site_id": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "label_singular": {
            "type": "string"
          },
          "label_plural": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "supports": {
            "type": "array"
          },
          "singleton": {
            "type": "boolean"
          },
          "url_pattern": {
            "type": "string"
          },
          "list_columns": {
            "type": "array"
          },
          "schema": {
            "type": "array"
          },
          "schema_version": {
            "type": "number"
          }
        },
        "required": [
          "site_id",
          "label_plural"
        ]
      },
      "content_entries": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "site_id": {
            "type": "string",
            "format": "uuid"
          },
          "type_id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "excerpt": {
            "type": "string"
          },
          "featured_media_id": {
            "type": "string"
          },
          "seo": {
            "type": "array"
          },
          "fields": {
            "type": "array"
          },
          "status": {
            "type": "string"
          },
          "previous_status": {
            "type": "string"
          },
          "publish_at": {
            "type": "string",
            "format": "date-time"
          },
          "announced_at": {
            "type": "string",
            "format": "date-time"
          },
          "author_id": {
            "type": "string"
          },
          "version": {
            "type": "number"
          },
          "media_ids": {
            "type": "array"
          },
          "search_text": {
            "type": "string"
          },
          "deleted_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ștergerii; gol pentru înregistrările active."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "term_ids": {
            "type": "array"
          }
        }
      },
      "content_entries_input": {
        "type": "object",
        "properties": {
          "type_id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "excerpt": {
            "type": "string"
          },
          "featured_media_id": {
            "type": "string"
          },
          "seo": {
            "type": "array"
          },
          "fields": {
            "type": "array"
          },
          "version": {
            "type": "number"
          },
          "term_ids": {
            "type": "array"
          }
        },
        "required": [
          "type_id"
        ]
      },
      "content_taxonomies": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "site_id": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "label_singular": {
            "type": "string"
          },
          "label_plural": {
            "type": "string"
          },
          "hierarchical": {
            "type": "boolean"
          },
          "type_ids": {
            "type": "array"
          },
          "schema": {
            "type": "array"
          },
          "schema_version": {
            "type": "number"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "content_taxonomies_input": {
        "type": "object",
        "properties": {
          "site_id": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "label_singular": {
            "type": "string"
          },
          "label_plural": {
            "type": "string"
          },
          "hierarchical": {
            "type": "boolean"
          },
          "type_ids": {
            "type": "array"
          },
          "schema": {
            "type": "array"
          },
          "schema_version": {
            "type": "number"
          }
        },
        "required": [
          "site_id",
          "label_plural"
        ]
      },
      "content_terms": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "taxonomy_id": {
            "type": "string"
          },
          "site_id": {
            "type": "string",
            "format": "uuid"
          },
          "parent_id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "sort_order": {
            "type": "number"
          },
          "fields": {
            "type": "array"
          },
          "media_ids": {
            "type": "array"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "content_terms_input": {
        "type": "object",
        "properties": {
          "taxonomy_id": {
            "type": "string"
          },
          "parent_id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "sort_order": {
            "type": "number"
          },
          "fields": {
            "type": "array"
          }
        },
        "required": [
          "taxonomy_id",
          "name"
        ]
      },
      "content_entry_terms": {
        "type": "object",
        "properties": {
          "entry_id": {
            "type": "string",
            "format": "uuid"
          },
          "term_id": {
            "type": "string",
            "format": "uuid"
          },
          "field_key": {
            "type": "string"
          },
          "sort_order": {
            "type": "integer"
          }
        }
      },
      "content_entry_terms_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "content_revisions": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "entry_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer"
          },
          "snapshot": {
            "type": "object"
          },
          "reason": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "content_revisions_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "content_menus": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "site_id": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "items": {
            "type": "array"
          },
          "media_ids": {
            "type": "array"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "content_menus_input": {
        "type": "object",
        "properties": {
          "site_id": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "items": {
            "type": "array"
          }
        },
        "required": [
          "site_id",
          "name"
        ]
      },
      "content_redirects": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "site_id": {
            "type": "string"
          },
          "from_path": {
            "type": "string"
          },
          "to_path": {
            "type": "string"
          },
          "status_code": {
            "type": "number"
          },
          "auto": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "content_redirects_input": {
        "type": "object",
        "properties": {
          "site_id": {
            "type": "string"
          },
          "from_path": {
            "type": "string"
          },
          "to_path": {
            "type": "string"
          },
          "status_code": {
            "type": "number"
          }
        },
        "required": [
          "site_id",
          "from_path",
          "to_path"
        ]
      },
      "content_translations": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "entry_id": {
            "type": "string"
          },
          "term_id": {
            "type": "string"
          },
          "scope_id": {
            "type": "string",
            "format": "uuid"
          },
          "lang": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "data": {
            "type": "array"
          },
          "media_ids": {
            "type": "array"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "search_text": {
            "type": "string"
          }
        }
      },
      "content_translations_input": {
        "type": "object",
        "properties": {
          "entry_id": {
            "type": "string"
          },
          "term_id": {
            "type": "string"
          },
          "lang": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "data": {
            "type": "array"
          }
        },
        "required": [
          "lang"
        ]
      },
      "content_form_submissions": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "site_id": {
            "type": "string",
            "format": "uuid"
          },
          "form_key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "page": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "fields": {
            "type": "object"
          },
          "consent": {
            "type": "boolean"
          },
          "crm_status": {
            "type": "string"
          },
          "crm_sent_at": {
            "type": "string",
            "format": "date-time"
          },
          "read_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "notify_status": {
            "type": "string"
          }
        }
      },
      "content_form_submissions_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "crm_leads": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "funnel_id": {
            "type": "string",
            "format": "uuid"
          },
          "assigned_to": {
            "type": "string",
            "format": "uuid"
          },
          "full_name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "phone_key": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "birth_date": {
            "type": "string",
            "format": "date"
          },
          "location": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "campaign": {
            "type": "string"
          },
          "adset": {
            "type": "string"
          },
          "ad": {
            "type": "string"
          },
          "form_id": {
            "type": "string"
          },
          "platform_lead_id": {
            "type": "string"
          },
          "forms_completed": {
            "type": "integer"
          },
          "lead_added_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "custom_fields": {
            "type": "object",
            "description": "Câmpurile personalizate ale companiei, ca obiect cheie-valoare (vezi „Câmpuri personalizate”).",
            "properties": {}
          },
          "last_entry_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_source": {
            "type": "string"
          },
          "last_campaign": {
            "type": "string"
          },
          "last_adset": {
            "type": "string"
          },
          "last_ad": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "crm_leads_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "crm_deals": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "lead_id": {
            "type": "string",
            "format": "uuid"
          },
          "funnel_id": {
            "type": "string",
            "format": "uuid"
          },
          "current_step_id": {
            "type": "string",
            "format": "uuid"
          },
          "current_status_id": {
            "type": "string",
            "format": "uuid"
          },
          "outcome": {
            "type": "string"
          },
          "value": {
            "type": "number"
          },
          "source": {
            "type": "string"
          },
          "campaign": {
            "type": "string"
          },
          "adset": {
            "type": "string"
          },
          "ad": {
            "type": "string"
          },
          "custom_fields": {
            "type": "object",
            "description": "Câmpurile personalizate ale companiei, ca obiect cheie-valoare (vezi „Câmpuri personalizate”).",
            "properties": {}
          },
          "opened_at": {
            "type": "string",
            "format": "date-time"
          },
          "closed_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "last_entry_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_source": {
            "type": "string"
          },
          "last_campaign": {
            "type": "string"
          },
          "last_adset": {
            "type": "string"
          },
          "last_ad": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "crm_deals_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "crm_entries": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "lead_id": {
            "type": "string",
            "format": "uuid"
          },
          "deal_id": {
            "type": "string",
            "format": "uuid"
          },
          "source": {
            "type": "string"
          },
          "campaign": {
            "type": "string"
          },
          "adset": {
            "type": "string"
          },
          "ad": {
            "type": "string"
          },
          "form_id": {
            "type": "string"
          },
          "platform_lead_id": {
            "type": "string"
          },
          "channel": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "form_data": {
            "type": "object"
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          },
          "deleted_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ștergerii; gol pentru înregistrările active."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "crm_entries_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "crm_transactions": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "lead_id": {
            "type": "string",
            "format": "uuid"
          },
          "deal_id": {
            "type": "string",
            "format": "uuid"
          },
          "transaction_date": {
            "type": "string",
            "format": "date"
          },
          "amount": {
            "type": "number"
          },
          "paid": {
            "type": "boolean"
          },
          "description": {
            "type": "string"
          },
          "custom_fields": {
            "type": "object",
            "description": "Câmpurile personalizate ale companiei, ca obiect cheie-valoare (vezi „Câmpuri personalizate”).",
            "properties": {}
          },
          "source": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "crm_transactions_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "crm_statuses": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "funnel_id": {
            "type": "string",
            "format": "uuid"
          },
          "funnel_name": {
            "type": "string"
          },
          "step_id": {
            "type": "string",
            "format": "uuid"
          },
          "step_name": {
            "type": "string"
          },
          "step_position": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "position": {
            "type": "integer"
          },
          "is_default": {
            "type": "boolean"
          },
          "outcome_type": {
            "type": "string"
          }
        }
      },
      "crm_statuses_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "crm_employees": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "full_name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "crm_employees_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "field_definitions": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "entity_key": {
            "type": "string"
          },
          "field_key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "field_type": {
            "type": "string"
          },
          "required": {
            "type": "boolean"
          },
          "options": {
            "type": "array"
          },
          "list_visible": {
            "type": "boolean"
          },
          "form_order": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "label_i18n": {
            "type": "object"
          },
          "entity": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "nomenclature": {
            "type": "string"
          },
          "multiple": {
            "type": "boolean"
          }
        }
      },
      "field_definitions_input": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "required": {
            "type": "boolean"
          },
          "options": {
            "type": "array"
          },
          "list_visible": {
            "type": "boolean"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "entity": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "nomenclature": {
            "type": "string"
          },
          "multiple": {
            "type": "boolean"
          }
        },
        "required": [
          "label",
          "entity",
          "type"
        ]
      },
      "status_definitions": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "entity_key": {
            "type": "string"
          },
          "status_key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "sort_order": {
            "type": "integer"
          },
          "is_terminal": {
            "type": "boolean"
          },
          "counts_as_worked": {
            "type": "boolean"
          },
          "label_i18n": {
            "type": "string"
          },
          "entity": {
            "type": "string"
          }
        }
      },
      "status_definitions_input": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "is_terminal": {
            "type": "boolean"
          },
          "counts_as_worked": {
            "type": "boolean"
          },
          "label_i18n": {
            "type": "string"
          },
          "entity": {
            "type": "string"
          }
        },
        "required": [
          "label",
          "entity"
        ]
      },
      "nomenclatures": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "is_system": {
            "type": "boolean"
          },
          "sort_order": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "label_i18n": {
            "type": "object"
          }
        }
      },
      "nomenclatures_input": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          }
        },
        "required": [
          "label"
        ]
      },
      "nomenclature_items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "nomenclature_id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "attributes": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "sort_order": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "label_i18n": {
            "type": "object"
          },
          "nomenclature_key": {
            "type": "string"
          }
        }
      },
      "nomenclature_items_input": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "attributes": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "nomenclature_key": {
            "type": "string"
          }
        },
        "required": [
          "label",
          "nomenclature_key"
        ]
      },
      "legal_entities": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "is_default": {
            "type": "boolean"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "legal_name": {
            "type": "string"
          },
          "cui": {
            "type": "string"
          },
          "reg_com": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "county": {
            "type": "string"
          },
          "postal_code": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "iban": {
            "type": "string"
          },
          "bank": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "legal_entities_input": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "legal_name": {
            "type": "string"
          },
          "cui": {
            "type": "string"
          },
          "reg_com": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "county": {
            "type": "string"
          },
          "postal_code": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "iban": {
            "type": "string"
          },
          "bank": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ]
      },
      "roles": {
        "type": "object",
        "properties": {
          "role_key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "permissions": {
            "type": "string"
          },
          "is_system": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "description": {
            "type": "string"
          },
          "template_key": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "label_i18n": {
            "type": "string"
          },
          "description_i18n": {
            "type": "string"
          }
        }
      },
      "roles_input": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "permissions": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "template_key": {
            "type": "string"
          },
          "label_i18n": {
            "type": "string"
          },
          "description_i18n": {
            "type": "string"
          }
        },
        "required": [
          "label"
        ]
      },
      "agents": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "template_key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "current_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "schedule": {
            "type": "array"
          },
          "probed_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "last_run_at": {
            "type": "string",
            "format": "date-time"
          },
          "next_run_at": {
            "type": "string",
            "format": "date-time"
          },
          "stopped_reason": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "department_id": {
            "type": "string"
          },
          "reports_to": {
            "type": "string"
          },
          "avatar": {
            "type": "string"
          },
          "is_custom": {
            "type": "boolean"
          },
          "role": {
            "type": "string"
          },
          "steps": {
            "type": "array"
          },
          "rules": {
            "type": "string"
          },
          "params": {
            "type": "array"
          },
          "comment": {
            "type": "string"
          }
        }
      },
      "agents_input": {
        "type": "object",
        "properties": {
          "template_key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "schedule": {
            "type": "array"
          },
          "department_id": {
            "type": "string"
          },
          "reports_to": {
            "type": "string"
          },
          "avatar": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "steps": {
            "type": "array"
          },
          "rules": {
            "type": "string"
          },
          "params": {
            "type": "array"
          },
          "comment": {
            "type": "string"
          }
        },
        "required": []
      },
      "agent_versions": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "agent_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer"
          },
          "rules": {
            "type": "string"
          },
          "params": {
            "type": "object"
          },
          "comment": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "role": {
            "type": "string"
          },
          "steps": {
            "type": "object"
          }
        }
      },
      "agent_versions_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "agent_runs": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "agent_id": {
            "type": "string",
            "format": "uuid"
          },
          "version_id": {
            "type": "string",
            "format": "uuid"
          },
          "trigger": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "dry_run": {
            "type": "boolean"
          },
          "tainted": {
            "type": "boolean"
          },
          "modules": {
            "type": "array"
          },
          "started_at": {
            "type": "string",
            "format": "date-time"
          },
          "finished_at": {
            "type": "string",
            "format": "date-time"
          },
          "cost_usd": {
            "type": "number"
          },
          "sell_amount": {
            "type": "number"
          },
          "sell_currency": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        }
      },
      "agent_runs_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "agent_actions": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "agent_id": {
            "type": "string",
            "format": "uuid"
          },
          "run_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string"
          },
          "target_type": {
            "type": "string"
          },
          "target_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "tainted": {
            "type": "boolean"
          },
          "decided_by": {
            "type": "string"
          },
          "decided_at": {
            "type": "string",
            "format": "date-time"
          },
          "result": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "agent_actions_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "agent_alerts": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "agent_id": {
            "type": "string",
            "format": "uuid"
          },
          "run_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string"
          },
          "severity": {
            "type": "string"
          },
          "detail": {
            "type": "object"
          },
          "auto_action": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "closed_at": {
            "type": "string",
            "format": "date-time"
          },
          "closed_by": {
            "type": "string"
          }
        }
      },
      "agent_alerts_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "agent_requests": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "agent_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string"
          },
          "channel_id": {
            "type": "string",
            "format": "uuid"
          },
          "message_id": {
            "type": "string",
            "format": "uuid"
          },
          "parent_id": {
            "type": "string",
            "format": "uuid"
          },
          "task_id": {
            "type": "string",
            "format": "uuid"
          },
          "requested_by": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "taken_at": {
            "type": "string",
            "format": "date-time"
          },
          "finished_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "agent_requests_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "agent_departments": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name_ro": {
            "type": "string"
          },
          "name_en": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "responsible_id": {
            "type": "string"
          },
          "keywords": {
            "type": "array"
          },
          "description": {
            "type": "string"
          },
          "pos_x": {
            "type": "number"
          },
          "pos_y": {
            "type": "number"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "agent_departments_input": {
        "type": "object",
        "properties": {
          "name_ro": {
            "type": "string"
          },
          "name_en": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "responsible_id": {
            "type": "string"
          },
          "keywords": {
            "type": "array"
          },
          "description": {
            "type": "string"
          },
          "pos_x": {
            "type": "number"
          },
          "pos_y": {
            "type": "number"
          }
        },
        "required": [
          "name_ro"
        ]
      },
      "agent_knowledge_sources": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "agent_id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "ref": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "trust": {
            "type": "string"
          },
          "module": {
            "type": "string"
          },
          "refresh": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "chunk_count": {
            "type": "integer"
          },
          "last_read_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_changed_at": {
            "type": "string",
            "format": "date-time"
          },
          "next_refresh_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "file_mime": {
            "type": "string"
          },
          "file_pages": {
            "type": "integer"
          },
          "ocr_method": {
            "type": "string"
          }
        }
      },
      "agent_knowledge_sources_input": {
        "type": "object",
        "properties": {
          "agent_id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "ref": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "module": {
            "type": "string"
          },
          "refresh": {
            "type": "string"
          }
        },
        "required": [
          "title"
        ]
      },
      "agent_skills": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "source": {
            "type": "string"
          },
          "catalog_key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "files": {
            "type": "array"
          },
          "removed": {
            "type": "object"
          },
          "findings": {
            "type": "object"
          },
          "ai_report": {
            "type": "object"
          },
          "origin_url": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "quarantine_reason": {
            "type": "string"
          },
          "approved_by": {
            "type": "string"
          },
          "approved_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "url": {
            "type": "string"
          }
        }
      },
      "agent_skills_input": {
        "type": "object",
        "properties": {
          "catalog_key": {
            "type": "string"
          },
          "files": {
            "type": "array"
          },
          "url": {
            "type": "string"
          }
        },
        "required": []
      },
      "brand_kits": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "site_id": {
            "type": "string"
          },
          "logo_url": {
            "type": "string"
          },
          "colors": {
            "type": "array"
          },
          "fonts": {
            "type": "array"
          },
          "tone": {
            "type": "string"
          },
          "audience": {
            "type": "string"
          },
          "forbidden": {
            "type": "array"
          },
          "required": {
            "type": "array"
          },
          "examples": {
            "type": "array"
          },
          "version": {
            "type": "integer"
          },
          "updated_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "comment": {
            "type": "string"
          }
        }
      },
      "brand_kits_input": {
        "type": "object",
        "properties": {
          "site_id": {
            "type": "string"
          },
          "logo_url": {
            "type": "string"
          },
          "colors": {
            "type": "array"
          },
          "fonts": {
            "type": "array"
          },
          "tone": {
            "type": "string"
          },
          "audience": {
            "type": "string"
          },
          "forbidden": {
            "type": "array"
          },
          "required": {
            "type": "array"
          },
          "examples": {
            "type": "array"
          },
          "comment": {
            "type": "string"
          }
        },
        "required": []
      },
      "agent_connections": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "access_module": {
            "type": "string"
          },
          "allowed_tools": {
            "type": "array"
          },
          "tools_cache": {
            "type": "object"
          },
          "read_only": {
            "type": "boolean"
          },
          "cache_ttl_sec": {
            "type": "number"
          },
          "status": {
            "type": "string"
          },
          "last_error": {
            "type": "string"
          },
          "last_used_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "secret": {
            "type": "string"
          },
          "clear_secret": {
            "type": "boolean"
          }
        }
      },
      "agent_connections_input": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "access_module": {
            "type": "string"
          },
          "allowed_tools": {
            "type": "array"
          },
          "read_only": {
            "type": "boolean"
          },
          "cache_ttl_sec": {
            "type": "number"
          },
          "secret": {
            "type": "string"
          },
          "clear_secret": {
            "type": "boolean"
          }
        },
        "required": [
          "name"
        ]
      },
      "chat_channels": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "topic": {
            "type": "string"
          },
          "dm_key": {
            "type": "string"
          },
          "entity_type": {
            "type": "string"
          },
          "entity_id": {
            "type": "string",
            "format": "uuid"
          },
          "ai_enabled": {
            "type": "boolean"
          },
          "ai_scanned_seq": {
            "type": "integer"
          },
          "last_seq": {
            "type": "integer"
          },
          "last_message_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "archived_at": {
            "type": "string",
            "format": "date-time"
          },
          "member_ids": {
            "type": "array"
          },
          "archived": {
            "type": "boolean"
          }
        }
      },
      "chat_channels_input": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "topic": {
            "type": "string"
          },
          "ai_enabled": {
            "type": "boolean"
          },
          "member_ids": {
            "type": "array"
          },
          "archived": {
            "type": "boolean"
          }
        },
        "required": [
          "name"
        ]
      },
      "chat_messages": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "channel_id": {
            "type": "string",
            "format": "uuid"
          },
          "user_id": {
            "type": "string"
          },
          "seq": {
            "type": "integer"
          },
          "parent_id": {
            "type": "string",
            "format": "uuid"
          },
          "reply_count": {
            "type": "integer"
          },
          "last_reply_at": {
            "type": "string",
            "format": "date-time"
          },
          "body": {
            "type": "string"
          },
          "mentions": {
            "type": "array"
          },
          "entity_refs": {
            "type": "object"
          },
          "pinned_at": {
            "type": "string",
            "format": "date-time"
          },
          "pinned_by": {
            "type": "string"
          },
          "edited_at": {
            "type": "string",
            "format": "date-time"
          },
          "deleted_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ștergerii; gol pentru înregistrările active."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "ticket_id": {
            "type": "string",
            "format": "uuid"
          },
          "ticket_claim_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "chat_messages_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "qr_links": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "entity_type": {
            "type": "string"
          },
          "entity_id": {
            "type": "string",
            "format": "uuid"
          },
          "code_id": {
            "type": "string",
            "format": "uuid"
          },
          "short_code": {
            "type": "string"
          },
          "short_url": {
            "type": "string"
          },
          "destination": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "scans_total": {
            "type": "integer"
          },
          "last_scan_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_synced_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "fallback_url": {
            "type": "string"
          },
          "valid_from": {
            "type": "string"
          },
          "valid_until": {
            "type": "string"
          },
          "style": {
            "type": "object"
          }
        }
      },
      "qr_links_input": {
        "type": "object",
        "properties": {
          "destination": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "fallback_url": {
            "type": "string"
          },
          "valid_from": {
            "type": "string"
          },
          "valid_until": {
            "type": "string"
          }
        },
        "required": [
          "destination",
          "name"
        ]
      },
      "notes": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "owner_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "plain_text": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "pinned": {
            "type": "boolean"
          },
          "visibility": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "version": {
            "type": "number"
          },
          "archived_at": {
            "type": "string",
            "format": "date-time"
          },
          "deleted_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ștergerii; gol pentru înregistrările active."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "media_ids": {
            "type": "array"
          },
          "content_at": {
            "type": "string",
            "format": "date-time"
          },
          "content_by": {
            "type": "string"
          },
          "deleted_by": {
            "type": "string"
          },
          "archived": {
            "type": "boolean"
          },
          "tag_ids": {
            "type": "array"
          },
          "links": {
            "type": "string"
          }
        }
      },
      "notes_input": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "pinned": {
            "type": "boolean"
          },
          "kind": {
            "type": "string"
          },
          "version": {
            "type": "number"
          },
          "archived": {
            "type": "boolean"
          },
          "tag_ids": {
            "type": "array"
          },
          "links": {
            "type": "string"
          }
        },
        "required": []
      },
      "note_tags": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "owner_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "note_tags_input": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "color": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ]
      },
      "note_comments": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "note_id": {
            "type": "string"
          },
          "author_id": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "mentions": {
            "type": "array"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "edited_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "note_comments_input": {
        "type": "object",
        "properties": {
          "note_id": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "mentions": {
            "type": "array"
          }
        },
        "required": [
          "note_id",
          "body"
        ]
      },
      "note_links": {
        "type": "object",
        "properties": {
          "note_id": {
            "type": "string",
            "format": "uuid"
          },
          "entity_type": {
            "type": "string"
          },
          "entity_id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "note_links_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "note_versions": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "note_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "saved_by": {
            "type": "string"
          },
          "saved_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "note_versions_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "note_templates": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "position": {
            "type": "integer"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "note_templates_input": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ]
      },
      "stamp_programs": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "stamps_required": {
            "type": "number"
          },
          "reward_text": {
            "type": "string"
          },
          "stamp_idle_days": {
            "type": "number"
          },
          "reward_valid_days": {
            "type": "number"
          },
          "max_per_action": {
            "type": "number"
          },
          "max_per_day": {
            "type": "number"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "location_ids": {
            "type": "array"
          },
          "referral_referrer_stamps": {
            "type": "number"
          },
          "referral_friend_stamps": {
            "type": "number"
          },
          "referral_monthly_limit": {
            "type": "number"
          },
          "referral_referrer_points": {
            "type": "number"
          },
          "referral_friend_points": {
            "type": "number"
          }
        }
      },
      "stamp_programs_input": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "stamps_required": {
            "type": "number"
          },
          "reward_text": {
            "type": "string"
          },
          "stamp_idle_days": {
            "type": "number"
          },
          "reward_valid_days": {
            "type": "number"
          },
          "max_per_action": {
            "type": "number"
          },
          "max_per_day": {
            "type": "number"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "location_ids": {
            "type": "array"
          },
          "referral_referrer_stamps": {
            "type": "number"
          },
          "referral_friend_stamps": {
            "type": "number"
          },
          "referral_monthly_limit": {
            "type": "number"
          },
          "referral_referrer_points": {
            "type": "number"
          },
          "referral_friend_points": {
            "type": "number"
          }
        },
        "required": [
          "name",
          "stamps_required",
          "reward_text"
        ]
      },
      "stamp_cards": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "program_id": {
            "type": "string"
          },
          "party_id": {
            "type": "string"
          },
          "holder_name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "contact_verified_at": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "referral_code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "stamp_cards_input": {
        "type": "object",
        "properties": {
          "program_id": {
            "type": "string"
          },
          "party_id": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "referral_code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "program_id"
        ]
      },
      "stamp_entries": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "card_id": {
            "type": "string",
            "format": "uuid"
          },
          "qty": {
            "type": "integer"
          },
          "reason": {
            "type": "string"
          },
          "undoes_id": {
            "type": "string",
            "format": "uuid"
          },
          "idempotency_key": {
            "type": "string"
          },
          "actor_id": {
            "type": "string"
          },
          "actor_name": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "location_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "stamp_entries_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "stamp_rewards": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "card_id": {
            "type": "string",
            "format": "uuid"
          },
          "entry_id": {
            "type": "string",
            "format": "uuid"
          },
          "reward_text": {
            "type": "string"
          },
          "stamps_used": {
            "type": "integer"
          },
          "earned_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "redeemed_at": {
            "type": "string",
            "format": "date-time"
          },
          "redeemed_by_name": {
            "type": "string"
          },
          "cancelled_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "redeemed_location_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "stamp_rewards_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "stamp_referrals": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "referrer_card_id": {
            "type": "string",
            "format": "uuid"
          },
          "friend_card_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "trigger_entry_id": {
            "type": "string",
            "format": "uuid"
          },
          "referrer_entry_id": {
            "type": "string",
            "format": "uuid"
          },
          "friend_entry_id": {
            "type": "string",
            "format": "uuid"
          },
          "rewarded_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "referrer_points_entry_id": {
            "type": "string",
            "format": "uuid"
          },
          "friend_points_entry_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "stamp_referrals_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "loyalty_challenges": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string"
          },
          "metric": {
            "type": "string"
          },
          "goal": {
            "type": "number"
          },
          "days": {
            "type": "integer"
          },
          "reward_points": {
            "type": "integer"
          },
          "active": {
            "type": "boolean"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "loyalty_challenges_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "loyalty_challenge_awards": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "challenge_id": {
            "type": "string",
            "format": "uuid"
          },
          "account_id": {
            "type": "string",
            "format": "uuid"
          },
          "entry_id": {
            "type": "string",
            "format": "uuid"
          },
          "awarded_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "loyalty_challenge_awards_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "points_accounts": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "source": {
            "type": "string"
          },
          "joined_by_name": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "points_accounts_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "points_entries": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "account_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string"
          },
          "points": {
            "type": "integer"
          },
          "money": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "source": {
            "type": "string"
          },
          "payment_id": {
            "type": "string",
            "format": "uuid"
          },
          "document_id": {
            "type": "string",
            "format": "uuid"
          },
          "expires_on": {
            "type": "string",
            "format": "date"
          },
          "reverses_id": {
            "type": "string",
            "format": "uuid"
          },
          "idempotency_key": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "location_id": {
            "type": "string",
            "format": "uuid"
          },
          "actor_name": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "seq": {
            "type": "integer"
          }
        }
      },
      "points_entries_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "gift_card_orders": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "channel_id": {
            "type": "string",
            "format": "uuid"
          },
          "amount": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "buyer_email": {
            "type": "string"
          },
          "buyer_name": {
            "type": "string"
          },
          "recipient_name": {
            "type": "string"
          },
          "recipient_email": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "external_id": {
            "type": "string"
          },
          "payment_mode": {
            "type": "string"
          },
          "payment_account_id": {
            "type": "string"
          },
          "card_id": {
            "type": "string",
            "format": "uuid"
          },
          "invoice_id": {
            "type": "string",
            "format": "uuid"
          },
          "emailed_to": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "paid_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "gift_card_orders_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "gift_cards": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "legal_entity_id": {
            "type": "string",
            "format": "uuid"
          },
          "code_last4": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "initial_value": {
            "type": "number"
          },
          "status": {
            "type": "string"
          },
          "expires_on": {
            "type": "string",
            "format": "date"
          },
          "buyer_party_id": {
            "type": "string",
            "format": "uuid"
          },
          "recipient_name": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "sale_method": {
            "type": "string"
          },
          "sale_reference": {
            "type": "string"
          },
          "location_id": {
            "type": "string",
            "format": "uuid"
          },
          "idempotency_key": {
            "type": "string"
          },
          "sold_by_name": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "gift_message": {
            "type": "string"
          },
          "access_log": {
            "type": "object"
          }
        }
      },
      "gift_cards_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "gift_card_entries": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "card_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "payment_id": {
            "type": "string",
            "format": "uuid"
          },
          "payment_source": {
            "type": "string"
          },
          "location_id": {
            "type": "string",
            "format": "uuid"
          },
          "idempotency_key": {
            "type": "string"
          },
          "document_id": {
            "type": "string",
            "format": "uuid"
          },
          "reverses_id": {
            "type": "string",
            "format": "uuid"
          },
          "refund_method": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "actor_name": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "gift_card_entries_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "subscription_plans": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "price": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "vat_rate": {
            "type": "number"
          },
          "interval_unit": {
            "type": "string"
          },
          "interval_count": {
            "type": "number"
          },
          "trial_days": {
            "type": "number"
          },
          "setup_fee": {
            "type": "number"
          },
          "min_cycles": {
            "type": "number"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "version": {
            "type": "integer"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "services_discount_pct": {
            "type": "number"
          },
          "sell_online": {
            "type": "boolean"
          },
          "all_courses": {
            "type": "boolean"
          },
          "course_ids": {
            "type": "array"
          }
        }
      },
      "subscription_plans_input": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "price": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "vat_rate": {
            "type": "number"
          },
          "interval_unit": {
            "type": "string"
          },
          "interval_count": {
            "type": "number"
          },
          "trial_days": {
            "type": "number"
          },
          "setup_fee": {
            "type": "number"
          },
          "min_cycles": {
            "type": "number"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "services_discount_pct": {
            "type": "number"
          },
          "sell_online": {
            "type": "boolean"
          },
          "all_courses": {
            "type": "boolean"
          },
          "course_ids": {
            "type": "array"
          }
        },
        "required": [
          "name",
          "price"
        ]
      },
      "subscription_plan_prices": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "plan_id": {
            "type": "string"
          },
          "service_id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "value": {
            "type": "number"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "limit_qty": {
            "type": "number"
          }
        }
      },
      "subscription_plan_prices_input": {
        "type": "object",
        "properties": {
          "plan_id": {
            "type": "string"
          },
          "service_id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "value": {
            "type": "number"
          },
          "limit_qty": {
            "type": "number"
          }
        },
        "required": [
          "plan_id",
          "service_id",
          "kind"
        ]
      },
      "subscriptions": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "plan_id": {
            "type": "string"
          },
          "plan_name": {
            "type": "string"
          },
          "price": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "vat_rate": {
            "type": "number"
          },
          "interval_unit": {
            "type": "string"
          },
          "interval_count": {
            "type": "integer"
          },
          "setup_fee": {
            "type": "number"
          },
          "min_cycles": {
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "payment_mode": {
            "type": "string"
          },
          "starts_on": {
            "type": "string"
          },
          "trial_ends_on": {
            "type": "string",
            "format": "date"
          },
          "anchor_day": {
            "type": "integer"
          },
          "next_period_start": {
            "type": "string",
            "format": "date"
          },
          "cancel_at_period_end": {
            "type": "boolean"
          },
          "cancelled_at": {
            "type": "string",
            "format": "date-time"
          },
          "cancel_reason": {
            "type": "string"
          },
          "paused_at": {
            "type": "string",
            "format": "date-time"
          },
          "note": {
            "type": "string"
          },
          "version": {
            "type": "integer"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "card_brand": {
            "type": "string"
          },
          "card_last4": {
            "type": "string"
          },
          "card_exp_month": {
            "type": "integer"
          },
          "card_exp_year": {
            "type": "integer"
          },
          "card_saved_at": {
            "type": "string",
            "format": "date-time"
          },
          "next_plan_id": {
            "type": "string",
            "format": "uuid"
          },
          "next_price": {
            "type": "number"
          },
          "trial_days": {
            "type": "number"
          }
        }
      },
      "subscriptions_input": {
        "type": "object",
        "properties": {
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "plan_id": {
            "type": "string"
          },
          "price": {
            "type": "number"
          },
          "starts_on": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "trial_days": {
            "type": "number"
          }
        },
        "required": [
          "party_id",
          "plan_id"
        ]
      },
      "subscription_cycles": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "subscription_id": {
            "type": "string",
            "format": "uuid"
          },
          "period_start": {
            "type": "string",
            "format": "date"
          },
          "period_end": {
            "type": "string",
            "format": "date"
          },
          "due_date": {
            "type": "string",
            "format": "date"
          },
          "amount": {
            "type": "number"
          },
          "setup_amount": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "status": {
            "type": "string"
          },
          "invoice_id": {
            "type": "string",
            "format": "uuid"
          },
          "invoice_claimed_at": {
            "type": "string",
            "format": "date-time"
          },
          "invoice_error": {
            "type": "string"
          },
          "paid_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "charge_state": {
            "type": "string"
          },
          "charge_attempts": {
            "type": "integer"
          },
          "next_attempt_on": {
            "type": "string",
            "format": "date"
          },
          "charge_claimed_at": {
            "type": "string",
            "format": "date-time"
          },
          "charge_ref": {
            "type": "string"
          },
          "charge_error": {
            "type": "string"
          },
          "charged_at": {
            "type": "string",
            "format": "date-time"
          },
          "charged_mode": {
            "type": "string"
          },
          "charged_account": {
            "type": "string"
          },
          "checkout_ref": {
            "type": "string"
          },
          "checkout_url": {
            "type": "string"
          },
          "checkout_until": {
            "type": "string",
            "format": "date-time"
          },
          "refunded_at": {
            "type": "string",
            "format": "date-time"
          },
          "refund_ref": {
            "type": "string"
          }
        }
      },
      "subscription_cycles_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "subscription_events": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "subscription_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string"
          },
          "data": {
            "type": "object"
          },
          "actor_name": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "subscription_events_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "courses": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "title": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "image_url": {
            "type": "string"
          },
          "price": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "status": {
            "type": "string"
          },
          "access_days": {
            "type": "number"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "certificate_enabled": {
            "type": "boolean"
          },
          "certificate_template": {
            "type": "string"
          },
          "certificate_color": {
            "type": "string"
          },
          "certificate_signer": {
            "type": "string"
          },
          "instructor_employee_id": {
            "type": "string"
          },
          "instructor_name": {
            "type": "string"
          },
          "instructor_title": {
            "type": "string"
          },
          "instructor_bio": {
            "type": "string"
          },
          "instructor_photo_url": {
            "type": "string"
          },
          "qa_enabled": {
            "type": "boolean"
          },
          "reviews_enabled": {
            "type": "boolean"
          }
        }
      },
      "courses_input": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "image_url": {
            "type": "string"
          },
          "price": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "access_days": {
            "type": "number"
          },
          "certificate_enabled": {
            "type": "boolean"
          },
          "certificate_template": {
            "type": "string"
          },
          "certificate_color": {
            "type": "string"
          },
          "certificate_signer": {
            "type": "string"
          },
          "instructor_employee_id": {
            "type": "string"
          },
          "instructor_name": {
            "type": "string"
          },
          "instructor_title": {
            "type": "string"
          },
          "instructor_bio": {
            "type": "string"
          },
          "instructor_photo_url": {
            "type": "string"
          },
          "qa_enabled": {
            "type": "boolean"
          },
          "reviews_enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "title"
        ]
      },
      "course_sections": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "course_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "position": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "course_sections_input": {
        "type": "object",
        "properties": {
          "course_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "course_id",
          "title"
        ]
      },
      "course_lessons": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "course_id": {
            "type": "string",
            "format": "uuid"
          },
          "section_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "video_id": {
            "type": "string"
          },
          "is_preview": {
            "type": "boolean"
          },
          "position": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "course_lessons_input": {
        "type": "object",
        "properties": {
          "section_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "video_id": {
            "type": "string"
          },
          "is_preview": {
            "type": "boolean"
          }
        },
        "required": [
          "section_id",
          "title"
        ]
      },
      "course_lesson_files": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "lesson_id": {
            "type": "string"
          },
          "media_id": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "course_lesson_files_input": {
        "type": "object",
        "properties": {
          "lesson_id": {
            "type": "string"
          },
          "media_id": {
            "type": "string"
          }
        },
        "required": [
          "lesson_id",
          "media_id"
        ]
      },
      "course_quizzes": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "lesson_id": {
            "type": "string",
            "format": "uuid"
          },
          "pass_percent": {
            "type": "integer"
          },
          "max_attempts": {
            "type": "integer"
          },
          "time_limit_minutes": {
            "type": "integer"
          },
          "pick_count": {
            "type": "integer"
          },
          "show_answers": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "course_quizzes_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "course_quiz_questions": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "lesson_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string"
          },
          "prompt": {
            "type": "string"
          },
          "options": {
            "type": "object"
          },
          "explanation": {
            "type": "string"
          },
          "points": {
            "type": "integer"
          },
          "position": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "course_quiz_questions_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "course_quiz_attempts": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "enrollment_id": {
            "type": "string",
            "format": "uuid"
          },
          "lesson_id": {
            "type": "string",
            "format": "uuid"
          },
          "question_ids": {
            "type": "object"
          },
          "answers": {
            "type": "object"
          },
          "points": {
            "type": "object"
          },
          "percent": {
            "type": "integer"
          },
          "passed": {
            "type": "boolean"
          },
          "started_at": {
            "type": "string",
            "format": "date-time"
          },
          "submitted_at": {
            "type": "string",
            "format": "date-time"
          },
          "reviewed_by": {
            "type": "string"
          },
          "reviewed_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "course_quiz_attempts_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "course_certificates": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "enrollment_id": {
            "type": "string",
            "format": "uuid"
          },
          "course_id": {
            "type": "string",
            "format": "uuid"
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "holder_name": {
            "type": "string"
          },
          "course_title": {
            "type": "string"
          },
          "issued_at": {
            "type": "string",
            "format": "date-time"
          },
          "revoked_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "design": {
            "type": "object"
          },
          "issuer_name": {
            "type": "string"
          },
          "pdf_sha256": {
            "type": "string"
          },
          "sealed": {
            "type": "boolean"
          },
          "ticket_id": {
            "type": "string",
            "format": "uuid"
          },
          "event_id": {
            "type": "string",
            "format": "uuid"
          },
          "emailed_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "course_certificates_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "course_assignments": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "lesson_id": {
            "type": "string",
            "format": "uuid"
          },
          "instructions": {
            "type": "string"
          },
          "max_points": {
            "type": "integer"
          },
          "pass_points": {
            "type": "integer"
          },
          "due_days": {
            "type": "integer"
          },
          "allow_late": {
            "type": "boolean"
          },
          "max_files": {
            "type": "integer"
          },
          "max_file_mb": {
            "type": "integer"
          },
          "required": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "course_assignments_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "course_submissions": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "enrollment_id": {
            "type": "string",
            "format": "uuid"
          },
          "lesson_id": {
            "type": "string",
            "format": "uuid"
          },
          "body": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "late": {
            "type": "boolean"
          },
          "points": {
            "type": "integer"
          },
          "passed": {
            "type": "boolean"
          },
          "feedback": {
            "type": "string"
          },
          "graded_by": {
            "type": "string"
          },
          "graded_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "course_submissions_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "course_submission_files": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "submission_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "file_type": {
            "type": "string"
          },
          "size_bytes": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "course_submission_files_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "course_questions": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "course_id": {
            "type": "string",
            "format": "uuid"
          },
          "lesson_id": {
            "type": "string",
            "format": "uuid"
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "author_name": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "resolved_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "course_questions_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "course_question_replies": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "question_id": {
            "type": "string"
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "staff_user_id": {
            "type": "string"
          },
          "from_staff": {
            "type": "boolean"
          },
          "author_name": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "course_question_replies_input": {
        "type": "object",
        "properties": {
          "question_id": {
            "type": "string"
          },
          "body": {
            "type": "string"
          }
        },
        "required": [
          "question_id",
          "body"
        ]
      },
      "course_reviews": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "course_id": {
            "type": "string",
            "format": "uuid"
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "author_name": {
            "type": "string"
          },
          "rating": {
            "type": "integer"
          },
          "body": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "moderated_by": {
            "type": "string"
          },
          "moderated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "course_reviews_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "course_announcements": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "course_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "author_name": {
            "type": "string"
          },
          "emailed_count": {
            "type": "integer"
          },
          "emailed_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "email": {
            "type": "boolean"
          }
        }
      },
      "course_announcements_input": {
        "type": "object",
        "properties": {
          "course_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "email": {
            "type": "boolean"
          }
        },
        "required": [
          "course_id",
          "title"
        ]
      },
      "course_orders": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "course_id": {
            "type": "string",
            "format": "uuid"
          },
          "course_title": {
            "type": "string"
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "buyer_name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "list_price": {
            "type": "number"
          },
          "discount": {
            "type": "number"
          },
          "total": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "coupon_id": {
            "type": "string",
            "format": "uuid"
          },
          "coupon_code": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "account_id": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "external_id": {
            "type": "string"
          },
          "checkout_url": {
            "type": "string"
          },
          "issue": {
            "type": "string"
          },
          "enrollment_id": {
            "type": "string",
            "format": "uuid"
          },
          "invoice_id": {
            "type": "string",
            "format": "uuid"
          },
          "invoice_error": {
            "type": "string"
          },
          "invoice_claimed_at": {
            "type": "string",
            "format": "date-time"
          },
          "paid_at": {
            "type": "string",
            "format": "date-time"
          },
          "refunded_at": {
            "type": "string",
            "format": "date-time"
          },
          "refund_note": {
            "type": "string"
          },
          "refunded_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "course_orders_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "course_coupons": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "code": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "value": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "course_id": {
            "type": "string"
          },
          "starts_at": {
            "type": "string"
          },
          "ends_at": {
            "type": "string"
          },
          "max_uses": {
            "type": "number"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "course_coupons_input": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "value": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "course_id": {
            "type": "string"
          },
          "starts_at": {
            "type": "string"
          },
          "ends_at": {
            "type": "string"
          },
          "max_uses": {
            "type": "number"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          }
        },
        "required": [
          "code",
          "value"
        ]
      },
      "course_videos": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "name": {
            "type": "string"
          },
          "size_bytes": {
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "progress": {
            "type": "integer"
          },
          "error": {
            "type": "string"
          },
          "job_id": {
            "type": "string",
            "format": "uuid"
          },
          "duration_seconds": {
            "type": "number"
          },
          "width": {
            "type": "integer"
          },
          "height": {
            "type": "integer"
          },
          "output_bytes": {
            "type": "integer"
          },
          "files": {
            "type": "object"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "course_videos_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "course_enrollments": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "course_id": {
            "type": "string"
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "source": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "starts_at": {
            "type": "string",
            "format": "date-time"
          },
          "ends_at": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "completed_notified_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "course_enrollments_input": {
        "type": "object",
        "properties": {
          "course_id": {
            "type": "string"
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "ends_at": {
            "type": "string"
          }
        },
        "required": [
          "course_id",
          "party_id"
        ]
      },
      "course_progress": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "enrollment_id": {
            "type": "string",
            "format": "uuid"
          },
          "lesson_id": {
            "type": "string",
            "format": "uuid"
          },
          "position_seconds": {
            "type": "integer"
          },
          "completed_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "course_progress_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "ticketed_events": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "image_url": {
            "type": "string"
          },
          "venue_name": {
            "type": "string"
          },
          "venue_address": {
            "type": "string"
          },
          "online_url": {
            "type": "string"
          },
          "starts_at": {
            "type": "string",
            "format": "date-time"
          },
          "ends_at": {
            "type": "string",
            "format": "date-time"
          },
          "timezone": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "status": {
            "type": "string"
          },
          "capacity": {
            "type": "number"
          },
          "cancellation_policy": {
            "type": "string"
          },
          "cancelled_at": {
            "type": "string",
            "format": "date-time"
          },
          "version": {
            "type": "number"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "public_code": {
            "type": "string"
          },
          "photos": {
            "type": "array"
          },
          "questions": {
            "type": "array"
          },
          "waitlist_enabled": {
            "type": "boolean"
          },
          "survey_key": {
            "type": "string"
          },
          "certificate_template": {
            "type": "string"
          },
          "certificate_color": {
            "type": "string"
          },
          "certificate_signer": {
            "type": "string"
          },
          "starts_local": {
            "type": "string"
          },
          "ends_local": {
            "type": "string"
          }
        }
      },
      "ticketed_events_input": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "image_url": {
            "type": "string"
          },
          "venue_name": {
            "type": "string"
          },
          "venue_address": {
            "type": "string"
          },
          "online_url": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "capacity": {
            "type": "number"
          },
          "cancellation_policy": {
            "type": "string"
          },
          "version": {
            "type": "number"
          },
          "photos": {
            "type": "array"
          },
          "questions": {
            "type": "array"
          },
          "waitlist_enabled": {
            "type": "boolean"
          },
          "starts_local": {
            "type": "string"
          },
          "ends_local": {
            "type": "string"
          }
        },
        "required": [
          "title"
        ]
      },
      "ticketed_types": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "event_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "price": {
            "type": "number"
          },
          "vat_rate": {
            "type": "number"
          },
          "seats": {
            "type": "number"
          },
          "position": {
            "type": "number"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "sale_from": {
            "type": "string"
          },
          "sale_to": {
            "type": "string"
          },
          "min_per_order": {
            "type": "number"
          },
          "max_per_order": {
            "type": "number"
          },
          "hidden": {
            "type": "boolean"
          },
          "access_code": {
            "type": "string"
          }
        }
      },
      "ticketed_types_input": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "price": {
            "type": "number"
          },
          "vat_rate": {
            "type": "number"
          },
          "seats": {
            "type": "number"
          },
          "position": {
            "type": "number"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "sale_from": {
            "type": "string"
          },
          "sale_to": {
            "type": "string"
          },
          "min_per_order": {
            "type": "number"
          },
          "max_per_order": {
            "type": "number"
          },
          "hidden": {
            "type": "boolean"
          },
          "access_code": {
            "type": "string"
          }
        },
        "required": [
          "event_id",
          "name"
        ]
      },
      "ticketed_orders": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "event_id": {
            "type": "string"
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "buyer_name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "total": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "status": {
            "type": "string"
          },
          "reserved_until": {
            "type": "string",
            "format": "date-time"
          },
          "source": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "paid_at": {
            "type": "string",
            "format": "date-time"
          },
          "cancelled_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "answers": {
            "type": "object"
          },
          "language": {
            "type": "string"
          },
          "confirmation_sent_at": {
            "type": "string",
            "format": "date-time"
          },
          "cancel_notified_at": {
            "type": "string",
            "format": "date-time"
          },
          "discount": {
            "type": "number"
          },
          "coupon_id": {
            "type": "string",
            "format": "uuid"
          },
          "coupon_code": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "account_id": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "external_id": {
            "type": "string"
          },
          "checkout_url": {
            "type": "string"
          },
          "expired_at": {
            "type": "string",
            "format": "date-time"
          },
          "issue": {
            "type": "string"
          },
          "invoice_id": {
            "type": "string",
            "format": "uuid"
          },
          "invoice_error": {
            "type": "string"
          },
          "invoice_claimed_at": {
            "type": "string",
            "format": "date-time"
          },
          "refunded_at": {
            "type": "string",
            "format": "date-time"
          },
          "refund_note": {
            "type": "string"
          },
          "refunded_by": {
            "type": "string"
          },
          "link_template": {
            "type": "string"
          },
          "tickets": {
            "type": "array"
          }
        }
      },
      "ticketed_orders_input": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string"
          },
          "party_id": {
            "type": "string",
            "format": "uuid"
          },
          "buyer_name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "tickets": {
            "type": "array"
          }
        },
        "required": [
          "event_id",
          "buyer_name",
          "tickets"
        ]
      },
      "ticketed_coupons": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "code": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "value": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "event_id": {
            "type": "string"
          },
          "starts_at": {
            "type": "string"
          },
          "ends_at": {
            "type": "string"
          },
          "max_uses": {
            "type": "number"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "created_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "ticketed_coupons_input": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "value": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "description": "Moneda (cod ISO, ex. RON)."
          },
          "event_id": {
            "type": "string"
          },
          "starts_at": {
            "type": "string"
          },
          "ends_at": {
            "type": "string"
          },
          "max_uses": {
            "type": "number"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          }
        },
        "required": [
          "code",
          "value"
        ]
      },
      "ticketed_scans": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "event_id": {
            "type": "string",
            "format": "uuid"
          },
          "ticket_id": {
            "type": "string",
            "format": "uuid"
          },
          "result": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "scanned_by": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          }
        }
      },
      "ticketed_scans_input": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "ticketed_tickets": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "order_id": {
            "type": "string",
            "format": "uuid"
          },
          "event_id": {
            "type": "string",
            "format": "uuid"
          },
          "type_id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": "integer"
          },
          "attendee_name": {
            "type": "string"
          },
          "attendee_email": {
            "type": "string"
          },
          "price": {
            "type": "number"
          },
          "status": {
            "type": "string"
          },
          "code_version": {
            "type": "integer"
          },
          "checked_in_at": {
            "type": "string",
            "format": "date-time"
          },
          "checked_in_by": {
            "type": "string"
          },
          "cancelled_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          }
        }
      },
      "ticketed_tickets_input": {
        "type": "object",
        "properties": {
          "attendee_name": {
            "type": "string"
          },
          "attendee_email": {
            "type": "string"
          }
        },
        "required": []
      },
      "ticketed_waitlist": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "event_id": {
            "type": "string",
            "format": "uuid"
          },
          "type_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "quantity": {
            "type": "number"
          },
          "language": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "invited_at": {
            "type": "string",
            "format": "date-time"
          },
          "invite_expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "order_id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "link_template": {
            "type": "string"
          }
        }
      },
      "ticketed_waitlist_input": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "quantity": {
            "type": "number"
          },
          "status": {
            "type": "string"
          }
        },
        "required": []
      },
      "users": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Identificator unic (UUID)."
          },
          "payload_user_id": {
            "type": "string"
          },
          "roles": {
            "type": "array"
          },
          "location_scopes": {
            "type": "array"
          },
          "preferences": {
            "type": "object"
          },
          "employee_id": {
            "type": "string",
            "format": "uuid"
          },
          "is_active": {
            "type": "boolean",
            "description": "Dacă înregistrarea este activă."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data creării (ISO 8601)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Data ultimei modificări (ISO 8601)."
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "password": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        }
      },
      "users_input": {
        "type": "object",
        "properties": {
          "roles": {
            "type": "array"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "password": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "email"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "details": {}
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/clients": {
      "get": {
        "tags": [
          "Clienți"
        ],
        "summary": "Clienți: listare",
        "description": "Persoanele și organizațiile cu care lucrezi, cu date de contact și câmpuri personalizate.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/clients"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "5403f647-0000-4000-8000-5403f6470000",
                      "display_name": "Exemplu",
                      "email": "nume@exemplu.ro",
                      "phone": "+40 700 000 000",
                      "party_kind": "person",
                      "custom_fields": {
                        "exemplu_camp": "valoare"
                      },
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "deleted_at": null,
                      "price_list_id": "941b16bf-0000-4000-8000-941b16bf0000",
                      "blocked": true,
                      "blocked_reason": "exemplu",
                      "messages_opt_out": true,
                      "acquisition_source": "recommendation",
                      "referred_by_party_id": "236ebb55-0000-4000-8000-236ebb550000",
                      "referred_by_employee_id": "142e9a6b-0000-4000-8000-142e9a6b0000",
                      "client_status": "active"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Clienți"
        ],
        "summary": "Clienți: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/clients_input"
              },
              "example": {
                "display_name": "Exemplu",
                "party_kind": "person",
                "email": "nume@exemplu.ro",
                "phone": "+40 700 000 000",
                "price_list_id": "941b16bf-0000-4000-8000-941b16bf0000",
                "blocked": true,
                "custom_fields": {
                  "exemplu_camp": "valoare"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/clients"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/clients/{id}/set_record_profile": {
      "post": {
        "tags": [
          "Clienți"
        ],
        "summary": "Clienți: set_record_profile",
        "description": "Fișa clientului după un șablon.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "template_id",
                  "data"
                ],
                "properties": {
                  "template_id": {
                    "type": "string"
                  },
                  "data": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/clients/{id}/generate_document": {
      "post": {
        "tags": [
          "Clienți"
        ],
        "summary": "Clienți: generate_document",
        "description": "Copia unui șablon-fișier în documentele clientului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "template_id"
                ],
                "properties": {
                  "template_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/clients/{id}/record_agreement": {
      "post": {
        "tags": [
          "Clienți"
        ],
        "summary": "Clienți: record_agreement",
        "description": "Completează un acord pentru client.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/clients/{id}/agreement_link": {
      "post": {
        "tags": [
          "Clienți"
        ],
        "summary": "Clienți: agreement_link",
        "description": "Link pentru completarea acordului pe tabletă: o singură folosire, 30 de minute.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "template_id"
                ],
                "properties": {
                  "template_id": {
                    "type": "string"
                  },
                  "legal_entity_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/clients/{id}/set_fiscal": {
      "post": {
        "tags": [
          "Clienți"
        ],
        "summary": "Clienți: set_fiscal",
        "description": "Datele fiscale ale clientului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "kind": {
                    "type": "string"
                  },
                  "vat_code": {
                    "type": "string"
                  },
                  "address": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "county": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/clients/{id}/draft_from_items": {
      "post": {
        "tags": [
          "Clienți"
        ],
        "summary": "Clienți: draft_from_items",
        "description": "Ciornă de factură sau proformă din programările finalizate, pachetele și serviciile adăugate din casierie (client_services) alese.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "appointment_ids": {
                    "type": "array",
                    "items": {}
                  },
                  "package_ids": {
                    "type": "array",
                    "items": {}
                  },
                  "client_service_ids": {
                    "type": "array",
                    "items": {}
                  },
                  "as": {
                    "type": "string",
                    "description": "proforma, implicit factură"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/clients/{id}/cashier": {
      "post": {
        "tags": [
          "Clienți"
        ],
        "summary": "Clienți: cashier",
        "description": "Din casierie: notă de plată, încasarea restului pe o notă (pay), avans, proformă sau ciornă de factură. `location_id` (punctul de lucru) dă firma documentului și registrul de casă al punctului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "action"
                ],
                "properties": {
                  "action": {
                    "type": "string",
                    "description": "note, pay, advance, proforma sau invoice"
                  },
                  "appointment_ids": {
                    "type": "array",
                    "items": {}
                  },
                  "package_ids": {
                    "type": "array",
                    "items": {}
                  },
                  "client_service_ids": {
                    "type": "array",
                    "items": {}
                  },
                  "document_id": {
                    "type": "string",
                    "description": "nota sau proforma, la pay"
                  },
                  "location_id": {
                    "type": "string"
                  },
                  "amount": {
                    "type": "number"
                  },
                  "vat_rate": {
                    "type": "number"
                  },
                  "note": {
                    "type": "string"
                  },
                  "method": {
                    "type": "string"
                  },
                  "reference": {
                    "type": "string"
                  },
                  "cashbook_book_id": {
                    "type": "string"
                  },
                  "advance_id": {
                    "type": "string"
                  },
                  "use_points": {
                    "type": "number",
                    "description": "puncte de fidelitate folosite ca reducere pe nota nouă (note)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/clients/{id}/add_shop_credit": {
      "post": {
        "tags": [
          "Clienți"
        ],
        "summary": "Clienți: add_shop_credit",
        "description": "Credit de magazin pentru client.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "channel_id",
                  "amount"
                ],
                "properties": {
                  "channel_id": {
                    "type": "string"
                  },
                  "amount": {
                    "type": "number"
                  },
                  "reason": {
                    "type": "string",
                    "description": "refund, gift sau adjustment"
                  },
                  "note": {
                    "type": "string"
                  },
                  "order_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/clients/{id}": {
      "get": {
        "tags": [
          "Clienți"
        ],
        "summary": "Clienți: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/clients"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Clienți"
        ],
        "summary": "Clienți: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/clients_input"
              },
              "example": {
                "email": "nume@exemplu.ro"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Clienți"
        ],
        "summary": "Clienți: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/locations": {
      "get": {
        "tags": [
          "Locații"
        ],
        "summary": "Locații: listare",
        "description": "Locațiile companiei.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/locations"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "8228e771-0000-4000-8000-8228e7710000",
                      "org_unit_id": "b0bdb0f4-0000-4000-8000-b0bdb0f40000",
                      "name": "Exemplu",
                      "code": "EX-001",
                      "address": "Strada Exemplu 1",
                      "city": "exemplu",
                      "timezone": "exemplu",
                      "is_active": true,
                      "custom_fields": {
                        "exemplu_camp": "valoare"
                      },
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "country": "exemplu",
                      "county": "exemplu",
                      "slug": "exemplu",
                      "legal_entity_id": "5cadfa0a-0000-4000-8000-5cadfa0a0000",
                      "external_code": "EX-001",
                      "hide_in_quick_filter": true,
                      "invoice_series": "exemplu",
                      "sms_address": "Strada Exemplu 1",
                      "sms_address_map": "Strada Exemplu 1",
                      "sms_phone": "+40 700 000 000"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Locații"
        ],
        "summary": "Locații: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/locations_input"
              },
              "example": {
                "name": "Exemplu",
                "code": "Exemplu",
                "address": "Exemplu",
                "city": "București",
                "timezone": "Exemplu",
                "is_active": true
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/locations"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{id}/set_hours": {
      "post": {
        "tags": [
          "Locații"
        ],
        "summary": "Locații: set_hours",
        "description": "Înlocuiește programul locației.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "items"
                ],
                "properties": {
                  "items": {
                    "type": "array",
                    "items": {},
                    "description": "weekday, open, close, min_staff"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{id}": {
      "get": {
        "tags": [
          "Locații"
        ],
        "summary": "Locații: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/locations"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Locații"
        ],
        "summary": "Locații: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/locations_input"
              },
              "example": {
                "code": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Locații"
        ],
        "summary": "Locații: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/appointments": {
      "get": {
        "tags": [
          "Programări"
        ],
        "summary": "Programări: listare",
        "description": "Programările: client, serviciu, resursă, angajat, interval și status.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/appointments"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "cbe281ed-0000-4000-8000-cbe281ed0000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                      "resource_id": "7f711085-0000-4000-8000-7f7110850000",
                      "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000",
                      "appointment_type_id": "dc2eb039-0000-4000-8000-dc2eb0390000",
                      "starts_at": "2026-01-31T09:30:00+00:00",
                      "ends_at": "2026-01-31T09:30:00+00:00",
                      "status": "requested",
                      "notes": "Text liber",
                      "custom_fields": {
                        "exemplu_camp": "valoare"
                      },
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "series_id": "8c0ee3bc-0000-4000-8000-8c0ee3bc0000",
                      "series_index": 1,
                      "source": "exemplu",
                      "reminder_sent_at": "2026-01-31T09:30:00+00:00",
                      "client_package_id": "ee206381-0000-4000-8000-ee2063810000",
                      "booking_group_id": "b3cf0608-0000-4000-8000-b3cf06080000",
                      "group_index": 1,
                      "answers": {},
                      "consents": {},
                      "allow_overlap": true,
                      "reject_reason": "exemplu",
                      "decided_at": "2026-01-31T09:30:00+00:00",
                      "reschedule_count": 2,
                      "cancel_reason": "exemplu",
                      "cancelled_by": "exemplu",
                      "attribution": {},
                      "cancel_reason_code": "client_request",
                      "delivery_mode": "on_site",
                      "insurer_id": "99753909-0000-4000-8000-997539090000",
                      "payment_method": "exemplu",
                      "payment_status": "active",
                      "payment_due": 100.5,
                      "payment_paid": 100.5,
                      "lang": "exemplu",
                      "created_by": "exemplu",
                      "status_by": "exemplu",
                      "meet_url": "https://exemplu.ro",
                      "co_employee_ids": []
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Programări"
        ],
        "summary": "Programări: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/appointments_input"
              },
              "example": {
                "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                "starts_at": "2026-01-31T09:30:00+02:00",
                "ends_at": "2026-01-31T10:30:00+02:00",
                "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                "resource_id": "7f711085-0000-4000-8000-7f7110850000",
                "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/appointments"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/appointments/{id}/decide_request": {
      "post": {
        "tags": [
          "Programări"
        ],
        "summary": "Programări: decide_request",
        "description": "Aprobă sau respinge o cerere de rezervare online. Clientul primește emailul obișnuit.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "decision"
                ],
                "properties": {
                  "decision": {
                    "type": "string",
                    "description": "approve sau reject"
                  },
                  "reason": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/appointments/{id}/send_feedback_request": {
      "post": {
        "tags": [
          "Programări"
        ],
        "summary": "Programări: send_feedback_request",
        "description": "Trimite clientului cererea de feedback pentru programare.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/appointments/{id}/set_label": {
      "post": {
        "tags": [
          "Programări"
        ],
        "summary": "Programări: set_label",
        "description": "Pune o etichetă pe programare; dacă e legată de un status, îl schimbă.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "code"
                ],
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/appointments/{id}/remove_label": {
      "post": {
        "tags": [
          "Programări"
        ],
        "summary": "Programări: remove_label",
        "description": "Scoate eticheta.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "code"
                ],
                "properties": {
                  "code": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/appointments/{id}/create_series": {
      "post": {
        "tags": [
          "Programări"
        ],
        "summary": "Programări: create_series",
        "description": "Repetă programarea într-o serie.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "count"
                ],
                "properties": {
                  "count": {
                    "type": "number"
                  },
                  "every": {
                    "type": "number"
                  },
                  "unit": {
                    "type": "string",
                    "description": "day, week sau month"
                  },
                  "client_package_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/appointments/{id}/to_invoice": {
      "post": {
        "tags": [
          "Programări"
        ],
        "summary": "Programări: to_invoice",
        "description": "Ciornă de factură din programare.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/appointments/{id}/update_activity": {
      "post": {
        "tags": [
          "Programări"
        ],
        "summary": "Programări: update_activity",
        "description": "Modifică o activitate din calendar.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/appointments/{id}/delete_activity": {
      "post": {
        "tags": [
          "Programări"
        ],
        "summary": "Programări: delete_activity",
        "description": "Șterge o activitate; cu series=true, toată seria.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "series": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/appointments/{id}": {
      "get": {
        "tags": [
          "Programări"
        ],
        "summary": "Programări: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/appointments"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Programări"
        ],
        "summary": "Programări: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/appointments_input"
              },
              "example": {
                "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Programări"
        ],
        "summary": "Programări: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/resources": {
      "get": {
        "tags": [
          "Programări"
        ],
        "summary": "Resurse: listare",
        "description": "Resursele care se rezervă la programări (săli, echipamente, posturi de lucru).",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/resources"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "6eb9374a-0000-4000-8000-6eb9374a0000",
                      "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                      "name": "Exemplu",
                      "resource_type": "chair",
                      "is_active": true,
                      "custom_fields": {
                        "exemplu_camp": "valoare"
                      },
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "code": "EX-001",
                      "description": "Text liber",
                      "access_mode": "open",
                      "used_by": "exemplu",
                      "accommodation_type_id": "4874afac-0000-4000-8000-4874afac0000",
                      "cleaning_state": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Programări"
        ],
        "summary": "Resurse: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/resources_input"
              },
              "example": {
                "name": "Exemplu",
                "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                "resource_type": "chair",
                "is_active": true,
                "code": "Exemplu",
                "description": "Text mai lung, pe mai multe rânduri."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/resources"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/resources/{id}": {
      "get": {
        "tags": [
          "Programări"
        ],
        "summary": "Resurse: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/resources"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Programări"
        ],
        "summary": "Resurse: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/resources_input"
              },
              "example": {
                "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Programări"
        ],
        "summary": "Resurse: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/services": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Servicii: listare",
        "description": "Serviciile oferite: durată, pauze, preț.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/services"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "c2f7e683-0000-4000-8000-c2f7e6830000",
                      "name": "Exemplu",
                      "duration_minutes": 30,
                      "color": "#791cf0",
                      "is_active": true,
                      "custom_fields": {
                        "exemplu_camp": "valoare"
                      },
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "description": "Text liber",
                      "category": "exemplu",
                      "price": 100.5,
                      "buffer_after_minutes": 30,
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "buffer_before_minutes": 30,
                      "setup_minutes": 30,
                      "cleanup_minutes": 30,
                      "support_note": "Text liber",
                      "vat_rate": 19,
                      "service_code": "EX-001",
                      "bookable_online": true,
                      "approval_mode": "default",
                      "cancel_before_hours": 2,
                      "image_key": "exemplu",
                      "resource_types": [],
                      "invoice_label": "exemplu",
                      "online_meeting": true,
                      "delivery_mode": "on_site",
                      "invite_client": true,
                      "all_specialists": true
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Catalog"
        ],
        "summary": "Servicii: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/services_input"
              },
              "example": {
                "name": "Exemplu",
                "duration_minutes": 42,
                "color": "#791cf0",
                "is_active": true,
                "description": "Text mai lung, pe mai multe rânduri.",
                "category": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/services"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/services/{id}/set_extras": {
      "post": {
        "tags": [
          "Catalog"
        ],
        "summary": "Servicii: set_extras",
        "description": "Specialiști, resurse, prețuri și materiale. Ce lipsește rămâne neatins. Onorariile rămân în aplicație.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "specialists": {
                    "type": "array",
                    "items": {}
                  },
                  "resource_ids": {
                    "type": "array",
                    "items": {}
                  },
                  "prices": {
                    "type": "array",
                    "items": {}
                  },
                  "materials": {
                    "type": "array",
                    "items": {}
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/services/{id}/set_price": {
      "post": {
        "tags": [
          "Catalog"
        ],
        "summary": "Servicii: set_price",
        "description": "Prețul pe o listă de prețuri; gol = prețul standard.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "price_list_id"
                ],
                "properties": {
                  "price_list_id": {
                    "type": "string"
                  },
                  "price": {
                    "type": "number"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/services/{id}": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Servicii: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/services"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Catalog"
        ],
        "summary": "Servicii: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/services_input"
              },
              "example": {
                "color": "#791cf0"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Catalog"
        ],
        "summary": "Servicii: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/products": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Produse: listare",
        "description": "Produsele: cod, unitate, preț, TVA, stoc minim.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/products"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "dd003fbd-0000-4000-8000-dd003fbd0000",
                      "sku": "EX-001",
                      "name": "Exemplu",
                      "is_active": true,
                      "custom_fields": {
                        "exemplu_camp": "valoare"
                      },
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "category": "exemplu",
                      "unit": "buc",
                      "barcode": "exemplu",
                      "brand": "exemplu",
                      "description": "Text liber",
                      "min_stock": 100.5,
                      "reorder_qty": 2,
                      "track_lots": true,
                      "avg_cost": 100.5,
                      "sale_price": 100.5,
                      "vat_rate": 19,
                      "is_stockable": true,
                      "preferred_supplier_id": "1c1b6009-0000-4000-8000-1c1b60090000",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "purchase_unit": "exemplu",
                      "purchase_factor": 100.5,
                      "kind": "consumable",
                      "parent_product_id": "e4f017f9-0000-4000-8000-e4f017f90000",
                      "variant_options": {},
                      "weight_grams": 100.5,
                      "length_mm": 100.5,
                      "width_mm": 100.5,
                      "height_mm": 100.5,
                      "allow_backorder": true,
                      "is_kit": true,
                      "returnable": true,
                      "has_variants": true,
                      "online_availability": "in_stock",
                      "stock_type": "goods",
                      "nc_code": "EX-001",
                      "profile_data": {}
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Catalog"
        ],
        "summary": "Produse: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/products_input"
              },
              "example": {
                "name": "Exemplu",
                "sku": "Exemplu",
                "is_active": true,
                "category": "Exemplu",
                "unit": "buc",
                "barcode": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/products"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/products/{id}/set_options": {
      "post": {
        "tags": [
          "Catalog"
        ],
        "summary": "Produse: set_options",
        "description": "Atributele produsului și valorile lor, inclusiv cele din care se fac variante.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "options"
                ],
                "properties": {
                  "options": {
                    "type": "array",
                    "items": {},
                    "description": "attribute_id, term_ids, for_variants"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/products/{id}/generate_variants": {
      "post": {
        "tags": [
          "Catalog"
        ],
        "summary": "Produse: generate_variants",
        "description": "Creează variantele lipsă din atributele marcate pentru variante.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/products/{id}/create_variant": {
      "post": {
        "tags": [
          "Catalog"
        ],
        "summary": "Produse: create_variant",
        "description": "Variantă nouă a produsului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "options"
                ],
                "properties": {
                  "options": {
                    "type": "object",
                    "description": "combinația de valori"
                  },
                  "sku": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/products/{id}/update_variant": {
      "post": {
        "tags": [
          "Catalog"
        ],
        "summary": "Produse: update_variant",
        "description": "Modifică o variantă.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "variant_id"
                ],
                "properties": {
                  "variant_id": {
                    "type": "string"
                  },
                  "sku": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "is_active": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/products/{id}/delete_variant": {
      "post": {
        "tags": [
          "Catalog"
        ],
        "summary": "Produse: delete_variant",
        "description": "Șterge o variantă.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "variant_id"
                ],
                "properties": {
                  "variant_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/products/{id}/set_attributes": {
      "post": {
        "tags": [
          "Catalog"
        ],
        "summary": "Produse: set_attributes",
        "description": "Specificațiile afișate pe produs.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "attributes"
                ],
                "properties": {
                  "attributes": {
                    "type": "array",
                    "items": {},
                    "description": "key, value"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/products/{id}/add_media": {
      "post": {
        "tags": [
          "Catalog"
        ],
        "summary": "Produse: add_media",
        "description": "Adaugă o poză (JPG, PNG sau WebP, până la 8 MB), în base64. Tipul se verifică după conținut.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "content_base64"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "content_base64": {
                    "type": "string"
                  },
                  "alt": {
                    "type": "string"
                  },
                  "variant_product_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/products/{id}/add_from_gallery": {
      "post": {
        "tags": [
          "Catalog"
        ],
        "summary": "Produse: add_from_gallery",
        "description": "Leagă de produs o imagine din galerie, fără copie.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "media_id"
                ],
                "properties": {
                  "media_id": {
                    "type": "string"
                  },
                  "alt": {
                    "type": "string"
                  },
                  "variant_product_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/products/{id}/delete_media": {
      "post": {
        "tags": [
          "Catalog"
        ],
        "summary": "Produse: delete_media",
        "description": "Șterge o poză a produsului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "media_id"
                ],
                "properties": {
                  "media_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/products/{id}/set_media_alt": {
      "post": {
        "tags": [
          "Catalog"
        ],
        "summary": "Produse: set_media_alt",
        "description": "Textul alternativ al unei poze.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "media_id",
                  "alt"
                ],
                "properties": {
                  "media_id": {
                    "type": "string"
                  },
                  "alt": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/products/{id}/add_barcode": {
      "post": {
        "tags": [
          "Catalog"
        ],
        "summary": "Produse: add_barcode",
        "description": "Cod de bare suplimentar.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "code"
                ],
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "factor": {
                    "type": "number"
                  },
                  "label": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/products/{id}/remove_barcode": {
      "post": {
        "tags": [
          "Catalog"
        ],
        "summary": "Produse: remove_barcode",
        "description": "Scoate un cod de bare.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "code"
                ],
                "properties": {
                  "code": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/products/{id}/set_variant_stock": {
      "post": {
        "tags": [
          "Catalog"
        ],
        "summary": "Produse: set_variant_stock",
        "description": "Stocul variantelor în depozitul ales și modul de disponibilitate.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "items"
                ],
                "properties": {
                  "warehouse_id": {
                    "type": "string"
                  },
                  "items": {
                    "type": "array",
                    "items": {},
                    "description": "product_id, counted, mode"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/products/{id}/set_collections": {
      "post": {
        "tags": [
          "Catalog"
        ],
        "summary": "Produse: set_collections",
        "description": "Înlocuiește colecțiile produsului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "collection_ids"
                ],
                "properties": {
                  "collection_ids": {
                    "type": "array",
                    "items": {}
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/products/{id}": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Produse: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/products"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Catalog"
        ],
        "summary": "Produse: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/products_input"
              },
              "example": {
                "sku": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Catalog"
        ],
        "summary": "Produse: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/warehouses": {
      "get": {
        "tags": [
          "Depozite & inventar"
        ],
        "summary": "Depozite: listare",
        "description": "Depozitele și gestiunile.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/warehouses"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "e2c3a151-0000-4000-8000-e2c3a1510000",
                      "name": "Exemplu",
                      "code": "EX-001",
                      "kind": "main",
                      "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                      "responsible_employee_id": "3fc3b09c-0000-4000-8000-3fc3b09c0000",
                      "is_default": true,
                      "is_active": true,
                      "note": "Text liber",
                      "custom_fields": {
                        "exemplu_camp": "valoare"
                      },
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "sell_online": true,
                      "legal_entity_id": "5cadfa0a-0000-4000-8000-5cadfa0a0000",
                      "stock_account": "exemplu",
                      "valuation": "cost"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Depozite & inventar"
        ],
        "summary": "Depozite: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/warehouses_input"
              },
              "example": {
                "name": "Exemplu",
                "code": "Exemplu",
                "kind": "main",
                "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                "responsible_employee_id": "3fc3b09c-0000-4000-8000-3fc3b09c0000",
                "is_default": true
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/warehouses"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/warehouses/{id}/set_sell_online": {
      "post": {
        "tags": [
          "Depozite & inventar"
        ],
        "summary": "Depozite: set_sell_online",
        "description": "Dacă stocul depozitului se vinde online.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "sell_online"
                ],
                "properties": {
                  "sell_online": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/warehouses/{id}": {
      "get": {
        "tags": [
          "Depozite & inventar"
        ],
        "summary": "Depozite: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/warehouses"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Depozite & inventar"
        ],
        "summary": "Depozite: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/warehouses_input"
              },
              "example": {
                "code": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Depozite & inventar"
        ],
        "summary": "Depozite: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/suppliers": {
      "get": {
        "tags": [
          "Furnizori"
        ],
        "summary": "Furnizori: listare",
        "description": "Furnizorii, cu datele fiscale și de contact.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/suppliers"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "fd3c5e08-0000-4000-8000-fd3c5e080000",
                      "name": "Exemplu",
                      "cui": "exemplu",
                      "nr_reg_com": "exemplu",
                      "platitor_tva": true,
                      "adresa": "Strada Exemplu 1",
                      "localitate": "exemplu",
                      "judet": "exemplu",
                      "email": "nume@exemplu.ro",
                      "phone": "+40 700 000 000",
                      "website": "https://exemplu.ro",
                      "contact_name": "Exemplu",
                      "iban": "exemplu",
                      "bank": "exemplu",
                      "payment_terms_days": 2,
                      "lead_time_days": 2,
                      "min_order_value": 100.5,
                      "rating": 1,
                      "notes": "Text liber",
                      "is_active": true,
                      "custom_fields": {
                        "exemplu_camp": "valoare"
                      },
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Furnizori"
        ],
        "summary": "Furnizori: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/suppliers_input"
              },
              "example": {
                "name": "Exemplu",
                "cui": "12345678",
                "nr_reg_com": "Exemplu",
                "platitor_tva": true,
                "adresa": "Exemplu",
                "localitate": "București"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/suppliers"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/suppliers/{id}/set_product": {
      "post": {
        "tags": [
          "Furnizori"
        ],
        "summary": "Furnizori: set_product",
        "description": "Oferta furnizorului pentru un produs.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/suppliers/{id}/remove_product": {
      "post": {
        "tags": [
          "Furnizori"
        ],
        "summary": "Furnizori: remove_product",
        "description": "Scoate produsul din oferta furnizorului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "product_id"
                ],
                "properties": {
                  "product_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/suppliers/{id}": {
      "get": {
        "tags": [
          "Furnizori"
        ],
        "summary": "Furnizori: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/suppliers"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Furnizori"
        ],
        "summary": "Furnizori: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/suppliers_input"
              },
              "example": {
                "cui": "12345678"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Furnizori"
        ],
        "summary": "Furnizori: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/employees": {
      "get": {
        "tags": [
          "HR"
        ],
        "summary": "Angajați: listare",
        "description": "Angajații: funcție, locație, date de angajare.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/employees"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "1e9e09ea-0000-4000-8000-1e9e09ea0000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                      "job_title": "exemplu",
                      "hire_date": "2026-01-31",
                      "terminate_date": "2026-01-31",
                      "is_active": true,
                      "custom_fields": {
                        "exemplu_camp": "valoare"
                      },
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "full_name": "Exemplu",
                      "email": "nume@exemplu.ro",
                      "phone": "+40 700 000 000",
                      "payload_user_id": "exemplu",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "photo_key": "exemplu",
                      "accepts_clients": true,
                      "max_parallel": 1,
                      "department_id": "665e1881-0000-4000-8000-665e18810000",
                      "manager_id": "a6f98a34-0000-4000-8000-a6f98a340000"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "HR"
        ],
        "summary": "Angajați: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/employees_input"
              },
              "example": {
                "full_name": "Exemplu",
                "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                "job_title": "Exemplu",
                "hire_date": "2026-01-31",
                "terminate_date": "2026-01-31",
                "is_active": true
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/employees"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/employees/{id}/set_allowance": {
      "post": {
        "tags": [
          "HR"
        ],
        "summary": "Angajați: set_allowance",
        "description": "Zilele de concediu ale angajatului pe un tip și un an.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type_id",
                  "year"
                ],
                "properties": {
                  "type_id": {
                    "type": "string"
                  },
                  "year": {
                    "type": "number"
                  },
                  "days": {
                    "type": "number",
                    "description": "gol = implicit"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/employees/{id}/add_activity": {
      "post": {
        "tags": [
          "HR"
        ],
        "summary": "Angajați: add_activity",
        "description": "Adaugă o activitate în calendarul angajatului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/employees/{id}/assign": {
      "post": {
        "tags": [
          "HR"
        ],
        "summary": "Angajați: assign",
        "description": "Departamentul și superiorul angajatului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "department_id": {
                    "type": "string"
                  },
                  "manager_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/employees/{id}/set_schedule": {
      "post": {
        "tags": [
          "HR"
        ],
        "summary": "Angajați: set_schedule",
        "description": "Înlocuiește programul tipic și regenerează turele viitoare.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "items"
                ],
                "properties": {
                  "items": {
                    "type": "array",
                    "items": {}
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/employees/{id}/add_repeat": {
      "post": {
        "tags": [
          "HR"
        ],
        "summary": "Angajați: add_repeat",
        "description": "Adaugă o tură repetitivă și generează zilele ei. Programul tipic rămâne neatins.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "date",
                  "start",
                  "end",
                  "repeat_weeks"
                ],
                "properties": {
                  "date": {
                    "type": "string",
                    "description": "prima zi"
                  },
                  "start": {
                    "type": "string"
                  },
                  "end": {
                    "type": "string"
                  },
                  "repeat_weeks": {
                    "type": "number",
                    "description": "1 sau 2"
                  },
                  "until": {
                    "type": "string"
                  },
                  "location_id": {
                    "type": "string"
                  },
                  "resource_id": {
                    "type": "string"
                  },
                  "note": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/employees/{id}/stop_repeat": {
      "post": {
        "tags": [
          "HR"
        ],
        "summary": "Angajați: stop_repeat",
        "description": "Oprește o tură repetitivă de mâine încolo.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "repeat_id"
                ],
                "properties": {
                  "repeat_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/employees/{id}": {
      "get": {
        "tags": [
          "HR"
        ],
        "summary": "Angajați: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/employees"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "HR"
        ],
        "summary": "Angajați: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/employees_input"
              },
              "example": {
                "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "HR"
        ],
        "summary": "Angajați: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/projects": {
      "get": {
        "tags": [
          "Proiecte"
        ],
        "summary": "Proiecte: listare",
        "description": "Proiectele, cu client, perioadă, buget și status.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/projects"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "fde398e7-0000-4000-8000-fde398e70000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                      "title": "Exemplu",
                      "status": "draft",
                      "custom_fields": {
                        "exemplu_camp": "valoare"
                      },
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "code": "EX-001",
                      "description": "Text liber",
                      "priority": "low",
                      "start_date": "2026-01-31",
                      "end_date": "2026-01-31",
                      "budget": 100.5,
                      "created_by": "exemplu",
                      "recurrence": {},
                      "recurrence_next": "2026-01-31",
                      "recurrence_parent": "560c2372-0000-4000-8000-560c23720000"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Proiecte"
        ],
        "summary": "Proiecte: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/projects_input"
              },
              "example": {
                "title": "Exemplu",
                "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                "status": "draft",
                "code": "Exemplu",
                "description": "Text mai lung, pe mai multe rânduri."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/projects"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/projects/{id}/add_expense": {
      "post": {
        "tags": [
          "Proiecte"
        ],
        "summary": "Proiecte: add_expense",
        "description": "Cheltuială pe proiect.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/projects/{id}/delete_expense": {
      "post": {
        "tags": [
          "Proiecte"
        ],
        "summary": "Proiecte: delete_expense",
        "description": "Șterge o cheltuială a proiectului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expense_id"
                ],
                "properties": {
                  "expense_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/projects/{id}/set_recurrence": {
      "post": {
        "tags": [
          "Proiecte"
        ],
        "summary": "Proiecte: set_recurrence",
        "description": "Recurența proiectului; null o golește.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "rule": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/projects/{id}/add_task": {
      "post": {
        "tags": [
          "Proiecte"
        ],
        "summary": "Proiecte: add_task",
        "description": "Task nou legat de proiect.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "title"
                ],
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "due_date": {
                    "type": "string"
                  },
                  "assignee_id": {
                    "type": "string"
                  },
                  "priority": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/projects/{id}": {
      "get": {
        "tags": [
          "Proiecte"
        ],
        "summary": "Proiecte: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/projects"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Proiecte"
        ],
        "summary": "Proiecte: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/projects_input"
              },
              "example": {
                "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Proiecte"
        ],
        "summary": "Proiecte: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contracts": {
      "get": {
        "tags": [
          "Contracte"
        ],
        "summary": "Contracte: listare",
        "description": "Contractele cu clienți, furnizori și angajați, cu perioadă, valoare și reînnoire.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/contracts"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "320c624e-0000-4000-8000-320c624e0000",
                      "number": "2026-0001",
                      "title": "Exemplu",
                      "kind": "client",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "supplier_id": "18af1a07-0000-4000-8000-18af1a070000",
                      "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000",
                      "counterparty": "exemplu",
                      "status": "draft",
                      "start_date": "2026-01-31",
                      "end_date": "2026-01-31",
                      "auto_renew": true,
                      "renew_months": 1,
                      "notice_days": 2,
                      "value": 100.5,
                      "currency": "RON",
                      "billing_period": "one_time",
                      "description": "Text liber",
                      "terminated_at": "2026-01-31",
                      "terminated_reason": "exemplu",
                      "expiry_notified_at": "2026-01-31T09:30:00+00:00",
                      "custom_fields": {
                        "exemplu_camp": "valoare"
                      },
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "legal_entity_id": "5cadfa0a-0000-4000-8000-5cadfa0a0000",
                      "billing_day": 1,
                      "billing_day_end": 1,
                      "project_id": "9cd58748-0000-4000-8000-9cd587480000"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Contracte"
        ],
        "summary": "Contracte: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/contracts_input"
              },
              "example": {
                "title": "Exemplu",
                "kind": "client",
                "legal_entity_id": "5cadfa0a-0000-4000-8000-5cadfa0a0000",
                "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                "supplier_id": "18af1a07-0000-4000-8000-18af1a070000",
                "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/contracts"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contracts/{id}/renew": {
      "post": {
        "tags": [
          "Contracte"
        ],
        "summary": "Contracte: renew",
        "description": "Reînnoiește contractul.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "months": {
                    "type": "number"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contracts/{id}/terminate": {
      "post": {
        "tags": [
          "Contracte"
        ],
        "summary": "Contracte: terminate",
        "description": "Încheie contractul.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "reason": {
                    "type": "string"
                  },
                  "date": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contracts/{id}/set_billing_day": {
      "post": {
        "tags": [
          "Contracte"
        ],
        "summary": "Contracte: set_billing_day",
        "description": "Ziua de facturare.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "day": {
                    "type": "number"
                  },
                  "day_end": {
                    "type": "number"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contracts/{id}/set_project": {
      "post": {
        "tags": [
          "Contracte"
        ],
        "summary": "Contracte: set_project",
        "description": "Proiectul contractului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "project_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contracts/{id}/add_note": {
      "post": {
        "tags": [
          "Contracte"
        ],
        "summary": "Contracte: add_note",
        "description": "Notă în istoricul contractului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contracts/{id}/add_task": {
      "post": {
        "tags": [
          "Contracte"
        ],
        "summary": "Contracte: add_task",
        "description": "Task nou pentru contract.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "title",
                  "board_id"
                ],
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "board_id": {
                    "type": "string"
                  },
                  "assignee_id": {
                    "type": "string"
                  },
                  "due_date": {
                    "type": "string"
                  },
                  "line_id": {
                    "type": "string"
                  },
                  "deliverable_id": {
                    "type": "string"
                  },
                  "billable": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contracts/{id}": {
      "get": {
        "tags": [
          "Contracte"
        ],
        "summary": "Contracte: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/contracts"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Contracte"
        ],
        "summary": "Contracte: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/contracts_input"
              },
              "example": {
                "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Contracte"
        ],
        "summary": "Contracte: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/expenses": {
      "get": {
        "tags": [
          "Financiar"
        ],
        "summary": "Cheltuieli: listare",
        "description": "Cheltuielile, alocate pe categorii, centre de cost și proiecte.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/expenses"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "d5395ea6-0000-4000-8000-d5395ea60000",
                      "cost_center_id": "a535bf1a-0000-4000-8000-a535bf1a0000",
                      "title": "Exemplu",
                      "amount": 100.5,
                      "currency": "RON",
                      "spent_at": "2026-01-31",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "project_id": "9cd58748-0000-4000-8000-9cd587480000",
                      "vendor": "exemplu",
                      "note": "Text liber",
                      "created_by": "exemplu",
                      "category": "exemplu",
                      "payment_method": "transfer",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "custom_fields": {
                        "exemplu_camp": "valoare"
                      },
                      "legal_entity_id": "5cadfa0a-0000-4000-8000-5cadfa0a0000",
                      "vat_amount": 19
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Financiar"
        ],
        "summary": "Cheltuieli: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/expenses_input"
              },
              "example": {
                "title": "Exemplu",
                "amount": 99.9,
                "spent_at": "2026-01-31",
                "legal_entity_id": "5cadfa0a-0000-4000-8000-5cadfa0a0000",
                "cost_center_id": "a535bf1a-0000-4000-8000-a535bf1a0000",
                "project_id": "9cd58748-0000-4000-8000-9cd587480000"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/expenses"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/expenses/{id}/add_receipt": {
      "post": {
        "tags": [
          "Financiar"
        ],
        "summary": "Cheltuieli: add_receipt",
        "description": "Atașează un bon sau o factură cheltuielii.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "type",
                  "content_base64"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "numele fișierului"
                  },
                  "type": {
                    "type": "string",
                    "description": "tipul MIME, ex. application/pdf"
                  },
                  "content_base64": {
                    "type": "string",
                    "description": "conținutul în base64, cel mult 25 MB"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/expenses/{id}/remove_receipt": {
      "post": {
        "tags": [
          "Financiar"
        ],
        "summary": "Cheltuieli: remove_receipt",
        "description": "Șterge bonul și fișierul lui.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "document_id"
                ],
                "properties": {
                  "document_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/expenses/{id}": {
      "get": {
        "tags": [
          "Financiar"
        ],
        "summary": "Cheltuieli: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/expenses"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Financiar"
        ],
        "summary": "Cheltuieli: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/expenses_input"
              },
              "example": {
                "cost_center_id": "a535bf1a-0000-4000-8000-a535bf1a0000"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Financiar"
        ],
        "summary": "Cheltuieli: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/cost_centers": {
      "get": {
        "tags": [
          "Financiar"
        ],
        "summary": "Centre de cost: listare",
        "description": "Centrele de cost la care se alocă cheltuielile.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/cost_centers"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "018a5b55-0000-4000-8000-018a5b550000",
                      "name": "Exemplu",
                      "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "code": "EX-001",
                      "is_active": true,
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "custom_fields": {
                        "exemplu_camp": "valoare"
                      }
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Financiar"
        ],
        "summary": "Centre de cost: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/cost_centers_input"
              },
              "example": {
                "name": "Exemplu",
                "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                "code": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/cost_centers"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/cost_centers/{id}": {
      "get": {
        "tags": [
          "Financiar"
        ],
        "summary": "Centre de cost: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/cost_centers"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Financiar"
        ],
        "summary": "Centre de cost: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/cost_centers_input"
              },
              "example": {
                "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Financiar"
        ],
        "summary": "Centre de cost: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/fiscal_registers": {
      "get": {
        "tags": [
          "Casă de marcat"
        ],
        "summary": "Case de marcat: listare",
        "description": "Casele de marcat ale companiei: driverul, modul de trimitere, grupele de TVA și codurile de plată.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/fiscal_registers"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "d173f352-0000-4000-8000-d173f3520000",
                      "name": "Exemplu",
                      "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                      "driver": "fiscalnet",
                      "delivery": "file",
                      "file_name": "Exemplu",
                      "http_url": "https://exemplu.ro",
                      "department": 1,
                      "vat_group_standard": 1,
                      "vat_group_reduced": 1,
                      "vat_group_exempt": 1,
                      "pay_code_cash": 1,
                      "pay_code_card": 1,
                      "name_max": 1,
                      "print_diacritics": true,
                      "is_active": true,
                      "custom_fields": {
                        "exemplu_camp": "valoare"
                      },
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "code": "EX-001",
                      "promo_message": "exemplu",
                      "show_discount": true,
                      "group_items": true
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Casă de marcat"
        ],
        "summary": "Case de marcat: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/fiscal_registers_input"
              },
              "example": {
                "name": "Exemplu",
                "driver": "fiscalnet",
                "delivery": "file",
                "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                "file_name": "Exemplu",
                "http_url": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/fiscal_registers"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/fiscal_registers/{id}": {
      "get": {
        "tags": [
          "Casă de marcat"
        ],
        "summary": "Case de marcat: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/fiscal_registers"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Casă de marcat"
        ],
        "summary": "Case de marcat: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/fiscal_registers_input"
              },
              "example": {
                "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Casă de marcat"
        ],
        "summary": "Case de marcat: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/time_cards": {
      "get": {
        "tags": [
          "Pontaj"
        ],
        "summary": "Cartele de pontaj: listare",
        "description": "Cartelele angajaților: codul citit de cititor pornește sau oprește pontajul.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/time_cards"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "339aa850-0000-4000-8000-339aa8500000",
                      "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000",
                      "code": "EX-001",
                      "is_active": true,
                      "note": "Text liber",
                      "last_scan_at": "2026-01-31T09:30:00+00:00",
                      "custom_fields": {
                        "exemplu_camp": "valoare"
                      },
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Pontaj"
        ],
        "summary": "Cartele de pontaj: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/time_cards_input"
              },
              "example": {
                "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000",
                "code": "Exemplu",
                "is_active": true,
                "note": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/time_cards"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/time_cards/{id}": {
      "get": {
        "tags": [
          "Pontaj"
        ],
        "summary": "Cartele de pontaj: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/time_cards"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Pontaj"
        ],
        "summary": "Cartele de pontaj: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/time_cards_input"
              },
              "example": {
                "is_active": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Pontaj"
        ],
        "summary": "Cartele de pontaj: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/budgets": {
      "get": {
        "tags": [
          "Financiar"
        ],
        "summary": "Bugete: listare",
        "description": "Bugetele pe perioadă, opțional pe centru de cost și categorie.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/budgets"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "e92d64c1-0000-4000-8000-e92d64c10000",
                      "cost_center_id": "a535bf1a-0000-4000-8000-a535bf1a0000",
                      "name": "Exemplu",
                      "amount": 100.5,
                      "currency": "RON",
                      "period_start": "2026-01-31",
                      "period_end": "2026-01-31",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "category": "exemplu",
                      "is_active": true,
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "custom_fields": {
                        "exemplu_camp": "valoare"
                      }
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Financiar"
        ],
        "summary": "Bugete: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/budgets_input"
              },
              "example": {
                "name": "Exemplu",
                "amount": 99.9,
                "period_start": "2026-01-31",
                "period_end": "2026-01-31",
                "cost_center_id": "a535bf1a-0000-4000-8000-a535bf1a0000",
                "category": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/budgets"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/budgets/{id}": {
      "get": {
        "tags": [
          "Financiar"
        ],
        "summary": "Bugete: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/budgets"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Financiar"
        ],
        "summary": "Bugete: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/budgets_input"
              },
              "example": {
                "cost_center_id": "a535bf1a-0000-4000-8000-a535bf1a0000"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Financiar"
        ],
        "summary": "Bugete: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/job_postings": {
      "get": {
        "tags": [
          "Cariere"
        ],
        "summary": "Posturi: listare",
        "description": "Posturile publicate pentru recrutare.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/job_postings"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "a8c69e8e-0000-4000-8000-a8c69e8e0000",
                      "slug": "exemplu",
                      "title": "Exemplu",
                      "department": "exemplu",
                      "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                      "employment_type": "full_time",
                      "work_mode": "onsite",
                      "description": "Text liber",
                      "requirements": "exemplu",
                      "benefits": "exemplu",
                      "salary_min": 100.5,
                      "salary_max": 100.5,
                      "salary_currency": "RON",
                      "show_salary": true,
                      "status": "draft",
                      "closes_at": "2026-01-31",
                      "published_at": "2026-01-31T09:30:00+00:00",
                      "questions": {},
                      "custom_fields": {
                        "exemplu_camp": "valoare"
                      },
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "team": "exemplu",
                      "level": "exemplu",
                      "positions": 1,
                      "apply_mode": "form",
                      "external_url": "https://exemplu.ro",
                      "contact_email": "nume@exemplu.ro",
                      "internal_note": "Text liber",
                      "featured": true,
                      "cover_url": "https://exemplu.ro",
                      "sections": {},
                      "form_key": "exemplu",
                      "pipeline_key": "exemplu",
                      "publish_at": "2026-01-31T09:30:00+00:00",
                      "visibility": "public",
                      "salary_period": "hour",
                      "extra_location_ids": [],
                      "hybrid_days": 2,
                      "starts_at": "2026-01-31",
                      "seo": {},
                      "tags": []
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Cariere"
        ],
        "summary": "Posturi: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/job_postings_input"
              },
              "example": {
                "title": "Exemplu",
                "employment_type": "full_time",
                "work_mode": "onsite",
                "status": "draft",
                "apply_mode": "form",
                "visibility": "public"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/job_postings"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/job_postings/{id}/set_questions": {
      "post": {
        "tags": [
          "Cariere"
        ],
        "summary": "Posturi: set_questions",
        "description": "Întrebările suplimentare din formularul postului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "questions"
                ],
                "properties": {
                  "questions": {
                    "type": "array",
                    "items": {}
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/job_postings/{id}/set_extras": {
      "post": {
        "tags": [
          "Cariere"
        ],
        "summary": "Posturi: set_extras",
        "description": "Secțiuni, formularul ales, locații suplimentare, etichete și SEO.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/job_postings/{id}/duplicate": {
      "post": {
        "tags": [
          "Cariere"
        ],
        "summary": "Posturi: duplicate",
        "description": "Duplică postul ca ciornă, fără candidați.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/job_postings/{id}": {
      "get": {
        "tags": [
          "Cariere"
        ],
        "summary": "Posturi: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/job_postings"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Cariere"
        ],
        "summary": "Posturi: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/job_postings_input"
              },
              "example": {
                "department": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Cariere"
        ],
        "summary": "Posturi: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/org_units": {
      "get": {
        "tags": [
          "Locații"
        ],
        "summary": "Unități organizatorice: listare",
        "description": "Structura organizatorică (departamente, divizii).",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/org_units"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "6700a4bb-0000-4000-8000-6700a4bb0000",
                      "parent_id": "2968c8a9-0000-4000-8000-2968c8a90000",
                      "name": "Exemplu",
                      "unit_type": "standard",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/org_units/{id}": {
      "get": {
        "tags": [
          "Locații"
        ],
        "summary": "Unități organizatorice: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/org_units"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/location_hours": {
      "get": {
        "tags": [
          "Locații"
        ],
        "summary": "Program locații: listare",
        "description": "Programul de funcționare al locațiilor, pe zile ale săptămânii.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/location_hours"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "4392fcbc-0000-4000-8000-4392fcbc0000",
                      "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                      "weekday": 1,
                      "open_time": "09:00:00",
                      "close_time": "09:00:00",
                      "min_staff": 1
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/location_hours/{id}": {
      "get": {
        "tags": [
          "Locații"
        ],
        "summary": "Program locații: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/location_hours"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/waitlist": {
      "get": {
        "tags": [
          "Programări"
        ],
        "summary": "Listă de așteptare: listare",
        "description": "Cererile de programare în așteptare.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/waitlist"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "e8f02f2e-0000-4000-8000-e8f02f2e0000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                      "appointment_type_id": "dc2eb039-0000-4000-8000-dc2eb0390000",
                      "preferred_from": "2026-01-31T09:30:00+00:00",
                      "preferred_to": "2026-01-31T09:30:00+00:00",
                      "status": "active",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "service_ids": [],
                      "contact": {},
                      "note": "Text liber",
                      "attribution": {},
                      "notified_at": "2026-01-31T09:30:00+00:00",
                      "notify_count": 2,
                      "source": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Programări"
        ],
        "summary": "Listă de așteptare: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/waitlist_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/waitlist"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/waitlist/{id}/set_status": {
      "post": {
        "tags": [
          "Programări"
        ],
        "summary": "Listă de așteptare: set_status",
        "description": "Marchează o cerere online ca rezolvată sau o șterge.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status"
                ],
                "properties": {
                  "status": {
                    "type": "string",
                    "description": "open, done sau removed"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/waitlist/{id}": {
      "get": {
        "tags": [
          "Programări"
        ],
        "summary": "Listă de așteptare: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/waitlist"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/price_lists": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Liste de prețuri: listare",
        "description": "Listele de prețuri.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/price_lists"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "ef4ff850-0000-4000-8000-ef4ff8500000",
                      "name": "Exemplu",
                      "currency": "RON",
                      "is_default": true,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "is_active": true,
                      "sort_order": 1
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Catalog"
        ],
        "summary": "Liste de prețuri: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/price_lists_input"
              },
              "example": {
                "name": "Exemplu",
                "is_active": true
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/price_lists"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/price_lists/{id}": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Liste de prețuri: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/price_lists"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Catalog"
        ],
        "summary": "Liste de prețuri: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/price_lists_input"
              },
              "example": {
                "is_active": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Catalog"
        ],
        "summary": "Liste de prețuri: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/service_prices": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Prețuri servicii: listare",
        "description": "Prețul fiecărui serviciu pe lista de prețuri.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/service_prices"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "service_id": "ab73162c-0000-4000-8000-ab73162c0000",
                      "price_list_id": "941b16bf-0000-4000-8000-941b16bf0000",
                      "price": 100.5
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/service_packages": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Pachete de servicii: listare",
        "description": "Pachetele de servicii cu număr de ședințe și preț.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/service_packages"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "8a02380a-0000-4000-8000-8a02380a0000",
                      "service_id": "ab73162c-0000-4000-8000-ab73162c0000",
                      "name": "Exemplu",
                      "sessions": 2,
                      "price": 100.5,
                      "interval_days": 2,
                      "valid_days": 2,
                      "is_active": true,
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Catalog"
        ],
        "summary": "Pachete de servicii: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/service_packages_input"
              },
              "example": {
                "service_id": "ab73162c-0000-4000-8000-ab73162c0000",
                "name": "Exemplu",
                "sessions": 42,
                "price": 99.9,
                "interval_days": 42,
                "valid_days": 42
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/service_packages"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/service_packages/{id}": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Pachete de servicii: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/service_packages"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Catalog"
        ],
        "summary": "Pachete de servicii: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/service_packages_input"
              },
              "example": {
                "price": 99.9
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Catalog"
        ],
        "summary": "Pachete de servicii: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/product_barcodes": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Coduri de bare: listare",
        "description": "Codurile de bare ale produselor.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/product_barcodes"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "code": "EX-001",
                      "product_id": "7abdadb2-0000-4000-8000-7abdadb20000",
                      "factor": 100.5,
                      "label": "Exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stock_movements": {
      "get": {
        "tags": [
          "Depozite & inventar"
        ],
        "summary": "Mișcări de stoc: listare",
        "description": "Intrările, ieșirile, transferurile și ajustările de stoc.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/stock_movements"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "bd3ee0b4-0000-4000-8000-bd3ee0b40000",
                      "product_id": "7abdadb2-0000-4000-8000-7abdadb20000",
                      "warehouse_id": "bcfdc99e-0000-4000-8000-bcfdc99e0000",
                      "lot_id": "30e95f90-0000-4000-8000-30e95f900000",
                      "qty": 2,
                      "unit_cost": 100.5,
                      "kind": "standard",
                      "ref_type": "standard",
                      "ref_id": "3a932b0e-0000-4000-8000-3a932b0e0000",
                      "transfer_id": "be1fb388-0000-4000-8000-be1fb3880000",
                      "note": "Text liber",
                      "occurred_at": "2026-01-31T09:30:00+00:00",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "voided": true,
                      "cost_fixed": true,
                      "value_adj": 100.5,
                      "reverses_id": "90974fe2-0000-4000-8000-90974fe20000",
                      "retail_price": 100.5,
                      "retail_vat": 19,
                      "retail_adj": 100.5,
                      "from_warehouse_id": "exemplu",
                      "to_warehouse_id": "exemplu",
                      "counted": "exemplu",
                      "lot_code": "EX-001",
                      "expires_at": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Depozite & inventar"
        ],
        "summary": "Mișcări de stoc: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/stock_movements_input"
              },
              "example": {
                "product_id": "7abdadb2-0000-4000-8000-7abdadb20000",
                "kind": "Exemplu",
                "warehouse_id": "bcfdc99e-0000-4000-8000-bcfdc99e0000",
                "lot_id": "Exemplu",
                "qty": 42,
                "unit_cost": 99.9
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/stock_movements"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stock_movements/{id}": {
      "get": {
        "tags": [
          "Depozite & inventar"
        ],
        "summary": "Mișcări de stoc: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/stock_movements"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stock_lots": {
      "get": {
        "tags": [
          "Depozite & inventar"
        ],
        "summary": "Loturi: listare",
        "description": "Loturile de produse, cu data de expirare și status.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/stock_lots"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "70483ab6-0000-4000-8000-70483ab60000",
                      "product_id": "7abdadb2-0000-4000-8000-7abdadb20000",
                      "lot_code": "EX-001",
                      "expires_at": "2026-01-31",
                      "received_at": "2026-01-31",
                      "supplier_id": "18af1a07-0000-4000-8000-18af1a070000",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "status": "active",
                      "status_note": "Text liber",
                      "status_at": "2026-01-31T09:30:00+00:00",
                      "status_by": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Depozite & inventar"
        ],
        "summary": "Loturi: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/stock_lots_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/stock_lots"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stock_lots/{id}/set_status": {
      "post": {
        "tags": [
          "Depozite & inventar"
        ],
        "summary": "Loturi: set_status",
        "description": "Blochează sau deblochează lotul.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status"
                ],
                "properties": {
                  "status": {
                    "type": "string",
                    "description": "ok, quarantine sau recalled"
                  },
                  "note": {
                    "type": "string"
                  },
                  "move_stock": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stock_lots/{id}": {
      "get": {
        "tags": [
          "Depozite & inventar"
        ],
        "summary": "Loturi: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/stock_lots"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/supplier_contacts": {
      "get": {
        "tags": [
          "Furnizori"
        ],
        "summary": "Contacte furnizori: listare",
        "description": "Persoanele de contact ale furnizorilor.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/supplier_contacts"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "e3afcd69-0000-4000-8000-e3afcd690000",
                      "supplier_id": "18af1a07-0000-4000-8000-18af1a070000",
                      "name": "Exemplu",
                      "role": "exemplu",
                      "phone": "+40 700 000 000",
                      "email": "nume@exemplu.ro",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Furnizori"
        ],
        "summary": "Contacte furnizori: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/supplier_contacts_input"
              },
              "example": {
                "supplier_id": "18af1a07-0000-4000-8000-18af1a070000",
                "name": "Exemplu",
                "role": "Exemplu",
                "phone": "+40 700 000 000",
                "email": "nume@exemplu.ro"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/supplier_contacts"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/supplier_contacts/{id}": {
      "get": {
        "tags": [
          "Furnizori"
        ],
        "summary": "Contacte furnizori: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/supplier_contacts"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Furnizori"
        ],
        "summary": "Contacte furnizori: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/supplier_products": {
      "get": {
        "tags": [
          "Furnizori"
        ],
        "summary": "Oferta furnizorilor: listare",
        "description": "Produsele oferite de fiecare furnizor, cu preț și termen.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/supplier_products"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "supplier_id": "18af1a07-0000-4000-8000-18af1a070000",
                      "product_id": "7abdadb2-0000-4000-8000-7abdadb20000",
                      "supplier_sku": "exemplu",
                      "price": 100.5,
                      "min_qty": 2,
                      "lead_time_days": 2,
                      "is_preferred": true,
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/supplier_price_history": {
      "get": {
        "tags": [
          "Furnizori"
        ],
        "summary": "Istoric prețuri furnizori: listare",
        "description": "Evoluția prețurilor de achiziție.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/supplier_price_history"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "2c17c596-0000-4000-8000-2c17c5960000",
                      "supplier_id": "18af1a07-0000-4000-8000-18af1a070000",
                      "product_id": "7abdadb2-0000-4000-8000-7abdadb20000",
                      "price": 100.5,
                      "source": "exemplu",
                      "ref_id": "3a932b0e-0000-4000-8000-3a932b0e0000",
                      "recorded_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/supplier_price_history/{id}": {
      "get": {
        "tags": [
          "Furnizori"
        ],
        "summary": "Istoric prețuri furnizori: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/supplier_price_history"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/purchase_orders": {
      "get": {
        "tags": [
          "Achiziții"
        ],
        "summary": "Comenzi către furnizori: listare",
        "description": "Comenzile de achiziție.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/purchase_orders"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "94ab4b8c-0000-4000-8000-94ab4b8c0000",
                      "number": "2026-0001",
                      "supplier_id": "18af1a07-0000-4000-8000-18af1a070000",
                      "warehouse_id": "bcfdc99e-0000-4000-8000-bcfdc99e0000",
                      "status": "active",
                      "order_date": "2026-01-31",
                      "expected_date": "2026-01-31",
                      "note": "Text liber",
                      "sent_at": "2026-01-31T09:30:00+00:00",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "submitted_at": "2026-01-31T09:30:00+00:00",
                      "submitted_by": "exemplu",
                      "decided_at": "2026-01-31T09:30:00+00:00",
                      "decided_by": "exemplu",
                      "decision_note": "Text liber",
                      "lines": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Achiziții"
        ],
        "summary": "Comenzi către furnizori: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/purchase_orders_input"
              },
              "example": {
                "supplier_id": "18af1a07-0000-4000-8000-18af1a070000",
                "lines": [
                  "optiune"
                ],
                "warehouse_id": "bcfdc99e-0000-4000-8000-bcfdc99e0000",
                "order_date": "2026-01-31",
                "expected_date": "2026-01-31",
                "note": "Text mai lung, pe mai multe rânduri."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/purchase_orders"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/purchase_orders/{id}/submit": {
      "post": {
        "tags": [
          "Achiziții"
        ],
        "summary": "Comenzi către furnizori: submit",
        "description": "Trimite comanda la aprobare.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/purchase_orders/{id}/decide": {
      "post": {
        "tags": [
          "Achiziții"
        ],
        "summary": "Comenzi către furnizori: decide",
        "description": "Aprobă sau respinge comanda.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "approve"
                ],
                "properties": {
                  "approve": {
                    "type": "boolean"
                  },
                  "note": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/purchase_orders/{id}/send": {
      "post": {
        "tags": [
          "Achiziții"
        ],
        "summary": "Comenzi către furnizori: send",
        "description": "Trimite comanda furnizorului pe email.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "message": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/purchase_orders/{id}/cancel": {
      "post": {
        "tags": [
          "Achiziții"
        ],
        "summary": "Comenzi către furnizori: cancel",
        "description": "Anulează comanda.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/purchase_orders/{id}": {
      "get": {
        "tags": [
          "Achiziții"
        ],
        "summary": "Comenzi către furnizori: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/purchase_orders"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Achiziții"
        ],
        "summary": "Comenzi către furnizori: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/purchase_orders_input"
              },
              "example": {
                "warehouse_id": "bcfdc99e-0000-4000-8000-bcfdc99e0000"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Achiziții"
        ],
        "summary": "Comenzi către furnizori: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/purchase_order_lines": {
      "get": {
        "tags": [
          "Achiziții"
        ],
        "summary": "Linii comenzi: listare",
        "description": "Liniile comenzilor de achiziție.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/purchase_order_lines"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "9a782391-0000-4000-8000-9a7823910000",
                      "order_id": "577108b3-0000-4000-8000-577108b30000",
                      "product_id": "7abdadb2-0000-4000-8000-7abdadb20000",
                      "qty_ordered": 2,
                      "qty_received": 2,
                      "unit_cost": 100.5,
                      "sort_order": 1
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/purchase_order_lines/{id}": {
      "get": {
        "tags": [
          "Achiziții"
        ],
        "summary": "Linii comenzi: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/purchase_order_lines"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/goods_receipts": {
      "get": {
        "tags": [
          "Achiziții"
        ],
        "summary": "Recepții: listare",
        "description": "Recepțiile de marfă.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/goods_receipts"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "4c66665d-0000-4000-8000-4c66665d0000",
                      "number": "2026-0001",
                      "order_id": "577108b3-0000-4000-8000-577108b30000",
                      "supplier_id": "18af1a07-0000-4000-8000-18af1a070000",
                      "warehouse_id": "bcfdc99e-0000-4000-8000-bcfdc99e0000",
                      "doc_number": "2026-0001",
                      "doc_date": "2026-01-31",
                      "received_at": "2026-01-31",
                      "note": "Text liber",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "lines": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Achiziții"
        ],
        "summary": "Recepții: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/goods_receipts_input"
              },
              "example": {
                "lines": [
                  "optiune"
                ],
                "order_id": "Exemplu",
                "supplier_id": "18af1a07-0000-4000-8000-18af1a070000",
                "warehouse_id": "bcfdc99e-0000-4000-8000-bcfdc99e0000",
                "doc_number": "Exemplu",
                "doc_date": "2026-01-31"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/goods_receipts"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/goods_receipts/{id}": {
      "get": {
        "tags": [
          "Achiziții"
        ],
        "summary": "Recepții: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/goods_receipts"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/supplier_invoices": {
      "get": {
        "tags": [
          "Achiziții"
        ],
        "summary": "Facturi furnizori: listare",
        "description": "Facturile primite de la furnizori.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/supplier_invoices"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "adde9df6-0000-4000-8000-adde9df60000",
                      "supplier_id": "18af1a07-0000-4000-8000-18af1a070000",
                      "number": "2026-0001",
                      "issue_date": "2026-01-31",
                      "due_date": "2026-01-31",
                      "net_amount": 100.5,
                      "vat_amount": 19,
                      "total": 100.5,
                      "currency": "RON",
                      "receipt_id": "1e6c17c9-0000-4000-8000-1e6c17c90000",
                      "order_id": "577108b3-0000-4000-8000-577108b30000",
                      "note": "Text liber",
                      "cancelled_at": "2026-01-31T09:30:00+00:00",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "vat_breakdown": {},
                      "intra_eu": true,
                      "reverse_charge": true,
                      "legal_entity_id": "5cadfa0a-0000-4000-8000-5cadfa0a0000",
                      "net": "exemplu",
                      "vat": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Achiziții"
        ],
        "summary": "Facturi furnizori: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/supplier_invoices_input"
              },
              "example": {
                "supplier_id": "18af1a07-0000-4000-8000-18af1a070000",
                "number": "Exemplu",
                "issue_date": "2026-01-31",
                "due_date": "2026-01-31",
                "total": 99.9,
                "currency": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/supplier_invoices"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/supplier_invoices/{id}/add_payment": {
      "post": {
        "tags": [
          "Achiziții"
        ],
        "summary": "Facturi furnizori: add_payment",
        "description": "Înregistrează o plată către furnizor.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount"
                ],
                "properties": {
                  "amount": {
                    "type": "number"
                  },
                  "paid_at": {
                    "type": "string"
                  },
                  "method": {
                    "type": "string"
                  },
                  "reference": {
                    "type": "string"
                  },
                  "cashbook_book_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/supplier_invoices/{id}/delete_payment": {
      "post": {
        "tags": [
          "Achiziții"
        ],
        "summary": "Facturi furnizori: delete_payment",
        "description": "Șterge o plată.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "payment_id"
                ],
                "properties": {
                  "payment_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/supplier_invoices/{id}": {
      "get": {
        "tags": [
          "Achiziții"
        ],
        "summary": "Facturi furnizori: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/supplier_invoices"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Achiziții"
        ],
        "summary": "Facturi furnizori: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/supplier_payments": {
      "get": {
        "tags": [
          "Achiziții"
        ],
        "summary": "Plăți furnizori: listare",
        "description": "Plățile făcute către furnizori.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/supplier_payments"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "856f784f-0000-4000-8000-856f784f0000",
                      "invoice_id": "8435a6b4-0000-4000-8000-8435a6b40000",
                      "paid_at": "2026-01-31",
                      "amount": 100.5,
                      "method": "exemplu",
                      "reference": "exemplu",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "cashbook_book_id": "ce152395-0000-4000-8000-ce1523950000"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/supplier_payments/{id}": {
      "get": {
        "tags": [
          "Achiziții"
        ],
        "summary": "Plăți furnizori: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/supplier_payments"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/invoices": {
      "get": {
        "tags": [
          "Casierie"
        ],
        "summary": "Facturi clienți: listare",
        "description": "Facturile către clienți. Se modifică doar ciornele; DELETE șterge o ciornă și anulează o factură emisă.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/invoices"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "028766fb-0000-4000-8000-028766fb0000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "status": "active",
                      "issue_date": "2026-01-31",
                      "due_date": "2026-01-31",
                      "currency": "RON",
                      "note": "Text liber",
                      "series": "exemplu",
                      "number": "2026-0001",
                      "provider": "exemplu",
                      "external_url": "https://exemplu.ro",
                      "issued_at": "2026-01-31T09:30:00+00:00",
                      "cancelled_at": "2026-01-31T09:30:00+00:00",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "credit_for": "f0a325ca-0000-4000-8000-f0a325ca0000",
                      "reversed_by": "90907d8d-0000-4000-8000-90907d8d0000",
                      "proforma_id": "888bcfc3-0000-4000-8000-888bcfc30000",
                      "intra_eu": true,
                      "reverse_charge": true,
                      "exchange_rate": 19,
                      "legal_entity_id": "5cadfa0a-0000-4000-8000-5cadfa0a0000",
                      "is_advance": true,
                      "rate_date": "2026-01-31",
                      "warehouse_id": "bcfdc99e-0000-4000-8000-bcfdc99e0000",
                      "stock_document_id": "cb2fd9ef-0000-4000-8000-cb2fd9ef0000",
                      "series_choice": "exemplu",
                      "lines": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Casierie"
        ],
        "summary": "Facturi clienți: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/invoices_input"
              },
              "example": {
                "party_id": "00000000-0000-4000-8000-000000000001",
                "due_date": "2026-02-14",
                "lines": [
                  {
                    "description": "Serviciu",
                    "qty": 1,
                    "unit_price": 100,
                    "vat_rate": 21
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/invoices"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/invoices/{id}/issue": {
      "post": {
        "tags": [
          "Casierie"
        ],
        "summary": "Facturi clienți: issue",
        "description": "Emite factura din ciornă, după setarea de facturare a firmei: în aplicație, cu e-Factura, sau în SmartBill. Nu se poate retrage ușor.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/invoices/{id}/mark_issued": {
      "post": {
        "tags": [
          "Casierie"
        ],
        "summary": "Facturi clienți: mark_issued",
        "description": "Marchează ca emisă o factură numerotată în altă parte. Nu trimite nimic la ANAF.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "series",
                  "number"
                ],
                "properties": {
                  "series": {
                    "type": "string"
                  },
                  "number": {
                    "type": "string"
                  },
                  "external_url": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/invoices/{id}/credit": {
      "post": {
        "tags": [
          "Casierie"
        ],
        "summary": "Facturi clienți: credit",
        "description": "Ciornă de stornare integrală pentru o factură emisă, fără încasări.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/invoices/{id}/add_payment": {
      "post": {
        "tags": [
          "Casierie"
        ],
        "summary": "Facturi clienți: add_payment",
        "description": "Înregistrează o încasare pe factura emisă.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount"
                ],
                "properties": {
                  "amount": {
                    "type": "number"
                  },
                  "paid_at": {
                    "type": "string",
                    "description": "AAAA-LL-ZZ"
                  },
                  "method": {
                    "type": "string",
                    "description": "cash, card, transfer sau other"
                  },
                  "reference": {
                    "type": "string"
                  },
                  "gift_card_code": {
                    "type": "string",
                    "description": "la method gift_card: codul cardului"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/invoices/{id}/delete_payment": {
      "post": {
        "tags": [
          "Casierie"
        ],
        "summary": "Facturi clienți: delete_payment",
        "description": "Șterge o încasare a facturii.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "payment_id"
                ],
                "properties": {
                  "payment_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/invoices/{id}/send_email": {
      "post": {
        "tags": [
          "Casierie"
        ],
        "summary": "Facturi clienți: send_email",
        "description": "Trimite factura emisă pe emailul clientului, din SMTP-ul companiei.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/invoices/{id}/use_points": {
      "post": {
        "tags": [
          "Casierie"
        ],
        "summary": "Facturi clienți: use_points",
        "description": "Pune punctele clientului ca reducere pe o ciornă de factură, împărțită pe cotele de TVA.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "points"
                ],
                "properties": {
                  "points": {
                    "type": "number"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/invoices/{id}/remove_points": {
      "post": {
        "tags": [
          "Casierie"
        ],
        "summary": "Facturi clienți: remove_points",
        "description": "Scoate reducerea din puncte de pe o ciornă; punctele se întorc clientului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/invoices/{id}": {
      "get": {
        "tags": [
          "Casierie"
        ],
        "summary": "Facturi clienți: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/invoices"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Casierie"
        ],
        "summary": "Facturi clienți: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/invoices_input"
              },
              "example": {
                "issue_date": "2026-01-31"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Casierie"
        ],
        "summary": "Facturi clienți: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/proformas": {
      "get": {
        "tags": [
          "Casierie"
        ],
        "summary": "Proforme: listare",
        "description": "Proformele către clienți. Se modifică doar ciornele; DELETE șterge o ciornă și anulează o proformă emisă.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/proformas"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "88f65fcc-0000-4000-8000-88f65fcc0000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "status": "active",
                      "number": "2026-0001",
                      "issue_date": "2026-01-31",
                      "valid_until": "2026-01-31",
                      "currency": "RON",
                      "note": "Text liber",
                      "invoice_id": "8435a6b4-0000-4000-8000-8435a6b40000",
                      "issued_at": "2026-01-31T09:30:00+00:00",
                      "cancelled_at": "2026-01-31T09:30:00+00:00",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "legal_entity_id": "5cadfa0a-0000-4000-8000-5cadfa0a0000",
                      "exchange_rate": 19,
                      "rate_date": "2026-01-31",
                      "kind": "standard",
                      "lines": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Casierie"
        ],
        "summary": "Proforme: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/proformas_input"
              },
              "example": {
                "party_id": "00000000-0000-4000-8000-000000000001",
                "lines": [
                  {
                    "description": "Serviciu",
                    "qty": 1,
                    "unit_price": 100,
                    "vat_rate": 21
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/proformas"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/proformas/{id}/issue": {
      "post": {
        "tags": [
          "Casierie"
        ],
        "summary": "Proforme: issue",
        "description": "Emite proforma și îi dă numărul.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/proformas/{id}/to_invoice": {
      "post": {
        "tags": [
          "Casierie"
        ],
        "summary": "Proforme: to_invoice",
        "description": "Ciornă de factură din proformă.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/proformas/{id}/advance_invoice": {
      "post": {
        "tags": [
          "Casierie"
        ],
        "summary": "Proforme: advance_invoice",
        "description": "Ciornă de factură de avans pentru încasările nefacturate.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/proformas/{id}/add_payment": {
      "post": {
        "tags": [
          "Casierie"
        ],
        "summary": "Proforme: add_payment",
        "description": "Înregistrează un avans încasat.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount"
                ],
                "properties": {
                  "amount": {
                    "type": "number"
                  },
                  "paid_at": {
                    "type": "string",
                    "description": "AAAA-LL-ZZ"
                  },
                  "method": {
                    "type": "string",
                    "description": "cash, card, transfer sau other"
                  },
                  "reference": {
                    "type": "string"
                  },
                  "gift_card_code": {
                    "type": "string",
                    "description": "la method gift_card: codul cardului"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/proformas/{id}/delete_payment": {
      "post": {
        "tags": [
          "Casierie"
        ],
        "summary": "Proforme: delete_payment",
        "description": "Șterge un avans.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "payment_id"
                ],
                "properties": {
                  "payment_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/proformas/{id}/send_email": {
      "post": {
        "tags": [
          "Casierie"
        ],
        "summary": "Proforme: send_email",
        "description": "Trimite proforma emisă pe emailul clientului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/proformas/{id}/use_points": {
      "post": {
        "tags": [
          "Casierie"
        ],
        "summary": "Proforme: use_points",
        "description": "Pune punctele clientului ca reducere pe o notă de plată nefacturată; pe una emisă, cel mult cât restul de plată.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "points"
                ],
                "properties": {
                  "points": {
                    "type": "number"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/proformas/{id}/remove_points": {
      "post": {
        "tags": [
          "Casierie"
        ],
        "summary": "Proforme: remove_points",
        "description": "Scoate reducerea din puncte de pe nota de plată; punctele se întorc clientului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/proformas/{id}": {
      "get": {
        "tags": [
          "Casierie"
        ],
        "summary": "Proforme: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/proformas"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Casierie"
        ],
        "summary": "Proforme: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/proformas_input"
              },
              "example": {
                "issue_date": "2026-01-31"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Casierie"
        ],
        "summary": "Proforme: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/proforma_lines": {
      "get": {
        "tags": [
          "Casierie"
        ],
        "summary": "Linii proforme: listare",
        "description": "Liniile proformelor.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/proforma_lines"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "2b2fb751-0000-4000-8000-2b2fb7510000",
                      "proforma_id": "888bcfc3-0000-4000-8000-888bcfc30000",
                      "description": "Text liber",
                      "code": "EX-001",
                      "unit": "exemplu",
                      "qty": 2,
                      "unit_price": 100.5,
                      "discount_pct": 19,
                      "vat_rate": 19,
                      "is_service": true,
                      "service_id": "ab73162c-0000-4000-8000-ab73162c0000",
                      "product_id": "7abdadb2-0000-4000-8000-7abdadb20000",
                      "appointment_id": "82726582-0000-4000-8000-827265820000",
                      "client_package_id": "ee206381-0000-4000-8000-ee2063810000",
                      "sort_order": 1,
                      "client_service_id": "859306b2-0000-4000-8000-859306b20000",
                      "points_entry_id": "4971f0fd-0000-4000-8000-4971f0fd0000"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/proforma_lines/{id}": {
      "get": {
        "tags": [
          "Casierie"
        ],
        "summary": "Linii proforme: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/proforma_lines"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/proforma_payments": {
      "get": {
        "tags": [
          "Casierie"
        ],
        "summary": "Avansuri pe proforme: listare",
        "description": "Avansurile încasate pe proforme.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/proforma_payments"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "7ffd7613-0000-4000-8000-7ffd76130000",
                      "proforma_id": "888bcfc3-0000-4000-8000-888bcfc30000",
                      "paid_at": "2026-01-31",
                      "amount": 100.5,
                      "method": "exemplu",
                      "reference": "exemplu",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "cashbook_book_id": "ce152395-0000-4000-8000-ce1523950000",
                      "invoice_id": "8435a6b4-0000-4000-8000-8435a6b40000",
                      "gift_card_id": "e1b56a22-0000-4000-8000-e1b56a220000"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/proforma_payments/{id}": {
      "get": {
        "tags": [
          "Casierie"
        ],
        "summary": "Avansuri pe proforme: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/proforma_payments"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/invoice_lines": {
      "get": {
        "tags": [
          "Casierie"
        ],
        "summary": "Linii facturi: listare",
        "description": "Liniile facturilor către clienți.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/invoice_lines"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "465ed582-0000-4000-8000-465ed5820000",
                      "invoice_id": "8435a6b4-0000-4000-8000-8435a6b40000",
                      "description": "Text liber",
                      "code": "EX-001",
                      "unit": "exemplu",
                      "qty": 2,
                      "unit_price": 100.5,
                      "vat_rate": 19,
                      "is_service": true,
                      "service_id": "ab73162c-0000-4000-8000-ab73162c0000",
                      "product_id": "7abdadb2-0000-4000-8000-7abdadb20000",
                      "appointment_id": "82726582-0000-4000-8000-827265820000",
                      "client_package_id": "ee206381-0000-4000-8000-ee2063810000",
                      "sort_order": 1,
                      "discount_pct": 19,
                      "exemption_reason": "exemplu",
                      "advance_invoice_id": "a88b1791-0000-4000-8000-a88b17910000",
                      "client_service_id": "859306b2-0000-4000-8000-859306b20000",
                      "unit_cost": 100.5,
                      "points_entry_id": "4971f0fd-0000-4000-8000-4971f0fd0000",
                      "shop_credit_order_id": "af8d0970-0000-4000-8000-af8d09700000"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/invoice_lines/{id}": {
      "get": {
        "tags": [
          "Casierie"
        ],
        "summary": "Linii facturi: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/invoice_lines"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/payments": {
      "get": {
        "tags": [
          "Casierie"
        ],
        "summary": "Încasări: listare",
        "description": "Încasările de la clienți, pe facturi.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/payments"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "da184154-0000-4000-8000-da1841540000",
                      "invoice_id": "8435a6b4-0000-4000-8000-8435a6b40000",
                      "paid_at": "2026-01-31",
                      "amount": 100.5,
                      "method": "exemplu",
                      "reference": "exemplu",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "cashbook_book_id": "ce152395-0000-4000-8000-ce1523950000",
                      "gift_card_id": "e1b56a22-0000-4000-8000-e1b56a220000"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/payments/{id}": {
      "get": {
        "tags": [
          "Casierie"
        ],
        "summary": "Încasări: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/payments"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/client_packages": {
      "get": {
        "tags": [
          "Casierie"
        ],
        "summary": "Pachete cumpărate: listare",
        "description": "Pachetele de servicii cumpărate de clienți.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/client_packages"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "d5f443ce-0000-4000-8000-d5f443ce0000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "package_id": "140072fb-0000-4000-8000-140072fb0000",
                      "service_id": "ab73162c-0000-4000-8000-ab73162c0000",
                      "name": "Exemplu",
                      "sessions_total": 2,
                      "price": 100.5,
                      "interval_days": 2,
                      "purchased_at": "2026-01-31",
                      "expires_at": "2026-01-31",
                      "cancelled_at": "2026-01-31T09:30:00+00:00",
                      "note": "Text liber",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "sessions": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Casierie"
        ],
        "summary": "Pachete cumpărate: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/client_packages_input"
              },
              "example": {
                "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                "package_id": "Exemplu",
                "service_id": "ab73162c-0000-4000-8000-ab73162c0000",
                "name": "Exemplu",
                "price": 99.9,
                "purchased_at": "2026-01-31"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/client_packages"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/client_packages/{id}": {
      "get": {
        "tags": [
          "Casierie"
        ],
        "summary": "Pachete cumpărate: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/client_packages"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Casierie"
        ],
        "summary": "Pachete cumpărate: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/client_services": {
      "get": {
        "tags": [
          "Casierie"
        ],
        "summary": "Servicii adăugate din casierie: listare",
        "description": "Serviciile încasate fără programare (din catalog sau speciale), cu medic, punct de lucru și discount. Intră la de facturat lângă programări și pachete.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/client_services"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "2cd606bd-0000-4000-8000-2cd606bd0000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "service_id": "ab73162c-0000-4000-8000-ab73162c0000",
                      "description": "Text liber",
                      "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000",
                      "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                      "appointment_id": "82726582-0000-4000-8000-827265820000",
                      "performed_on": "2026-01-31",
                      "qty": 2,
                      "unit_price": 100.5,
                      "vat_rate": 19,
                      "discount_pct": 19,
                      "is_special": true,
                      "created_by": "exemplu",
                      "created_by_name": "Exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "subscription_id": "d76ab896-0000-4000-8000-d76ab8960000",
                      "base_price": 100.5
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Casierie"
        ],
        "summary": "Servicii adăugate din casierie: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/client_services_input"
              },
              "example": {
                "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000",
                "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                "performed_on": "2026-01-31",
                "service_id": "ab73162c-0000-4000-8000-ab73162c0000",
                "description": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/client_services"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/client_services/{id}": {
      "get": {
        "tags": [
          "Casierie"
        ],
        "summary": "Servicii adăugate din casierie: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/client_services"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Casierie"
        ],
        "summary": "Servicii adăugate din casierie: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/client_services_input"
              },
              "example": {
                "service_id": "ab73162c-0000-4000-8000-ab73162c0000"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Casierie"
        ],
        "summary": "Servicii adăugate din casierie: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/quotes": {
      "get": {
        "tags": [
          "Devize & oferte"
        ],
        "summary": "Oferte: listare",
        "description": "Ofertele și devizele trimise clienților. Se pot modifica și șterge doar cât sunt ciorne.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/quotes"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "55aab50a-0000-4000-8000-55aab50a0000",
                      "number": "2026-0001",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "title": "Exemplu",
                      "status": "active",
                      "issue_date": "2026-01-31",
                      "valid_until": "2026-01-31",
                      "currency": "RON",
                      "intro": "exemplu",
                      "terms": "exemplu",
                      "project_id": "9cd58748-0000-4000-8000-9cd587480000",
                      "invoice_id": "8435a6b4-0000-4000-8000-8435a6b40000",
                      "sent_at": "2026-01-31T09:30:00+00:00",
                      "decided_at": "2026-01-31T09:30:00+00:00",
                      "decided_via": "exemplu",
                      "decided_by": "exemplu",
                      "decided_note": "Text liber",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "lines": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Devize & oferte"
        ],
        "summary": "Oferte: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/quotes_input"
              },
              "example": {
                "party_id": "00000000-0000-4000-8000-000000000001",
                "title": "Ofertă",
                "lines": [
                  {
                    "description": "Serviciu",
                    "qty": 1,
                    "unit_price": 100,
                    "vat_rate": 21
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/quotes"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/quotes/{id}/send": {
      "post": {
        "tags": [
          "Devize & oferte"
        ],
        "summary": "Oferte: send",
        "description": "Marchează oferta ca trimisă. Cu email=true o trimite și clientului, cu linkul de acceptare.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "email": {
                    "type": "boolean",
                    "description": "implicit false"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/quotes/{id}/decide": {
      "post": {
        "tags": [
          "Devize & oferte"
        ],
        "summary": "Oferte: decide",
        "description": "Consemnează răspunsul clientului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "decision"
                ],
                "properties": {
                  "decision": {
                    "type": "string",
                    "description": "accepted sau rejected"
                  },
                  "note": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/quotes/{id}/duplicate": {
      "post": {
        "tags": [
          "Devize & oferte"
        ],
        "summary": "Oferte: duplicate",
        "description": "Face o ciornă nouă din ofertă.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/quotes/{id}/to_invoice": {
      "post": {
        "tags": [
          "Devize & oferte"
        ],
        "summary": "Oferte: to_invoice",
        "description": "Ciornă de factură din oferta acceptată.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/quotes/{id}/to_project": {
      "post": {
        "tags": [
          "Devize & oferte"
        ],
        "summary": "Oferte: to_project",
        "description": "Proiect cu etape din oferta acceptată.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/quotes/{id}": {
      "get": {
        "tags": [
          "Devize & oferte"
        ],
        "summary": "Oferte: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/quotes"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Devize & oferte"
        ],
        "summary": "Oferte: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/quotes_input"
              },
              "example": {
                "issue_date": "2026-01-31"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Devize & oferte"
        ],
        "summary": "Oferte: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/quote_lines": {
      "get": {
        "tags": [
          "Devize & oferte"
        ],
        "summary": "Linii oferte: listare",
        "description": "Liniile ofertelor.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/quote_lines"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "a4b4f8d3-0000-4000-8000-a4b4f8d30000",
                      "quote_id": "d978dac5-0000-4000-8000-d978dac50000",
                      "description": "Text liber",
                      "service_id": "ab73162c-0000-4000-8000-ab73162c0000",
                      "unit": "exemplu",
                      "qty": 2,
                      "unit_price": 100.5,
                      "discount_pct": 19,
                      "vat_rate": 19,
                      "sort_order": 1
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/quote_lines/{id}": {
      "get": {
        "tags": [
          "Devize & oferte"
        ],
        "summary": "Linii oferte: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/quote_lines"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contract_events": {
      "get": {
        "tags": [
          "Contracte"
        ],
        "summary": "Istoric contracte: listare",
        "description": "Evenimentele și notele din istoricul contractelor.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/contract_events"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "50be9ba9-0000-4000-8000-50be9ba90000",
                      "contract_id": "b74a7501-0000-4000-8000-b74a75010000",
                      "kind": "standard",
                      "text": "Text liber",
                      "actor": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contract_events/{id}": {
      "get": {
        "tags": [
          "Contracte"
        ],
        "summary": "Istoric contracte: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/contract_events"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/employee_contracts": {
      "get": {
        "tags": [
          "HR"
        ],
        "summary": "Contracte de muncă: listare",
        "description": "Versiunile de contract ale angajaților (normă, salariu, perioadă).",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/employee_contracts"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "84c09d11-0000-4000-8000-84c09d110000",
                      "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000",
                      "contract_type": "standard",
                      "valid_from": "2026-01-31",
                      "valid_to": "2026-01-31",
                      "weekly_hours": 100.5,
                      "pay_type": "standard",
                      "amount": 100.5,
                      "amount_basis": "exemplu",
                      "currency": "RON",
                      "location_ids": [],
                      "notes": "Text liber",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "legal_entity_id": "5cadfa0a-0000-4000-8000-5cadfa0a0000"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/employee_contracts/{id}": {
      "get": {
        "tags": [
          "HR"
        ],
        "summary": "Contracte de muncă: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/employee_contracts"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/absence_requests": {
      "get": {
        "tags": [
          "Concedii"
        ],
        "summary": "Cereri de absență: listare",
        "description": "Cererile de concediu și absență.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/absence_requests"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "ebf4595b-0000-4000-8000-ebf4595b0000",
                      "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000",
                      "type_id": "a44f1a59-0000-4000-8000-a44f1a590000",
                      "start_date": "2026-01-31",
                      "end_date": "2026-01-31",
                      "half_day": "exemplu",
                      "days": 100.5,
                      "reason": "exemplu",
                      "status": "active",
                      "requested_by": "exemplu",
                      "decided_by": "exemplu",
                      "decided_at": "2026-01-31T09:30:00+00:00",
                      "decision_note": "Text liber",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "start": "exemplu",
                      "end": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Concedii"
        ],
        "summary": "Cereri de absență: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/absence_requests_input"
              },
              "example": {
                "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000",
                "type_id": "Exemplu",
                "start": "2026-01-31",
                "half_day": "Exemplu",
                "reason": "Exemplu",
                "end": "2026-01-31"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/absence_requests"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/absence_requests/{id}/decide": {
      "post": {
        "tags": [
          "Concedii"
        ],
        "summary": "Cereri de absență: decide",
        "description": "Aprobă, respinge sau anulează cererea.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "action"
                ],
                "properties": {
                  "action": {
                    "type": "string",
                    "description": "approve, reject sau cancel"
                  },
                  "note": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/absence_requests/{id}": {
      "get": {
        "tags": [
          "Concedii"
        ],
        "summary": "Cereri de absență: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/absence_requests"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/absence_types": {
      "get": {
        "tags": [
          "Concedii"
        ],
        "summary": "Tipuri de absență: listare",
        "description": "Tipurile de absență configurate.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/absence_types"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "c41e54b8-0000-4000-8000-c41e54b80000",
                      "key": "exemplu",
                      "label": "Exemplu",
                      "color": "#791cf0",
                      "counts_as": "exemplu",
                      "requires_approval": true,
                      "uses_allowance": true,
                      "days_per_year": 100.5,
                      "allow_half_day": true,
                      "is_active": true,
                      "sort_order": 1,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "label_i18n": {}
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Concedii"
        ],
        "summary": "Tipuri de absență: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/absence_types_input"
              },
              "example": {
                "label": "Exemplu",
                "color": "#791cf0",
                "counts_as": "Exemplu",
                "requires_approval": true,
                "uses_allowance": true,
                "days_per_year": 42
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/absence_types"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/absence_types/{id}": {
      "get": {
        "tags": [
          "Concedii"
        ],
        "summary": "Tipuri de absență: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/absence_types"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Concedii"
        ],
        "summary": "Tipuri de absență: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/absence_types_input"
              },
              "example": {
                "color": "#791cf0"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/leave_allowances": {
      "get": {
        "tags": [
          "Concedii"
        ],
        "summary": "Drepturi de concediu: listare",
        "description": "Zilele de concediu pe angajat, tip și an.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/leave_allowances"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000",
                      "type_id": "a44f1a59-0000-4000-8000-a44f1a590000",
                      "year": 2,
                      "days": 100.5
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shifts": {
      "get": {
        "tags": [
          "Program & ture"
        ],
        "summary": "Ture: listare",
        "description": "Turele planificate.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/shifts"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "e34e7010-0000-4000-8000-e34e70100000",
                      "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000",
                      "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                      "shift_date": "2026-01-31",
                      "start_time": "09:00:00",
                      "end_time": "09:00:00",
                      "kind": "standard",
                      "source": "exemplu",
                      "note": "Text liber",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "resource_id": "7f711085-0000-4000-8000-7f7110850000",
                      "template_id": "9f562099-0000-4000-8000-9f5620990000",
                      "date": "exemplu",
                      "start": "exemplu",
                      "end": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Program & ture"
        ],
        "summary": "Ture: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shifts_input"
              },
              "example": {
                "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000",
                "date": "2026-01-31",
                "start": "Exemplu",
                "end": "Exemplu",
                "location_id": "Exemplu",
                "kind": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shifts"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shifts/{id}": {
      "get": {
        "tags": [
          "Program & ture"
        ],
        "summary": "Ture: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shifts"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Program & ture"
        ],
        "summary": "Ture: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shifts_input"
              },
              "example": {
                "location_id": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Program & ture"
        ],
        "summary": "Ture: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/time_entries": {
      "get": {
        "tags": [
          "Pontaj"
        ],
        "summary": "Pontaj: listare",
        "description": "Intrările de pontaj.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/time_entries"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "ce006943-0000-4000-8000-ce0069430000",
                      "payload_user_id": "exemplu",
                      "work_date": "2026-01-31",
                      "kind": "standard",
                      "started_at": "2026-01-31T09:30:00+00:00",
                      "ended_at": "2026-01-31T09:30:00+00:00",
                      "minutes": 30,
                      "project_id": "9cd58748-0000-4000-8000-9cd587480000",
                      "note": "Text liber",
                      "source": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000",
                      "task_id": "7b87cc2e-0000-4000-8000-7b87cc2e0000",
                      "billing_run_id": "ecceb95a-0000-4000-8000-ecceb95a0000",
                      "date": "exemplu",
                      "from": "exemplu",
                      "to": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Pontaj"
        ],
        "summary": "Pontaj: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/time_entries_input"
              },
              "example": {
                "kind": "Exemplu",
                "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000",
                "date": "2026-01-31",
                "minutes": 42,
                "project_id": "Exemplu",
                "note": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/time_entries"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/time_entries/{id}": {
      "get": {
        "tags": [
          "Pontaj"
        ],
        "summary": "Pontaj: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/time_entries"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Pontaj"
        ],
        "summary": "Pontaj: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/time_entries_input"
              },
              "example": {
                "minutes": 42
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Pontaj"
        ],
        "summary": "Pontaj: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/time_card_scans": {
      "get": {
        "tags": [
          "Pontaj"
        ],
        "summary": "Scanări de cartele: listare",
        "description": "Jurnalul citirilor de cartele: intrare, ieșire, citire repetată sau cartelă necunoscută.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/time_card_scans"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "c94acb56-0000-4000-8000-c94acb560000",
                      "card_id": "f82c96c3-0000-4000-8000-f82c96c30000",
                      "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000",
                      "code": "EX-001",
                      "result": "exemplu",
                      "time_entry_id": "b7407493-0000-4000-8000-b74074930000",
                      "source": "exemplu",
                      "scanned_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/time_card_scans/{id}": {
      "get": {
        "tags": [
          "Pontaj"
        ],
        "summary": "Scanări de cartele: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/time_card_scans"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/fiscal_receipts": {
      "get": {
        "tags": [
          "Casă de marcat"
        ],
        "summary": "Bonuri fiscale: listare",
        "description": "Bonurile date pe încasări: rândurile, comenzile pentru driver, starea și numărul de pe casă.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/fiscal_receipts"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "a455aa33-0000-4000-8000-a455aa330000",
                      "seq": 1,
                      "register_id": "b6b421d0-0000-4000-8000-b6b421d00000",
                      "source": "exemplu",
                      "source_id": "48c66798-0000-4000-8000-48c667980000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "method": "exemplu",
                      "amount": 100.5,
                      "items": {},
                      "commands": "exemplu",
                      "status": "active",
                      "receipt_number": "2026-0001",
                      "error": "exemplu",
                      "attempts": 1,
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "sent_at": "2026-01-31T09:30:00+00:00",
                      "printed_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "created_by_name": "Exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Casă de marcat"
        ],
        "summary": "Bonuri fiscale: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/fiscal_receipts_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/fiscal_receipts"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/fiscal_receipts/{id}/result": {
      "post": {
        "tags": [
          "Casă de marcat"
        ],
        "summary": "Bonuri fiscale: result",
        "description": "Rezultatul de la driverul casei de marcat: `status` sent (fișier predat driverului), printed (confirmat, cu `receipt_number`) sau failed (cu `error`).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status"
                ],
                "properties": {
                  "status": {
                    "type": "string",
                    "description": "sent, printed sau failed"
                  },
                  "receipt_number": {
                    "type": "string",
                    "description": "numărul bonului de pe casă"
                  },
                  "error": {
                    "type": "string",
                    "description": "mesajul driverului, la failed"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/fiscal_receipts/{id}": {
      "get": {
        "tags": [
          "Casă de marcat"
        ],
        "summary": "Bonuri fiscale: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/fiscal_receipts"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/fiscal_operations": {
      "get": {
        "tags": [
          "Casă de marcat"
        ],
        "summary": "Operațiuni casă de marcat: listare",
        "description": "Raport X, raport Z, introducere și scoatere de numerar și bonuri de retur, cu starea și numărul de pe casă.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/fiscal_operations"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "b4722462-0000-4000-8000-b47224620000",
                      "seq": 1,
                      "register_id": "b6b421d0-0000-4000-8000-b6b421d00000",
                      "kind": "standard",
                      "amount": 100.5,
                      "receipt_id": "1e6c17c9-0000-4000-8000-1e6c17c90000",
                      "commands": "exemplu",
                      "status": "active",
                      "receipt_number": "2026-0001",
                      "error": "exemplu",
                      "attempts": 1,
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "sent_at": "2026-01-31T09:30:00+00:00",
                      "printed_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "created_by_name": "Exemplu",
                      "cashbook_book_id": "ce152395-0000-4000-8000-ce1523950000",
                      "cashbook_posted": true,
                      "cashbook_entry_id": "00432724-0000-4000-8000-004327240000"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Casă de marcat"
        ],
        "summary": "Operațiuni casă de marcat: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/fiscal_operations_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/fiscal_operations"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/fiscal_operations/{id}/result": {
      "post": {
        "tags": [
          "Casă de marcat"
        ],
        "summary": "Operațiuni casă de marcat: result",
        "description": "Rezultatul de la driverul casei pentru o operațiune (raport, numerar, retur): `status` sent, printed (cu `receipt_number`) sau failed (cu `error`).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status"
                ],
                "properties": {
                  "status": {
                    "type": "string",
                    "description": "sent, printed sau failed"
                  },
                  "receipt_number": {
                    "type": "string",
                    "description": "numărul de pe casă"
                  },
                  "error": {
                    "type": "string",
                    "description": "mesajul driverului, la failed"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/fiscal_operations/{id}": {
      "get": {
        "tags": [
          "Casă de marcat"
        ],
        "summary": "Operațiuni casă de marcat: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/fiscal_operations"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tasks": {
      "get": {
        "tags": [
          "Task-uri"
        ],
        "summary": "Task-uri: listare",
        "description": "Task-urile din board-uri, cu status, prioritate, termen și persoană atribuită.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/tasks"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "f579f0c1-0000-4000-8000-f579f0c10000",
                      "board_id": "6de15a1b-0000-4000-8000-6de15a1b0000",
                      "title": "Exemplu",
                      "description": "Text liber",
                      "status": "active",
                      "priority": "exemplu",
                      "due_at": "2026-01-31T09:30:00+00:00",
                      "assignee_payload_user_id": "exemplu",
                      "creator_payload_user_id": "exemplu",
                      "custom_fields": {
                        "exemplu_camp": "valoare"
                      },
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "position": 100.5,
                      "labels": [],
                      "completed_at": "2026-01-31T09:30:00+00:00",
                      "result": "exemplu",
                      "phase_id": "a9f4bb66-0000-4000-8000-a9f4bb660000",
                      "recurrence": {},
                      "recurrence_parent": "560c2372-0000-4000-8000-560c23720000",
                      "department_id": "665e1881-0000-4000-8000-665e18810000",
                      "contract_line_id": "9d23e520-0000-4000-8000-9d23e5200000",
                      "billable": true,
                      "deliverable_id": "2dcbe122-0000-4000-8000-2dcbe1220000",
                      "context": {}
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Task-uri"
        ],
        "summary": "Task-uri: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/tasks_input"
              },
              "example": {
                "board_id": "118adb3f-0000-4000-8000-118adb3f0000",
                "title": "Sună clientul",
                "description": "Confirmă oferta",
                "priority": "high",
                "due_date": "2026-02-05",
                "labels": [
                  "urgent"
                ],
                "checklist": [
                  "Pregătește oferta"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/tasks"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tasks/{id}/move": {
      "post": {
        "tags": [
          "Task-uri"
        ],
        "summary": "Task-uri: move",
        "description": "Mută task-ul în altă coloană.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status"
                ],
                "properties": {
                  "status": {
                    "type": "string"
                  },
                  "ordered_ids": {
                    "type": "array",
                    "items": {},
                    "description": "ordinea din coloană"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tasks/{id}/add_watcher": {
      "post": {
        "tags": [
          "Task-uri"
        ],
        "summary": "Task-uri: add_watcher",
        "description": "Adaugă un observator.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "user_id"
                ],
                "properties": {
                  "user_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tasks/{id}/remove_watcher": {
      "post": {
        "tags": [
          "Task-uri"
        ],
        "summary": "Task-uri: remove_watcher",
        "description": "Scoate un observator.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "user_id"
                ],
                "properties": {
                  "user_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tasks/{id}": {
      "get": {
        "tags": [
          "Task-uri"
        ],
        "summary": "Task-uri: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/tasks"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Task-uri"
        ],
        "summary": "Task-uri: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/tasks_input"
              },
              "example": {
                "status": "done"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Task-uri"
        ],
        "summary": "Task-uri: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/task_boards": {
      "get": {
        "tags": [
          "Task-uri"
        ],
        "summary": "Board-uri: listare",
        "description": "Board-urile de task-uri și coloanele lor.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/task_boards"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "2519be28-0000-4000-8000-2519be280000",
                      "name": "Exemplu",
                      "board_type": "standard",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "description": "Text liber",
                      "columns": {},
                      "is_archived": true,
                      "sort_order": 1,
                      "created_by": "exemplu",
                      "department_id": "665e1881-0000-4000-8000-665e18810000"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Task-uri"
        ],
        "summary": "Board-uri: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/task_boards_input"
              },
              "example": {
                "name": "Exemplu",
                "description": "Exemplu",
                "columns": [
                  "optiune"
                ],
                "department_id": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/task_boards"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/task_boards/{id}": {
      "get": {
        "tags": [
          "Task-uri"
        ],
        "summary": "Board-uri: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/task_boards"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Task-uri"
        ],
        "summary": "Board-uri: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/task_boards_input"
              },
              "example": {
                "description": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Task-uri"
        ],
        "summary": "Board-uri: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/task_comments": {
      "get": {
        "tags": [
          "Task-uri"
        ],
        "summary": "Comentarii task-uri: listare",
        "description": "Comentariile de pe task-uri.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/task_comments"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "f6a129e1-0000-4000-8000-f6a129e10000",
                      "task_id": "7b87cc2e-0000-4000-8000-7b87cc2e0000",
                      "author_id": "exemplu",
                      "author_name": "Exemplu",
                      "body": "Text liber",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Task-uri"
        ],
        "summary": "Comentarii task-uri: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/task_comments_input"
              },
              "example": {
                "task_id": "Exemplu",
                "body": "Text mai lung, pe mai multe rânduri."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/task_comments"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/task_comments/{id}": {
      "get": {
        "tags": [
          "Task-uri"
        ],
        "summary": "Comentarii task-uri: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/task_comments"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Task-uri"
        ],
        "summary": "Comentarii task-uri: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/task_checklist_items": {
      "get": {
        "tags": [
          "Task-uri"
        ],
        "summary": "Checklist task-uri: listare",
        "description": "Elementele de checklist ale task-urilor.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/task_checklist_items"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "dd14c9d4-0000-4000-8000-dd14c9d40000",
                      "task_id": "7b87cc2e-0000-4000-8000-7b87cc2e0000",
                      "text": "Text liber",
                      "done": true,
                      "position": 1
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Task-uri"
        ],
        "summary": "Checklist task-uri: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/task_checklist_items_input"
              },
              "example": {
                "task_id": "Exemplu",
                "text": "Exemplu",
                "done": true
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/task_checklist_items"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/task_checklist_items/{id}": {
      "get": {
        "tags": [
          "Task-uri"
        ],
        "summary": "Checklist task-uri: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/task_checklist_items"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Task-uri"
        ],
        "summary": "Checklist task-uri: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/task_checklist_items_input"
              },
              "example": {
                "done": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Task-uri"
        ],
        "summary": "Checklist task-uri: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/project_phases": {
      "get": {
        "tags": [
          "Proiecte"
        ],
        "summary": "Etape proiecte: listare",
        "description": "Etapele proiectelor, cu sumă și stare.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/project_phases"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "b22af9e3-0000-4000-8000-b22af9e30000",
                      "project_id": "9cd58748-0000-4000-8000-9cd587480000",
                      "title": "Exemplu",
                      "description": "Text liber",
                      "service_id": "ab73162c-0000-4000-8000-ab73162c0000",
                      "planned_date": "2026-01-31",
                      "amount": 100.5,
                      "done": true,
                      "done_at": "2026-01-31T09:30:00+00:00",
                      "sort_order": 1,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "recurrence": {},
                      "recurrence_parent": "560c2372-0000-4000-8000-560c23720000"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Proiecte"
        ],
        "summary": "Etape proiecte: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/project_phases_input"
              },
              "example": {
                "project_id": "9cd58748-0000-4000-8000-9cd587480000",
                "title": "Exemplu",
                "description": "Exemplu",
                "service_id": "ab73162c-0000-4000-8000-ab73162c0000",
                "planned_date": "2026-01-31",
                "amount": 99.9
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/project_phases"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/project_phases/{id}": {
      "get": {
        "tags": [
          "Proiecte"
        ],
        "summary": "Etape proiecte: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/project_phases"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Proiecte"
        ],
        "summary": "Etape proiecte: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/project_phases_input"
              },
              "example": {
                "description": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Proiecte"
        ],
        "summary": "Etape proiecte: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/records": {
      "get": {
        "tags": [
          "Fișe & istoric"
        ],
        "summary": "Intrări în fișe: listare",
        "description": "Intrările din fișele clienților (date structurate după șablon).",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/records"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "3e1bbbcd-0000-4000-8000-3e1bbbcd0000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "template_id": "9f562099-0000-4000-8000-9f5620990000",
                      "template_name": "Exemplu",
                      "appointment_id": "82726582-0000-4000-8000-827265820000",
                      "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000",
                      "entry_date": "2026-01-31",
                      "title": "Exemplu",
                      "data": {},
                      "locked": true,
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_by": "exemplu",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "date": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Fișe & istoric"
        ],
        "summary": "Intrări în fișe: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/records_input"
              },
              "example": {
                "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                "template_id": "Exemplu",
                "appointment_id": "Exemplu",
                "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000",
                "title": "Exemplu",
                "data": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/records"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/records/{id}/add_file": {
      "post": {
        "tags": [
          "Fișe & istoric"
        ],
        "summary": "Intrări în fișe: add_file",
        "description": "Atașează un fișier intrării din fișă.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "type",
                  "content_base64"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "numele fișierului"
                  },
                  "type": {
                    "type": "string",
                    "description": "tipul MIME, ex. application/pdf"
                  },
                  "content_base64": {
                    "type": "string",
                    "description": "conținutul în base64, cel mult 25 MB"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/records/{id}": {
      "get": {
        "tags": [
          "Fișe & istoric"
        ],
        "summary": "Intrări în fișe: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/records"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Fișe & istoric"
        ],
        "summary": "Intrări în fișe: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/records_input"
              },
              "example": {
                "appointment_id": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Fișe & istoric"
        ],
        "summary": "Intrări în fișe: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/record_templates": {
      "get": {
        "tags": [
          "Fișe & istoric"
        ],
        "summary": "Șabloane de fișe: listare",
        "description": "Șabloanele după care se completează fișele.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/record_templates"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "ffa321f6-0000-4000-8000-ffa321f60000",
                      "name": "Exemplu",
                      "kind": "standard",
                      "fields": {},
                      "is_active": true,
                      "sort_order": 1,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "design": {},
                      "medical": true
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Fișe & istoric"
        ],
        "summary": "Șabloane de fișe: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/record_templates_input"
              },
              "example": {
                "name": "Exemplu",
                "fields": [
                  "optiune"
                ],
                "kind": "Exemplu",
                "is_active": true,
                "sort_order": 42,
                "design": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/record_templates"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/record_templates/{id}": {
      "get": {
        "tags": [
          "Fișe & istoric"
        ],
        "summary": "Șabloane de fișe: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/record_templates"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Fișe & istoric"
        ],
        "summary": "Șabloane de fișe: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/record_templates_input"
              },
              "example": {
                "kind": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Fișe & istoric"
        ],
        "summary": "Șabloane de fișe: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/feedback": {
      "get": {
        "tags": [
          "Recenzii"
        ],
        "summary": "Răspunsuri feedback: listare",
        "description": "Răspunsurile la chestionarele de feedback.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/feedback"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "e836e5fc-0000-4000-8000-e836e5fc0000",
                      "request_id": "14772412-0000-4000-8000-147724120000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000",
                      "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                      "service_id": "ab73162c-0000-4000-8000-ab73162c0000",
                      "nps": 1,
                      "comment": "Text liber",
                      "answers": {},
                      "consent_public": true,
                      "published": true,
                      "handled": true,
                      "handled_by": "exemplu",
                      "handled_at": "2026-01-31T09:30:00+00:00",
                      "handled_note": "Text liber",
                      "google_clicked": true,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "author_name": "Exemplu",
                      "author_email": "nume@exemplu.ro",
                      "source": "exemplu",
                      "survey_key": "exemplu",
                      "form_snapshot": {},
                      "consents": {},
                      "author_phone": "+40 700 000 000",
                      "tags": [],
                      "rules_applied": {},
                      "escalate_at": "2026-01-31T09:30:00+00:00",
                      "escalate_rule": "exemplu",
                      "escalated_at": "2026-01-31T09:30:00+00:00",
                      "flagged": true,
                      "flag_reason": "exemplu",
                      "published_at": "2026-01-31T09:30:00+00:00",
                      "assigned_to": "exemplu",
                      "display_name": "Exemplu",
                      "public_reply": "exemplu",
                      "public_reply_at": "2026-01-31T09:30:00+00:00",
                      "replied_at": "2026-01-31T09:30:00+00:00",
                      "utm": {},
                      "support_ticket_id": "c78d0d97-0000-4000-8000-c78d0d970000",
                      "ticket_id": "a9c4b307-0000-4000-8000-a9c4b3070000",
                      "ticket_claim_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Recenzii"
        ],
        "summary": "Răspunsuri feedback: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/feedback_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/feedback"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/feedback/{id}/set_handled": {
      "post": {
        "tags": [
          "Recenzii"
        ],
        "summary": "Răspunsuri feedback: set_handled",
        "description": "Marchează răspunsul ca rezolvat sau îl redeschide.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "value": {
                    "type": "boolean",
                    "description": "implicit true"
                  },
                  "note": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/feedback/{id}/assign": {
      "post": {
        "tags": [
          "Recenzii"
        ],
        "summary": "Răspunsuri feedback: assign",
        "description": "Atribuie răspunsul unui utilizator; gol = nimănui.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "user_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/feedback/{id}/set_tags": {
      "post": {
        "tags": [
          "Recenzii"
        ],
        "summary": "Răspunsuri feedback: set_tags",
        "description": "Etichetele răspunsului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tags"
                ],
                "properties": {
                  "tags": {
                    "type": "array",
                    "items": {}
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/feedback/{id}/add_note": {
      "post": {
        "tags": [
          "Recenzii"
        ],
        "summary": "Răspunsuri feedback: add_note",
        "description": "Notă internă.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "body"
                ],
                "properties": {
                  "body": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/feedback/{id}/reply_private": {
      "post": {
        "tags": [
          "Recenzii"
        ],
        "summary": "Răspunsuri feedback: reply_private",
        "description": "Răspunde clientului pe email.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "body"
                ],
                "properties": {
                  "body": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/feedback/{id}/reply_public": {
      "post": {
        "tags": [
          "Recenzii"
        ],
        "summary": "Răspunsuri feedback: reply_public",
        "description": "Răspunsul public, afișat lângă recenzie.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "body"
                ],
                "properties": {
                  "body": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/feedback/{id}/set_display_name": {
      "post": {
        "tags": [
          "Recenzii"
        ],
        "summary": "Răspunsuri feedback: set_display_name",
        "description": "Numele afișat public.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/feedback/{id}/flag": {
      "post": {
        "tags": [
          "Recenzii"
        ],
        "summary": "Răspunsuri feedback: flag",
        "description": "Marchează răspunsul pentru atenție.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "value": {
                    "type": "boolean",
                    "description": "implicit true"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/feedback/{id}/publish": {
      "post": {
        "tags": [
          "Recenzii"
        ],
        "summary": "Răspunsuri feedback: publish",
        "description": "Publică recenzia sau o scoate de pe pagina publică.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "value": {
                    "type": "boolean",
                    "description": "implicit true"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/feedback/{id}": {
      "get": {
        "tags": [
          "Recenzii"
        ],
        "summary": "Răspunsuri feedback: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/feedback"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/feedback_requests": {
      "get": {
        "tags": [
          "Recenzii"
        ],
        "summary": "Cereri de feedback: listare",
        "description": "Cererile de feedback trimise.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/feedback_requests"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "65d4f091-0000-4000-8000-65d4f0910000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "appointment_id": "82726582-0000-4000-8000-827265820000",
                      "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000",
                      "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                      "service_id": "ab73162c-0000-4000-8000-ab73162c0000",
                      "status": "active",
                      "sent_at": "2026-01-31T09:30:00+00:00",
                      "answered_at": "2026-01-31T09:30:00+00:00",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "survey_key": "exemplu",
                      "channel": "exemplu",
                      "reminder_count": 2,
                      "last_reminder_at": "2026-01-31T09:30:00+00:00",
                      "opened_at": "2026-01-31T09:30:00+00:00",
                      "started_at": "2026-01-31T09:30:00+00:00",
                      "event_id": "1e72c9e7-0000-4000-8000-1e72c9e70000",
                      "recipient_name": "Exemplu",
                      "recipient_email": "nume@exemplu.ro"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/feedback_requests/{id}": {
      "get": {
        "tags": [
          "Recenzii"
        ],
        "summary": "Cereri de feedback: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/feedback_requests"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/documents": {
      "get": {
        "tags": [
          "Documente"
        ],
        "summary": "Documente: listare",
        "description": "Documentele din bibliotecă (metadate). Fișierul se descarcă de la /documents/{id}/file.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/documents"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "2dd2f5d7-0000-4000-8000-2dd2f5d70000",
                      "folder_id": "cd72ee65-0000-4000-8000-cd72ee650000",
                      "title": "Exemplu",
                      "description": "Text liber",
                      "category": "exemplu",
                      "tags": [],
                      "visibility": "exemplu",
                      "expires_at": "2026-01-31",
                      "owner_id": "exemplu",
                      "owner_name": "Exemplu",
                      "current_version": 1,
                      "archived": true,
                      "expiry_notified_at": "2026-01-31T09:30:00+00:00",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "esign_id": "862e1bdf-0000-4000-8000-862e1bdf0000",
                      "name": "Exemplu",
                      "type": "standard",
                      "content_base64": "exemplu",
                      "link_type": "standard",
                      "link_id": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Documente"
        ],
        "summary": "Documente: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/documents_input"
              },
              "example": {
                "name": "Exemplu",
                "type": "Exemplu",
                "content_base64": "Exemplu",
                "folder_id": "Exemplu",
                "title": "Exemplu",
                "description": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/documents"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/documents/{id}/add_version": {
      "post": {
        "tags": [
          "Documente"
        ],
        "summary": "Documente: add_version",
        "description": "Versiune nouă a documentului; cea veche rămâne în istoric.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "type",
                  "content_base64"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "numele fișierului"
                  },
                  "type": {
                    "type": "string",
                    "description": "tipul MIME, ex. application/pdf"
                  },
                  "content_base64": {
                    "type": "string",
                    "description": "conținutul în base64, cel mult 25 MB"
                  },
                  "note": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/documents/{id}/add_link": {
      "post": {
        "tags": [
          "Documente"
        ],
        "summary": "Documente: add_link",
        "description": "Leagă documentul de un client, angajat, furnizor sau proiect.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "entity_type",
                  "entity_id"
                ],
                "properties": {
                  "entity_type": {
                    "type": "string"
                  },
                  "entity_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/documents/{id}/remove_link": {
      "post": {
        "tags": [
          "Documente"
        ],
        "summary": "Documente: remove_link",
        "description": "Scoate legătura.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "entity_type",
                  "entity_id"
                ],
                "properties": {
                  "entity_type": {
                    "type": "string"
                  },
                  "entity_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/documents/{id}": {
      "get": {
        "tags": [
          "Documente"
        ],
        "summary": "Documente: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/documents"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Documente"
        ],
        "summary": "Documente: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/documents_input"
              },
              "example": {
                "folder_id": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Documente"
        ],
        "summary": "Documente: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/document_folders": {
      "get": {
        "tags": [
          "Documente"
        ],
        "summary": "Foldere documente: listare",
        "description": "Folderele bibliotecii de documente.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/document_folders"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "97e06460-0000-4000-8000-97e064600000",
                      "parent_id": "2968c8a9-0000-4000-8000-2968c8a90000",
                      "name": "Exemplu",
                      "sort_order": 1,
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Documente"
        ],
        "summary": "Foldere documente: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/document_folders_input"
              },
              "example": {
                "name": "Exemplu",
                "parent_id": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/document_folders"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/document_folders/{id}": {
      "get": {
        "tags": [
          "Documente"
        ],
        "summary": "Foldere documente: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/document_folders"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Documente"
        ],
        "summary": "Foldere documente: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/document_folders_input"
              },
              "example": {
                "parent_id": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Documente"
        ],
        "summary": "Foldere documente: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/document_versions": {
      "get": {
        "tags": [
          "Documente"
        ],
        "summary": "Versiuni documente: listare",
        "description": "Versiunile documentelor.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/document_versions"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "85b802f0-0000-4000-8000-85b802f00000",
                      "document_id": "540ecc58-0000-4000-8000-540ecc580000",
                      "version": 1,
                      "file_name": "Exemplu",
                      "mime_type": "standard",
                      "size_bytes": 1,
                      "note": "Text liber",
                      "uploaded_by": "exemplu",
                      "uploaded_name": "Exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/document_versions/{id}": {
      "get": {
        "tags": [
          "Documente"
        ],
        "summary": "Versiuni documente: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/document_versions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/document_templates": {
      "get": {
        "tags": [
          "Documente"
        ],
        "summary": "Șabloane de documente: listare",
        "description": "Șabloanele de documente cu variabile.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/document_templates"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "fc4b932c-0000-4000-8000-fc4b932c0000",
                      "name": "Exemplu",
                      "category": "exemplu",
                      "design": {},
                      "is_active": true,
                      "sort_order": 1,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "kind": "standard",
                      "file_key": "exemplu",
                      "file_name": "Exemplu",
                      "mime_type": "standard",
                      "size_bytes": 1,
                      "scope": "exemplu",
                      "docx": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/document_templates/{id}": {
      "get": {
        "tags": [
          "Documente"
        ],
        "summary": "Șabloane de documente: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/document_templates"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/job_applications": {
      "get": {
        "tags": [
          "Cariere"
        ],
        "summary": "Candidați: listare",
        "description": "Aplicările la posturi. CV-ul se descarcă de la /job_applications/{id}/cv.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/job_applications"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "05188e1c-0000-4000-8000-05188e1c0000",
                      "posting_id": "97f3ba7f-0000-4000-8000-97f3ba7f0000",
                      "posting_title": "exemplu",
                      "name": "Exemplu",
                      "email": "nume@exemplu.ro",
                      "phone": "+40 700 000 000",
                      "message": "Text liber",
                      "answers": {},
                      "stage": "exemplu",
                      "rating": 1,
                      "rejected_reason": "exemplu",
                      "source": "exemplu",
                      "consent_at": "2026-01-31T09:30:00+00:00",
                      "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000",
                      "cv_file_id": "3bcc2e39-0000-4000-8000-3bcc2e390000",
                      "cv_name": "Exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "form_snapshot": {},
                      "consents": {},
                      "extra": {},
                      "files": {},
                      "form_key": "exemplu",
                      "score": 100.5,
                      "tags": [],
                      "assigned_to": "exemplu",
                      "utm": {},
                      "talent": true,
                      "flagged": true,
                      "withdrawn_at": "2026-01-31T09:30:00+00:00",
                      "anonymized_at": "2026-01-31T09:30:00+00:00",
                      "stage_entered_at": "2026-01-31T09:30:00+00:00",
                      "last_activity_at": "2026-01-31T09:30:00+00:00",
                      "first_response_at": "2026-01-31T09:30:00+00:00",
                      "auto_reject_at": "2026-01-31T09:30:00+00:00",
                      "auto_reject_reason": "exemplu",
                      "sla_alerted_at": "2026-01-31T09:30:00+00:00",
                      "lang": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Cariere"
        ],
        "summary": "Candidați: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/job_applications_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/job_applications"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/job_applications/{id}/set_stage": {
      "post": {
        "tags": [
          "Cariere"
        ],
        "summary": "Candidați: set_stage",
        "description": "Mută candidatul în altă etapă. Se trimit emailurile configurate pentru etapă.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "stage"
                ],
                "properties": {
                  "stage": {
                    "type": "string"
                  },
                  "rejected_reason": {
                    "type": "string"
                  },
                  "reason_key": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/job_applications/{id}/rate": {
      "post": {
        "tags": [
          "Cariere"
        ],
        "summary": "Candidați: rate",
        "description": "Nota candidatului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "rating"
                ],
                "properties": {
                  "rating": {
                    "type": "number"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/job_applications/{id}/add_note": {
      "post": {
        "tags": [
          "Cariere"
        ],
        "summary": "Candidați: add_note",
        "description": "Notă în istoricul candidatului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/job_applications/{id}/hire": {
      "post": {
        "tags": [
          "Cariere"
        ],
        "summary": "Candidați: hire",
        "description": "Angajează candidatul: creează fișa de angajat.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "hire_date": {
                    "type": "string"
                  },
                  "job_title": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/job_applications/{id}/anonymize": {
      "post": {
        "tags": [
          "Cariere"
        ],
        "summary": "Candidați: anonymize",
        "description": "Anonimizează candidatul (GDPR). Nu se poate anula.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/job_applications/{id}/propose_interview": {
      "post": {
        "tags": [
          "Cariere"
        ],
        "summary": "Candidați: propose_interview",
        "description": "Propune intervale pentru interviu; candidatul alege și primește email.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/job_applications/{id}/schedule_interview": {
      "post": {
        "tags": [
          "Cariere"
        ],
        "summary": "Candidați: schedule_interview",
        "description": "Programează interviul la o oră fixă; candidatul primește email.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/job_applications/{id}/evaluate": {
      "post": {
        "tags": [
          "Cariere"
        ],
        "summary": "Candidați: evaluate",
        "description": "Evaluarea candidatului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "interview_id": {
                    "type": "string"
                  },
                  "scores": {
                    "type": "object"
                  },
                  "recommendation": {
                    "type": "string"
                  },
                  "note": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/job_applications/{id}": {
      "get": {
        "tags": [
          "Cariere"
        ],
        "summary": "Candidați: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/job_applications"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Cariere"
        ],
        "summary": "Candidați: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/job_application_events": {
      "get": {
        "tags": [
          "Cariere"
        ],
        "summary": "Istoric candidați: listare",
        "description": "Etapele și notele din istoricul candidaților.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/job_application_events"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "e80234f7-0000-4000-8000-e80234f70000",
                      "application_id": "28479231-0000-4000-8000-284792310000",
                      "kind": "standard",
                      "text": "Text liber",
                      "actor": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/job_application_events/{id}": {
      "get": {
        "tags": [
          "Cariere"
        ],
        "summary": "Istoric candidați: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/job_application_events"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_reservations": {
      "get": {
        "tags": [
          "Cazare"
        ],
        "summary": "Rezervări cazare: listare",
        "description": "Rezervările pe nopți: oaspete, tip, unitate, perioadă, status, preț și sursă. Starea și plățile se schimbă prin acțiuni.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/accommodation_reservations"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "acd91ded-0000-4000-8000-acd91ded0000",
                      "number": "2026-0001",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "guest_name": "Exemplu",
                      "guest_email": "nume@exemplu.ro",
                      "guest_phone": "+40 700 000 000",
                      "type_id": "a44f1a59-0000-4000-8000-a44f1a590000",
                      "unit_id": "c61433cf-0000-4000-8000-c61433cf0000",
                      "check_in": "2026-01-31",
                      "check_out": "2026-01-31",
                      "adults": 1,
                      "children": 1,
                      "status": "active",
                      "total": 100.5,
                      "currency": "RON",
                      "price_breakdown": {},
                      "source": "exemplu",
                      "notes": "Text liber",
                      "occupies_from": "2026-01-31T09:30:00+00:00",
                      "occupies_until": "2026-01-31T09:30:00+00:00",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "payment_choice": "exemplu",
                      "proforma_id": "888bcfc3-0000-4000-8000-888bcfc30000",
                      "external_uid": "exemplu",
                      "feed_id": "9cfb7975-0000-4000-8000-9cfb79750000",
                      "feedback_request_id": "76e5925e-0000-4000-8000-76e5925e0000",
                      "promo_code": "EX-001",
                      "discount": 100.5,
                      "group_id": "2c0d7fe2-0000-4000-8000-2c0d7fe20000",
                      "child_ages": []
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Cazare"
        ],
        "summary": "Rezervări cazare: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/accommodation_reservations_input"
              },
              "example": {
                "guest_name": "Exemplu",
                "type_id": "Exemplu",
                "check_in": "2026-01-31",
                "check_out": "2026-01-31",
                "guest_email": "nume@exemplu.ro",
                "guest_phone": "+40 700 000 000"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/accommodation_reservations"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_reservations/{id}/set_status": {
      "post": {
        "tags": [
          "Cazare"
        ],
        "summary": "Rezervări cazare: set_status",
        "description": "Confirmă, check-in, check-out, anulează sau neprezentare. Cu send_review=true, la plecare se trimite și cererea de recenzie.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status"
                ],
                "properties": {
                  "status": {
                    "type": "string",
                    "description": "requested, confirmed, checked_in, checked_out, cancelled sau no_show"
                  },
                  "send_review": {
                    "type": "boolean",
                    "description": "implicit false"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_reservations/{id}/add_payment": {
      "post": {
        "tags": [
          "Cazare"
        ],
        "summary": "Rezervări cazare: add_payment",
        "description": "Înregistrează o încasare.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount"
                ],
                "properties": {
                  "amount": {
                    "type": "number"
                  },
                  "method": {
                    "type": "string"
                  },
                  "note": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_reservations/{id}/settle_refund": {
      "post": {
        "tags": [
          "Cazare"
        ],
        "summary": "Rezervări cazare: settle_refund",
        "description": "Marchează o rambursare ca plătită.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "refund_id"
                ],
                "properties": {
                  "refund_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_reservations/{id}/issue_proforma": {
      "post": {
        "tags": [
          "Cazare"
        ],
        "summary": "Rezervări cazare: issue_proforma",
        "description": "Emite proforma rezervării și trece pe ea încasările.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_reservations/{id}": {
      "get": {
        "tags": [
          "Cazare"
        ],
        "summary": "Rezervări cazare: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/accommodation_reservations"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_types": {
      "get": {
        "tags": [
          "Cazare"
        ],
        "summary": "Tipuri de cazare: listare",
        "description": "Ce se vinde: capacitate, facilități, ore de check-in și check-out, preț de bază. Tarifele și prețurile pe zile se schimbă prin acțiuni.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/accommodation_types"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "c6297d03-0000-4000-8000-c6297d030000",
                      "name": "Exemplu",
                      "slug": "exemplu",
                      "short_description": "Text liber",
                      "description": "Text liber",
                      "max_adults": 1,
                      "max_children": 1,
                      "max_guests": 1,
                      "beds": "exemplu",
                      "area_m2": 100.5,
                      "amenities": [],
                      "base_price": 100.5,
                      "check_in_time": "exemplu",
                      "check_out_time": "exemplu",
                      "min_nights": 1,
                      "policies": {},
                      "is_active": true,
                      "sort_order": 1,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "included_guests": 1,
                      "extra_adult_price": 100.5,
                      "extra_child_price": 100.5,
                      "free_child_age": 1
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Cazare"
        ],
        "summary": "Tipuri de cazare: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/accommodation_types_input"
              },
              "example": {
                "name": "Exemplu",
                "base_price": 99.9,
                "short_description": "Text mai lung, pe mai multe rânduri.",
                "description": "Exemplu",
                "max_adults": 42,
                "max_children": 42
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/accommodation_types"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_types/{id}/set_rates": {
      "post": {
        "tags": [
          "Cazare"
        ],
        "summary": "Tipuri de cazare: set_rates",
        "description": "Înlocuiește tarifele tipului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "rates"
                ],
                "properties": {
                  "rates": {
                    "type": "array",
                    "items": {}
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_types/{id}/set_day_prices": {
      "post": {
        "tags": [
          "Cazare"
        ],
        "summary": "Tipuri de cazare: set_day_prices",
        "description": "Preț, procent, ședere minimă sau restricții pe un interval.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_types/{id}/set_guest_pricing": {
      "post": {
        "tags": [
          "Cazare"
        ],
        "summary": "Tipuri de cazare: set_guest_pricing",
        "description": "Oaspeții incluși și suplimentele.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_types/{id}/add_media": {
      "post": {
        "tags": [
          "Cazare"
        ],
        "summary": "Tipuri de cazare: add_media",
        "description": "Adaugă o poză în galerie (JPG, PNG sau WebP, până la 8 MB).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "type",
                  "content_base64"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "numele fișierului"
                  },
                  "type": {
                    "type": "string",
                    "description": "tipul MIME, ex. application/pdf"
                  },
                  "content_base64": {
                    "type": "string",
                    "description": "conținutul în base64, cel mult 25 MB"
                  },
                  "alt": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_types/{id}/remove_media": {
      "post": {
        "tags": [
          "Cazare"
        ],
        "summary": "Tipuri de cazare: remove_media",
        "description": "Șterge o poză din galerie.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "media_id"
                ],
                "properties": {
                  "media_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_types/{id}/reorder_media": {
      "post": {
        "tags": [
          "Cazare"
        ],
        "summary": "Tipuri de cazare: reorder_media",
        "description": "Ordinea pozelor; prima e coperta.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "order"
                ],
                "properties": {
                  "order": {
                    "type": "array",
                    "items": {}
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_types/{id}/set_media_alt": {
      "post": {
        "tags": [
          "Cazare"
        ],
        "summary": "Tipuri de cazare: set_media_alt",
        "description": "Textul alternativ al unei poze.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "media_id",
                  "alt"
                ],
                "properties": {
                  "media_id": {
                    "type": "string"
                  },
                  "alt": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_types/{id}": {
      "get": {
        "tags": [
          "Cazare"
        ],
        "summary": "Tipuri de cazare: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/accommodation_types"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Cazare"
        ],
        "summary": "Tipuri de cazare: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/accommodation_types_input"
              },
              "example": {
                "short_description": "Text mai lung, pe mai multe rânduri."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Cazare"
        ],
        "summary": "Tipuri de cazare: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_units": {
      "get": {
        "tags": [
          "Cazare"
        ],
        "summary": "Unități de cazare: listare",
        "description": "Camerele fiecărui tip. Cu resource_id, o resursă de la Programări devine comună.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/accommodation_units"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "dd07924d-0000-4000-8000-dd07924d0000",
                      "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                      "name": "Exemplu",
                      "resource_type": "standard",
                      "is_active": true,
                      "custom_fields": {},
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "code": "EX-001",
                      "description": "Text liber",
                      "access_mode": "exemplu",
                      "used_by": "exemplu",
                      "accommodation_type_id": "4874afac-0000-4000-8000-4874afac0000",
                      "cleaning_state": "exemplu",
                      "type_id": "exemplu",
                      "resource_id": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Cazare"
        ],
        "summary": "Unități de cazare: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/accommodation_units_input"
              },
              "example": {
                "name": "Exemplu",
                "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                "is_active": true,
                "code": "Exemplu",
                "type_id": "Exemplu",
                "resource_id": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/accommodation_units"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_units/{id}/set_cleaning": {
      "post": {
        "tags": [
          "Cazare"
        ],
        "summary": "Unități de cazare: set_cleaning",
        "description": "Starea de curățenie a unității.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "state"
                ],
                "properties": {
                  "state": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_units/{id}/export_token": {
      "post": {
        "tags": [
          "Cazare"
        ],
        "summary": "Unități de cazare: export_token",
        "description": "Tokenul adresei de export iCal a unității. E secret.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_units/{id}": {
      "get": {
        "tags": [
          "Cazare"
        ],
        "summary": "Unități de cazare: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/accommodation_units"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Cazare"
        ],
        "summary": "Unități de cazare: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/accommodation_units_input"
              },
              "example": {
                "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Cazare"
        ],
        "summary": "Unități de cazare: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_rates": {
      "get": {
        "tags": [
          "Cazare"
        ],
        "summary": "Tarife cazare: listare",
        "description": "Tarifele tipurilor de cazare. Se înlocuiesc cu acțiunea set_rates pe accommodation_types.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/accommodation_rates"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "07a4f7a9-0000-4000-8000-07a4f7a90000",
                      "type_id": "a44f1a59-0000-4000-8000-a44f1a590000",
                      "name": "Exemplu",
                      "valid_from": "2026-01-31",
                      "valid_to": "2026-01-31",
                      "weekdays": [],
                      "price": 100.5,
                      "min_nights": 1,
                      "priority": 1,
                      "is_active": true,
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_rates/{id}": {
      "get": {
        "tags": [
          "Cazare"
        ],
        "summary": "Tarife cazare: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/accommodation_rates"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_payments": {
      "get": {
        "tags": [
          "Cazare"
        ],
        "summary": "Plăți cazare: listare",
        "description": "Încasările și rambursările rezervărilor.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/accommodation_payments"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "1bfcf527-0000-4000-8000-1bfcf5270000",
                      "reservation_id": "84ddf235-0000-4000-8000-84ddf2350000",
                      "kind": "standard",
                      "method": "exemplu",
                      "status": "active",
                      "amount": 100.5,
                      "currency": "RON",
                      "note": "Text liber",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "provider": "exemplu",
                      "external_id": "exemplu",
                      "checkout_url": "https://exemplu.ro"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_payments/{id}": {
      "get": {
        "tags": [
          "Cazare"
        ],
        "summary": "Plăți cazare: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/accommodation_payments"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_promos": {
      "get": {
        "tags": [
          "Cazare"
        ],
        "summary": "Coduri promoționale: listare",
        "description": "Codurile promoționale de la cazare.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/accommodation_promos"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "af734ab0-0000-4000-8000-af734ab00000",
                      "code": "EX-001",
                      "description": "Text liber",
                      "kind": "standard",
                      "value": 100.5,
                      "valid_from": "2026-01-31",
                      "valid_to": "2026-01-31",
                      "min_nights": 1,
                      "uses_limit": 1,
                      "used": 1,
                      "is_active": true,
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Cazare"
        ],
        "summary": "Coduri promoționale: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/accommodation_promos_input"
              },
              "example": {
                "code": "Exemplu",
                "value": 42,
                "description": "Exemplu",
                "kind": "Exemplu",
                "valid_from": "2026-01-31",
                "valid_to": "2026-01-31"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/accommodation_promos"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_promos/{id}": {
      "get": {
        "tags": [
          "Cazare"
        ],
        "summary": "Coduri promoționale: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/accommodation_promos"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Cazare"
        ],
        "summary": "Coduri promoționale: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/accommodation_promos_input"
              },
              "example": {
                "description": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Cazare"
        ],
        "summary": "Coduri promoționale: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/reception_agents": {
      "get": {
        "tags": [
          "Recepționer AI"
        ],
        "summary": "Agenți recepționer: listare",
        "description": "Agenții care răspund la telefon și pe WhatsApp: ton, mesaj de început, instrucțiuni și ce au voie să facă.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/reception_agents"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "b7893463-0000-4000-8000-b78934630000",
                      "name": "Exemplu",
                      "language": "exemplu",
                      "voice": "exemplu",
                      "tone": "exemplu",
                      "greeting": "exemplu",
                      "instructions": "exemplu",
                      "permissions": [],
                      "transfer_phone": "+40 700 000 000",
                      "is_active": true,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "provider_agent_id": "exemplu",
                      "sync_status": "active",
                      "sync_error": "exemplu",
                      "synced_at": "2026-01-31T09:30:00+00:00",
                      "monthly_limit_minutes": 30,
                      "custom_fields": {
                        "exemplu_camp": "valoare"
                      }
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Recepționer AI"
        ],
        "summary": "Agenți recepționer: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/reception_agents_input"
              },
              "example": {
                "name": "Ana",
                "tone": "friendly",
                "permissions": [
                  "book",
                  "reschedule",
                  "cancel",
                  "message"
                ],
                "is_active": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/reception_agents"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/reception_agents/{id}/sync": {
      "post": {
        "tags": [
          "Recepționer AI"
        ],
        "summary": "Agenți recepționer: sync",
        "description": "Sincronizează agentul cu serviciul de voce (îl creează sau îl actualizează acolo). Cere vocea completată pe agent.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/reception_agents/{id}": {
      "get": {
        "tags": [
          "Recepționer AI"
        ],
        "summary": "Agenți recepționer: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/reception_agents"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Recepționer AI"
        ],
        "summary": "Agenți recepționer: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/reception_agents_input"
              },
              "example": {
                "language": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Recepționer AI"
        ],
        "summary": "Agenți recepționer: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/reception_locations": {
      "get": {
        "tags": [
          "Recepționer AI"
        ],
        "summary": "Recepționer pe locații: listare",
        "description": "Ce diferă pe o locație față de agent: pornit sau oprit, mesaj de început, număr de transfer, servicii oferite. Fără rând, locația folosește setările agentului.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/reception_locations"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "3351fe21-0000-4000-8000-3351fe210000",
                      "agent_id": "65709d9c-0000-4000-8000-65709d9c0000",
                      "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                      "enabled": true,
                      "greeting": "exemplu",
                      "transfer_phone": "+40 700 000 000",
                      "service_ids": [],
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Recepționer AI"
        ],
        "summary": "Recepționer pe locații: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/reception_locations_input"
              },
              "example": {
                "agent_id": "Exemplu",
                "location_id": "Exemplu",
                "enabled": true,
                "greeting": "Exemplu",
                "transfer_phone": "Exemplu",
                "service_ids": [
                  "optiune"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/reception_locations"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/reception_locations/{id}": {
      "get": {
        "tags": [
          "Recepționer AI"
        ],
        "summary": "Recepționer pe locații: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/reception_locations"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Recepționer AI"
        ],
        "summary": "Recepționer pe locații: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/reception_locations_input"
              },
              "example": {
                "enabled": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Recepționer AI"
        ],
        "summary": "Recepționer pe locații: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/reception_numbers": {
      "get": {
        "tags": [
          "Recepționer AI"
        ],
        "summary": "Numere recepționer: listare",
        "description": "Numerele de telefon și de WhatsApp pe care răspunde agentul, cu locația fiecăruia. Se adaugă din aplicație.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/reception_numbers"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "67ccf175-0000-4000-8000-67ccf1750000",
                      "agent_id": "65709d9c-0000-4000-8000-65709d9c0000",
                      "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                      "channel": "exemplu",
                      "phone": "+40 700 000 000",
                      "provider": "exemplu",
                      "provider_ref": "exemplu",
                      "status": "active",
                      "forwarded_from": "exemplu",
                      "notes": "Text liber",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "carrier_ref": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/reception_numbers/{id}": {
      "get": {
        "tags": [
          "Recepționer AI"
        ],
        "summary": "Numere recepționer: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/reception_numbers"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/reception_conversations": {
      "get": {
        "tags": [
          "Recepționer AI"
        ],
        "summary": "Conversații recepționer: listare",
        "description": "Apelurile și conversațiile agentului: canal, client, locație, rezultat, rezumat, mesajul lăsat și programările făcute. Transcrierea nu se expune.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/reception_conversations"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "623e306f-0000-4000-8000-623e306f0000",
                      "agent_id": "65709d9c-0000-4000-8000-65709d9c0000",
                      "number_id": "1059fdaa-0000-4000-8000-1059fdaa0000",
                      "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                      "channel": "exemplu",
                      "caller_phone": "+40 700 000 000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "status": "active",
                      "outcome": "exemplu",
                      "summary": "exemplu",
                      "message": "Text liber",
                      "events": {},
                      "appointment_ids": [],
                      "duration_seconds": 30,
                      "message_count": 2,
                      "provider": "exemplu",
                      "provider_ref": "exemplu",
                      "is_test": true,
                      "started_at": "2026-01-31T09:30:00+00:00",
                      "ended_at": "2026-01-31T09:30:00+00:00",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "handled_by": "exemplu",
                      "last_message_at": "2026-01-31T09:30:00+00:00",
                      "ticket_id": "a9c4b307-0000-4000-8000-a9c4b3070000",
                      "ticket_claim_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Recepționer AI"
        ],
        "summary": "Conversații recepționer: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/reception_conversations_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/reception_conversations"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/reception_conversations/{id}/reply": {
      "post": {
        "tags": [
          "Recepționer AI"
        ],
        "summary": "Conversații recepționer: reply",
        "description": "Un om răspunde pe o conversație WhatsApp deschisă; agentul se oprește pe ea. Mesajul se taxează ca orice mesaj trimis.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "textul mesajului"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/reception_conversations/{id}": {
      "get": {
        "tags": [
          "Recepționer AI"
        ],
        "summary": "Conversații recepționer: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/reception_conversations"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auction_events": {
      "get": {
        "tags": [
          "Licitații"
        ],
        "summary": "Licitații: listare",
        "description": "Evenimentele de licitație: adresă, stare, monedă, obiectiv și ecranul de pe proiector (stage). Ecranul se schimbă prin acțiunea set_stage.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/auction_events"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "ed94e22c-0000-4000-8000-ed94e22c0000",
                      "slug": "exemplu",
                      "name": "Exemplu",
                      "status": "active",
                      "starts_at": "2026-01-31T09:30:00+00:00",
                      "venue": "exemplu",
                      "currency": "RON",
                      "goal": 100.5,
                      "raised_offset": 100.5,
                      "phone_bidding": true,
                      "site_url": "https://exemplu.ro",
                      "stage": "exemplu",
                      "current_lot_id": "13117e16-0000-4000-8000-13117e160000",
                      "paddle_levels": [],
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "payment_account_id": "exemplu",
                      "sms_device_id": "exemplu",
                      "smtp_id": "exemplu",
                      "screen_title": "exemplu",
                      "screen_text": "exemplu",
                      "show_levels": true,
                      "donors_mode": "exemplu",
                      "donors_count": 2,
                      "site_id": "5453b32c-0000-4000-8000-5453b32c0000"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Licitații"
        ],
        "summary": "Licitații: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/auction_events_input"
              },
              "example": {
                "name": "Exemplu",
                "slug": "Exemplu",
                "status": "Exemplu",
                "starts_at": "2026-01-31",
                "venue": "Exemplu",
                "currency": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/auction_events"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auction_events/{id}/set_stage": {
      "post": {
        "tags": [
          "Licitații"
        ],
        "summary": "Licitații: set_stage",
        "description": "Ce arată proiectorul: ecranul de început, lotul curent, sponsorii, momentul de donații sau mulțumirile.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "stage"
                ],
                "properties": {
                  "stage": {
                    "type": "string",
                    "description": "intro, lot, sponsors, paddle sau thanks"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auction_events/{id}": {
      "get": {
        "tags": [
          "Licitații"
        ],
        "summary": "Licitații: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/auction_events"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Licitații"
        ],
        "summary": "Licitații: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/auction_events_input"
              },
              "example": {
                "slug": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Licitații"
        ],
        "summary": "Licitații: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auction_lots": {
      "get": {
        "tags": [
          "Licitații"
        ],
        "summary": "Loturi: listare",
        "description": "Loturile licitațiilor, din produsele catalogului: preț de pornire, pas, oferta curentă, stare. Fiecare licitație are și un singur rând cu kind = donation, locul donațiilor. Licitarea se face prin acțiuni.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/auction_lots"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "7f6732a3-0000-4000-8000-7f6732a30000",
                      "event_id": "1e72c9e7-0000-4000-8000-1e72c9e70000",
                      "product_id": "7abdadb2-0000-4000-8000-7abdadb20000",
                      "kind": "standard",
                      "position": 1,
                      "title": "Exemplu",
                      "description": "Text liber",
                      "donor": "exemplu",
                      "estimate": 100.5,
                      "start_price": 100.5,
                      "step": 100.5,
                      "status": "active",
                      "going": 1,
                      "current_amount": 100.5,
                      "leader_bidder_id": "480c8d97-0000-4000-8000-480c8d970000",
                      "ends_at": "2026-01-31T09:30:00+00:00",
                      "sold_at": "2026-01-31T09:30:00+00:00",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "quantity": 1,
                      "round": 1
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Licitații"
        ],
        "summary": "Loturi: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/auction_lots_input"
              },
              "example": {
                "event_id": "Exemplu",
                "product_id": "Exemplu",
                "kind": "Exemplu",
                "position": 42,
                "title": "Exemplu",
                "description": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/auction_lots"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auction_lots/{id}/open": {
      "post": {
        "tags": [
          "Licitații"
        ],
        "summary": "Loturi: open",
        "description": "Pune lotul pe ecran și îl deschide pentru oferte. Lotul tăcut se deschide doar pentru oferte din telefon, iar la donații arată pe proiector ecranul de donații.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auction_lots/{id}/bid": {
      "post": {
        "tags": [
          "Licitații"
        ],
        "summary": "Loturi: bid",
        "description": "Ofertă din sală, după nr. ofertant. Pentru cine nu s-a înscris: name (ofertant nou cu numele dat) sau walk_in=true (ofertant nou „Invitat”). Fără sumă, se ia următoarea (curentă + pas).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "paddle": {
                    "type": "number"
                  },
                  "bidder_id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "walk_in": {
                    "type": "boolean"
                  },
                  "amount": {
                    "type": "number"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auction_lots/{id}/undo_bid": {
      "post": {
        "tags": [
          "Licitații"
        ],
        "summary": "Loturi: undo_bid",
        "description": "Anulează ultima ofertă (greșeală de număr).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auction_lots/{id}/going": {
      "post": {
        "tags": [
          "Licitații"
        ],
        "summary": "Loturi: going",
        "description": "Prima oară (1), a doua oară (2) sau înapoi (0).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "going"
                ],
                "properties": {
                  "going": {
                    "type": "number",
                    "description": "0, 1 sau 2"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auction_lots/{id}/close": {
      "post": {
        "tags": [
          "Licitații"
        ],
        "summary": "Loturi: close",
        "description": "Adjudecă o bucată celui care conduce, apoi începe runda bucății următoare; la ultima, lotul e adjudecat. Fără oferte, lotul se închide.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auction_lots/{id}/award_next": {
      "post": {
        "tags": [
          "Licitații"
        ],
        "summary": "Loturi: award_next",
        "description": "La un lot cu mai multe bucăți: bucata următoare merge celui mai bun ofertant din runda trecută care n-a primit încă una, la oferta lui.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auction_lots/{id}/reset": {
      "post": {
        "tags": [
          "Licitații"
        ],
        "summary": "Loturi: reset",
        "description": "Lotul o ia de la capăt: ofertele și adjudecările lui se șterg. Refuzat dacă un câștigător a plătit deja.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auction_lots/{id}/mark_unsold": {
      "post": {
        "tags": [
          "Licitații"
        ],
        "summary": "Loturi: mark_unsold",
        "description": "Închide lotul neadjudecat, chiar dacă are oferte.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auction_lots/{id}/reopen": {
      "post": {
        "tags": [
          "Licitații"
        ],
        "summary": "Loturi: reopen",
        "description": "Redeschide un lot închis din greșeală, cu ofertele de dinainte.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auction_lots/{id}": {
      "get": {
        "tags": [
          "Licitații"
        ],
        "summary": "Loturi: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/auction_lots"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Licitații"
        ],
        "summary": "Loturi: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/auction_lots_input"
              },
              "example": {
                "product_id": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Licitații"
        ],
        "summary": "Loturi: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auction_bidders": {
      "get": {
        "tags": [
          "Licitații"
        ],
        "summary": "Ofertanți: listare",
        "description": "Ofertanții cu paleta lor. Încasările se trec prin acțiunea add_payment.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/auction_bidders"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "ce4a186c-0000-4000-8000-ce4a186c0000",
                      "event_id": "1e72c9e7-0000-4000-8000-1e72c9e70000",
                      "paddle": 1,
                      "name": "Exemplu",
                      "phone": "+40 700 000 000",
                      "email": "nume@exemplu.ro",
                      "table_label": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Licitații"
        ],
        "summary": "Ofertanți: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/auction_bidders_input"
              },
              "example": {
                "event_id": "Exemplu",
                "name": "Exemplu",
                "paddle": 42,
                "phone": "Exemplu",
                "email": "Exemplu",
                "table_label": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/auction_bidders"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auction_bidders/{id}/send_pay_link": {
      "post": {
        "tags": [
          "Licitații"
        ],
        "summary": "Ofertanți: send_pay_link",
        "description": "Trimite linkul de plată, prin SMS sau email, de pe telefonul și contul SMTP alese pe licitație.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "channel"
                ],
                "properties": {
                  "channel": {
                    "type": "string",
                    "description": "sms sau email"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auction_bidders/{id}/add_payment": {
      "post": {
        "tags": [
          "Licitații"
        ],
        "summary": "Ofertanți: add_payment",
        "description": "Încasare trecută de organizator (numerar, transfer). Nu depășește ce mai are de plată.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount"
                ],
                "properties": {
                  "amount": {
                    "type": "number"
                  },
                  "method": {
                    "type": "string",
                    "description": "cash, transfer sau other"
                  },
                  "note": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auction_bidders/{id}": {
      "get": {
        "tags": [
          "Licitații"
        ],
        "summary": "Ofertanți: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/auction_bidders"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Licitații"
        ],
        "summary": "Ofertanți: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/auction_bidders_input"
              },
              "example": {
                "paddle": 42
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auction_sponsors": {
      "get": {
        "tags": [
          "Licitații"
        ],
        "summary": "Sponsori licitație: listare",
        "description": "Sponsorii unei licitații: nume, logo (adresa din galerie), site, ordine. Apar pe proiector și în aplicația publică.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/auction_sponsors"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "d970ff6c-0000-4000-8000-d970ff6c0000",
                      "event_id": "1e72c9e7-0000-4000-8000-1e72c9e70000",
                      "name": "Exemplu",
                      "logo_url": "https://exemplu.ro",
                      "website": "https://exemplu.ro",
                      "position": 1,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Licitații"
        ],
        "summary": "Sponsori licitație: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/auction_sponsors_input"
              },
              "example": {
                "event_id": "Exemplu",
                "name": "Exemplu",
                "logo_url": "Exemplu",
                "website": "Exemplu",
                "position": 42
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/auction_sponsors"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auction_sponsors/{id}": {
      "get": {
        "tags": [
          "Licitații"
        ],
        "summary": "Sponsori licitație: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/auction_sponsors"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Licitații"
        ],
        "summary": "Sponsori licitație: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/auction_sponsors_input"
              },
              "example": {
                "logo_url": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Licitații"
        ],
        "summary": "Sponsori licitație: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auction_awards": {
      "get": {
        "tags": [
          "Licitații"
        ],
        "summary": "Adjudecări: listare",
        "description": "Cine a câștigat ce: un rând pe bucată de lot, cu ofertantul și suma. De aici se calculează ce are de plată fiecare.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/auction_awards"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "36bd506f-0000-4000-8000-36bd506f0000",
                      "event_id": "1e72c9e7-0000-4000-8000-1e72c9e70000",
                      "lot_id": "30e95f90-0000-4000-8000-30e95f900000",
                      "bidder_id": "65e84b1f-0000-4000-8000-65e84b1f0000",
                      "amount": 100.5,
                      "round": 1,
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auction_awards/{id}": {
      "get": {
        "tags": [
          "Licitații"
        ],
        "summary": "Adjudecări: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/auction_awards"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auction_bids": {
      "get": {
        "tags": [
          "Licitații"
        ],
        "summary": "Oferte: listare",
        "description": "Toate ofertele, din sală și din telefon; cele anulate au voided = true.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/auction_bids"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "634a564f-0000-4000-8000-634a564f0000",
                      "event_id": "1e72c9e7-0000-4000-8000-1e72c9e70000",
                      "lot_id": "30e95f90-0000-4000-8000-30e95f900000",
                      "bidder_id": "65e84b1f-0000-4000-8000-65e84b1f0000",
                      "amount": 100.5,
                      "source": "exemplu",
                      "voided": true,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "round": 1
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auction_bids/{id}": {
      "get": {
        "tags": [
          "Licitații"
        ],
        "summary": "Oferte: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/auction_bids"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auction_payments": {
      "get": {
        "tags": [
          "Licitații"
        ],
        "summary": "Plăți licitație: listare",
        "description": "Încasările ofertanților: cu cardul sau trecute de organizator.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/auction_payments"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "47108858-0000-4000-8000-471088580000",
                      "event_id": "1e72c9e7-0000-4000-8000-1e72c9e70000",
                      "bidder_id": "65e84b1f-0000-4000-8000-65e84b1f0000",
                      "amount": 100.5,
                      "currency": "RON",
                      "method": "exemplu",
                      "status": "active",
                      "provider": "exemplu",
                      "external_id": "exemplu",
                      "checkout_url": "https://exemplu.ro",
                      "note": "Text liber",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auction_payments/{id}": {
      "get": {
        "tags": [
          "Licitații"
        ],
        "summary": "Plăți licitație: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/auction_payments"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/support_tickets": {
      "get": {
        "tags": [
          "Support"
        ],
        "summary": "Tickete Support: listare",
        "description": "Ticketele de support: stare, prioritate, client, vizitator, SLA și CSAT.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/support_tickets"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "2a1cdc78-0000-4000-8000-2a1cdc780000",
                      "number": 1,
                      "subject": "exemplu",
                      "status": "active",
                      "priority": "exemplu",
                      "assignee_user_id": "exemplu",
                      "team_id": "815e7056-0000-4000-8000-815e70560000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "visitor_name": "Exemplu",
                      "visitor_email": "nume@exemplu.ro",
                      "visitor_phone": "+40 700 000 000",
                      "visitor_meta": {},
                      "first_response_due_at": "2026-01-31T09:30:00+00:00",
                      "resolve_due_at": "2026-01-31T09:30:00+00:00",
                      "first_responded_at": "2026-01-31T09:30:00+00:00",
                      "resolved_at": "2026-01-31T09:30:00+00:00",
                      "last_message_at": "2026-01-31T09:30:00+00:00",
                      "last_customer_message_at": "2026-01-31T09:30:00+00:00",
                      "agent_last_read_at": "2026-01-31T09:30:00+00:00",
                      "csat_score": 1,
                      "csat_comment": "Text liber",
                      "csat_at": "2026-01-31T09:30:00+00:00",
                      "csat_feedback_response_id": "55a48c14-0000-4000-8000-55a48c140000",
                      "merged_into_id": "5c3e750e-0000-4000-8000-5c3e750e0000",
                      "search_tsv": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "sla_paused_at": "2026-01-31T09:30:00+00:00",
                      "sla_paused_ms": 1,
                      "shop_return_id": "baf5e848-0000-4000-8000-baf5e8480000",
                      "return_claim_at": "2026-01-31T09:30:00+00:00",
                      "body": "Text liber"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Support"
        ],
        "summary": "Tickete Support: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/support_tickets_input"
              },
              "example": {
                "body": "Exemplu",
                "subject": "Exemplu",
                "priority": "Exemplu",
                "assignee_user_id": "Exemplu",
                "team_id": "Exemplu",
                "party_id": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/support_tickets"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/support_tickets/{id}/assign": {
      "post": {
        "tags": [
          "Support"
        ],
        "summary": "Tickete Support: assign",
        "description": "Atribuie ticketul unui utilizator (sau lasă assignee_user_id gol ca să îl dea înapoi în coadă).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "assignee_user_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/support_tickets/{id}/resolve": {
      "post": {
        "tags": [
          "Support"
        ],
        "summary": "Tickete Support: resolve",
        "description": "Marchează ticketul ca rezolvat.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/support_tickets/{id}/reopen": {
      "post": {
        "tags": [
          "Support"
        ],
        "summary": "Tickete Support: reopen",
        "description": "Redeschide un ticket rezolvat sau pending.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/support_tickets/{id}/set_status": {
      "post": {
        "tags": [
          "Support"
        ],
        "summary": "Tickete Support: set_status",
        "description": "Schimbă starea: open, pending sau resolved.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status"
                ],
                "properties": {
                  "status": {
                    "type": "string",
                    "description": "open, pending sau resolved"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/support_tickets/{id}/set_priority": {
      "post": {
        "tags": [
          "Support"
        ],
        "summary": "Tickete Support: set_priority",
        "description": "Schimbă prioritatea.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "priority"
                ],
                "properties": {
                  "priority": {
                    "type": "string",
                    "description": "low, normal, high sau urgent"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/support_tickets/{id}/link_party": {
      "post": {
        "tags": [
          "Support"
        ],
        "summary": "Tickete Support: link_party",
        "description": "Leagă ticketul de un client (parties) sau scoate legătura.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "party_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/support_tickets/{id}/set_labels": {
      "post": {
        "tags": [
          "Support"
        ],
        "summary": "Tickete Support: set_labels",
        "description": "Înlocuiește etichetele ticketului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "label_ids"
                ],
                "properties": {
                  "label_ids": {
                    "type": "array",
                    "items": {},
                    "description": "listă de id-uri support_labels"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/support_tickets/{id}/add_note": {
      "post": {
        "tags": [
          "Support"
        ],
        "summary": "Tickete Support: add_note",
        "description": "Notă internă pe ticket (invizibilă pentru client).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "body"
                ],
                "properties": {
                  "body": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/support_tickets/{id}/reply": {
      "post": {
        "tags": [
          "Support"
        ],
        "summary": "Tickete Support: reply",
        "description": "Răspuns vizibil pe thread-ul principal.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "body"
                ],
                "properties": {
                  "body": {
                    "type": "string"
                  },
                  "thread_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/support_tickets/{id}/merge": {
      "post": {
        "tags": [
          "Support"
        ],
        "summary": "Tickete Support: merge",
        "description": "Unește acest ticket (sursă) într-un altul (target_id). Thread-urile și mesajele trec pe țintă.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "target_id"
                ],
                "properties": {
                  "target_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/support_tickets/{id}": {
      "get": {
        "tags": [
          "Support"
        ],
        "summary": "Tickete Support: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/support_tickets"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/support_threads": {
      "get": {
        "tags": [
          "Support"
        ],
        "summary": "Thread-uri Support: listare",
        "description": "Canalele unui ticket (widget, manual, api).",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/support_threads"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "66efd076-0000-4000-8000-66efd0760000",
                      "ticket_id": "a9c4b307-0000-4000-8000-a9c4b3070000",
                      "channel": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "email_message_id": "nume@exemplu.ro",
                      "email_in_reply_to": "nume@exemplu.ro"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/support_threads/{id}": {
      "get": {
        "tags": [
          "Support"
        ],
        "summary": "Thread-uri Support: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/support_threads"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/support_messages": {
      "get": {
        "tags": [
          "Support"
        ],
        "summary": "Mesaje Support: listare",
        "description": "Mesajele de pe tickete, inclusiv notele interne.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/support_messages"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "cefa1d65-0000-4000-8000-cefa1d650000",
                      "thread_id": "50e44749-0000-4000-8000-50e447490000",
                      "ticket_id": "a9c4b307-0000-4000-8000-a9c4b3070000",
                      "author_kind": "exemplu",
                      "author_user_id": "exemplu",
                      "author_name": "Exemplu",
                      "body": "Text liber",
                      "internal": true,
                      "media_ids": [],
                      "attachments": {},
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/support_messages/{id}": {
      "get": {
        "tags": [
          "Support"
        ],
        "summary": "Mesaje Support: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/support_messages"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/support_labels": {
      "get": {
        "tags": [
          "Support"
        ],
        "summary": "Etichete Support: listare",
        "description": "Etichetele din inbox.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/support_labels"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "a79e5412-0000-4000-8000-a79e54120000",
                      "name": "Exemplu",
                      "color": "#791cf0",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Support"
        ],
        "summary": "Etichete Support: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/support_labels_input"
              },
              "example": {
                "name": "Exemplu",
                "color": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/support_labels"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/support_labels/{id}": {
      "get": {
        "tags": [
          "Support"
        ],
        "summary": "Etichete Support: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/support_labels"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Support"
        ],
        "summary": "Etichete Support: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/support_labels_input"
              },
              "example": {
                "color": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Support"
        ],
        "summary": "Etichete Support: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/support_teams": {
      "get": {
        "tags": [
          "Support"
        ],
        "summary": "Echipe Support: listare",
        "description": "Cozile / echipele cu round-robin.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/support_teams"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "bbf1e509-0000-4000-8000-bbf1e5090000",
                      "name": "Exemplu",
                      "member_ids": [],
                      "round_robin_cursor": 1,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "department_id": "665e1881-0000-4000-8000-665e18810000"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Support"
        ],
        "summary": "Echipe Support: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/support_teams_input"
              },
              "example": {
                "name": "Exemplu",
                "member_ids": [
                  "optiune"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/support_teams"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/support_teams/{id}": {
      "get": {
        "tags": [
          "Support"
        ],
        "summary": "Echipe Support: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/support_teams"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Support"
        ],
        "summary": "Echipe Support: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/support_teams_input"
              },
              "example": {
                "member_ids": [
                  "optiune"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Support"
        ],
        "summary": "Echipe Support: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/support_canned_replies": {
      "get": {
        "tags": [
          "Support"
        ],
        "summary": "Răspunsuri rapide Support: listare",
        "description": "Textele salvate pentru răspunsuri.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/support_canned_replies"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "1f12972b-0000-4000-8000-1f12972b0000",
                      "title": "Exemplu",
                      "body": "Text liber",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Support"
        ],
        "summary": "Răspunsuri rapide Support: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/support_canned_replies_input"
              },
              "example": {
                "title": "Exemplu",
                "body": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/support_canned_replies"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/support_canned_replies/{id}": {
      "get": {
        "tags": [
          "Support"
        ],
        "summary": "Răspunsuri rapide Support: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/support_canned_replies"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Support"
        ],
        "summary": "Răspunsuri rapide Support: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/support_canned_replies_input"
              },
              "example": {
                "title": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Support"
        ],
        "summary": "Răspunsuri rapide Support: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/support_articles": {
      "get": {
        "tags": [
          "Support"
        ],
        "summary": "Articole wiki Support: listare",
        "description": "Articolele din baza de cunoștințe / portal.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/support_articles"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "33c9dad4-0000-4000-8000-33c9dad40000",
                      "category_id": "91843195-0000-4000-8000-918431950000",
                      "title": "Exemplu",
                      "slug": "exemplu",
                      "body": "Text liber",
                      "status": "active",
                      "locales": {},
                      "media_ids": [],
                      "published_at": "2026-01-31T09:30:00+00:00",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Support"
        ],
        "summary": "Articole wiki Support: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/support_articles_input"
              },
              "example": {
                "title": "Exemplu",
                "category_id": "Exemplu",
                "slug": "Exemplu",
                "body": "Exemplu",
                "status": "Exemplu",
                "media_ids": [
                  "optiune"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/support_articles"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/support_articles/{id}": {
      "get": {
        "tags": [
          "Support"
        ],
        "summary": "Articole wiki Support: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/support_articles"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Support"
        ],
        "summary": "Articole wiki Support: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/support_articles_input"
              },
              "example": {
                "category_id": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Support"
        ],
        "summary": "Articole wiki Support: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/support_article_categories": {
      "get": {
        "tags": [
          "Support"
        ],
        "summary": "Categorii wiki Support: listare",
        "description": "Categoriile articolelor.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/support_article_categories"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "efcf3fcc-0000-4000-8000-efcf3fcc0000",
                      "name": "Exemplu",
                      "slug": "exemplu",
                      "position": 1,
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Support"
        ],
        "summary": "Categorii wiki Support: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/support_article_categories_input"
              },
              "example": {
                "name": "Exemplu",
                "slug": "Exemplu",
                "position": 42
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/support_article_categories"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/support_article_categories/{id}": {
      "get": {
        "tags": [
          "Support"
        ],
        "summary": "Categorii wiki Support: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/support_article_categories"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Support"
        ],
        "summary": "Categorii wiki Support: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/support_article_categories_input"
              },
              "example": {
                "slug": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Support"
        ],
        "summary": "Categorii wiki Support: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_discounts": {
      "get": {
        "tags": [
          "Cazare"
        ],
        "summary": "Reduceri automate: listare",
        "description": "Reducerile pentru sejur lung, rezervare din timp și ultimul moment.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/accommodation_discounts"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "a115dd8a-0000-4000-8000-a115dd8a0000",
                      "name": "Exemplu",
                      "kind": "standard",
                      "threshold": 1,
                      "percent": 100.5,
                      "is_active": true,
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Cazare"
        ],
        "summary": "Reduceri automate: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/accommodation_discounts_input"
              },
              "example": {
                "name": "Exemplu",
                "kind": "Exemplu",
                "threshold": 42,
                "percent": 42,
                "is_active": true
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/accommodation_discounts"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_discounts/{id}": {
      "get": {
        "tags": [
          "Cazare"
        ],
        "summary": "Reduceri automate: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/accommodation_discounts"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Cazare"
        ],
        "summary": "Reduceri automate: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/accommodation_discounts_input"
              },
              "example": {
                "is_active": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Cazare"
        ],
        "summary": "Reduceri automate: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_ical_feeds": {
      "get": {
        "tags": [
          "Cazare"
        ],
        "summary": "Calendare iCal: listare",
        "description": "Calendarele aduse de pe alte platforme. Adresa lor nu se expune la citire.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/accommodation_ical_feeds"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "c9adb5f9-0000-4000-8000-c9adb5f90000",
                      "unit_id": "c61433cf-0000-4000-8000-c61433cf0000",
                      "name": "Exemplu",
                      "is_active": true,
                      "last_synced_at": "2026-01-31T09:30:00+00:00",
                      "last_error": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "url": "https://exemplu.ro"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Cazare"
        ],
        "summary": "Calendare iCal: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/accommodation_ical_feeds_input"
              },
              "example": {
                "unit_id": "Exemplu",
                "name": "Exemplu",
                "url": "https://exemplu.ro"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/accommodation_ical_feeds"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_ical_feeds/{id}/sync": {
      "post": {
        "tags": [
          "Cazare"
        ],
        "summary": "Calendare iCal: sync",
        "description": "Aduce acum rezervările din calendar.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accommodation_ical_feeds/{id}": {
      "get": {
        "tags": [
          "Cazare"
        ],
        "summary": "Calendare iCal: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/accommodation_ical_feeds"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Cazare"
        ],
        "summary": "Calendare iCal: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/booking_blocks": {
      "get": {
        "tags": [
          "Programări"
        ],
        "summary": "Blocări: listare",
        "description": "Intervalele blocate pentru programări.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/booking_blocks"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "527f0935-0000-4000-8000-527f09350000",
                      "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000",
                      "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                      "starts_at": "2026-01-31T09:30:00+00:00",
                      "ends_at": "2026-01-31T09:30:00+00:00",
                      "reason": "exemplu",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "resource_id": "7f711085-0000-4000-8000-7f7110850000",
                      "kind": "standard",
                      "title": "Exemplu",
                      "group_id": "2c0d7fe2-0000-4000-8000-2c0d7fe20000",
                      "date": "exemplu",
                      "date_to": "exemplu",
                      "all_day": "exemplu",
                      "from": "exemplu",
                      "to": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Programări"
        ],
        "summary": "Blocări: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/booking_blocks_input"
              },
              "example": {
                "date": "2026-01-31",
                "employee_id": "Exemplu",
                "location_id": "Exemplu",
                "reason": "Exemplu",
                "resource_id": "Exemplu",
                "date_to": "2026-01-31"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/booking_blocks"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/booking_blocks/{id}": {
      "get": {
        "tags": [
          "Programări"
        ],
        "summary": "Blocări: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/booking_blocks"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Programări"
        ],
        "summary": "Blocări: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/location_closures": {
      "get": {
        "tags": [
          "Programări"
        ],
        "summary": "Închideri: listare",
        "description": "Zilele în care locațiile sunt închise.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/location_closures"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "b65dbe6d-0000-4000-8000-b65dbe6d0000",
                      "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                      "date_from": "2026-01-31",
                      "date_to": "2026-01-31",
                      "reason": "exemplu",
                      "from": "exemplu",
                      "to": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Programări"
        ],
        "summary": "Închideri: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/location_closures_input"
              },
              "example": {
                "from": "2026-01-31",
                "location_id": "Exemplu",
                "reason": "Exemplu",
                "to": "2026-01-31"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/location_closures"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/location_closures/{id}": {
      "get": {
        "tags": [
          "Programări"
        ],
        "summary": "Închideri: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/location_closures"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Programări"
        ],
        "summary": "Închideri: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/service_combos": {
      "get": {
        "tags": [
          "Programări online"
        ],
        "summary": "Combinații de servicii: listare",
        "description": "Durata specială când mai multe servicii se fac împreună.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/service_combos"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "82618912-0000-4000-8000-826189120000",
                      "service_ids": [],
                      "duration_minutes": 30,
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Programări online"
        ],
        "summary": "Combinații de servicii: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/service_combos_input"
              },
              "example": {
                "service_ids": [
                  "optiune"
                ],
                "duration_minutes": 42
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/service_combos"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/service_combos/{id}": {
      "get": {
        "tags": [
          "Programări online"
        ],
        "summary": "Combinații de servicii: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/service_combos"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Programări online"
        ],
        "summary": "Combinații de servicii: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/product_listings": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Listinguri magazin: listare",
        "description": "Produsele publicate pe un canal: texte, SEO, stare și modul de preț. Propunerile AI modifică doar textele, nu prețul sau stocul.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/product_listings"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "6b4cee82-0000-4000-8000-6b4cee820000",
                      "channel_id": "9f2b151e-0000-4000-8000-9f2b151e0000",
                      "product_id": "7abdadb2-0000-4000-8000-7abdadb20000",
                      "slug": "exemplu",
                      "title": "Exemplu",
                      "description": "Text liber",
                      "seo_title": "exemplu",
                      "seo_description": "Text liber",
                      "seo_image_url": "https://exemplu.ro",
                      "status": "active",
                      "published_at": "2026-01-31T09:30:00+00:00",
                      "price_mode": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "short_description": "Text liber",
                      "content_tabs": {},
                      "publish_at": "2026-01-31T09:30:00+00:00",
                      "custom": {}
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Listinguri magazin: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/product_listings_input"
              },
              "example": {
                "channel_id": "Exemplu",
                "product_id": "7abdadb2-0000-4000-8000-7abdadb20000",
                "slug": "Exemplu",
                "title": "Exemplu",
                "description": "Exemplu",
                "seo_title": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/product_listings"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/product_listings/{id}": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Listinguri magazin: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/product_listings"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Listinguri magazin: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/product_listings_input"
              },
              "example": {
                "slug": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Listinguri magazin: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_collections": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Colecții magazin: listare",
        "description": "Colecțiile din catalogul magazinului, cu canalele și produsele lor.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/shop_collections"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "a8b59155-0000-4000-8000-a8b591550000",
                      "parent_id": "2968c8a9-0000-4000-8000-2968c8a90000",
                      "name": "Exemplu",
                      "slug": "exemplu",
                      "description": "Text liber",
                      "position": 1,
                      "is_active": true,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "custom_fields": {
                        "exemplu_camp": "valoare"
                      },
                      "channel_ids": "exemplu",
                      "product_ids": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Colecții magazin: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shop_collections_input"
              },
              "example": {
                "name": "Exemplu",
                "parent_id": "Exemplu",
                "slug": "Exemplu",
                "description": "Text mai lung, pe mai multe rânduri.",
                "position": 42,
                "is_active": true
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_collections"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_collections/{id}/add_product": {
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Colecții magazin: add_product",
        "description": "Adaugă un produs în colecție.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "product_id"
                ],
                "properties": {
                  "product_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_collections/{id}/remove_product": {
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Colecții magazin: remove_product",
        "description": "Scoate un produs din colecție.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "product_id"
                ],
                "properties": {
                  "product_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_collections/{id}": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Colecții magazin: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_collections"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Colecții magazin: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shop_collections_input"
              },
              "example": {
                "parent_id": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Colecții magazin: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/cashbook_books": {
      "get": {
        "tags": [
          "Casierie"
        ],
        "summary": "Registre de casă și bancă: listare",
        "description": "Registrele de casă și de bancă.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/cashbook_books"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "f497863a-0000-4000-8000-f497863a0000",
                      "book": "exemplu",
                      "legal_entity_id": "5cadfa0a-0000-4000-8000-5cadfa0a0000",
                      "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                      "name": "Exemplu",
                      "iban": "exemplu",
                      "bank_name": "Exemplu",
                      "currency": "RON",
                      "opening_balance": 100.5,
                      "opening_date": "2026-01-31",
                      "is_active": true,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Casierie"
        ],
        "summary": "Registre de casă și bancă: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/cashbook_books_input"
              },
              "example": {
                "book": "Exemplu",
                "name": "Exemplu",
                "legal_entity_id": "Exemplu",
                "location_id": "Exemplu",
                "iban": "Exemplu",
                "bank_name": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/cashbook_books"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/cashbook_books/{id}/transfer": {
      "post": {
        "tags": [
          "Casierie"
        ],
        "summary": "Registre de casă și bancă: transfer",
        "description": "Transferă o sumă în alt registru.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "to_book_id",
                  "amount"
                ],
                "properties": {
                  "to_book_id": {
                    "type": "string"
                  },
                  "amount": {
                    "type": "number"
                  },
                  "entry_date": {
                    "type": "string"
                  },
                  "explanation": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/cashbook_books/{id}": {
      "get": {
        "tags": [
          "Casierie"
        ],
        "summary": "Registre de casă și bancă: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/cashbook_books"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Casierie"
        ],
        "summary": "Registre de casă și bancă: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/cashbook_books_input"
              },
              "example": {
                "legal_entity_id": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/cashbook_entries": {
      "get": {
        "tags": [
          "Casierie"
        ],
        "summary": "Înregistrări registru: listare",
        "description": "Încasările și plățile din registre.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/cashbook_entries"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "e120bb94-0000-4000-8000-e120bb940000",
                      "book_id": "db031c4a-0000-4000-8000-db031c4a0000",
                      "entry_date": "2026-01-31",
                      "doc_number": "2026-0001",
                      "direction": "exemplu",
                      "amount": 100.5,
                      "explanation": "exemplu",
                      "counterparty": "exemplu",
                      "kind": "standard",
                      "reverses_id": "90974fe2-0000-4000-8000-90974fe20000",
                      "transfer_pair_id": "0bf53e53-0000-4000-8000-0bf53e530000",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "category": "exemplu",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "annex_number": "2026-0001",
                      "notes": "Text liber",
                      "created_by_name": "Exemplu",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Casierie"
        ],
        "summary": "Înregistrări registru: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/cashbook_entries_input"
              },
              "example": {
                "book_id": "Exemplu",
                "direction": "Exemplu",
                "amount": 99.9,
                "explanation": "Exemplu",
                "entry_date": "2026-01-31",
                "doc_number": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/cashbook_entries"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/cashbook_entries/{id}/reverse": {
      "post": {
        "tags": [
          "Casierie"
        ],
        "summary": "Înregistrări registru: reverse",
        "description": "Stornează înregistrarea cu una de sens opus.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/cashbook_entries/{id}": {
      "get": {
        "tags": [
          "Casierie"
        ],
        "summary": "Înregistrări registru: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/cashbook_entries"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Casierie"
        ],
        "summary": "Înregistrări registru: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/cashbook_entries_input"
              },
              "example": {
                "entry_date": "2026-01-31"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Casierie"
        ],
        "summary": "Înregistrări registru: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/departments": {
      "get": {
        "tags": [
          "HR"
        ],
        "summary": "Departamente: listare",
        "description": "Departamentele companiei.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/departments"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "656d2ece-0000-4000-8000-656d2ece0000",
                      "parent_id": "2968c8a9-0000-4000-8000-2968c8a90000",
                      "name": "Exemplu",
                      "code": "EX-001",
                      "description": "Text liber",
                      "manager_id": "a6f98a34-0000-4000-8000-a6f98a340000",
                      "cost_center_id": "a535bf1a-0000-4000-8000-a535bf1a0000",
                      "sort_order": 1,
                      "is_active": true,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "HR"
        ],
        "summary": "Departamente: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/departments_input"
              },
              "example": {
                "name": "Exemplu",
                "parent_id": "Exemplu",
                "code": "Exemplu",
                "description": "Exemplu",
                "manager_id": "a6f98a34-0000-4000-8000-a6f98a340000",
                "cost_center_id": "a535bf1a-0000-4000-8000-a535bf1a0000"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/departments"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/departments/{id}": {
      "get": {
        "tags": [
          "HR"
        ],
        "summary": "Departamente: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/departments"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "HR"
        ],
        "summary": "Departamente: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/departments_input"
              },
              "example": {
                "parent_id": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "HR"
        ],
        "summary": "Departamente: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/employee_resources": {
      "get": {
        "tags": [
          "HR"
        ],
        "summary": "Resursele angajaților: listare",
        "description": "Resursele asociate angajaților.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/employee_resources"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "c16d720d-0000-4000-8000-c16d720d0000",
                      "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000",
                      "resource_id": "7f711085-0000-4000-8000-7f7110850000",
                      "mode": "exemplu",
                      "weekdays": [],
                      "start_time": "09:00:00",
                      "end_time": "09:00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/employee_resources/{id}": {
      "get": {
        "tags": [
          "HR"
        ],
        "summary": "Resursele angajaților: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/employee_resources"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/leave_adjustments": {
      "get": {
        "tags": [
          "Concedii"
        ],
        "summary": "Ajustări concediu: listare",
        "description": "Ajustările zilelor de concediu.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/leave_adjustments"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "f9881cb1-0000-4000-8000-f9881cb10000",
                      "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000",
                      "type_id": "a44f1a59-0000-4000-8000-a44f1a590000",
                      "year": 2,
                      "days": 100.5,
                      "reason": "exemplu",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Concedii"
        ],
        "summary": "Ajustări concediu: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/leave_adjustments_input"
              },
              "example": {
                "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000",
                "type_id": "Exemplu",
                "year": 42,
                "days": 42,
                "reason": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/leave_adjustments"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/leave_adjustments/{id}": {
      "get": {
        "tags": [
          "Concedii"
        ],
        "summary": "Ajustări concediu: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/leave_adjustments"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Concedii"
        ],
        "summary": "Ajustări concediu: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contract_lines": {
      "get": {
        "tags": [
          "Contracte"
        ],
        "summary": "Linii contracte: listare",
        "description": "Serviciile din contracte.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/contract_lines"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "0760f60f-0000-4000-8000-0760f60f0000",
                      "contract_id": "b74a7501-0000-4000-8000-b74a75010000",
                      "service_id": "ab73162c-0000-4000-8000-ab73162c0000",
                      "bundle_id": "55d171d1-0000-4000-8000-55d171d10000",
                      "description": "Text liber",
                      "kind": "standard",
                      "qty": 2,
                      "unit": "exemplu",
                      "unit_price": 100.5,
                      "vat_rate": 19,
                      "frequency": "exemplu",
                      "estimated_hours": 100.5,
                      "is_active": true,
                      "sort_order": 1,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "cost_amount": 100.5,
                      "markup_type": "standard",
                      "markup_value": 100.5,
                      "assignee_ids": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Contracte"
        ],
        "summary": "Linii contracte: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/contract_lines_input"
              },
              "example": {
                "contract_id": "b74a7501-0000-4000-8000-b74a75010000",
                "description": "Exemplu",
                "service_id": "ab73162c-0000-4000-8000-ab73162c0000",
                "kind": "Exemplu",
                "qty": 42,
                "unit": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/contract_lines"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contract_lines/{id}": {
      "get": {
        "tags": [
          "Contracte"
        ],
        "summary": "Linii contracte: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/contract_lines"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Contracte"
        ],
        "summary": "Linii contracte: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/contract_lines_input"
              },
              "example": {
                "service_id": "ab73162c-0000-4000-8000-ab73162c0000"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Contracte"
        ],
        "summary": "Linii contracte: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contract_deliverables": {
      "get": {
        "tags": [
          "Contracte"
        ],
        "summary": "Livrabile contracte: listare",
        "description": "Livrabilele contractelor.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/contract_deliverables"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "7b13870e-0000-4000-8000-7b13870e0000",
                      "line_id": "e1b3875f-0000-4000-8000-e1b3875f0000",
                      "title": "Exemplu",
                      "per_period": 1,
                      "frequency": "exemplu",
                      "carry_over": true,
                      "start_date": "2026-01-31",
                      "is_active": true,
                      "sort_order": 1,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "contract_id": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Contracte"
        ],
        "summary": "Livrabile contracte: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/contract_deliverables_input"
              },
              "example": {
                "line_id": "Exemplu",
                "title": "Exemplu",
                "contract_id": "b74a7501-0000-4000-8000-b74a75010000",
                "per_period": 42,
                "frequency": "Exemplu",
                "carry_over": true
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/contract_deliverables"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contract_deliverables/{id}": {
      "get": {
        "tags": [
          "Contracte"
        ],
        "summary": "Livrabile contracte: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/contract_deliverables"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Contracte"
        ],
        "summary": "Livrabile contracte: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/contract_deliverables_input"
              },
              "example": {
                "per_period": 42
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Contracte"
        ],
        "summary": "Livrabile contracte: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contract_deliveries": {
      "get": {
        "tags": [
          "Contracte"
        ],
        "summary": "Livrări contracte: listare",
        "description": "Livrările pe contracte.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/contract_deliveries"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "eb52c190-0000-4000-8000-eb52c1900000",
                      "deliverable_id": "2dcbe122-0000-4000-8000-2dcbe1220000",
                      "delivered_on": "2026-01-31",
                      "qty": 2,
                      "note": "Text liber",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contract_deliveries/{id}": {
      "get": {
        "tags": [
          "Contracte"
        ],
        "summary": "Livrări contracte: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/contract_deliveries"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contract_line_costs": {
      "get": {
        "tags": [
          "Contracte"
        ],
        "summary": "Costuri linii contract: listare",
        "description": "Costurile pe liniile de contract.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/contract_line_costs"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "281dfe47-0000-4000-8000-281dfe470000",
                      "line_id": "e1b3875f-0000-4000-8000-e1b3875f0000",
                      "period_start": "2026-01-31",
                      "description": "Text liber",
                      "supplier": "exemplu",
                      "amount": 100.5,
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contract_line_costs/{id}": {
      "get": {
        "tags": [
          "Contracte"
        ],
        "summary": "Costuri linii contract: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/contract_line_costs"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contract_billing_runs": {
      "get": {
        "tags": [
          "Contracte"
        ],
        "summary": "Facturări contracte: listare",
        "description": "Rulările de facturare ale contractelor.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/contract_billing_runs"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "9c6bb5d6-0000-4000-8000-9c6bb5d60000",
                      "contract_id": "b74a7501-0000-4000-8000-b74a75010000",
                      "frequency": "exemplu",
                      "period_start": "2026-01-31",
                      "period_end": "2026-01-31",
                      "due_date": "2026-01-31",
                      "skipped": true,
                      "invoice_id": "8435a6b4-0000-4000-8000-8435a6b40000",
                      "notified_upcoming_at": "2026-01-31T09:30:00+00:00",
                      "notified_late_at": "2026-01-31T09:30:00+00:00",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "due_until": "2026-01-31"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Contracte"
        ],
        "summary": "Facturări contracte: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/contract_billing_runs_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/contract_billing_runs"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contract_billing_runs/{id}/invoice": {
      "post": {
        "tags": [
          "Contracte"
        ],
        "summary": "Facturări contracte: invoice",
        "description": "Ciornă de factură din scadență.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contract_billing_runs/{id}/skip": {
      "post": {
        "tags": [
          "Contracte"
        ],
        "summary": "Facturări contracte: skip",
        "description": "Sare peste scadență.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contract_billing_runs/{id}/unskip": {
      "post": {
        "tags": [
          "Contracte"
        ],
        "summary": "Facturări contracte: unskip",
        "description": "Readuce scadența.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contract_billing_runs/{id}": {
      "get": {
        "tags": [
          "Contracte"
        ],
        "summary": "Facturări contracte: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/contract_billing_runs"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/activity_reports": {
      "get": {
        "tags": [
          "Contracte"
        ],
        "summary": "Rapoarte de activitate: listare",
        "description": "Rapoartele de activitate.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/activity_reports"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "d2ada7b2-0000-4000-8000-d2ada7b20000",
                      "number": "2026-0001",
                      "contract_id": "b74a7501-0000-4000-8000-b74a75010000",
                      "title": "Exemplu",
                      "period_start": "2026-01-31",
                      "period_end": "2026-01-31",
                      "summary": "exemplu",
                      "include_signature": true,
                      "invoice_id": "8435a6b4-0000-4000-8000-8435a6b40000",
                      "share_invoice": true,
                      "deliverables": {},
                      "status": "active",
                      "sent_at": "2026-01-31T09:30:00+00:00",
                      "sent_to": "exemplu",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/activity_reports/{id}": {
      "get": {
        "tags": [
          "Contracte"
        ],
        "summary": "Rapoarte de activitate: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/activity_reports"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/activity_report_items": {
      "get": {
        "tags": [
          "Contracte"
        ],
        "summary": "Linii rapoarte: listare",
        "description": "Liniile rapoartelor de activitate.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/activity_report_items"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "0bbd92ca-0000-4000-8000-0bbd92ca0000",
                      "report_id": "98f2b7df-0000-4000-8000-98f2b7df0000",
                      "kind": "standard",
                      "task_id": "7b87cc2e-0000-4000-8000-7b87cc2e0000",
                      "delivery_id": "fd5ce6df-0000-4000-8000-fd5ce6df0000",
                      "description": "Text liber",
                      "detail": "exemplu",
                      "line_label": "exemplu",
                      "done_on": "2026-01-31",
                      "hours": 100.5,
                      "included": true,
                      "sort_order": 1
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/activity_report_items/{id}": {
      "get": {
        "tags": [
          "Contracte"
        ],
        "summary": "Linii rapoarte: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/activity_report_items"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/party_roles": {
      "get": {
        "tags": [
          "Clienți"
        ],
        "summary": "Roluri clienți: listare",
        "description": "Rolurile fiecărui client.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/party_roles"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "f6af332b-0000-4000-8000-f6af332b0000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "role_key": "exemplu",
                      "is_primary": true
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/party_roles/{id}": {
      "get": {
        "tags": [
          "Clienți"
        ],
        "summary": "Roluri clienți: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/party_roles"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/recalls": {
      "get": {
        "tags": [
          "Programări"
        ],
        "summary": "Rechemări: listare",
        "description": "Rechemările programate ale clienților.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/recalls"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "4fb8268d-0000-4000-8000-4fb8268d0000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "recall_type": "standard",
                      "due_date": "2026-01-31",
                      "status": "active",
                      "note": "Text liber",
                      "done_at": "2026-01-31T09:30:00+00:00",
                      "custom_fields": {},
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/recalls/{id}": {
      "get": {
        "tags": [
          "Programări"
        ],
        "summary": "Rechemări: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/recalls"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/appointment_labels": {
      "get": {
        "tags": [
          "Programări"
        ],
        "summary": "Etichete programări: listare",
        "description": "Etichetele de pe programări.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/appointment_labels"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "48279762-0000-4000-8000-482797620000",
                      "appointment_id": "82726582-0000-4000-8000-827265820000",
                      "label_code": "EX-001",
                      "set_at": "2026-01-31T09:30:00+00:00",
                      "set_by": "exemplu",
                      "reason": "exemplu",
                      "removed_at": "2026-01-31T09:30:00+00:00",
                      "removed_by": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/appointment_labels/{id}": {
      "get": {
        "tags": [
          "Programări"
        ],
        "summary": "Etichete programări: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/appointment_labels"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/appointment_status_log": {
      "get": {
        "tags": [
          "Programări"
        ],
        "summary": "Istoric programări: listare",
        "description": "Schimbările de stare ale programărilor.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/appointment_status_log"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "965f066a-0000-4000-8000-965f066a0000",
                      "appointment_id": "82726582-0000-4000-8000-827265820000",
                      "from_status": "active",
                      "to_status": "active",
                      "changed_at": "2026-01-31T09:30:00+00:00",
                      "changed_by": "exemplu",
                      "reason": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/appointment_status_log/{id}": {
      "get": {
        "tags": [
          "Programări"
        ],
        "summary": "Istoric programări: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/appointment_status_log"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/location_services": {
      "get": {
        "tags": [
          "Programări"
        ],
        "summary": "Servicii pe locații: listare",
        "description": "Serviciile oferite la fiecare locație.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/location_services"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                      "service_id": "ab73162c-0000-4000-8000-ab73162c0000"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/location_travel": {
      "get": {
        "tags": [
          "Programări"
        ],
        "summary": "Timp între locații: listare",
        "description": "Timpul de deplasare dintre locații.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/location_travel"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "from_location_id": "914512d7-0000-4000-8000-914512d70000",
                      "to_location_id": "34272de8-0000-4000-8000-34272de80000",
                      "minutes": 30
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/resource_schedules": {
      "get": {
        "tags": [
          "Programări"
        ],
        "summary": "Program resurse: listare",
        "description": "Programul resurselor.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/resource_schedules"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "404db2b6-0000-4000-8000-404db2b60000",
                      "resource_id": "7f711085-0000-4000-8000-7f7110850000",
                      "weekday": 1,
                      "start_time": "09:00:00",
                      "end_time": "09:00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/resource_schedules/{id}": {
      "get": {
        "tags": [
          "Programări"
        ],
        "summary": "Program resurse: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/resource_schedules"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/schedule_templates": {
      "get": {
        "tags": [
          "Program & ture"
        ],
        "summary": "Șabloane de program: listare",
        "description": "Șabloanele de program ale angajaților.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/schedule_templates"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "ec511b30-0000-4000-8000-ec511b300000",
                      "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000",
                      "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                      "weekday": 1,
                      "start_time": "09:00:00",
                      "end_time": "09:00:00",
                      "valid_from": "2026-01-31",
                      "valid_to": "2026-01-31",
                      "resource_id": "7f711085-0000-4000-8000-7f7110850000",
                      "repeat_weeks": 1,
                      "note": "Text liber"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/schedule_templates/{id}": {
      "get": {
        "tags": [
          "Program & ture"
        ],
        "summary": "Șabloane de program: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/schedule_templates"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/service_bundles": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Pachete comerciale: listare",
        "description": "Pachetele de servicii vândute împreună.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/service_bundles"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "1b098448-0000-4000-8000-1b0984480000",
                      "name": "Exemplu",
                      "description": "Text liber",
                      "is_active": true,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "items": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Catalog"
        ],
        "summary": "Pachete comerciale: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/service_bundles_input"
              },
              "example": {
                "name": "Exemplu",
                "items": [
                  "optiune"
                ],
                "description": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/service_bundles"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/service_bundles/{id}": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Pachete comerciale: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/service_bundles"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Catalog"
        ],
        "summary": "Pachete comerciale: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/service_bundles_input"
              },
              "example": {
                "description": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Catalog"
        ],
        "summary": "Pachete comerciale: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/service_bundle_items": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Conținut pachete: listare",
        "description": "Serviciile din pachetele comerciale.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/service_bundle_items"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "2e6223f4-0000-4000-8000-2e6223f40000",
                      "bundle_id": "55d171d1-0000-4000-8000-55d171d10000",
                      "service_id": "ab73162c-0000-4000-8000-ab73162c0000",
                      "qty": 2,
                      "unit": "exemplu",
                      "unit_price": 100.5,
                      "kind": "standard",
                      "sort_order": 1
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/service_bundle_items/{id}": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Conținut pachete: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/service_bundle_items"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/service_materials": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Materiale servicii: listare",
        "description": "Materialele consumate de servicii.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/service_materials"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "service_id": "ab73162c-0000-4000-8000-ab73162c0000",
                      "product_id": "7abdadb2-0000-4000-8000-7abdadb20000",
                      "qty": 2
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/service_resources": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Resurse servicii: listare",
        "description": "Resursele folosite de servicii.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/service_resources"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "service_id": "ab73162c-0000-4000-8000-ab73162c0000",
                      "resource_id": "7f711085-0000-4000-8000-7f7110850000"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/service_specialists": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Specialiști servicii: listare",
        "description": "Specialiștii fiecărui serviciu.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/service_specialists"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "service_id": "ab73162c-0000-4000-8000-ab73162c0000",
                      "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000",
                      "duration_minutes": 30,
                      "fee_mode": "exemplu",
                      "fee_value": 100.5
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/product_attributes": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Specificații produse: listare",
        "description": "Specificațiile produselor.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/product_attributes"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "product_id": "7abdadb2-0000-4000-8000-7abdadb20000",
                      "key": "exemplu",
                      "value": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/product_components": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Componente produse: listare",
        "description": "Componentele produselor compuse.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/product_components"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "kit_product_id": "d64ae73b-0000-4000-8000-d64ae73b0000",
                      "component_product_id": "3e41a974-0000-4000-8000-3e41a9740000",
                      "qty": 2
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/product_price_history": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Istoric prețuri: listare",
        "description": "Istoricul prețurilor de produse.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/product_price_history"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "e1391201-0000-4000-8000-e13912010000",
                      "product_id": "7abdadb2-0000-4000-8000-7abdadb20000",
                      "price_list_id": "941b16bf-0000-4000-8000-941b16bf0000",
                      "price": 100.5,
                      "currency": "RON",
                      "valid_from": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/product_price_history/{id}": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Istoric prețuri: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/product_price_history"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stock_levels": {
      "get": {
        "tags": [
          "Depozite & inventar"
        ],
        "summary": "Niveluri de stoc: listare",
        "description": "Stocul curent pe produs și depozit.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/stock_levels"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "product_id": "7abdadb2-0000-4000-8000-7abdadb20000",
                      "warehouse_id": "bcfdc99e-0000-4000-8000-bcfdc99e0000",
                      "on_hand": 100.5
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stock_reservations": {
      "get": {
        "tags": [
          "Depozite & inventar"
        ],
        "summary": "Rezervări de stoc: listare",
        "description": "Stocul rezervat.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/stock_reservations"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "d50af5b1-0000-4000-8000-d50af5b10000",
                      "product_id": "7abdadb2-0000-4000-8000-7abdadb20000",
                      "qty": 2,
                      "source": "exemplu",
                      "source_id": "exemplu",
                      "channel_id": "9f2b151e-0000-4000-8000-9f2b151e0000",
                      "expires_at": "2026-01-31T09:30:00+00:00",
                      "status": "active",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stock_reservations/{id}": {
      "get": {
        "tags": [
          "Depozite & inventar"
        ],
        "summary": "Rezervări de stoc: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/stock_reservations"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/fx_rates": {
      "get": {
        "tags": [
          "Financiar"
        ],
        "summary": "Cursuri valutare: listare",
        "description": "Cursurile BNR folosite.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/fx_rates"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "rate_date": "2026-01-31",
                      "currency": "RON",
                      "rate": 19
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tax_declarations": {
      "get": {
        "tags": [
          "Casierie"
        ],
        "summary": "Declarații fiscale: listare",
        "description": "Declarațiile fiscale generate.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/tax_declarations"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "21ea6134-0000-4000-8000-21ea61340000",
                      "kind": "standard",
                      "period": "exemplu",
                      "status": "active",
                      "xml": "exemplu",
                      "summary": {},
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Casierie"
        ],
        "summary": "Declarații fiscale: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/tax_declarations_input"
              },
              "example": {
                "kind": "Exemplu",
                "period": "Exemplu",
                "status": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/tax_declarations"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tax_declarations/{id}": {
      "get": {
        "tags": [
          "Casierie"
        ],
        "summary": "Declarații fiscale: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/tax_declarations"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Casierie"
        ],
        "summary": "Declarații fiscale: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/tax_declarations_input"
              },
              "example": {
                "status": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Casierie"
        ],
        "summary": "Declarații fiscale: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/job_evaluations": {
      "get": {
        "tags": [
          "Cariere"
        ],
        "summary": "Evaluări candidați: listare",
        "description": "Evaluările candidaților.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/job_evaluations"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "d34df2fa-0000-4000-8000-d34df2fa0000",
                      "application_id": "28479231-0000-4000-8000-284792310000",
                      "interview_id": "3556d220-0000-4000-8000-3556d2200000",
                      "evaluator": "exemplu",
                      "scores": {},
                      "total": 100.5,
                      "recommendation": "exemplu",
                      "note": "Text liber",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/job_evaluations/{id}": {
      "get": {
        "tags": [
          "Cariere"
        ],
        "summary": "Evaluări candidați: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/job_evaluations"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/job_interviews": {
      "get": {
        "tags": [
          "Cariere"
        ],
        "summary": "Interviuri: listare",
        "description": "Interviurile candidaților.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/job_interviews"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "1459f38d-0000-4000-8000-1459f38d0000",
                      "application_id": "28479231-0000-4000-8000-284792310000",
                      "status": "active",
                      "kind": "standard",
                      "starts_at": "2026-01-31T09:30:00+00:00",
                      "duration_min": 30,
                      "place": "exemplu",
                      "link": "exemplu",
                      "interviewers": [],
                      "offered": {},
                      "note": "Text liber",
                      "reminder_sent_at": "2026-01-31T09:30:00+00:00",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "tasks_claim_at": "2026-01-31T09:30:00+00:00",
                      "tasks_created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Cariere"
        ],
        "summary": "Interviuri: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/job_interviews_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/job_interviews"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/job_interviews/{id}/set_status": {
      "post": {
        "tags": [
          "Cariere"
        ],
        "summary": "Interviuri: set_status",
        "description": "Încheie, anulează sau marchează neprezentarea.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status"
                ],
                "properties": {
                  "status": {
                    "type": "string",
                    "description": "done, cancelled sau no_show"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/job_interviews/{id}": {
      "get": {
        "tags": [
          "Cariere"
        ],
        "summary": "Interviuri: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/job_interviews"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/library_links": {
      "get": {
        "tags": [
          "Documente"
        ],
        "summary": "Legături documente: listare",
        "description": "Legăturile documentelor cu alte înregistrări.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/library_links"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "document_id": "540ecc58-0000-4000-8000-540ecc580000",
                      "entity_type": "standard",
                      "entity_id": "81ddf6d0-0000-4000-8000-81ddf6d00000"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/esign_documents": {
      "get": {
        "tags": [
          "Documente"
        ],
        "summary": "Documente de semnat: listare",
        "description": "Documentele trimise la semnare.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/esign_documents"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "4dcb3214-0000-4000-8000-4dcb32140000",
                      "number": "2026-0001",
                      "title": "Exemplu",
                      "design": {},
                      "status": "active",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "template_id": "9f562099-0000-4000-8000-9f5620990000",
                      "source_type": "standard",
                      "source_id": "48c66798-0000-4000-8000-48c667980000",
                      "ordered": true,
                      "expires_at": "2026-01-31",
                      "message": "Text liber",
                      "revision": 1,
                      "revision_of": "547c6e54-0000-4000-8000-547c6e540000",
                      "created_by": "exemplu",
                      "created_name": "Exemplu",
                      "sent_at": "2026-01-31T09:30:00+00:00",
                      "completed_at": "2026-01-31T09:30:00+00:00",
                      "voided_at": "2026-01-31T09:30:00+00:00",
                      "void_reason": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "docx": "exemplu",
                      "send_mode": "exemplu",
                      "verify_mode": "exemplu",
                      "remind_days": 2,
                      "last_reminded_at": "2026-01-31T09:30:00+00:00",
                      "expiry_notified_at": "2026-01-31T09:30:00+00:00",
                      "lang": "exemplu",
                      "fields": {},
                      "pdf_status": "active",
                      "pdf_attempts": 1,
                      "signed_pdf_sha256": "exemplu",
                      "certificate_sha256": "exemplu",
                      "completion_claimed_at": "2026-01-31T09:30:00+00:00",
                      "done_mailed_at": "2026-01-31T09:30:00+00:00",
                      "sealed": true,
                      "timestamped": true,
                      "source_pdf": "exemplu",
                      "page_count": 2,
                      "placements": {},
                      "pdf_base64": "exemplu",
                      "contract_id": "exemplu",
                      "signers": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Documente"
        ],
        "summary": "Documente de semnat: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/esign_documents_input"
              },
              "example": {
                "title": "Exemplu",
                "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                "template_id": "Exemplu",
                "ordered": true,
                "expires_at": "2026-01-31T09:30:00+02:00",
                "message": "Text mai lung, pe mai multe rânduri."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/esign_documents"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/esign_documents/{id}/send": {
      "post": {
        "tags": [
          "Documente"
        ],
        "summary": "Documente de semnat: send",
        "description": "Trimite documentul la semnat, pe email sau doar cu linkuri. Semnatarii interni primesc task (Documente + Taskuri).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "mode": {
                    "type": "string",
                    "description": "email sau links, implicit links"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/esign_documents/{id}/remind": {
      "post": {
        "tags": [
          "Documente"
        ],
        "summary": "Documente de semnat: remind",
        "description": "Reamintește semnatarilor, pe email.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/esign_documents/{id}/void": {
      "post": {
        "tags": [
          "Documente"
        ],
        "summary": "Documente de semnat: void",
        "description": "Anulează documentul trimis.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/esign_documents/{id}/set_placements": {
      "post": {
        "tags": [
          "Documente"
        ],
        "summary": "Documente de semnat: set_placements",
        "description": "Locurile de semnătură și câmpurile de pe paginile unui PDF încărcat, doar cât documentul e ciornă. `placements`: listă de { role (r1-r6), kind (signature sau field), page (de la 1), x, y, w, h (fracții din pagină, colțul de sus stânga), și pentru câmp key, type (text, data, numar, bifa, lista), label, options }.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "placements"
                ],
                "properties": {
                  "placements": {
                    "type": "array",
                    "items": {}
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/esign_documents/{id}/regenerate_link": {
      "post": {
        "tags": [
          "Documente"
        ],
        "summary": "Documente de semnat: regenerate_link",
        "description": "Înlocuiește linkul unui semnatar aflat la rând; cel vechi nu mai merge. Răspunde cu linkul nou.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "signer_id"
                ],
                "properties": {
                  "signer_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/esign_documents/{id}/correct_signer": {
      "post": {
        "tags": [
          "Documente"
        ],
        "summary": "Documente de semnat: correct_signer",
        "description": "Corectează numele, emailul sau telefonul unui semnatar care n-a semnat încă; linkul se schimbă și invitația nouă pleacă.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "signer_id"
                ],
                "properties": {
                  "signer_id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/esign_documents/{id}/regenerate_code": {
      "post": {
        "tags": [
          "Documente"
        ],
        "summary": "Documente de semnat: regenerate_code",
        "description": "Cod de acces nou pentru un semnatar (documente cu verificare prin cod de acces). Se întoarce o singură dată.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "signer_id"
                ],
                "properties": {
                  "signer_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/esign_documents/{id}/regenerate_pdf": {
      "post": {
        "tags": [
          "Documente"
        ],
        "summary": "Documente de semnat: regenerate_pdf",
        "description": "Generează din nou PDF-ul semnat și certificatul unui document semnat de toți.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/esign_documents/{id}/revision": {
      "post": {
        "tags": [
          "Documente"
        ],
        "summary": "Documente de semnat: revision",
        "description": "Ciornă nouă din document.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/esign_documents/{id}/set_docx": {
      "post": {
        "tags": [
          "Documente"
        ],
        "summary": "Documente de semnat: set_docx",
        "description": "Înlocuiește fișierul Word al ciornei.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "content_base64"
                ],
                "properties": {
                  "content_base64": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/esign_documents/{id}": {
      "get": {
        "tags": [
          "Documente"
        ],
        "summary": "Documente de semnat: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/esign_documents"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Documente"
        ],
        "summary": "Documente de semnat: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/esign_documents_input"
              },
              "example": {
                "title": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Documente"
        ],
        "summary": "Documente de semnat: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/esign_signers": {
      "get": {
        "tags": [
          "Documente"
        ],
        "summary": "Semnatari: listare",
        "description": "Semnatarii documentelor.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/esign_signers"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "810fd1a3-0000-4000-8000-810fd1a30000",
                      "document_id": "540ecc58-0000-4000-8000-540ecc580000",
                      "role": "exemplu",
                      "label": "Exemplu",
                      "name": "Exemplu",
                      "email": "nume@exemplu.ro",
                      "sort_order": 1,
                      "status": "active",
                      "emailed_at": "2026-01-31T09:30:00+00:00",
                      "viewed_at": "2026-01-31T09:30:00+00:00",
                      "signed_at": "2026-01-31T09:30:00+00:00",
                      "signature": "exemplu",
                      "signed_name": "Exemplu",
                      "ip": "exemplu",
                      "user_agent": "exemplu",
                      "decline_reason": "exemplu",
                      "task_id": "7b87cc2e-0000-4000-8000-7b87cc2e0000",
                      "phone": "+40 700 000 000",
                      "kind": "standard",
                      "step": 1,
                      "consent_version": 1,
                      "consent_text": "exemplu",
                      "consented_at": "2026-01-31T09:30:00+00:00",
                      "lang": "exemplu",
                      "verified_at": "2026-01-31T09:30:00+00:00",
                      "verified_method": "exemplu",
                      "link_version": 1
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/esign_signers/{id}": {
      "get": {
        "tags": [
          "Documente"
        ],
        "summary": "Semnatari: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/esign_signers"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/task_activity": {
      "get": {
        "tags": [
          "Task-uri"
        ],
        "summary": "Istoric task-uri: listare",
        "description": "Istoricul task-urilor.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/task_activity"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "42853ae6-0000-4000-8000-42853ae60000",
                      "task_id": "7b87cc2e-0000-4000-8000-7b87cc2e0000",
                      "actor_id": "exemplu",
                      "actor_name": "Exemplu",
                      "kind": "standard",
                      "text": "Text liber",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/task_activity/{id}": {
      "get": {
        "tags": [
          "Task-uri"
        ],
        "summary": "Istoric task-uri: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/task_activity"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/task_links": {
      "get": {
        "tags": [
          "Task-uri"
        ],
        "summary": "Legături task-uri: listare",
        "description": "Legăturile task-urilor cu alte înregistrări.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/task_links"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "74ce0482-0000-4000-8000-74ce04820000",
                      "task_id": "7b87cc2e-0000-4000-8000-7b87cc2e0000",
                      "entity_type": "standard",
                      "entity_id": "81ddf6d0-0000-4000-8000-81ddf6d00000",
                      "kind": "standard"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/task_links/{id}": {
      "get": {
        "tags": [
          "Task-uri"
        ],
        "summary": "Legături task-uri: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/task_links"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/task_watchers": {
      "get": {
        "tags": [
          "Task-uri"
        ],
        "summary": "Urmăritori task-uri: listare",
        "description": "Cine urmărește fiecare task.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/task_watchers"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "task_id": "7b87cc2e-0000-4000-8000-7b87cc2e0000",
                      "user_id": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/media_items": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Galerie: listare",
        "description": "Imaginile și documentele companiei. La imagini, `public_url` e adresa stabilă și `thumb_url` miniatura. Documentele sunt private până primesc `public_link`, cu acțiunea create_link. `file_type` e tipul documentului, gol la imagini. Încărcarea: POST /media_items/upload. Ghidul complet e în documentație, la Imagini și fișiere.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/media_items"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "a8c8000a-0000-4000-8000-a8c8000a0000",
                      "name": "Exemplu",
                      "alt": "exemplu",
                      "public_url": "https://exemplu.ro",
                      "source": "exemplu",
                      "width": 1,
                      "height": 1,
                      "size_bytes": 1,
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "file_type": "standard",
                      "public_link": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Setări"
        ],
        "summary": "Galerie: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/media_items_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/media_items"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/media_items/{id}/usage": {
      "post": {
        "tags": [
          "Setări"
        ],
        "summary": "Galerie: usage",
        "description": "Unde e folosit fișierul, inclusiv linkul public activ.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/media_items/{id}/replace": {
      "post": {
        "tags": [
          "Setări"
        ],
        "summary": "Galerie: replace",
        "description": "Înlocuiește fișierul, cu aceeași adresă: o imagine cu o imagine, un document cu un document.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "type",
                  "content_base64"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "numele fișierului"
                  },
                  "type": {
                    "type": "string",
                    "description": "tipul MIME, ex. application/pdf"
                  },
                  "content_base64": {
                    "type": "string",
                    "description": "conținutul în base64, cel mult 25 MB"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/media_items/{id}/replace_from": {
      "post": {
        "tags": [
          "Setări"
        ],
        "summary": "Galerie: replace_from",
        "description": "Înlocuiește conținutul cu al altui fișier din galerie, cu aceeași adresă. Fișierul ales rămâne neschimbat.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "source_id"
                ],
                "properties": {
                  "source_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/media_items/{id}/create_link": {
      "post": {
        "tags": [
          "Setări"
        ],
        "summary": "Galerie: create_link",
        "description": "Creează linkul public: oricine îl are deschide fișierul fără cont, iar fișierul apare ca folosit extern. Dacă există deja, îl întoarce pe acela.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/media_items/{id}/remove_link": {
      "post": {
        "tags": [
          "Setări"
        ],
        "summary": "Galerie: remove_link",
        "description": "Oprește linkul public. Unul creat după aceea are altă adresă.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/media_items/{id}/force_delete": {
      "post": {
        "tags": [
          "Setări"
        ],
        "summary": "Galerie: force_delete",
        "description": "Șterge imaginea și când e folosită: dispare din pozele de produs și de cazare, iar în setări rămâne fără imagine.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/media_items/{id}": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Galerie: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/media_items"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Setări"
        ],
        "summary": "Galerie: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/media_items_input"
              },
              "example": {
                "alt": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Setări"
        ],
        "summary": "Galerie: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/product_media": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Poze produse: listare",
        "description": "Pozele produselor. Se adaugă prin acțiunea add_media pe products.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/product_media"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "9c211efb-0000-4000-8000-9c211efb0000",
                      "product_id": "7abdadb2-0000-4000-8000-7abdadb20000",
                      "variant_product_id": "5067a6ac-0000-4000-8000-5067a6ac0000",
                      "public_url": "https://exemplu.ro",
                      "alt": "exemplu",
                      "position": 1,
                      "width": 1,
                      "height": 1,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "media_id": "d82e505d-0000-4000-8000-d82e505d0000"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/product_media/{id}": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Poze produse: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/product_media"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/product_option_values": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Valori opțiuni: listare",
        "description": "Valorile opțiunilor de produs.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/product_option_values"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "a341eeb3-0000-4000-8000-a341eeb30000",
                      "option_id": "1c0130fe-0000-4000-8000-1c0130fe0000",
                      "value": "exemplu",
                      "position": 1,
                      "term_id": "824dffe7-0000-4000-8000-824dffe70000"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/product_option_values/{id}": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Valori opțiuni: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/product_option_values"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_accounts": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Conturi magazin: listare",
        "description": "Conturile clienților din magazin.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/shop_accounts"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "616632a0-0000-4000-8000-616632a00000",
                      "channel_id": "9f2b151e-0000-4000-8000-9f2b151e0000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "email": "nume@exemplu.ro",
                      "email_verified_at": "2026-01-31T09:30:00+00:00",
                      "last_login_at": "2026-01-31T09:30:00+00:00",
                      "marketing_consent": {},
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "status": "active",
                      "portal_id": "f09719a7-0000-4000-8000-f09719a70000"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Conturi magazin: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shop_accounts_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_accounts"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_accounts/{id}/export": {
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Conturi magazin: export",
        "description": "Exportul GDPR al contului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_accounts/{id}/erase": {
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Conturi magazin: erase",
        "description": "Șterge contul la cererea clientului (GDPR). Comenzile rămân. Nu se poate anula.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_accounts/{id}": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Conturi magazin: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_accounts"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_addresses": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Adrese magazin: listare",
        "description": "Adresele clienților din magazin.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/shop_addresses"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "996cbca8-0000-4000-8000-996cbca80000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "channel_id": "9f2b151e-0000-4000-8000-9f2b151e0000",
                      "label": "Exemplu",
                      "data": {},
                      "is_default": true,
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_addresses/{id}": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Adrese magazin: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_addresses"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_credit_entries": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Credit magazin: listare",
        "description": "Mișcările de credit ale clienților.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/shop_credit_entries"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "4340d03c-0000-4000-8000-4340d03c0000",
                      "channel_id": "9f2b151e-0000-4000-8000-9f2b151e0000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "amount": 100.5,
                      "reason": "exemplu",
                      "order_id": "577108b3-0000-4000-8000-577108b30000",
                      "gift_card_id": "e1b56a22-0000-4000-8000-e1b56a220000",
                      "note": "Text liber",
                      "actor": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "bucket": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_credit_entries/{id}": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Credit magazin: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_credit_entries"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_order_events": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Istoric comenzi: listare",
        "description": "Istoricul comenzilor.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/shop_order_events"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "e3fe05dc-0000-4000-8000-e3fe05dc0000",
                      "order_id": "577108b3-0000-4000-8000-577108b30000",
                      "type": "standard",
                      "data": {},
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "actor": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_order_events/{id}": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Istoric comenzi: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_order_events"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_order_messages": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Mesaje comenzi: listare",
        "description": "Mesajele de pe comenzi.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/shop_order_messages"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "6f856589-0000-4000-8000-6f8565890000",
                      "order_id": "577108b3-0000-4000-8000-577108b30000",
                      "direction": "exemplu",
                      "body": "Text liber",
                      "author": "exemplu",
                      "read_at": "2026-01-31T09:30:00+00:00",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_order_messages/{id}": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Mesaje comenzi: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_order_messages"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_product_reviews": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Recenzii produse: listare",
        "description": "Recenziile produselor.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/shop_product_reviews"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "94dc095f-0000-4000-8000-94dc095f0000",
                      "channel_id": "9f2b151e-0000-4000-8000-9f2b151e0000",
                      "product_id": "7abdadb2-0000-4000-8000-7abdadb20000",
                      "order_id": "577108b3-0000-4000-8000-577108b30000",
                      "order_line_id": "2cdfd0ae-0000-4000-8000-2cdfd0ae0000",
                      "account_id": "e25effb4-0000-4000-8000-e25effb40000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "rating": 1,
                      "title": "Exemplu",
                      "body": "Text liber",
                      "status": "active",
                      "company_reply": "exemplu",
                      "report_count": 2,
                      "invite_expires_at": "2026-01-31T09:30:00+00:00",
                      "published_at": "2026-01-31T09:30:00+00:00",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "author_name": "Exemplu",
                      "source": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Recenzii produse: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shop_product_reviews_input"
              },
              "example": {
                "product_id": "7abdadb2-0000-4000-8000-7abdadb20000",
                "rating": 42,
                "channel_id": "Exemplu",
                "party_id": "Exemplu",
                "title": "Exemplu",
                "body": "Text mai lung, pe mai multe rânduri."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_product_reviews"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_product_reviews/{id}": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Recenzii produse: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_product_reviews"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Recenzii produse: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shop_product_reviews_input"
              },
              "example": {
                "channel_id": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_quote_requests": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Cereri de ofertă: listare",
        "description": "Cererile de ofertă din magazin.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/shop_quote_requests"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "29eb363f-0000-4000-8000-29eb363f0000",
                      "channel_id": "9f2b151e-0000-4000-8000-9f2b151e0000",
                      "quote_id": "d978dac5-0000-4000-8000-d978dac50000",
                      "email": "nume@exemplu.ro",
                      "name": "Exemplu",
                      "phone": "+40 700 000 000",
                      "company": "exemplu",
                      "cui": "exemplu",
                      "message": "Text liber",
                      "product_ids": [],
                      "status": "active",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Cereri de ofertă: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shop_quote_requests_input"
              },
              "example": {
                "channel_id": "Exemplu",
                "email": "nume@exemplu.ro",
                "name": "Exemplu",
                "phone": "+40 700 000 000",
                "company": "Exemplu",
                "cui": "12345678"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_quote_requests"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_quote_requests/{id}/to_quote": {
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Cereri de ofertă: to_quote",
        "description": "Face ofertă din cerere.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_quote_requests/{id}": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Cereri de ofertă: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_quote_requests"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Cereri de ofertă: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shop_quote_requests_input"
              },
              "example": {
                "name": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Cereri de ofertă: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_return_lines": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Linii retururi: listare",
        "description": "Liniile retururilor.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/shop_return_lines"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "77449816-0000-4000-8000-774498160000",
                      "return_id": "76c5fe63-0000-4000-8000-76c5fe630000",
                      "order_line_id": "2cdfd0ae-0000-4000-8000-2cdfd0ae0000",
                      "qty": 2,
                      "condition": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_return_lines/{id}": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Linii retururi: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_return_lines"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_shipment_lines": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Linii expedieri: listare",
        "description": "Liniile expedierilor.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/shop_shipment_lines"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "09bae36c-0000-4000-8000-09bae36c0000",
                      "shipment_id": "d1a7e779-0000-4000-8000-d1a7e7790000",
                      "order_line_id": "2cdfd0ae-0000-4000-8000-2cdfd0ae0000",
                      "qty": 2
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_shipment_lines/{id}": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Linii expedieri: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_shipment_lines"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_shipment_parcels": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Colete: listare",
        "description": "Coletele expedierilor.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/shop_shipment_parcels"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "d6e1fc41-0000-4000-8000-d6e1fc410000",
                      "shipment_id": "d1a7e779-0000-4000-8000-d1a7e7790000",
                      "parcel_no": 1,
                      "weight_g": 1,
                      "dims": {},
                      "awb_number": "2026-0001"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_shipment_parcels/{id}": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Colete: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_shipment_parcels"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_stock_alerts": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Alerte de stoc: listare",
        "description": "Abonările la revenirea în stoc.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/shop_stock_alerts"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "d41a4166-0000-4000-8000-d41a41660000",
                      "channel_id": "9f2b151e-0000-4000-8000-9f2b151e0000",
                      "product_id": "7abdadb2-0000-4000-8000-7abdadb20000",
                      "email": "nume@exemplu.ro",
                      "consent_text": "exemplu",
                      "consent_version": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "notified_at": "2026-01-31T09:30:00+00:00",
                      "expires_at": "2026-01-31T09:30:00+00:00",
                      "state": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Alerte de stoc: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shop_stock_alerts_input"
              },
              "example": {
                "channel_id": "Exemplu",
                "product_id": "7abdadb2-0000-4000-8000-7abdadb20000",
                "email": "nume@exemplu.ro",
                "expires_at": "2026-01-31T09:30:00+02:00",
                "state": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_stock_alerts"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_stock_alerts/{id}": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Alerte de stoc: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_stock_alerts"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Alerte de stoc: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shop_stock_alerts_input"
              },
              "example": {
                "expires_at": "2026-01-31T09:30:00+02:00"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Alerte de stoc: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_translations": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Traduceri magazin: listare",
        "description": "Traducerile textelor din magazin.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/shop_translations"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "channel_id": "9f2b151e-0000-4000-8000-9f2b151e0000",
                      "text_id": "exemplu",
                      "lang": "exemplu",
                      "value": "exemplu",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/crm_activity": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Activitate CRM: listare",
        "description": "Jurnalul de activitate din Rivil CRM. Replică, doar citire.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/crm_activity"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "b1a3c8d1-0000-4000-8000-b1a3c8d10000",
                      "lead_id": "da287ef7-0000-4000-8000-da287ef70000",
                      "deal_id": "32fa47e7-0000-4000-8000-32fa47e70000",
                      "created_by": "63e48c55-0000-4000-8000-63e48c550000",
                      "event_type": "standard",
                      "source": "exemplu",
                      "content": "exemplu",
                      "prev_step_id": "055bfae9-0000-4000-8000-055bfae90000",
                      "new_step_id": "989b9d68-0000-4000-8000-989b9d680000",
                      "prev_status_id": "52bde543-0000-4000-8000-52bde5430000",
                      "new_status_id": "149ee402-0000-4000-8000-149ee4020000",
                      "scheduled_followup_at": "2026-01-31T09:30:00+00:00",
                      "occurred_at": "2026-01-31T09:30:00+00:00",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/crm_activity/{id}": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Activitate CRM: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/crm_activity"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/record_profiles": {
      "get": {
        "tags": [
          "Fișe & istoric"
        ],
        "summary": "Fișe clienți: listare",
        "description": "Fișele clienților după șablon. Se scriu prin acțiunea set_record_profile pe clients.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/record_profiles"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "template_id": "9f562099-0000-4000-8000-9f5620990000",
                      "data": {},
                      "updated_by": "exemplu",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/record_entry_versions": {
      "get": {
        "tags": [
          "Fișe & istoric"
        ],
        "summary": "Versiuni intrări: listare",
        "description": "Versiunile intrărilor din fișe.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/record_entry_versions"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "d23d97d9-0000-4000-8000-d23d97d90000",
                      "entry_id": "9114450f-0000-4000-8000-9114450f0000",
                      "title": "Exemplu",
                      "data": {},
                      "changed_by": "exemplu",
                      "changed_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/record_entry_versions/{id}": {
      "get": {
        "tags": [
          "Fișe & istoric"
        ],
        "summary": "Versiuni intrări: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/record_entry_versions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/message_templates": {
      "get": {
        "tags": [
          "Clienți"
        ],
        "summary": "Șabloane de mesaje: listare",
        "description": "Șabloanele de SMS și email. Mesajele se trimit prin /messages.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/message_templates"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "aab49fee-0000-4000-8000-aab49fee0000",
                      "key": "exemplu",
                      "channel": "exemplu",
                      "label": "Exemplu",
                      "subject": "exemplu",
                      "body": "Text liber",
                      "is_active": true,
                      "sort_order": 1,
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Clienți"
        ],
        "summary": "Șabloane de mesaje: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/message_templates_input"
              },
              "example": {
                "key": "Exemplu",
                "channel": "Exemplu",
                "body": "Text mai lung, pe mai multe rânduri.",
                "subject": "Exemplu",
                "is_active": true
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/message_templates"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/message_templates/{id}": {
      "get": {
        "tags": [
          "Clienți"
        ],
        "summary": "Șabloane de mesaje: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/message_templates"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Clienți"
        ],
        "summary": "Șabloane de mesaje: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/message_templates_input"
              },
              "example": {
                "subject": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/message_lists": {
      "get": {
        "tags": [
          "Clienți"
        ],
        "summary": "Liste de comunicare: listare",
        "description": "Listele și segmentele salvate (kind segment, params: match all sau any și rules). Se trimit prin /messages/list; numărul se află cu comanda messaging.segment_count. Cu modulul Fidelizare, câmpurile de regulă includ stamp_card (has, has_not; value = id program), stamps_left (lte), stamp_reward (yes, no), reward_expiring (within, zile), last_stamp (older_than, within, zile) și referrals (gte, lte); pentru puncte points_member (yes, no), points_balance (gte, lte) și points_expiring (within, zile).",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/message_lists"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "d7c38992-0000-4000-8000-d7c389920000",
                      "name": "Exemplu",
                      "kind": "standard",
                      "params": {},
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Clienți"
        ],
        "summary": "Liste de comunicare: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/message_lists_input"
              },
              "example": {
                "name": "Exemplu",
                "kind": "Exemplu",
                "params": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/message_lists"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/message_lists/{id}/add_member": {
      "post": {
        "tags": [
          "Clienți"
        ],
        "summary": "Liste de comunicare: add_member",
        "description": "Adaugă clientul în segment, peste reguli. `status` spune dacă primește mesaje (`included`) sau de ce nu.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "party_id"
                ],
                "properties": {
                  "party_id": {
                    "type": "string",
                    "description": "clientul (UUID)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/message_lists/{id}/remove_member": {
      "post": {
        "tags": [
          "Clienți"
        ],
        "summary": "Liste de comunicare: remove_member",
        "description": "Scoate clientul din segment, chiar dacă regulile îl prind.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "party_id"
                ],
                "properties": {
                  "party_id": {
                    "type": "string",
                    "description": "clientul (UUID)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/message_lists/{id}/reset_member": {
      "post": {
        "tags": [
          "Clienți"
        ],
        "summary": "Liste de comunicare: reset_member",
        "description": "Uită alegerea făcută de mână pentru client: rămân doar regulile.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "party_id"
                ],
                "properties": {
                  "party_id": {
                    "type": "string",
                    "description": "clientul (UUID)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/message_lists/{id}": {
      "get": {
        "tags": [
          "Clienți"
        ],
        "summary": "Liste de comunicare: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/message_lists"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Clienți"
        ],
        "summary": "Liste de comunicare: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/message_lists_input"
              },
              "example": {
                "params": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Clienți"
        ],
        "summary": "Liste de comunicare: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/suppressions": {
      "get": {
        "tags": [
          "Clienți"
        ],
        "summary": "Dezabonați: listare",
        "description": "Adresele și numerele care nu mai primesc mesaje promoționale. POST adaugă (channel, address), DELETE scoate.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/suppressions"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "e3c7b581-0000-4000-8000-e3c7b5810000",
                      "channel": "exemplu",
                      "address": "Strada Exemplu 1",
                      "reason": "exemplu",
                      "source": "exemplu",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Clienți"
        ],
        "summary": "Dezabonați: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/suppressions_input"
              },
              "example": {
                "channel": "Exemplu",
                "address": "Exemplu",
                "reason": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/suppressions"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/suppressions/{id}": {
      "get": {
        "tags": [
          "Clienți"
        ],
        "summary": "Dezabonați: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/suppressions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Clienți"
        ],
        "summary": "Dezabonați: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contact_consents": {
      "get": {
        "tags": [
          "Clienți"
        ],
        "summary": "Acorduri de contact: listare",
        "description": "Registrul acordurilor și retragerilor pe email și SMS. Doar se adaugă: ultimul rând spune starea.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/contact_consents"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "ccd54ec9-0000-4000-8000-ccd54ec90000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "channel": "exemplu",
                      "address": "Strada Exemplu 1",
                      "granted": true,
                      "source": "exemplu",
                      "proof": "exemplu",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Clienți"
        ],
        "summary": "Acorduri de contact: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/contact_consents_input"
              },
              "example": {
                "channel": "Exemplu",
                "address": "Exemplu",
                "granted": true,
                "source": "Exemplu",
                "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                "proof": "Text mai lung, pe mai multe rânduri."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/contact_consents"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contact_consents/{id}": {
      "get": {
        "tags": [
          "Clienți"
        ],
        "summary": "Acorduri de contact: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/contact_consents"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/message_batches": {
      "get": {
        "tags": [
          "Clienți"
        ],
        "summary": "Trimiteri în grup: listare",
        "description": "Trimiterile unei liste prin coadă. Se pornesc prin /messages/list; acțiunea cancel oprește ce n-a plecat.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/message_batches"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "9cf0671f-0000-4000-8000-9cf0671f0000",
                      "label": "Exemplu",
                      "template_key": "exemplu",
                      "channel": "exemplu",
                      "purpose": "exemplu",
                      "marketing": true,
                      "status": "active",
                      "total": 1,
                      "expires_at": "2026-01-31T09:30:00+00:00",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "finished_at": "2026-01-31T09:30:00+00:00",
                      "campaign_id": "b20f9c43-0000-4000-8000-b20f9c430000"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Clienți"
        ],
        "summary": "Trimiteri în grup: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/message_batches_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/message_batches"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/message_batches/{id}/cancel": {
      "post": {
        "tags": [
          "Clienți"
        ],
        "summary": "Trimiteri în grup: cancel",
        "description": "Oprește ce n-a plecat încă dintr-o trimitere în grup.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/message_batches/{id}": {
      "get": {
        "tags": [
          "Clienți"
        ],
        "summary": "Trimiteri în grup: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/message_batches"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/campaigns": {
      "get": {
        "tags": [
          "Clienți"
        ],
        "summary": "Campanii de email: listare",
        "description": "Campaniile pe email sau SMS: nume, canal, subiect, blocuri sau text SMS, list_ref (id de segment), stare. Acțiuni: test, schedule, pause, resume, cancel, report.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/campaigns"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "8fec234c-0000-4000-8000-8fec234c0000",
                      "name": "Exemplu",
                      "subject": "exemplu",
                      "blocks": {},
                      "list_ref": "exemplu",
                      "smtp_id": "exemplu",
                      "status": "active",
                      "scheduled_at": "2026-01-31T09:30:00+00:00",
                      "batch_id": "a8e4a147-0000-4000-8000-a8e4a1470000",
                      "pause_reason": "exemplu",
                      "started_at": "2026-01-31T09:30:00+00:00",
                      "finished_at": "2026-01-31T09:30:00+00:00",
                      "version": 1,
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "channel": "exemplu",
                      "sms_body": "exemplu",
                      "attribution_days": 2
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Clienți"
        ],
        "summary": "Campanii de email: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/campaigns_input"
              },
              "example": {
                "name": "Exemplu",
                "subject": "Exemplu",
                "blocks": "Exemplu",
                "list_ref": "Exemplu",
                "smtp_id": "Exemplu",
                "channel": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/campaigns"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/campaigns/{id}/test": {
      "post": {
        "tags": [
          "Clienți"
        ],
        "summary": "Campanii de email: test",
        "description": "Trimite un email de probă. Obligatoriu înainte de programare, pe conținutul actual.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "to": {
                    "type": "string",
                    "description": "adresa de email sau numărul de test"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/campaigns/{id}/schedule": {
      "post": {
        "tags": [
          "Clienți"
        ],
        "summary": "Campanii de email: schedule",
        "description": "Programează campania; fără `at`, pornește acum.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "at": {
                    "type": "string",
                    "description": "data și ora, ISO 8601"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/campaigns/{id}/pause": {
      "post": {
        "tags": [
          "Clienți"
        ],
        "summary": "Campanii de email: pause",
        "description": "Pune pe pauză trimiterea.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/campaigns/{id}/resume": {
      "post": {
        "tags": [
          "Clienți"
        ],
        "summary": "Campanii de email: resume",
        "description": "Reia trimiterea.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/campaigns/{id}/cancel": {
      "post": {
        "tags": [
          "Clienți"
        ],
        "summary": "Campanii de email: cancel",
        "description": "Oprește definitiv ce n-a plecat.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/campaigns/{id}/report": {
      "post": {
        "tags": [
          "Clienți"
        ],
        "summary": "Campanii de email: report",
        "description": "Trimise, omise, clicuri pe link și dezabonări.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/campaigns/{id}": {
      "get": {
        "tags": [
          "Clienți"
        ],
        "summary": "Campanii de email: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/campaigns"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Clienți"
        ],
        "summary": "Campanii de email: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/campaigns_input"
              },
              "example": {
                "subject": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Clienți"
        ],
        "summary": "Campanii de email: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_import_sources": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Surse de import: listare",
        "description": "Fișierele din care se actualizează catalogul. Adresa nu se expune la citire.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/shop_import_sources"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "00dfdbe8-0000-4000-8000-00dfdbe80000",
                      "channel_id": "9f2b151e-0000-4000-8000-9f2b151e0000",
                      "name": "Exemplu",
                      "source_type": "standard",
                      "auth_header": "exemplu",
                      "field_map": {},
                      "frequency": "exemplu",
                      "update_stock": true,
                      "update_price": true,
                      "update_content": true,
                      "missing_action": "exemplu",
                      "is_active": true,
                      "last_run_at": "2026-01-31T09:30:00+00:00",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "url": "https://exemplu.ro"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Surse de import: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shop_import_sources_input"
              },
              "example": {
                "channel_id": "Exemplu",
                "name": "Exemplu",
                "field_map": "Exemplu",
                "frequency": "Exemplu",
                "update_stock": true,
                "update_price": true
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_import_sources"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_import_sources/{id}/run": {
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Surse de import: run",
        "description": "Rulează importul acum.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_import_sources/{id}": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Surse de import: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_import_sources"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Surse de import: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shop_import_sources_input"
              },
              "example": {
                "field_map": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_orders": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Comenzi magazin: listare",
        "description": "Comenzile. POST introduce o comandă manuală; starea, liniile și adresele se schimbă prin acțiuni; câmpurile personalizate se modifică prin PATCH.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/shop_orders"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "dae82ec1-0000-4000-8000-dae82ec10000",
                      "number": "2026-0001",
                      "channel_id": "9f2b151e-0000-4000-8000-9f2b151e0000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "account_id": "e25effb4-0000-4000-8000-e25effb40000",
                      "cart_id": "f833dcb3-0000-4000-8000-f833dcb30000",
                      "email": "nume@exemplu.ro",
                      "phone": "+40 700 000 000",
                      "billing_address": {},
                      "shipping_address": {},
                      "order_status": "active",
                      "payment_status": "active",
                      "fulfillment_status": "active",
                      "payment_method": "exemplu",
                      "shipping_rate_id": "dd648150-0000-4000-8000-dd6481500000",
                      "shipping_name": "Exemplu",
                      "currency": "RON",
                      "subtotal": 100.5,
                      "discount_total": 100.5,
                      "shipping_total": 100.5,
                      "cod_fee": 100.5,
                      "tax_total": 100.5,
                      "total": 100.5,
                      "source": "exemplu",
                      "external_ref": "exemplu",
                      "invoice_id": "8435a6b4-0000-4000-8000-8435a6b40000",
                      "customer_note": "Text liber",
                      "internal_note": "Text liber",
                      "is_test": true,
                      "legal_versions": {},
                      "attribution": {},
                      "version": 1,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "discount_id": "15e1ee72-0000-4000-8000-15e1ee720000",
                      "custom_fields": {
                        "exemplu_camp": "valoare"
                      },
                      "shipping": "exemplu",
                      "billing": "exemplu",
                      "lines": "exemplu",
                      "shipping_gross": "exemplu",
                      "cod_fee_gross": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Comenzi magazin: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shop_orders_input"
              },
              "example": {
                "channel_id": "Exemplu",
                "email": "nume@exemplu.ro",
                "shipping": "Exemplu",
                "lines": [
                  "optiune"
                ],
                "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                "phone": "+40 700 000 000"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_orders"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_orders/{id}/set_state": {
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Comenzi magazin: set_state",
        "description": "Schimbă starea comenzii, a plății sau a livrării.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "kind",
                  "to"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "description": "order, payment sau fulfillment"
                  },
                  "to": {
                    "type": "string",
                    "description": "starea nouă"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_orders/{id}/edit_lines": {
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Comenzi magazin: edit_lines",
        "description": "Înlocuiește liniile comenzii. Trimite version ca să nu suprascrii o modificare făcută între timp.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "lines"
                ],
                "properties": {
                  "lines": {
                    "type": "array",
                    "items": {},
                    "description": "product_id, qty, și opțional unit_price"
                  },
                  "version": {
                    "type": "number"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_orders/{id}/set_details": {
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Comenzi magazin: set_details",
        "description": "Modifică datele de contact și adresele.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "shipping_address": {
                    "type": "object"
                  },
                  "billing_address": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_orders/{id}/set_note": {
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Comenzi magazin: set_note",
        "description": "Nota internă a comenzii.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "note"
                ],
                "properties": {
                  "note": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_orders/{id}/create_invoice": {
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Comenzi magazin: create_invoice",
        "description": "Ciornă de factură a comenzii. Repetarea întoarce factura existentă.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_orders/{id}/create_shipment": {
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Comenzi magazin: create_shipment",
        "description": "Creează AWB la curier. Atenție: AWB-ul real se plătește; fără parametri ia tot ce n-a plecat, într-un colet.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "lines": {
                    "type": "array",
                    "items": {},
                    "description": "order_line_id, qty"
                  },
                  "parcels": {
                    "type": "array",
                    "items": {},
                    "description": "weight_g, length_cm, width_cm, height_cm"
                  },
                  "courier": {
                    "type": "string"
                  },
                  "warehouse_id": {
                    "type": "string"
                  },
                  "pickup_point": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_orders/{id}": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Comenzi magazin: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_orders"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_order_lines": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Linii comenzi magazin: listare",
        "description": "Liniile comenzilor.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/shop_order_lines"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "9041f97c-0000-4000-8000-9041f97c0000",
                      "order_id": "577108b3-0000-4000-8000-577108b30000",
                      "product_id": "7abdadb2-0000-4000-8000-7abdadb20000",
                      "sku": "EX-001",
                      "name": "Exemplu",
                      "qty": 2,
                      "unit_price": 100.5,
                      "tax_included": true,
                      "vat_rate": 19,
                      "discount": 100.5,
                      "line_total": 100.5,
                      "kit_components": {},
                      "position": 1,
                      "unit_cost": 100.5
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_order_lines/{id}": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Linii comenzi magazin: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_order_lines"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_order_payments": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Plăți comenzi: listare",
        "description": "Plățile comenzilor.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/shop_order_payments"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "47bf8008-0000-4000-8000-47bf80080000",
                      "order_id": "577108b3-0000-4000-8000-577108b30000",
                      "method": "exemplu",
                      "provider": "exemplu",
                      "external_id": "exemplu",
                      "amount": 100.5,
                      "currency": "RON",
                      "status": "active",
                      "checkout_url": "https://exemplu.ro",
                      "meta": {},
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_order_payments/{id}": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Plăți comenzi: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_order_payments"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_shipments": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Expedieri: listare",
        "description": "Expedierile comenzilor, cu AWB și stare.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/shop_shipments"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "6720ced1-0000-4000-8000-6720ced10000",
                      "order_id": "577108b3-0000-4000-8000-577108b30000",
                      "warehouse_id": "bcfdc99e-0000-4000-8000-bcfdc99e0000",
                      "courier": "exemplu",
                      "service": "exemplu",
                      "reference": "exemplu",
                      "awb_number": "2026-0001",
                      "status": "active",
                      "cod_amount": 100.5,
                      "price": 100.5,
                      "pickup_point": {},
                      "external_id": "exemplu",
                      "tracking": {},
                      "error": "exemplu",
                      "test_mode": true,
                      "stock_issued_at": "2026-01-31T09:30:00+00:00",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "delivered_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_shipments/{id}": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Expedieri: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_shipments"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_returns": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Retururi: listare",
        "description": "Retururile comenzilor. Starea se schimbă prin acțiunea set_status.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/shop_returns"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "a3cf57e7-0000-4000-8000-a3cf57e70000",
                      "channel_id": "9f2b151e-0000-4000-8000-9f2b151e0000",
                      "order_id": "577108b3-0000-4000-8000-577108b30000",
                      "status": "active",
                      "reason": "exemplu",
                      "staff_note": "Text liber",
                      "requested_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Retururi: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shop_returns_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_returns"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_returns/{id}/set_status": {
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Retururi: set_status",
        "description": "Schimbă starea returului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status"
                ],
                "properties": {
                  "status": {
                    "type": "string"
                  },
                  "staff_note": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_returns/{id}": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Retururi: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_returns"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_attributes": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Atribute produse: listare",
        "description": "Atributele globale (mărime, culoare).",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/shop_attributes"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "4b6cec0f-0000-4000-8000-4b6cec0f0000",
                      "name": "Exemplu",
                      "kind": "standard",
                      "position": 1,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "custom_fields": {},
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Atribute produse: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shop_attributes_input"
              },
              "example": {
                "name": "Exemplu",
                "kind": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_attributes"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_attributes/{id}": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Atribute produse: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_attributes"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Atribute produse: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shop_attributes_input"
              },
              "example": {
                "kind": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Atribute produse: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_attribute_terms": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Valori atribute: listare",
        "description": "Valorile atributelor.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/shop_attribute_terms"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "4df9f566-0000-4000-8000-4df9f5660000",
                      "attribute_id": "48fd9f25-0000-4000-8000-48fd9f250000",
                      "value": "exemplu",
                      "color": "#791cf0",
                      "image_url": "https://exemplu.ro",
                      "position": 1
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Valori atribute: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shop_attribute_terms_input"
              },
              "example": {
                "attribute_id": "Exemplu",
                "value": "Exemplu",
                "color": "#791cf0",
                "image_url": "https://exemplu.ro"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_attribute_terms"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_attribute_terms/{id}": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Valori atribute: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_attribute_terms"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Valori atribute: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shop_attribute_terms_input"
              },
              "example": {
                "color": "#791cf0"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Valori atribute: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/product_options": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Opțiuni produse: listare",
        "description": "Atributele alese pe fiecare produs. Se setează prin acțiunea set_options pe products.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/product_options"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "f9675c41-0000-4000-8000-f9675c410000",
                      "product_id": "7abdadb2-0000-4000-8000-7abdadb20000",
                      "name": "Exemplu",
                      "position": 1,
                      "attribute_id": "48fd9f25-0000-4000-8000-48fd9f250000",
                      "for_variants": true
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/product_options/{id}": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Opțiuni produse: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/product_options"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_channels": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Canale magazin: listare",
        "description": "Canalele de vânzare: magazine proprii și marketplace-uri. Setările canalului nu se expun.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/shop_channels"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "3e1cca76-0000-4000-8000-3e1cca760000",
                      "name": "Exemplu",
                      "slug": "exemplu",
                      "channel_type": "standard",
                      "marketplace_provider": "exemplu",
                      "currency": "RON",
                      "price_list_id": "941b16bf-0000-4000-8000-941b16bf0000",
                      "legal_entity_id": "5cadfa0a-0000-4000-8000-5cadfa0a0000",
                      "warehouse_ids": [],
                      "allowed_domains": [],
                      "test_mode": true,
                      "is_active": true,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "site_id": "5453b32c-0000-4000-8000-5453b32c0000"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Canale magazin: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shop_channels_input"
              },
              "example": {
                "name": "Exemplu",
                "slug": "Exemplu",
                "channel_type": "Exemplu",
                "marketplace_provider": "Exemplu",
                "currency": "Exemplu",
                "price_list_id": "941b16bf-0000-4000-8000-941b16bf0000"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_channels"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_channels/{id}/ensure_feed": {
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Canale magazin: ensure_feed",
        "description": "Adresa feed-ului canalului. Tokenul din ea e secret.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "feed_type"
                ],
                "properties": {
                  "feed_type": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_channels/{id}/get_markets": {
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Canale magazin: get_markets",
        "description": "Piețele canalului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_channels/{id}/set_markets": {
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Canale magazin: set_markets",
        "description": "Piețele, prețurile și completarea lor.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "config": {
                    "type": "object"
                  },
                  "prices": {
                    "type": "array",
                    "items": {}
                  },
                  "fill": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_channels/{id}/get_i18n": {
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Canale magazin: get_i18n",
        "description": "Limbile și traducerile canalului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_channels/{id}/merge_i18n": {
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Canale magazin: merge_i18n",
        "description": "Adaugă sau modifică traduceri; ce nu trimiți rămâne.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_channels/{id}/get_emails": {
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Canale magazin: get_emails",
        "description": "Textele emailurilor canalului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_channels/{id}/set_emails": {
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Canale magazin: set_emails",
        "description": "Salvează emailurile canalului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "templates": {
                    "type": "object"
                  },
                  "footer": {
                    "type": "string"
                  },
                  "theme": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_channels/{id}/set_payment_methods": {
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Canale magazin: set_payment_methods",
        "description": "Metodele de plată ale canalului. Cheile procesatorului rămân în aplicație.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "payment_methods"
                ],
                "properties": {
                  "payment_methods": {
                    "type": "array",
                    "items": {},
                    "description": "card, cod, transfer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_channels/{id}": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Canale magazin: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_channels"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Canale magazin: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shop_channels_input"
              },
              "example": {
                "slug": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/product_prices": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Prețuri magazin: listare",
        "description": "Prețul produselor pe listele de prețuri. POST creează sau actualizează prețul și scrie istoricul.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/product_prices"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "price_list_id": "941b16bf-0000-4000-8000-941b16bf0000",
                      "product_id": "7abdadb2-0000-4000-8000-7abdadb20000",
                      "price": 100.5,
                      "compare_at_price": 100.5,
                      "tax_included": true,
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "promo_starts_at": "2026-01-31T09:30:00+00:00",
                      "promo_ends_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Prețuri magazin: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/product_prices_input"
              },
              "example": {
                "price_list_id": "941b16bf-0000-4000-8000-941b16bf0000",
                "product_id": "7abdadb2-0000-4000-8000-7abdadb20000",
                "price": 99.9,
                "compare_at_price": 99.9,
                "tax_included": true,
                "promo_starts_at": "2026-01-31T09:30:00+02:00"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/product_prices"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_discounts": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Reduceri magazin: listare",
        "description": "Codurile de reducere și reducerile automate.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/shop_discounts"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "aa27a6f8-0000-4000-8000-aa27a6f80000",
                      "code": "EX-001",
                      "type": "standard",
                      "value": 100.5,
                      "applicability": "exemplu",
                      "target_ids": [],
                      "min_order": 100.5,
                      "starts_at": "2026-01-31T09:30:00+00:00",
                      "ends_at": "2026-01-31T09:30:00+00:00",
                      "max_uses": 1,
                      "max_per_customer": 1,
                      "channel_ids": [],
                      "is_active": true,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "customer_ids": [],
                      "customer_emails": []
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Reduceri magazin: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shop_discounts_input"
              },
              "example": {
                "type": "Exemplu",
                "code": "Exemplu",
                "value": 42,
                "applicability": "Exemplu",
                "target_ids": [
                  "optiune"
                ],
                "min_order": 99.9
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_discounts"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_discounts/{id}": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Reduceri magazin: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_discounts"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Reduceri magazin: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shop_discounts_input"
              },
              "example": {
                "code": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Reduceri magazin: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_shipping_zones": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Zone de livrare: listare",
        "description": "Zonele de livrare ale unui canal, pe județe.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/shop_shipping_zones"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "7805a590-0000-4000-8000-7805a5900000",
                      "channel_id": "9f2b151e-0000-4000-8000-9f2b151e0000",
                      "name": "Exemplu",
                      "counties": []
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Zone de livrare: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shop_shipping_zones_input"
              },
              "example": {
                "channel_id": "Exemplu",
                "name": "Exemplu",
                "counties": [
                  "optiune"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_shipping_zones"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_shipping_zones/{id}": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Zone de livrare: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_shipping_zones"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Zone de livrare: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shop_shipping_zones_input"
              },
              "example": {
                "counties": [
                  "optiune"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Zone de livrare: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_shipping_rates": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Tarife de livrare: listare",
        "description": "Tarifele fiecărei zone de livrare.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/shop_shipping_rates"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "5ea214c4-0000-4000-8000-5ea214c40000",
                      "zone_id": "d087d8a7-0000-4000-8000-d087d8a70000",
                      "name": "Exemplu",
                      "suggested_courier": "exemplu",
                      "min_order_value": 100.5,
                      "max_order_value": 100.5,
                      "min_weight_g": 1,
                      "max_weight_g": 1,
                      "price": 100.5,
                      "free_above": 100.5,
                      "cod_fee": 100.5,
                      "is_active": true,
                      "position": 1
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Tarife de livrare: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shop_shipping_rates_input"
              },
              "example": {
                "zone_id": "Exemplu",
                "name": "Exemplu",
                "price": 99.9,
                "suggested_courier": "Exemplu",
                "min_order_value": 99.9,
                "max_order_value": 99.9
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_shipping_rates"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/shop_shipping_rates/{id}": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Tarife de livrare: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/shop_shipping_rates"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Tarife de livrare: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/shop_shipping_rates_input"
              },
              "example": {
                "suggested_courier": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Tarife de livrare: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_sites": {
      "get": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Site-uri: listare",
        "description": "Site-urile companiei: domeniu, limbi, domenii permise la embed. Fiecare site are structura și conținutul lui.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/content_sites"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "692fe789-0000-4000-8000-692fe7890000",
                      "name": "Exemplu",
                      "domain": "exemplu",
                      "default_lang": "exemplu",
                      "languages": [],
                      "preview_url": "https://exemplu.ro",
                      "embed_domains": [],
                      "is_active": true,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "form_settings": {},
                      "events_order_url": "https://exemplu.ro",
                      "events_invite_url": "https://exemplu.ro"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Site-uri: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/content_sites_input"
              },
              "example": {
                "name": "Exemplu",
                "domain": "Exemplu",
                "default_lang": "Exemplu",
                "languages": [
                  "optiune"
                ],
                "preview_url": "Exemplu",
                "embed_domains": [
                  "optiune"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/content_sites"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_sites/{id}": {
      "get": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Site-uri: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/content_sites"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Site-uri: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/content_sites_input"
              },
              "example": {
                "domain": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Site-uri: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_types": {
      "get": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Tipuri de conținut: listare",
        "description": "Tipurile de conținut ale unui site. `schema` ține definiția câmpurilor; cheia unui câmp nu se schimbă, iar un câmp scos rămâne arhivat, cu valorile lui.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/content_types"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "18a165fc-0000-4000-8000-18a165fc0000",
                      "site_id": "5453b32c-0000-4000-8000-5453b32c0000",
                      "key": "exemplu",
                      "label_singular": "exemplu",
                      "label_plural": "exemplu",
                      "icon": "exemplu",
                      "supports": {},
                      "singleton": true,
                      "url_pattern": "https://exemplu.ro",
                      "list_columns": [],
                      "schema": {},
                      "schema_version": 1,
                      "template_key": "exemplu",
                      "sort_order": 1,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Tipuri de conținut: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/content_types_input"
              },
              "example": {
                "site_id": "Exemplu",
                "label_plural": "Exemplu",
                "key": "Exemplu",
                "label_singular": "Exemplu",
                "icon": "Exemplu",
                "supports": [
                  "optiune"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/content_types"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_types/{id}/purge_field": {
      "post": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Tipuri de conținut: purge_field",
        "description": "Șterge definitiv un câmp arhivat de pe primul nivel, împreună cu valorile lui din toate intrările.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "key"
                ],
                "properties": {
                  "key": {
                    "type": "string",
                    "description": "cheia câmpului arhivat"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_types/{id}": {
      "get": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Tipuri de conținut: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/content_types"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Tipuri de conținut: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/content_types_input"
              },
              "example": {
                "key": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Tipuri de conținut: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_entries": {
      "get": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Intrări: listare",
        "description": "Intrările unui tip de conținut. `fields` ține valorile câmpurilor, după cheile din schema tipului. DELETE mută în coș; restaurarea și ștergerea definitivă sunt acțiuni.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/content_entries"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "07df9f45-0000-4000-8000-07df9f450000",
                      "site_id": "5453b32c-0000-4000-8000-5453b32c0000",
                      "type_id": "a44f1a59-0000-4000-8000-a44f1a590000",
                      "slug": "exemplu",
                      "title": "Exemplu",
                      "body": "Text liber",
                      "excerpt": "exemplu",
                      "featured_media_id": "50779720-0000-4000-8000-507797200000",
                      "seo": {},
                      "fields": {},
                      "status": "active",
                      "previous_status": "active",
                      "publish_at": "2026-01-31T09:30:00+00:00",
                      "announced_at": "2026-01-31T09:30:00+00:00",
                      "author_id": "exemplu",
                      "version": 1,
                      "media_ids": [],
                      "search_text": "exemplu",
                      "deleted_at": null,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "term_ids": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Intrări: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/content_entries_input"
              },
              "example": {
                "type_id": "Exemplu",
                "slug": "Exemplu",
                "title": "Exemplu",
                "body": "Exemplu",
                "excerpt": "Exemplu",
                "featured_media_id": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/content_entries"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_entries/{id}/publish": {
      "post": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Intrări: publish",
        "description": "Publică intrarea acum, după validarea completă. Cu `publish_at` în viitor o programează.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "publish_at": {
                    "type": "string",
                    "description": "dată ISO 8601; gol = acum"
                  },
                  "version": {
                    "type": "number",
                    "description": "versiunea citită"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_entries/{id}/schedule": {
      "post": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Intrări: schedule",
        "description": "Programează intrarea pentru o dată din viitor.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "publish_at"
                ],
                "properties": {
                  "publish_at": {
                    "type": "string",
                    "description": "dată ISO 8601"
                  },
                  "version": {
                    "type": "number",
                    "description": "versiunea citită"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_entries/{id}/unpublish": {
      "post": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Intrări: unpublish",
        "description": "Retrage intrarea de pe site; redevine ciornă.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "version": {
                    "type": "number",
                    "description": "versiunea citită"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_entries/{id}/restore_revision": {
      "post": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Intrări: restore_revision",
        "description": "Readuce conținutul unei revizii. Conținutul curent rămâne în istoric.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "revision_id"
                ],
                "properties": {
                  "revision_id": {
                    "type": "string",
                    "description": "id din content_revisions"
                  },
                  "version": {
                    "type": "number",
                    "description": "versiunea citită"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_entries/{id}/restore": {
      "post": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Intrări: restore",
        "description": "Scoate intrarea din coș, în starea pe care o avea.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_entries/{id}/delete_permanently": {
      "post": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Intrări: delete_permanently",
        "description": "Șterge definitiv o intrare aflată în coș.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_entries/{id}": {
      "get": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Intrări: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/content_entries"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Intrări: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/content_entries_input"
              },
              "example": {
                "slug": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Intrări: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_taxonomies": {
      "get": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Taxonomii: listare",
        "description": "Taxonomiile unui site: ierarhice sau nu, legate de tipuri prin `type_ids`, cu câmpuri proprii în `schema`.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/content_taxonomies"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "6974490c-0000-4000-8000-6974490c0000",
                      "site_id": "5453b32c-0000-4000-8000-5453b32c0000",
                      "key": "exemplu",
                      "label_singular": "exemplu",
                      "label_plural": "exemplu",
                      "hierarchical": true,
                      "type_ids": [],
                      "schema": {},
                      "schema_version": 1,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Taxonomii: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/content_taxonomies_input"
              },
              "example": {
                "site_id": "Exemplu",
                "label_plural": "Exemplu",
                "key": "Exemplu",
                "label_singular": "Exemplu",
                "hierarchical": true,
                "type_ids": [
                  "optiune"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/content_taxonomies"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_taxonomies/{id}/reorder": {
      "post": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Taxonomii: reorder",
        "description": "Stabilește ordinea termenilor de sub același părinte.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "ids"
                ],
                "properties": {
                  "ids": {
                    "type": "array",
                    "items": {},
                    "description": "id-urile termenilor, în ordine"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_taxonomies/{id}": {
      "get": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Taxonomii: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/content_taxonomies"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Taxonomii: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/content_taxonomies_input"
              },
              "example": {
                "key": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Taxonomii: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_terms": {
      "get": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Termeni: listare",
        "description": "Termenii unei taxonomii. La ștergere, copiii urcă la părintele termenului.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/content_terms"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "fa7f322e-0000-4000-8000-fa7f322e0000",
                      "taxonomy_id": "4696b662-0000-4000-8000-4696b6620000",
                      "site_id": "5453b32c-0000-4000-8000-5453b32c0000",
                      "parent_id": "2968c8a9-0000-4000-8000-2968c8a90000",
                      "slug": "exemplu",
                      "name": "Exemplu",
                      "description": "Text liber",
                      "sort_order": 1,
                      "fields": {},
                      "media_ids": [],
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Termeni: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/content_terms_input"
              },
              "example": {
                "taxonomy_id": "Exemplu",
                "name": "Exemplu",
                "parent_id": "Exemplu",
                "slug": "Exemplu",
                "description": "Exemplu",
                "sort_order": 42
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/content_terms"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_terms/{id}": {
      "get": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Termeni: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/content_terms"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Termeni: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/content_terms_input"
              },
              "example": {
                "parent_id": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Termeni: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_entry_terms": {
      "get": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Termeni pe intrări: listare",
        "description": "Termenii fiecărei intrări. `field_key` gol = ales din panou, altfel câmpul din care vine. Se scrie prin `term_ids` și prin câmpuri. Fără webhooks: rândurile se rescriu la fiecare salvare a intrării.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/content_entry_terms"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "entry_id": "9114450f-0000-4000-8000-9114450f0000",
                      "term_id": "824dffe7-0000-4000-8000-824dffe70000",
                      "field_key": "exemplu",
                      "sort_order": 1
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_revisions": {
      "get": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Revizii: listare",
        "description": "Istoricul intrărilor: ultimele 30 de salvări explicite ale fiecăreia. Se restaurează prin acțiunea restore_revision. Fără webhooks: rândurile copiază intrarea.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/content_revisions"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "47c4079d-0000-4000-8000-47c4079d0000",
                      "entry_id": "9114450f-0000-4000-8000-9114450f0000",
                      "version": 1,
                      "snapshot": {},
                      "reason": "exemplu",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_revisions/{id}": {
      "get": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Revizii: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/content_revisions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_menus": {
      "get": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Meniuri site: listare",
        "description": "Meniurile unui site. `items` e un arbore de cel mult 3 niveluri, cu legături către intrări (`entry_id`), termeni (`term_id`) sau adrese (`href`).",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/content_menus"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "1cf451a1-0000-4000-8000-1cf451a10000",
                      "site_id": "5453b32c-0000-4000-8000-5453b32c0000",
                      "key": "exemplu",
                      "name": "Exemplu",
                      "items": {},
                      "media_ids": [],
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Meniuri site: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/content_menus_input"
              },
              "example": {
                "site_id": "Exemplu",
                "name": "Exemplu",
                "key": "Exemplu",
                "items": [
                  "optiune"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/content_menus"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_menus/{id}": {
      "get": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Meniuri site: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/content_menus"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Meniuri site: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/content_menus_input"
              },
              "example": {
                "key": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Meniuri site: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_redirects": {
      "get": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Redirecturi site: listare",
        "description": "Redirecturile unui site. Cele cu `auto` apar singure când se schimbă adresa unei intrări publicate.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/content_redirects"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "cafa5f1e-0000-4000-8000-cafa5f1e0000",
                      "site_id": "5453b32c-0000-4000-8000-5453b32c0000",
                      "from_path": "exemplu",
                      "to_path": "exemplu",
                      "status_code": 1,
                      "auto": true,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Redirecturi site: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/content_redirects_input"
              },
              "example": {
                "site_id": "Exemplu",
                "from_path": "Exemplu",
                "to_path": "Exemplu",
                "status_code": 42
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/content_redirects"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_redirects/{id}": {
      "get": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Redirecturi site: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/content_redirects"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Redirecturi site: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/content_redirects_input"
              },
              "example": {
                "status_code": 42
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Redirecturi site: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_translations": {
      "get": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Traduceri site: listare",
        "description": "Traducerile intrărilor și termenilor, un rând pe limbă. POST creează sau înlocuiește. Ce lipsește cade pe limba principală.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/content_translations"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "c7398f39-0000-4000-8000-c7398f390000",
                      "entry_id": "9114450f-0000-4000-8000-9114450f0000",
                      "term_id": "824dffe7-0000-4000-8000-824dffe70000",
                      "scope_id": "f0d2abed-0000-4000-8000-f0d2abed0000",
                      "lang": "exemplu",
                      "title": "Exemplu",
                      "slug": "exemplu",
                      "data": {},
                      "media_ids": [],
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "search_text": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Traduceri site: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/content_translations_input"
              },
              "example": {
                "lang": "Exemplu",
                "entry_id": "Exemplu",
                "term_id": "Exemplu",
                "title": "Exemplu",
                "slug": "Exemplu",
                "data": [
                  "optiune"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/content_translations"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_translations/{id}": {
      "get": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Traduceri site: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/content_translations"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Traduceri site: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_form_submissions": {
      "get": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Cereri din formulare: listare",
        "description": "Cererile trimise din formularele site-urilor, cu datele de contact. `crm_status`: none, pending sau sent. Se citesc și se șterg; apar singure prin POST /api/site/v1/forms/{cheie}.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/content_form_submissions"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "817c71af-0000-4000-8000-817c71af0000",
                      "site_id": "5453b32c-0000-4000-8000-5453b32c0000",
                      "form_key": "exemplu",
                      "name": "Exemplu",
                      "email": "nume@exemplu.ro",
                      "phone": "+40 700 000 000",
                      "subject": "exemplu",
                      "message": "Text liber",
                      "page": "exemplu",
                      "source": "exemplu",
                      "fields": {},
                      "consent": true,
                      "crm_status": "active",
                      "crm_sent_at": "2026-01-31T09:30:00+00:00",
                      "read_at": "2026-01-31T09:30:00+00:00",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "notify_status": "active"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Cereri din formulare: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/content_form_submissions_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/content_form_submissions"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_form_submissions/{id}/mark_read": {
      "post": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Cereri din formulare: mark_read",
        "description": "Marchează cererea ca citită.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content_form_submissions/{id}": {
      "get": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Cereri din formulare: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/content_form_submissions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Conținut online"
        ],
        "summary": "Cereri din formulare: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/crm_leads": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Lead-uri CRM: listare",
        "description": "Lead-urile din Rivil CRM. Replică, doar citire: se modifică prin CRM.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/crm_leads"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "32daa4d9-0000-4000-8000-32daa4d90000",
                      "funnel_id": "b7942e1d-0000-4000-8000-b7942e1d0000",
                      "assigned_to": "9daf7025-0000-4000-8000-9daf70250000",
                      "full_name": "Exemplu",
                      "phone": "+40 700 000 000",
                      "phone_key": "+40 700 000 000",
                      "email": "nume@exemplu.ro",
                      "birth_date": "2026-01-31",
                      "location": "exemplu",
                      "source": "exemplu",
                      "campaign": "exemplu",
                      "adset": "exemplu",
                      "ad": "exemplu",
                      "form_id": "exemplu",
                      "platform_lead_id": "exemplu",
                      "forms_completed": 1,
                      "lead_added_at": "2026-01-31T09:30:00+00:00",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "custom_fields": {},
                      "last_entry_at": "2026-01-31T09:30:00+00:00",
                      "last_source": "exemplu",
                      "last_campaign": "exemplu",
                      "last_adset": "exemplu",
                      "last_ad": "exemplu",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Lead-uri CRM: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/crm_leads_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/crm_leads"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/crm_leads/{id}/convert": {
      "post": {
        "tags": [
          "CRM"
        ],
        "summary": "Lead-uri CRM: convert",
        "description": "Face client din lead, sau îl leagă de unul cu același telefon sau email.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/crm_leads/{id}": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Lead-uri CRM: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/crm_leads"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/crm_deals": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Deal-uri CRM: listare",
        "description": "Deal-urile din Rivil CRM. Replică, doar citire.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/crm_deals"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "f441f9e9-0000-4000-8000-f441f9e90000",
                      "lead_id": "da287ef7-0000-4000-8000-da287ef70000",
                      "funnel_id": "b7942e1d-0000-4000-8000-b7942e1d0000",
                      "current_step_id": "c92653c1-0000-4000-8000-c92653c10000",
                      "current_status_id": "4d55681b-0000-4000-8000-4d55681b0000",
                      "outcome": "exemplu",
                      "value": 100.5,
                      "source": "exemplu",
                      "campaign": "exemplu",
                      "adset": "exemplu",
                      "ad": "exemplu",
                      "custom_fields": {},
                      "opened_at": "2026-01-31T09:30:00+00:00",
                      "closed_at": "2026-01-31T09:30:00+00:00",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "last_entry_at": "2026-01-31T09:30:00+00:00",
                      "last_source": "exemplu",
                      "last_campaign": "exemplu",
                      "last_adset": "exemplu",
                      "last_ad": "exemplu",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/crm_deals/{id}": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Deal-uri CRM: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/crm_deals"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/crm_entries": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Intrări CRM: listare",
        "description": "Intrările de lead din Rivil CRM. Replică, doar citire.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/crm_entries"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "fb80ac40-0000-4000-8000-fb80ac400000",
                      "lead_id": "da287ef7-0000-4000-8000-da287ef70000",
                      "deal_id": "32fa47e7-0000-4000-8000-32fa47e70000",
                      "source": "exemplu",
                      "campaign": "exemplu",
                      "adset": "exemplu",
                      "ad": "exemplu",
                      "form_id": "exemplu",
                      "platform_lead_id": "exemplu",
                      "channel": "exemplu",
                      "content": "exemplu",
                      "form_data": {},
                      "occurred_at": "2026-01-31T09:30:00+00:00",
                      "deleted_at": null,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/crm_entries/{id}": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Intrări CRM: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/crm_entries"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/crm_transactions": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Tranzacții CRM: listare",
        "description": "Tranzacțiile deal-urilor din Rivil CRM. Replică, doar citire.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/crm_transactions"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "c01168cb-0000-4000-8000-c01168cb0000",
                      "lead_id": "da287ef7-0000-4000-8000-da287ef70000",
                      "deal_id": "32fa47e7-0000-4000-8000-32fa47e70000",
                      "transaction_date": "2026-01-31",
                      "amount": 100.5,
                      "paid": true,
                      "description": "Text liber",
                      "custom_fields": {},
                      "source": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/crm_transactions/{id}": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Tranzacții CRM: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/crm_transactions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/crm_statuses": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Statusuri CRM: listare",
        "description": "Etapele funnel-urilor din Rivil CRM. Replică, doar citire.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/crm_statuses"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "b385ae20-0000-4000-8000-b385ae200000",
                      "funnel_id": "b7942e1d-0000-4000-8000-b7942e1d0000",
                      "funnel_name": "Exemplu",
                      "step_id": "664aa187-0000-4000-8000-664aa1870000",
                      "step_name": "Exemplu",
                      "step_position": 1,
                      "name": "Exemplu",
                      "color": "#791cf0",
                      "position": 1,
                      "is_default": true,
                      "outcome_type": "standard"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/crm_statuses/{id}": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Statusuri CRM: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/crm_statuses"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/crm_employees": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Responsabili CRM: listare",
        "description": "Responsabilii din Rivil CRM. Replică, doar citire.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/crm_employees"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "bada4f2b-0000-4000-8000-bada4f2b0000",
                      "full_name": "Exemplu",
                      "email": "nume@exemplu.ro",
                      "phone": "+40 700 000 000",
                      "is_active": true,
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/crm_employees/{id}": {
      "get": {
        "tags": [
          "CRM"
        ],
        "summary": "Responsabili CRM: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/crm_employees"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/field_definitions": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Câmpuri personalizate: listare",
        "description": "Câmpurile definite de companie pe entități. Tipul și cheia nu se mai schimbă după creare.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/field_definitions"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "ced880f4-0000-4000-8000-ced880f40000",
                      "entity_key": "exemplu",
                      "field_key": "exemplu",
                      "label": "Exemplu",
                      "field_type": "standard",
                      "required": true,
                      "options": {},
                      "list_visible": true,
                      "form_order": 1,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "is_active": true,
                      "label_i18n": {},
                      "entity": "exemplu",
                      "type": "standard",
                      "nomenclature": "exemplu",
                      "multiple": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Setări"
        ],
        "summary": "Câmpuri personalizate: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/field_definitions_input"
              },
              "example": {
                "entity": "clients",
                "label": "Sursă",
                "type": "text"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/field_definitions"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/field_definitions/{id}/convert": {
      "post": {
        "tags": [
          "Setări"
        ],
        "summary": "Câmpuri personalizate: convert",
        "description": "Mută lista câmpului în Nomenclatoare, fără să piardă valorile.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/field_definitions/{id}": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Câmpuri personalizate: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/field_definitions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Setări"
        ],
        "summary": "Câmpuri personalizate: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/field_definitions_input"
              },
              "example": {
                "required": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Setări"
        ],
        "summary": "Câmpuri personalizate: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/status_definitions": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Statusuri: listare",
        "description": "Statusurile configurabile ale entităților.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/status_definitions"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "9c9fe6ce-0000-4000-8000-9c9fe6ce0000",
                      "entity_key": "exemplu",
                      "status_key": "exemplu",
                      "label": "Exemplu",
                      "color": "#791cf0",
                      "sort_order": 1,
                      "is_terminal": true,
                      "counts_as_worked": true,
                      "label_i18n": {},
                      "entity": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Setări"
        ],
        "summary": "Statusuri: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/status_definitions_input"
              },
              "example": {
                "label": "Exemplu",
                "entity": "Exemplu",
                "color": "#791cf0",
                "is_terminal": true,
                "counts_as_worked": true,
                "label_i18n": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/status_definitions"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/status_definitions/{id}": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Statusuri: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/status_definitions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Setări"
        ],
        "summary": "Statusuri: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/status_definitions_input"
              },
              "example": {
                "color": "#791cf0"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Setări"
        ],
        "summary": "Statusuri: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/nomenclatures": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Nomenclatoare: listare",
        "description": "Listele de valori ale companiei.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/nomenclatures"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "83d3feb3-0000-4000-8000-83d3feb30000",
                      "key": "exemplu",
                      "label": "Exemplu",
                      "description": "Text liber",
                      "is_system": true,
                      "sort_order": 1,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "label_i18n": {}
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Setări"
        ],
        "summary": "Nomenclatoare: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/nomenclatures_input"
              },
              "example": {
                "label": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/nomenclatures"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/nomenclatures/{id}": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Nomenclatoare: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/nomenclatures"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Setări"
        ],
        "summary": "Nomenclatoare: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/nomenclature_items": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Elemente nomenclatoare: listare",
        "description": "Valorile din nomenclatoare. Se dezactivează, nu se șterg.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/nomenclature_items"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "99aa7469-0000-4000-8000-99aa74690000",
                      "nomenclature_id": "6f9b37fc-0000-4000-8000-6f9b37fc0000",
                      "code": "EX-001",
                      "label": "Exemplu",
                      "color": "#791cf0",
                      "attributes": {},
                      "is_active": true,
                      "sort_order": 1,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "label_i18n": {},
                      "nomenclature_key": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Setări"
        ],
        "summary": "Elemente nomenclatoare: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/nomenclature_items_input"
              },
              "example": {
                "label": "Exemplu",
                "nomenclature_key": "Exemplu",
                "color": "#791cf0",
                "attributes": "Exemplu",
                "is_active": true
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/nomenclature_items"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/nomenclature_items/{id}": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Elemente nomenclatoare: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/nomenclature_items"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Setări"
        ],
        "summary": "Elemente nomenclatoare: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/nomenclature_items_input"
              },
              "example": {
                "color": "#791cf0"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/legal_entities": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Firme: listare",
        "description": "Firmele companiei, cu datele fiscale. Configurările de facturare nu se expun.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/legal_entities"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "ce226cfa-0000-4000-8000-ce226cfa0000",
                      "code": "EX-001",
                      "name": "Exemplu",
                      "is_default": true,
                      "is_active": true,
                      "legal_name": "Exemplu",
                      "cui": "exemplu",
                      "reg_com": "exemplu",
                      "address": "Strada Exemplu 1",
                      "city": "exemplu",
                      "county": "exemplu",
                      "postal_code": "EX-001",
                      "phone": "+40 700 000 000",
                      "email": "nume@exemplu.ro",
                      "iban": "exemplu",
                      "bank": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Setări"
        ],
        "summary": "Firme: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/legal_entities_input"
              },
              "example": {
                "name": "Exemplu",
                "code": "Exemplu",
                "is_active": true,
                "legal_name": "Exemplu",
                "cui": "12345678",
                "reg_com": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/legal_entities"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/legal_entities/{id}/set_default": {
      "post": {
        "tags": [
          "Setări"
        ],
        "summary": "Firme: set_default",
        "description": "Face firma implicită.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/legal_entities/{id}/set_billing": {
      "post": {
        "tags": [
          "Setări"
        ],
        "summary": "Firme: set_billing",
        "description": "Setările de facturare ale firmei. Nu include cheile SmartBill sau e-Factura.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "provider": {
                    "type": "string",
                    "description": "manual, own sau smartbill"
                  },
                  "series_name": {
                    "type": "string"
                  },
                  "start_number": {
                    "type": "number"
                  },
                  "extra_series": {
                    "type": "array",
                    "items": {},
                    "description": "Alte serii, alese pe factură: name, start_number. Lista trimisă le înlocuiește pe cele de dinainte."
                  },
                  "default_vat_rate": {
                    "type": "number"
                  },
                  "due_days": {
                    "type": "number"
                  },
                  "currency": {
                    "type": "string"
                  },
                  "vat_payer": {
                    "type": "boolean"
                  },
                  "exempt_reason": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/legal_entities/{id}": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Firme: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/legal_entities"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Setări"
        ],
        "summary": "Firme: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/legal_entities_input"
              },
              "example": {
                "code": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/roles": {
      "get": {
        "tags": [
          "access"
        ],
        "summary": "Roluri: listare",
        "description": "Rolurile și permisiunile din companie.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/roles"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "role_key": "exemplu",
                      "label": "Exemplu",
                      "permissions": {},
                      "is_system": true,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "description": "Text liber",
                      "template_key": "exemplu",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "label_i18n": {},
                      "description_i18n": {}
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "access"
        ],
        "summary": "Roluri: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/roles_input"
              },
              "example": {
                "label": "Exemplu",
                "permissions": "Exemplu",
                "description": "Exemplu",
                "template_key": "Exemplu",
                "label_i18n": "Exemplu",
                "description_i18n": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/roles"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/roles/{id}": {
      "get": {
        "tags": [
          "access"
        ],
        "summary": "Roluri: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/roles"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "access"
        ],
        "summary": "Roluri: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/roles_input"
              },
              "example": {
                "permissions": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "access"
        ],
        "summary": "Roluri: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agents": {
      "get": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Agenți AI: listare",
        "description": "Agenții companiei: șablonul, numele, starea (`on`/`off`), programul, departamentul, rapoartele între agenți și cine a creat. Regulile și pragurile stau în versiuni (`agent_versions`). Se creează și se modifică (reguli, praguri, program, pornire); rulezi cu acțiunea run. Fără webhooks: configurarea nu pleacă din companie.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/agents"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "48ab4d13-0000-4000-8000-48ab4d130000",
                      "template_key": "exemplu",
                      "name": "Exemplu",
                      "state": "exemplu",
                      "current_version_id": "269354af-0000-4000-8000-269354af0000",
                      "schedule": {},
                      "probed_version_id": "be4ae326-0000-4000-8000-be4ae3260000",
                      "last_run_at": "2026-01-31T09:30:00+00:00",
                      "next_run_at": "2026-01-31T09:30:00+00:00",
                      "stopped_reason": "exemplu",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "department_id": "665e1881-0000-4000-8000-665e18810000",
                      "reports_to": "856d3842-0000-4000-8000-856d38420000",
                      "avatar": "exemplu",
                      "is_custom": true,
                      "role": "exemplu",
                      "steps": "exemplu",
                      "rules": "exemplu",
                      "params": "exemplu",
                      "comment": "Text liber"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Agenți AI: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/agents_input"
              },
              "example": {
                "template_key": "weekly-report",
                "name": "Raportul săptămânii"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/agents"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agents/{id}/run": {
      "post": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Agenți AI: run",
        "description": "Rulează agentul acum, pe probă (nu trimite și nu scrie nimic) sau pe bune. Rezultatul se arată doar dacă ai drept de citire pe modulele atinse; până atunci rămâne în jurnal, la `agent_runs`. Cel mult 20 pe oră pe companie.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "dry_run": {
                    "type": "boolean",
                    "description": "implicit true: rularea pe probă"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agents/{id}/restore_version": {
      "post": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Agenți AI: restore_version",
        "description": "Revine la o versiune veche ca versiune nouă identică (istoricul rămâne); agentul cere din nou o probă.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "version_id"
                ],
                "properties": {
                  "version_id": {
                    "type": "string",
                    "description": "id-ul din `agent_versions`"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agents/{id}": {
      "get": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Agenți AI: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/agents"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Agenți AI: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/agents_input"
              },
              "example": {
                "template_key": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_versions": {
      "get": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Versiuni de agenți: listare",
        "description": "Fiecare schimbare de reguli, praguri sau rețetă este o versiune nouă (autor, dată, comentariu); revenirea creează una nouă identică, cu acțiunea restore_version pe agent. Doar citire.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/agent_versions"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "4a535e2c-0000-4000-8000-4a535e2c0000",
                      "agent_id": "65709d9c-0000-4000-8000-65709d9c0000",
                      "version": 1,
                      "rules": "exemplu",
                      "params": {},
                      "comment": "Text liber",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "role": "exemplu",
                      "steps": {}
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_versions/{id}": {
      "get": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Versiuni de agenți: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/agent_versions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_runs": {
      "get": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Rulări de agenți: listare",
        "description": "Jurnalul rulărilor: declanșator, stare, modulele atinse, tokeni, cost și preț de vânzare. Rezumatul și rezultatul nu se dau aici: se citesc cu comanda agents.run_result, doar cu drept de citire pe toate modulele atinse. Păstrate 90 de zile (registrul de costuri rămâne).",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/agent_runs"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "72fb11df-0000-4000-8000-72fb11df0000",
                      "agent_id": "65709d9c-0000-4000-8000-65709d9c0000",
                      "version_id": "ea49e929-0000-4000-8000-ea49e9290000",
                      "trigger": "exemplu",
                      "state": "exemplu",
                      "dry_run": true,
                      "tainted": true,
                      "modules": [],
                      "started_at": "2026-01-31T09:30:00+00:00",
                      "finished_at": "2026-01-31T09:30:00+00:00",
                      "cost_usd": 100.5,
                      "sell_amount": 100.5,
                      "sell_currency": "RON",
                      "error": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_runs/{id}": {
      "get": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Rulări de agenți: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/agent_runs"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_actions": {
      "get": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Propuneri ale agenților: listare",
        "description": "Ce propun agenții și așteaptă un om: răspuns la o cerere sau recenzie, cheltuială din document, reminder de plată, idei și texte de marketing. Starea (`pending`, `approved`, `rejected`, `failed`) și rezultatul se citesc; conținutul propunerii rămâne în aplicație. Aprobarea e a omului (acțiunile approve și reject, doar cu utilizator, nu cu cheie).",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/agent_actions"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "98caef6c-0000-4000-8000-98caef6c0000",
                      "agent_id": "65709d9c-0000-4000-8000-65709d9c0000",
                      "run_id": "3b784616-0000-4000-8000-3b7846160000",
                      "kind": "standard",
                      "target_type": "standard",
                      "target_id": "7d656262-0000-4000-8000-7d6562620000",
                      "status": "active",
                      "tainted": true,
                      "decided_by": "exemplu",
                      "decided_at": "2026-01-31T09:30:00+00:00",
                      "result": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Propuneri ale agenților: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/agent_actions_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/agent_actions"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_actions/{id}/approve": {
      "post": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Propuneri ale agenților: approve",
        "description": "Un om aprobă propunerea: se execută acțiunea (email, răspuns, cheltuială, reminder), doar dacă el însuși are dreptul pe modulul ei. Textul se poate corecta.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "textul corectat, la propunerile cu text"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_actions/{id}/reject": {
      "post": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Propuneri ale agenților: reject",
        "description": "Un om respinge propunerea.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_actions/{id}": {
      "get": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Propuneri ale agenților: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/agent_actions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_alerts": {
      "get": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Alerte ale agenților: listare",
        "description": "Alertele ridicate de semnalele de siguranță și de cost: tipul, gravitatea, dacă agentul a fost oprit. O alertă se închide cu acțiunea close, doar de un om.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/agent_alerts"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "47278470-0000-4000-8000-472784700000",
                      "agent_id": "65709d9c-0000-4000-8000-65709d9c0000",
                      "run_id": "3b784616-0000-4000-8000-3b7846160000",
                      "kind": "standard",
                      "severity": "exemplu",
                      "detail": {},
                      "auto_action": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "closed_at": "2026-01-31T09:30:00+00:00",
                      "closed_by": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Alerte ale agenților: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/agent_alerts_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/agent_alerts"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_alerts/{id}/close": {
      "post": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Alerte ale agenților: close",
        "description": "Un om închide alerta după ce a citit-o; un agent oprit de ea se poate porni din nou abia apoi.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_alerts/{id}": {
      "get": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Alerte ale agenților: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/agent_alerts"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_requests": {
      "get": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Cereri către agenți: listare",
        "description": "Cererile venite din Chat (mențiune) și din Taskuri (task atribuit unui agent, prin `assignee_id` = `agent:<id>` pe resursa tasks): starea și notele. Textul cererii nu se dă aici.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/agent_requests"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "65cd8063-0000-4000-8000-65cd80630000",
                      "agent_id": "65709d9c-0000-4000-8000-65709d9c0000",
                      "kind": "standard",
                      "channel_id": "9f2b151e-0000-4000-8000-9f2b151e0000",
                      "message_id": "ad7a839a-0000-4000-8000-ad7a839a0000",
                      "parent_id": "2968c8a9-0000-4000-8000-2968c8a90000",
                      "task_id": "7b87cc2e-0000-4000-8000-7b87cc2e0000",
                      "requested_by": "exemplu",
                      "state": "exemplu",
                      "note": "Text liber",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "taken_at": "2026-01-31T09:30:00+00:00",
                      "finished_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_requests/{id}": {
      "get": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Cereri către agenți: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/agent_requests"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_departments": {
      "get": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Departamente de agenți: listare",
        "description": "Departamentele rețelei de agenți: nume, culoare, cuvinte de rutare, responsabil și poziția pe hartă.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/agent_departments"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "918c1e08-0000-4000-8000-918c1e080000",
                      "name_ro": "Exemplu",
                      "name_en": "Exemplu",
                      "color": "#791cf0",
                      "responsible_id": "exemplu",
                      "keywords": [],
                      "description": "Text liber",
                      "pos_x": 100.5,
                      "pos_y": 100.5,
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Departamente de agenți: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/agent_departments_input"
              },
              "example": {
                "name_ro": "Financiar",
                "name_en": "Finance",
                "color": "#0ea5e9"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/agent_departments"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_departments/{id}": {
      "get": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Departamente de agenți: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/agent_departments"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Departamente de agenți: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/agent_departments_input"
              },
              "example": {
                "name_en": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Departamente de agenți: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_knowledge_sources": {
      "get": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Surse de cunoștințe: listare",
        "description": "Textele, paginile web și conținutul de Site din care răspund agenții: tip, încredere, modul cerut, reîmprospătare, stare (`active`, `error`, `quarantined`). Se recitesc cu acțiunea refresh.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/agent_knowledge_sources"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "239103f2-0000-4000-8000-239103f20000",
                      "agent_id": "65709d9c-0000-4000-8000-65709d9c0000",
                      "kind": "standard",
                      "title": "Exemplu",
                      "ref": "exemplu",
                      "body": "Text liber",
                      "trust": "exemplu",
                      "module": "exemplu",
                      "refresh": "exemplu",
                      "status": "active",
                      "error": "exemplu",
                      "chunk_count": 2,
                      "last_read_at": "2026-01-31T09:30:00+00:00",
                      "last_changed_at": "2026-01-31T09:30:00+00:00",
                      "next_refresh_at": "2026-01-31T09:30:00+00:00",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "file_mime": "exemplu",
                      "file_pages": 1,
                      "ocr_method": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Surse de cunoștințe: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/agent_knowledge_sources_input"
              },
              "example": {
                "kind": "text",
                "title": "Program și adresă",
                "body": "Suntem deschiși de luni până vineri, 9-17."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/agent_knowledge_sources"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_knowledge_sources/{id}/refresh": {
      "post": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Surse de cunoștințe: refresh",
        "description": "Recitește sursa acum; o sursă din carantină se recitește tot de aici, după ce a văzut-o un om.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_knowledge_sources/{id}/ocr": {
      "post": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Surse de cunoștințe: ocr",
        "description": "Citește un document scanat (PDF fără text sau poză), în fundal: method = local (gratuit, mai lent) sau ai (cu cost, trecut în registru). Starea se vede pe sursă: processing, apoi active sau error.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "method"
                ],
                "properties": {
                  "method": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_knowledge_sources/{id}": {
      "get": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Surse de cunoștințe: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/agent_knowledge_sources"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Surse de cunoștințe: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/agent_knowledge_sources_input"
              },
              "example": {
                "agent_id": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Surse de cunoștințe: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_skills": {
      "get": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Skilluri: listare",
        "description": "Skillurile instalate din catalog sau importate (cu verificări automate și raport AI). Un skill importat așteaptă aprobarea unui om (approve) și abia apoi se atașează (attach) unui agent.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/agent_skills"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "150142e5-0000-4000-8000-150142e50000",
                      "source": "exemplu",
                      "catalog_key": "exemplu",
                      "name": "Exemplu",
                      "description": "Text liber",
                      "body": "Text liber",
                      "files": {},
                      "removed": {},
                      "findings": {},
                      "ai_report": {},
                      "origin_url": "https://exemplu.ro",
                      "version": 1,
                      "status": "active",
                      "quarantine_reason": "exemplu",
                      "approved_by": "exemplu",
                      "approved_at": "2026-01-31T09:30:00+00:00",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "url": "https://exemplu.ro"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Skilluri: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/agent_skills_input"
              },
              "example": {
                "files": [
                  {
                    "name": "SKILL.md",
                    "text": "---\nname: Ton prietenos\ndescription: Cum scriem clienților\n---\nScrie scurt și politicos."
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/agent_skills"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_skills/{id}/approve": {
      "post": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Skilluri: approve",
        "description": "Un om aprobă skillul după ce i-a citit instrucțiunile și constatările; un skill din carantină nu se poate aproba.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_skills/{id}/reject": {
      "post": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Skilluri: reject",
        "description": "Un om respinge skillul.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_skills/{id}/recheck": {
      "post": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Skilluri: recheck",
        "description": "Recitește skillul de la adresa lui; o schimbare iese din „aprobat” și cere din nou un om.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_skills/{id}/attach": {
      "post": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Skilluri: attach",
        "description": "Atașează skillul aprobat unui agent, la un pas care cheamă modelul.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "agent_id"
                ],
                "properties": {
                  "agent_id": {
                    "type": "string"
                  },
                  "step_key": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_skills/{id}/detach": {
      "post": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Skilluri: detach",
        "description": "Scoate skillul de pe un agent.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "agent_id"
                ],
                "properties": {
                  "agent_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_skills/{id}": {
      "get": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Skilluri: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/agent_skills"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Skilluri: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/brand_kits": {
      "get": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Kit de brand: listare",
        "description": "Kitul de brand al companiei (fără site) sau al unui site: culori, fonturi, ton, public, cuvinte interzise și obligatorii. Fiecare salvare e o versiune.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/brand_kits"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "97d53f2c-0000-4000-8000-97d53f2c0000",
                      "site_id": "5453b32c-0000-4000-8000-5453b32c0000",
                      "logo_url": "https://exemplu.ro",
                      "colors": {},
                      "fonts": [],
                      "tone": "exemplu",
                      "audience": "exemplu",
                      "forbidden": [],
                      "required": [],
                      "examples": [],
                      "version": 1,
                      "updated_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "comment": "Text liber"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Kit de brand: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/brand_kits_input"
              },
              "example": {
                "tone": "Cald, direct, fără jargon.",
                "forbidden": [
                  "gratis"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/brand_kits"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/brand_kits/{id}/restore_version": {
      "post": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Kit de brand: restore_version",
        "description": "Revine la o versiune veche a kitului ca versiune nouă; agenții care scriu către exterior cer din nou o probă.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "version_id"
                ],
                "properties": {
                  "version_id": {
                    "type": "string",
                    "description": "id-ul versiunii kitului"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/brand_kits/{id}": {
      "get": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Kit de brand: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/brand_kits"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Kit de brand: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/brand_kits_input"
              },
              "example": {
                "site_id": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_connections": {
      "get": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Conexiuni MCP ale agenților: listare",
        "description": "Serverele MCP externe la care pot ajunge agenții: adresa, modulul de acces, uneltele permise, doar citire, starea. Cheia nu se citește niciodată.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/agent_connections"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "ece1b394-0000-4000-8000-ece1b3940000",
                      "name": "Exemplu",
                      "url": "https://exemplu.ro",
                      "access_module": "exemplu",
                      "allowed_tools": [],
                      "tools_cache": {},
                      "read_only": true,
                      "cache_ttl_sec": 1,
                      "status": "active",
                      "last_error": "exemplu",
                      "last_used_at": "2026-01-31T09:30:00+00:00",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "secret": "exemplu",
                      "clear_secret": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Conexiuni MCP ale agenților: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/agent_connections_input"
              },
              "example": {
                "name": "Calendar",
                "url": "https://mcp.example.com/mcp",
                "access_module": "scheduling",
                "read_only": true
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/agent_connections"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_connections/{id}/refresh_tools": {
      "post": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Conexiuni MCP ale agenților: refresh_tools",
        "description": "Listează din nou uneltele de pe serverul MCP. Cel mult 30 pe oră pe companie.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_connections/{id}/set_agents": {
      "post": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Conexiuni MCP ale agenților: set_agents",
        "description": "Alege agenții care pot folosi conexiunea și, opțional, uneltele permise pe legătură.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "agent_ids"
                ],
                "properties": {
                  "agent_ids": {
                    "type": "array",
                    "items": {},
                    "description": "id-urile agenților"
                  },
                  "allowed_tools": {
                    "type": "array",
                    "items": {},
                    "description": "uneltele permise pe legătură"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_connections/{id}/call": {
      "post": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Conexiuni MCP ale agenților: call",
        "description": "Cheamă o unealtă a serverului, ca un agent, doar dacă ai drept de citire pe modulul conexiunii. Cel mult 60 pe oră.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "agent_id",
                  "tool"
                ],
                "properties": {
                  "agent_id": {
                    "type": "string"
                  },
                  "tool": {
                    "type": "string"
                  },
                  "args": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent_connections/{id}": {
      "get": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Conexiuni MCP ale agenților: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/agent_connections"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Conexiuni MCP ale agenților: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/agent_connections_input"
              },
              "example": {
                "url": "https://exemplu.ro"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Agenți AI"
        ],
        "summary": "Conexiuni MCP ale agenților: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/chat_channels": {
      "get": {
        "tags": [
          "Chat"
        ],
        "summary": "Canale chat: listare",
        "description": "Canalele publice și private ale chatului intern. Mesajele directe și grupurile nu se expun. Fără webhooks: canalele private nu pleacă din companie. Mesajele se trimit prin acțiunea post.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/chat_channels"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "84e9ffd8-0000-4000-8000-84e9ffd80000",
                      "kind": "standard",
                      "name": "Exemplu",
                      "topic": "exemplu",
                      "dm_key": "exemplu",
                      "entity_type": "standard",
                      "entity_id": "81ddf6d0-0000-4000-8000-81ddf6d00000",
                      "ai_enabled": true,
                      "ai_scanned_seq": 1,
                      "last_seq": 1,
                      "last_message_at": "2026-01-31T09:30:00+00:00",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "archived_at": "2026-01-31T09:30:00+00:00",
                      "member_ids": "exemplu",
                      "archived": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Chat"
        ],
        "summary": "Canale chat: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/chat_channels_input"
              },
              "example": {
                "name": "Vânzări",
                "topic": "Oferte și comenzi",
                "kind": "public"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/chat_channels"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/chat_channels/{id}/post": {
      "post": {
        "tags": [
          "Chat"
        ],
        "summary": "Canale chat: post",
        "description": "Trimite un mesaj de sistem pe canal (apare fără autor, ca mesajele automate ale aplicației). Textul e simplu; liniile devin paragrafe. Pe un canal arhivat nu se poate scrie.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "textul mesajului, cel mult 5000 de caractere"
                  },
                  "entity_refs": {
                    "type": "array",
                    "items": {},
                    "description": "înregistrări de legat: [{ type, id, label }]; type: clients, projects, quotes, shop_orders, purchase_orders, invoices, proformas, contracts, tasks, suppliers, support_tickets (ticketul se vede în previzualizare doar de cine are acces la el)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/chat_channels/{id}/archive": {
      "post": {
        "tags": [
          "Chat"
        ],
        "summary": "Canale chat: archive",
        "description": "Arhivează canalul: se poate citi, dar nu mai primește mesaje, iar asistentul AI se oprește pe el.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/chat_channels/{id}/unarchive": {
      "post": {
        "tags": [
          "Chat"
        ],
        "summary": "Canale chat: unarchive",
        "description": "Redeschide un canal arhivat.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/chat_channels/{id}": {
      "get": {
        "tags": [
          "Chat"
        ],
        "summary": "Canale chat: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/chat_channels"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Chat"
        ],
        "summary": "Canale chat: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/chat_channels_input"
              },
              "example": {
                "kind": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/chat_messages": {
      "get": {
        "tags": [
          "Chat"
        ],
        "summary": "Mesaje chat: listare",
        "description": "Mesajele canalelor publice și private, cu textul ca HTML curățat. Doar citire: se trimit prin acțiunea post pe canal, ca mesaj de sistem. Mesajele directe și grupurile (criptate) nu se expun.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/chat_messages"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "408860dc-0000-4000-8000-408860dc0000",
                      "channel_id": "9f2b151e-0000-4000-8000-9f2b151e0000",
                      "user_id": "exemplu",
                      "seq": 1,
                      "parent_id": "2968c8a9-0000-4000-8000-2968c8a90000",
                      "reply_count": 2,
                      "last_reply_at": "2026-01-31T09:30:00+00:00",
                      "body": "Text liber",
                      "mentions": [],
                      "entity_refs": {},
                      "pinned_at": "2026-01-31T09:30:00+00:00",
                      "pinned_by": "exemplu",
                      "edited_at": "2026-01-31T09:30:00+00:00",
                      "deleted_at": null,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "ticket_id": "a9c4b307-0000-4000-8000-a9c4b3070000",
                      "ticket_claim_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/chat_messages/{id}": {
      "get": {
        "tags": [
          "Chat"
        ],
        "summary": "Mesaje chat: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/chat_messages"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/qr_links": {
      "get": {
        "tags": [
          "Coduri QR"
        ],
        "summary": "Coduri QR: listare",
        "description": "Codurile QR dinamice ale companiei (`name`, `destination`, `short_url`, `status`, `fallback_url`, `valid_from`, `valid_until`, `scans_total`). Adresa scurtă rămâne aceeași, iar destinația se schimbă oricând. POST creează codul în Rivil QR; PATCH schimbă numele, destinația, adresa de rezervă și valabilitatea; DELETE șterge codul (un cod tipărit cu el nu mai duce nicăieri). Acțiuni: pause, resume, set_style. Scanările și blocările vin din Rivil QR (`qr.scan`, `qr.blocked`).",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/qr_links"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "04231da6-0000-4000-8000-04231da60000",
                      "entity_type": "standard",
                      "entity_id": "81ddf6d0-0000-4000-8000-81ddf6d00000",
                      "code_id": "0f4b9ac6-0000-4000-8000-0f4b9ac60000",
                      "short_code": "EX-001",
                      "short_url": "https://exemplu.ro",
                      "destination": "exemplu",
                      "status": "active",
                      "name": "Exemplu",
                      "scans_total": 1,
                      "last_scan_at": "2026-01-31T09:30:00+00:00",
                      "last_synced_at": "2026-01-31T09:30:00+00:00",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "fallback_url": "https://exemplu.ro",
                      "valid_from": "2026-01-31T09:30:00+00:00",
                      "valid_until": "2026-01-31T09:30:00+00:00",
                      "style": {}
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Coduri QR"
        ],
        "summary": "Coduri QR: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/qr_links_input"
              },
              "example": {
                "name": "Meniu restaurant",
                "destination": "https://exemplu.ro/meniu"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/qr_links"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/qr_links/{id}/pause": {
      "post": {
        "tags": [
          "Coduri QR"
        ],
        "summary": "Coduri QR: pause",
        "description": "Oprește codul (stare oprit) fără a schimba adresa scurtă. Cine îl scanează vede o pagină care spune că linkul nu e activ.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/qr_links/{id}/resume": {
      "post": {
        "tags": [
          "Coduri QR"
        ],
        "summary": "Coduri QR: resume",
        "description": "Reactivează un cod oprit.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/qr_links/{id}/set_style": {
      "post": {
        "tags": [
          "Coduri QR"
        ],
        "summary": "Coduri QR: set_style",
        "description": "Schimbă aspectul imaginii: culoarea codului, a fundalului și nivelul de corecție a erorilor.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "fg": {
                    "type": "string",
                    "description": "culoarea codului, #rrggbb"
                  },
                  "bg": {
                    "type": "string",
                    "description": "culoarea fundalului, #rrggbb"
                  },
                  "ecc": {
                    "type": "string",
                    "description": "L, M, Q sau H"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/qr_links/{id}": {
      "get": {
        "tags": [
          "Coduri QR"
        ],
        "summary": "Coduri QR: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/qr_links"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Coduri QR"
        ],
        "summary": "Coduri QR: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/qr_links_input"
              },
              "example": {
                "fallback_url": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Coduri QR"
        ],
        "summary": "Coduri QR: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/notes": {
      "get": {
        "tags": [
          "Notițe"
        ],
        "summary": "Notițe: listare",
        "description": "Notițele vizibile pentru toată compania, cu textul ca HTML curățat. Notițele private și cele partajate cu persoane sau echipe nu se expun niciodată prin API și nu pleacă în webhooks. POST creează o notiță a companiei (autor: cheia API), PATCH modifică (cu `version` pentru a nu călca peste altcineva), DELETE o mută în coș (se scoate cu comanda `notes.restore`). Fixarea, arhivarea, taskurile din rânduri cu bifă și exportul sunt acțiuni.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/notes"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "6c2a6cae-0000-4000-8000-6c2a6cae0000",
                      "owner_id": "exemplu",
                      "title": "Exemplu",
                      "body": "Text liber",
                      "plain_text": "exemplu",
                      "color": "#791cf0",
                      "pinned": true,
                      "visibility": "exemplu",
                      "kind": "standard",
                      "version": 1,
                      "archived_at": "2026-01-31T09:30:00+00:00",
                      "deleted_at": null,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "media_ids": [],
                      "content_at": "2026-01-31T09:30:00+00:00",
                      "content_by": "exemplu",
                      "deleted_by": "exemplu",
                      "archived": "exemplu",
                      "tag_ids": "exemplu",
                      "links": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Notițe"
        ],
        "summary": "Notițe: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/notes_input"
              },
              "example": {
                "title": "Procedură de predare",
                "body": "<p>Pașii de urmat la predarea unui client nou.</p><ul data-type=\"taskList\"><li data-type=\"taskItem\" data-checked=\"false\"><p>Contract semnat</p></li></ul>",
                "color": "blue"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/notes"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/notes/{id}/pin": {
      "post": {
        "tags": [
          "Notițe"
        ],
        "summary": "Notițe: pin",
        "description": "Fixează notița sus în listă.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/notes/{id}/unpin": {
      "post": {
        "tags": [
          "Notițe"
        ],
        "summary": "Notițe: unpin",
        "description": "Scoate notița din cele fixate.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/notes/{id}/archive": {
      "post": {
        "tags": [
          "Notițe"
        ],
        "summary": "Notițe: archive",
        "description": "Arhivează notița: iese din lista activă, dar se poate citi și restaura.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/notes/{id}/unarchive": {
      "post": {
        "tags": [
          "Notițe"
        ],
        "summary": "Notițe: unarchive",
        "description": "Scoate notița din arhivă.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/notes/{id}/to_task": {
      "post": {
        "tags": [
          "Notițe"
        ],
        "summary": "Notițe: to_task",
        "description": "Face taskuri din rânduri cu bifă ale notiței: rândul rămâne legat de task, iar bifa și starea taskului se țin la fel. `ordinal` e numărul rândului cu bifă în textul salvat (de la 0), iar `version` e versiunea notiței citită (la nepotrivire, 409). Cere și drept pe Taskuri.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "version",
                  "picks"
                ],
                "properties": {
                  "version": {
                    "type": "number",
                    "description": "versiunea notiței citită"
                  },
                  "picks": {
                    "type": "array",
                    "items": {},
                    "description": "[{ ordinal, title?, assignee_id?, due_date? (AAAA-LL-ZZ), priority? }], cel mult 30"
                  },
                  "board_id": {
                    "type": "string",
                    "description": "tabla taskurilor"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/notes/{id}/generate_tasks": {
      "post": {
        "tags": [
          "Notițe"
        ],
        "summary": "Notițe: generate_tasks",
        "description": "Generează taskuri din rândurile cu bifă din secțiunea „De făcut” a notiței (titlu „De făcut”, „Acțiuni”, „Action items”), cele care nu au deja task. Cu `assignee_id` și `due_date` le dă tuturor același responsabil și termen. Cere și drept pe Taskuri.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "version"
                ],
                "properties": {
                  "version": {
                    "type": "number",
                    "description": "versiunea notiței citită"
                  },
                  "assignee_id": {
                    "type": "string"
                  },
                  "due_date": {
                    "type": "string",
                    "description": "AAAA-LL-ZZ"
                  },
                  "board_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/notes/{id}/export": {
      "post": {
        "tags": [
          "Notițe"
        ],
        "summary": "Notițe: export",
        "description": "Exportă notița: `format` md (Markdown, implicit), html (cu imaginile încorporate) sau pdf (cere Gotenberg configurat; vine în `content_base64`). Răspunsul are `filename`, `content_type` și `content` (text) sau `content_base64`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "format": {
                    "type": "string",
                    "description": "md, html sau pdf"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/notes/{id}/remind": {
      "post": {
        "tags": [
          "Notițe"
        ],
        "summary": "Notițe: remind",
        "description": "Pune sau scoate mementoul omului pe notiță (`at`: dată ISO în viitor; `null` îl scoate). Mementoul e personal, deci există doar pentru un om din aplicația mobilă; o cheie API nu are utilizator.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "at"
                ],
                "properties": {
                  "at": {
                    "type": "string",
                    "description": "data și ora ISO 8601, sau null ca să scoți mementoul"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/notes/{id}": {
      "get": {
        "tags": [
          "Notițe"
        ],
        "summary": "Notițe: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/notes"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Notițe"
        ],
        "summary": "Notițe: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/notes_input"
              },
              "example": {
                "title": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Notițe"
        ],
        "summary": "Notițe: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/note_tags": {
      "get": {
        "tags": [
          "Notițe"
        ],
        "summary": "Etichete de notițe: listare",
        "description": "Etichetele comune ale companiei (nume, culoare). Cele personale nu se expun. Se creează doar etichete comune. O etichetă se pune pe o notiță prin `tag_ids`.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/note_tags"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "c3a3d189-0000-4000-8000-c3a3d1890000",
                      "name": "Exemplu",
                      "color": "#791cf0",
                      "scope": "exemplu",
                      "owner_id": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Notițe"
        ],
        "summary": "Etichete de notițe: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/note_tags_input"
              },
              "example": {
                "name": "Clienți",
                "color": "teal"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/note_tags"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/note_tags/{id}": {
      "get": {
        "tags": [
          "Notițe"
        ],
        "summary": "Etichete de notițe: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/note_tags"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Notițe"
        ],
        "summary": "Etichete de notițe: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/note_tags_input"
              },
              "example": {
                "color": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Notițe"
        ],
        "summary": "Etichete de notițe: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/note_comments": {
      "get": {
        "tags": [
          "Notițe"
        ],
        "summary": "Comentarii la notițe: listare",
        "description": "Comentariile de pe notițele vizibile pentru toată compania (autor, text, colegii pomeniți). Comentariile notițelor private sau partajate nu se expun. POST adaugă un comentariu (autor: cheia API), PATCH și DELETE doar pe cele scrise de aceeași cheie. Cei pomeniți în `mentions` (id-uri de utilizatori, cu `@Nume` în text) primesc notificare.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/note_comments"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "e20168ce-0000-4000-8000-e20168ce0000",
                      "note_id": "56119ea1-0000-4000-8000-56119ea10000",
                      "author_id": "exemplu",
                      "body": "Text liber",
                      "mentions": [],
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "edited_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Notițe"
        ],
        "summary": "Comentarii la notițe: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/note_comments_input"
              },
              "example": {
                "note_id": "00000000-0000-0000-0000-000000000000",
                "body": "Am actualizat pașii."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/note_comments"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/note_comments/{id}": {
      "get": {
        "tags": [
          "Notițe"
        ],
        "summary": "Comentarii la notițe: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/note_comments"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Notițe"
        ],
        "summary": "Comentarii la notițe: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/note_comments_input"
              },
              "example": {
                "mentions": [
                  "optiune"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Notițe"
        ],
        "summary": "Comentarii la notițe: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/note_links": {
      "get": {
        "tags": [
          "Notițe"
        ],
        "summary": "Legături ale notițelor: listare",
        "description": "Înregistrările de care sunt legate notițele companiei (client, factură, ofertă, proiect, task...): `entity_type` și `entity_id`. Doar citire; legăturile se scriu prin câmpul `links` al notiței.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/note_links"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "note_id": "56119ea1-0000-4000-8000-56119ea10000",
                      "entity_type": "standard",
                      "entity_id": "81ddf6d0-0000-4000-8000-81ddf6d00000",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/note_versions": {
      "get": {
        "tags": [
          "Notițe"
        ],
        "summary": "Versiuni de notițe: listare",
        "description": "Istoricul notițelor companiei: starea de dinainte de fiecare modificare de titlu sau text (cel mult 50 pe notiță). Doar citire; restaurarea se face din aplicație.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/note_versions"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "8db2b2c7-0000-4000-8000-8db2b2c70000",
                      "note_id": "56119ea1-0000-4000-8000-56119ea10000",
                      "version": 1,
                      "title": "Exemplu",
                      "body": "Text liber",
                      "saved_by": "exemplu",
                      "saved_at": "2026-01-31T09:30:00+00:00",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/note_versions/{id}": {
      "get": {
        "tags": [
          "Notițe"
        ],
        "summary": "Versiuni de notițe: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/note_versions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/note_templates": {
      "get": {
        "tags": [
          "Notițe"
        ],
        "summary": "Șabloane de notițe: listare",
        "description": "Șabloanele companiei pentru notițe (notă de ședință, preluare client, vizită, checklist de predare): nume, tip (`note` sau `meeting`), culoare, titlu implicit și text. Se creează, se modifică și se șterg cu drept de administrare pe Notițe.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/note_templates"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "f3a6de35-0000-4000-8000-f3a6de350000",
                      "name": "Exemplu",
                      "description": "Text liber",
                      "kind": "standard",
                      "color": "#791cf0",
                      "title": "Exemplu",
                      "body": "Text liber",
                      "position": 1,
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Notițe"
        ],
        "summary": "Șabloane de notițe: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/note_templates_input"
              },
              "example": {
                "name": "Notă de ședință",
                "kind": "meeting",
                "body": "<h2>De făcut</h2><ul data-type=\"taskList\"><li data-type=\"taskItem\" data-checked=\"false\"><p></p></li></ul>"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/note_templates"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/note_templates/{id}": {
      "get": {
        "tags": [
          "Notițe"
        ],
        "summary": "Șabloane de notițe: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/note_templates"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Notițe"
        ],
        "summary": "Șabloane de notițe: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/note_templates_input"
              },
              "example": {
                "description": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Notițe"
        ],
        "summary": "Șabloane de notițe: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stamp_programs": {
      "get": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Carduri cu ștampile: listare",
        "description": "Cardurile oferite clienților: câte ștampile cere un premiu, limitele pe adăugare și pe zi, termenele. Un card cu clienți nu se șterge, se oprește (`is_active`).",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/stamp_programs"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "7a7efd96-0000-4000-8000-7a7efd960000",
                      "name": "Exemplu",
                      "description": "Text liber",
                      "unit": "exemplu",
                      "stamps_required": 1,
                      "reward_text": "exemplu",
                      "stamp_idle_days": 2,
                      "reward_valid_days": 2,
                      "max_per_action": 1,
                      "max_per_day": 1,
                      "is_active": true,
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "location_ids": [],
                      "referral_referrer_stamps": 1,
                      "referral_friend_stamps": 1,
                      "referral_monthly_limit": 1,
                      "referral_referrer_points": 1,
                      "referral_friend_points": 1
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Carduri cu ștampile: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/stamp_programs_input"
              },
              "example": {
                "name": "Cafeaua casei",
                "reward_text": "O cafea gratis",
                "stamps_required": 9
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/stamp_programs"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stamp_programs/{id}": {
      "get": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Carduri cu ștampile: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/stamp_programs"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Carduri cu ștampile: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/stamp_programs_input"
              },
              "example": {
                "description": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Carduri cu ștampile: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stamp_cards": {
      "get": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Carduri de fidelitate ale clienților: listare",
        "description": "Cardul unui client pe un program, cu numele și contactul de la înscriere. Soldul e suma mișcărilor din stamp_entries. Linkul secret se ia cu acțiunea link. Acțiuni: stamp, link, new_link. Filtrează cu filter[program_id] sau filter[party_id].",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/stamp_cards"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "33c65088-0000-4000-8000-33c650880000",
                      "program_id": "143277fd-0000-4000-8000-143277fd0000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "holder_name": "Exemplu",
                      "phone": "+40 700 000 000",
                      "email": "nume@exemplu.ro",
                      "contact_verified_at": "2026-01-31T09:30:00+00:00",
                      "status": "active",
                      "source": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "referral_code": "EX-001",
                      "name": "Exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Carduri de fidelitate ale clienților: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/stamp_cards_input"
              },
              "example": {
                "program_id": "<id program>",
                "name": "Ana",
                "phone": "0722123456"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/stamp_cards"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stamp_cards/{id}/stamp": {
      "post": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Carduri de fidelitate ale clienților: stamp",
        "description": "Pune ștampile pe card. Aceeași `key` trimisă din nou nu adaugă a doua oară. Întoarce `added` și câte premii s-au completat (`rewards`).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "qty": {
                    "type": "number",
                    "description": "câte ștampile, implicit 1"
                  },
                  "key": {
                    "type": "string",
                    "description": "cheie unică a operației"
                  },
                  "location_id": {
                    "type": "string",
                    "description": "locația; obligatorie pe un card limitat la locații"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stamp_cards/{id}/link": {
      "post": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Carduri de fidelitate ale clienților: link",
        "description": "Întoarce linkul secret al cardului, de trimis clientului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stamp_cards/{id}/referral_link": {
      "post": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Carduri de fidelitate ale clienților: referral_link",
        "description": "Întoarce linkul de recomandare al clientului; `url` e gol când programul nu are „adu un prieten”.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stamp_cards/{id}/new_link": {
      "post": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Carduri de fidelitate ale clienților: new_link",
        "description": "Schimbă linkul cardului: cel vechi nu mai merge.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stamp_cards/{id}": {
      "get": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Carduri de fidelitate ale clienților: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/stamp_cards"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Carduri de fidelitate ale clienților: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/stamp_cards_input"
              },
              "example": {
                "party_id": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stamp_entries": {
      "get": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Mișcări de ștampile: listare",
        "description": "Fiecare mișcare de pe un card: ștampile puse (`stamp`), premiu completat (`reward`), anulare (`undo`), expirare (`expired`), cu cine a făcut-o. Acțiunea undo anulează o adăugare. Filtrează cu filter[card_id].",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/stamp_entries"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "71e2e37b-0000-4000-8000-71e2e37b0000",
                      "card_id": "f82c96c3-0000-4000-8000-f82c96c30000",
                      "qty": 2,
                      "reason": "exemplu",
                      "undoes_id": "81282bc1-0000-4000-8000-81282bc10000",
                      "idempotency_key": "exemplu",
                      "actor_id": "exemplu",
                      "actor_name": "Exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Mișcări de ștampile: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/stamp_entries_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/stamp_entries"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stamp_entries/{id}/undo": {
      "post": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Mișcări de ștampile: undo",
        "description": "Anulează o adăugare de ștampile. Fără drept de administrare, doar propriile adăugări, în fereastra setată.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stamp_entries/{id}": {
      "get": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Mișcări de ștampile: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/stamp_entries"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stamp_rewards": {
      "get": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Premii de fidelitate: listare",
        "description": "Premiile completate: când, până când sunt valabile, când și de cine au fost folosite sau dacă au fost anulate. Acțiunea redeem. Filtrează cu filter[card_id].",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/stamp_rewards"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "66dcd867-0000-4000-8000-66dcd8670000",
                      "card_id": "f82c96c3-0000-4000-8000-f82c96c30000",
                      "entry_id": "9114450f-0000-4000-8000-9114450f0000",
                      "reward_text": "exemplu",
                      "stamps_used": 1,
                      "earned_at": "2026-01-31T09:30:00+00:00",
                      "expires_at": "2026-01-31T09:30:00+00:00",
                      "redeemed_at": "2026-01-31T09:30:00+00:00",
                      "redeemed_by_name": "Exemplu",
                      "cancelled_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "redeemed_location_id": "c2f99d68-0000-4000-8000-c2f99d680000"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Premii de fidelitate: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/stamp_rewards_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/stamp_rewards"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stamp_rewards/{id}/redeem": {
      "post": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Premii de fidelitate: redeem",
        "description": "Marchează premiul ca folosit, o singură dată.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "location_id": {
                    "type": "string",
                    "description": "locația; obligatorie pe un card limitat la locații"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stamp_rewards/{id}": {
      "get": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Premii de fidelitate: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/stamp_rewards"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stamp_referrals": {
      "get": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Recomandări de fidelitate: listare",
        "description": "Prietenii aduși: cine a recomandat, cardul nou și starea (`pending` așteaptă prima ștampilă, `rewarded` premiat, `limit` peste limita lunară, `cancelled`). Filtrează cu filter[referrer_card_id] sau filter[friend_card_id].",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/stamp_referrals"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "04952915-0000-4000-8000-049529150000",
                      "referrer_card_id": "03350291-0000-4000-8000-033502910000",
                      "friend_card_id": "1fac77d0-0000-4000-8000-1fac77d00000",
                      "status": "active",
                      "trigger_entry_id": "312518b6-0000-4000-8000-312518b60000",
                      "referrer_entry_id": "e7195301-0000-4000-8000-e71953010000",
                      "friend_entry_id": "599085a2-0000-4000-8000-599085a20000",
                      "rewarded_at": "2026-01-31T09:30:00+00:00",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "referrer_points_entry_id": "b5f0aecb-0000-4000-8000-b5f0aecb0000",
                      "friend_points_entry_id": "2efa750a-0000-4000-8000-2efa750a0000"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stamp_referrals/{id}": {
      "get": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Recomandări de fidelitate: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/stamp_referrals"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/loyalty_challenges": {
      "get": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Provocări: listare",
        "description": "Provocările cu premiu în puncte: ce se numără, ținta, termenul și punctele.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/loyalty_challenges"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "75944db8-0000-4000-8000-75944db80000",
                      "name": "Exemplu",
                      "metric": "exemplu",
                      "goal": 100.5,
                      "days": 2,
                      "reward_points": 1,
                      "active": true,
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/loyalty_challenges/{id}": {
      "get": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Provocări: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/loyalty_challenges"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/loyalty_challenge_awards": {
      "get": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Premii de provocări: listare",
        "description": "Premiile date de provocări, pe cont de puncte.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/loyalty_challenge_awards"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "1be73dd6-0000-4000-8000-1be73dd60000",
                      "challenge_id": "8c47a3fe-0000-4000-8000-8c47a3fe0000",
                      "account_id": "e25effb4-0000-4000-8000-e25effb40000",
                      "entry_id": "9114450f-0000-4000-8000-9114450f0000",
                      "awarded_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/loyalty_challenge_awards/{id}": {
      "get": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Premii de provocări: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/loyalty_challenge_awards"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/points_accounts": {
      "get": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Conturi de puncte: listare",
        "description": "Clienții înscriși la puncte; un client are un singur cont. Soldul e suma mișcărilor din points_entries. Un client se înscrie cu comanda loyalty.join_points.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/points_accounts"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "4633d34d-0000-4000-8000-4633d34d0000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "source": "exemplu",
                      "joined_by_name": "Exemplu",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Conturi de puncte: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/points_accounts_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/points_accounts"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/points_accounts/{id}/adjust": {
      "post": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Conturi de puncte: adjust",
        "description": "Corecție de puncte (cu minus pentru scădere), mereu cu motiv.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "points",
                  "reason"
                ],
                "properties": {
                  "points": {
                    "type": "number"
                  },
                  "reason": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/points_accounts/{id}": {
      "get": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Conturi de puncte: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/points_accounts"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/points_entries": {
      "get": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Mișcări de puncte: listare",
        "description": "Câștig (`earn`), recomandare (`referral`), folosire (`redeem`), anulare (`reverse`), expirare (`expire`) și corecție (`adjust`). `money` e suma încasată sau reducerea dată; `source` spune de unde vine: factură, notă de plată, tejghea. Filtrează cu filter[account_id].",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/points_entries"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "99c4732d-0000-4000-8000-99c4732d0000",
                      "account_id": "e25effb4-0000-4000-8000-e25effb40000",
                      "kind": "standard",
                      "points": 1,
                      "money": 100.5,
                      "currency": "RON",
                      "source": "exemplu",
                      "payment_id": "72639d3b-0000-4000-8000-72639d3b0000",
                      "document_id": "540ecc58-0000-4000-8000-540ecc580000",
                      "expires_on": "2026-01-31",
                      "reverses_id": "90974fe2-0000-4000-8000-90974fe20000",
                      "idempotency_key": "exemplu",
                      "reason": "exemplu",
                      "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                      "actor_name": "Exemplu",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "seq": 1
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/points_entries/{id}": {
      "get": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Mișcări de puncte: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/points_entries"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gift_card_orders": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Cumpărări de carduri cadou: listare",
        "description": "Cardurile cadou cumpărate online: suma, cumpărătorul, starea plății și cardul emis după ea.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/gift_card_orders"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "45d66a1c-0000-4000-8000-45d66a1c0000",
                      "channel_id": "9f2b151e-0000-4000-8000-9f2b151e0000",
                      "amount": 100.5,
                      "currency": "RON",
                      "buyer_email": "nume@exemplu.ro",
                      "buyer_name": "Exemplu",
                      "recipient_name": "Exemplu",
                      "recipient_email": "nume@exemplu.ro",
                      "message": "Text liber",
                      "status": "active",
                      "provider": "exemplu",
                      "external_id": "exemplu",
                      "payment_mode": "exemplu",
                      "payment_account_id": "exemplu",
                      "card_id": "f82c96c3-0000-4000-8000-f82c96c30000",
                      "invoice_id": "8435a6b4-0000-4000-8000-8435a6b40000",
                      "emailed_to": "nume@exemplu.ro",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "paid_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gift_card_orders/{id}": {
      "get": {
        "tags": [
          "Magazin online"
        ],
        "summary": "Cumpărări de carduri cadou: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/gift_card_orders"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gift_cards": {
      "get": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Carduri cadou (toată firma): listare",
        "description": "Cardurile cadou ale companiei, vândute la casă sau din magazin: firma, valoarea, termenul și starea (`active`, `cancelled`, `expired`). Soldul e suma mișcărilor din gift_card_entries. Codul nu apare la citire: îl dau comanda loyalty.sell_gift_card și acțiunea show_code. Acțiuni: show_code, document, send, set_text, new_code, cancel, extend.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/gift_cards"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "5500114d-0000-4000-8000-5500114d0000",
                      "legal_entity_id": "5cadfa0a-0000-4000-8000-5cadfa0a0000",
                      "code_last4": "exemplu",
                      "currency": "RON",
                      "initial_value": 100.5,
                      "status": "active",
                      "expires_on": "2026-01-31",
                      "buyer_party_id": "63f7f5e7-0000-4000-8000-63f7f5e70000",
                      "recipient_name": "Exemplu",
                      "note": "Text liber",
                      "sale_method": "exemplu",
                      "sale_reference": "exemplu",
                      "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                      "idempotency_key": "exemplu",
                      "sold_by_name": "Exemplu",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "gift_message": "exemplu",
                      "access_log": {}
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Carduri cadou (toată firma): creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/gift_cards_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/gift_cards"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gift_cards/{id}/show_code": {
      "post": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Carduri cadou (toată firma): show_code",
        "description": "Codul unui card activ. Deschiderea se notează pe card (access_log).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gift_cards/{id}/document": {
      "post": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Carduri cadou (toată firma): document",
        "description": "PDF-ul cardului, în base64. `recipient_name` și `message`, dacă vin, rămân pe card.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "recipient_name": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gift_cards/{id}/send": {
      "post": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Carduri cadou (toată firma): send",
        "description": "Trimite cardul pe email, cu PDF-ul atașat, prin SMTP-ul companiei.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "description": "adresa"
                  },
                  "recipient_name": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gift_cards/{id}/set_text": {
      "post": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Carduri cadou (toată firma): set_text",
        "description": "Schimbă numele și mesajul de pe card.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "recipient_name": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gift_cards/{id}/new_code": {
      "post": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Carduri cadou (toată firma): new_code",
        "description": "Cod nou, pentru când codul a ajuns la altcineva: cel vechi nu mai merge.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gift_cards/{id}/cancel": {
      "post": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Carduri cadou (toată firma): cancel",
        "description": "Închide cardul: soldul rămas iese, cu motiv și cu felul restituirii.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "refund_method",
                  "reason"
                ],
                "properties": {
                  "refund_method": {
                    "type": "string",
                    "description": "none, cash, card sau transfer"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "cashbook_book_id": {
                    "type": "string",
                    "description": "doar dacă restituirea trece în registrul de casă"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gift_cards/{id}/extend": {
      "post": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Carduri cadou (toată firma): extend",
        "description": "Schimbă termenul unui card activ.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expires_on"
                ],
                "properties": {
                  "expires_on": {
                    "type": "string",
                    "description": "AAAA-LL-ZZ sau none"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gift_cards/{id}": {
      "get": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Carduri cadou (toată firma): citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/gift_cards"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gift_card_entries": {
      "get": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Mișcări de carduri cadou: listare",
        "description": "Vânzare (`sale`), folosire (`redeem`), anularea unei folosiri (`reverse`), închidere (`cancel`) și expirare (`expire`). `payment_source` spune de unde vine folosirea: factură, notă de plată sau `manual`. Filtrează cu filter[card_id].",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/gift_card_entries"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "b6c88d7f-0000-4000-8000-b6c88d7f0000",
                      "card_id": "f82c96c3-0000-4000-8000-f82c96c30000",
                      "kind": "standard",
                      "amount": 100.5,
                      "payment_id": "72639d3b-0000-4000-8000-72639d3b0000",
                      "payment_source": "exemplu",
                      "location_id": "56c73f7e-0000-4000-8000-56c73f7e0000",
                      "idempotency_key": "exemplu",
                      "document_id": "540ecc58-0000-4000-8000-540ecc580000",
                      "reverses_id": "90974fe2-0000-4000-8000-90974fe20000",
                      "refund_method": "exemplu",
                      "reason": "exemplu",
                      "actor_name": "Exemplu",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/gift_card_entries/{id}": {
      "get": {
        "tags": [
          "Fidelizare"
        ],
        "summary": "Mișcări de carduri cadou: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/gift_card_entries"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/subscription_plans": {
      "get": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Planuri de abonament: listare",
        "description": "Planurile: preț pe perioadă cu TVA inclus, perioadă (`interval_unit`, `interval_count`), zile de probă, taxă de pornire și angajament minim. `sell_online` îl pune la vânzare în contul de client de pe site. `all_courses` sau `course_ids` dau acces la cursuri cât abonamentul e în vigoare. Un plan cu abonamente nu se șterge, se oprește (`is_active`).",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/subscription_plans"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "c38aae99-0000-4000-8000-c38aae990000",
                      "name": "Exemplu",
                      "description": "Text liber",
                      "price": 100.5,
                      "currency": "RON",
                      "vat_rate": 19,
                      "interval_unit": "exemplu",
                      "interval_count": 2,
                      "trial_days": 2,
                      "setup_fee": 100.5,
                      "min_cycles": 1,
                      "is_active": true,
                      "version": 1,
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "services_discount_pct": 19,
                      "sell_online": true,
                      "all_courses": true,
                      "course_ids": []
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Planuri de abonament: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/subscription_plans_input"
              },
              "example": {
                "name": "Mentenanță lunară",
                "price": 150,
                "interval_unit": "month",
                "interval_count": 1
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/subscription_plans"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/subscription_plans/{id}": {
      "get": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Planuri de abonament: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/subscription_plans"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Planuri de abonament: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/subscription_plans_input"
              },
              "example": {
                "description": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Planuri de abonament: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/subscription_plan_prices": {
      "get": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Prețuri de abonat: listare",
        "description": "Ce plătește un abonat pentru un serviciu, pe plan: `kind` e `free`, `percent` sau `price`, iar `limit_qty` spune de câte ori pe perioada abonamentului (gol = nelimitat). Reducerea la restul serviciilor e `services_discount_pct` pe plan. Se aplică în casierie și la facturare, mereu prețul mai mic pentru client. Filtrează cu filter[plan_id].",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/subscription_plan_prices"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "a43392e3-0000-4000-8000-a43392e30000",
                      "plan_id": "b9b7e40a-0000-4000-8000-b9b7e40a0000",
                      "service_id": "ab73162c-0000-4000-8000-ab73162c0000",
                      "kind": "standard",
                      "value": 100.5,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "limit_qty": 2
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Prețuri de abonat: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/subscription_plan_prices_input"
              },
              "example": {
                "plan_id": "<id plan>",
                "service_id": "<id serviciu>",
                "kind": "percent",
                "value": 20
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/subscription_plan_prices"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/subscription_plan_prices/{id}": {
      "get": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Prețuri de abonat: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/subscription_plan_prices"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Prețuri de abonat: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/subscription_plan_prices_input"
              },
              "example": {
                "value": 42
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Prețuri de abonat: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions": {
      "get": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Abonamente: listare",
        "description": "Abonamentele clienților, cu prețul copiat din plan și starea (`pending` = cumpărat de pe site și neplătit, `trialing`, `active`, `past_due`, `suspended`, `paused`, `cancelled`). Acțiuni: pause, resume, cancel, keep, change_plan, run. Nu se șterg, se anulează.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/subscriptions"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "15f49159-0000-4000-8000-15f491590000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "plan_id": "b9b7e40a-0000-4000-8000-b9b7e40a0000",
                      "plan_name": "Exemplu",
                      "price": 100.5,
                      "currency": "RON",
                      "vat_rate": 19,
                      "interval_unit": "exemplu",
                      "interval_count": 2,
                      "setup_fee": 100.5,
                      "min_cycles": 1,
                      "status": "active",
                      "payment_mode": "exemplu",
                      "starts_on": "2026-01-31",
                      "trial_ends_on": "2026-01-31",
                      "anchor_day": 1,
                      "next_period_start": "2026-01-31",
                      "cancel_at_period_end": true,
                      "cancelled_at": "2026-01-31T09:30:00+00:00",
                      "cancel_reason": "exemplu",
                      "paused_at": "2026-01-31T09:30:00+00:00",
                      "note": "Text liber",
                      "version": 1,
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "card_brand": "exemplu",
                      "card_last4": "exemplu",
                      "card_exp_month": 1,
                      "card_exp_year": 2,
                      "card_saved_at": "2026-01-31T09:30:00+00:00",
                      "next_plan_id": "b2b3662c-0000-4000-8000-b2b3662c0000",
                      "next_price": 100.5,
                      "trial_days": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Abonamente: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/subscriptions_input"
              },
              "example": {
                "party_id": "<id client>",
                "plan_id": "<id plan>"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/subscriptions"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{id}/pause": {
      "post": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Abonamente: pause",
        "description": "Pune abonamentul pe pauză: nu mai apar perioade noi.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{id}/resume": {
      "post": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Abonamente: resume",
        "description": "Repornește un abonament pus pe pauză; timpul din pauză nu se facturează.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{id}/cancel": {
      "post": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Abonamente: cancel",
        "description": "Anulează acum sau la sfârșitul perioadei. Perioadele neplătite rămân de încasat.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "at_period_end": {
                    "type": "boolean",
                    "description": "la sfârșitul perioadei plătite"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "force": {
                    "type": "boolean",
                    "description": "trece peste angajamentul minim"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{id}/change_plan": {
      "post": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Abonamente: change_plan",
        "description": "Trece pe alt plan de la perioada următoare, fără prorată; fără `plan_id` renunță la schimbarea programată.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "plan_id": {
                    "type": "string",
                    "description": "planul nou"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{id}/keep": {
      "post": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Abonamente: keep",
        "description": "Renunță la oprirea programată.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{id}/run": {
      "post": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Abonamente: run",
        "description": "Aduce abonamentul la zi acum: bani veniți, stare, perioade noi, debitări și facturile lor.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{id}/card_link": {
      "post": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Abonamente: card_link",
        "description": "Întoarce linkul clientului pentru salvarea sau schimbarea cardului și plata a ce e scadent.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{id}/remove_card": {
      "post": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Abonamente: remove_card",
        "description": "Uită cardul salvat și trece abonamentul pe plată manuală.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{id}": {
      "get": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Abonamente: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/subscriptions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Abonamente: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/subscriptions_input"
              },
              "example": {
                "price": 42
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/subscription_cycles": {
      "get": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Perioade de abonament: listare",
        "description": "Fiecare perioadă de plată: interval, scadență, sumă, stare (`due`, `paid`, `skipped`) și factura. Filtrează cu filter[subscription_id]. Acțiuni: invoice, record_payment, skip, unskip.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/subscription_cycles"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "d27d36c0-0000-4000-8000-d27d36c00000",
                      "subscription_id": "d76ab896-0000-4000-8000-d76ab8960000",
                      "period_start": "2026-01-31",
                      "period_end": "2026-01-31",
                      "due_date": "2026-01-31",
                      "amount": 100.5,
                      "setup_amount": 100.5,
                      "currency": "RON",
                      "status": "active",
                      "invoice_id": "8435a6b4-0000-4000-8000-8435a6b40000",
                      "invoice_claimed_at": "2026-01-31T09:30:00+00:00",
                      "invoice_error": "exemplu",
                      "paid_at": "2026-01-31T09:30:00+00:00",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "charge_state": "exemplu",
                      "charge_attempts": 1,
                      "next_attempt_on": "2026-01-31",
                      "charge_claimed_at": "2026-01-31T09:30:00+00:00",
                      "charge_ref": "exemplu",
                      "charge_error": "exemplu",
                      "charged_at": "2026-01-31T09:30:00+00:00",
                      "charged_mode": "exemplu",
                      "charged_account": "exemplu",
                      "checkout_ref": "exemplu",
                      "checkout_url": "https://exemplu.ro",
                      "checkout_until": "2026-01-31T09:30:00+00:00",
                      "refunded_at": "2026-01-31T09:30:00+00:00",
                      "refund_ref": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Perioade de abonament: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/subscription_cycles_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/subscription_cycles"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/subscription_cycles/{id}/charge": {
      "post": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Perioade de abonament: charge",
        "description": "Debitează acum perioada de pe cardul salvat. Întoarce rezultatul: paid, failed, action_required, processing sau unknown.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/subscription_cycles/{id}/refund": {
      "post": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Perioade de abonament: refund",
        "description": "Rambursează integral o perioadă plătită cu cardul. Factura se stornează separat.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/subscription_cycles/{id}/invoice": {
      "post": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Perioade de abonament: invoice",
        "description": "Creează factura perioadei (o singură dată).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/subscription_cycles/{id}/record_payment": {
      "post": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Perioade de abonament: record_payment",
        "description": "Înregistrează încasarea. Cu factură, trebuie să fie emisă; fără sumă, se încasează restul.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "method"
                ],
                "properties": {
                  "method": {
                    "type": "string",
                    "description": "transfer, cash, card sau other"
                  },
                  "amount": {
                    "type": "number"
                  },
                  "reference": {
                    "type": "string"
                  },
                  "paid_at": {
                    "type": "string",
                    "description": "YYYY-MM-DD"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/subscription_cycles/{id}/skip": {
      "post": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Perioade de abonament: skip",
        "description": "Sare perioada: nu se mai încasează. Doar fără factură.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/subscription_cycles/{id}/unskip": {
      "post": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Perioade de abonament: unskip",
        "description": "Readuce de plată o perioadă sărită.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/subscription_cycles/{id}": {
      "get": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Perioade de abonament: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/subscription_cycles"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/subscription_events": {
      "get": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Istoric de abonament: listare",
        "description": "Ce s-a întâmplat cu un abonament (pornit, facturat, plătit, suspendat, anulat) și cine a făcut-o. Filtrează cu filter[subscription_id].",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/subscription_events"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "316c1674-0000-4000-8000-316c16740000",
                      "subscription_id": "d76ab896-0000-4000-8000-d76ab8960000",
                      "kind": "standard",
                      "data": {},
                      "actor_name": "Exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/subscription_events/{id}": {
      "get": {
        "tags": [
          "Abonamente"
        ],
        "summary": "Istoric de abonament: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/subscription_events"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/courses": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Cursuri: listare",
        "description": "Cursurile online: titlu, adresă scurtă, descriere, preț, stare (`draft`, `published`, `archived`) și durata accesului. Acțiuni: publish, unpublish, archive. Un curs cu cursanți nu se șterge, se arhivează.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/courses"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "a6c53a97-0000-4000-8000-a6c53a970000",
                      "title": "Exemplu",
                      "slug": "exemplu",
                      "summary": "exemplu",
                      "description": "Text liber",
                      "image_url": "https://exemplu.ro",
                      "price": 100.5,
                      "currency": "RON",
                      "status": "active",
                      "access_days": 2,
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "certificate_enabled": true,
                      "certificate_template": "exemplu",
                      "certificate_color": "#791cf0",
                      "certificate_signer": "exemplu",
                      "instructor_employee_id": "6d2f8071-0000-4000-8000-6d2f80710000",
                      "instructor_name": "Exemplu",
                      "instructor_title": "exemplu",
                      "instructor_bio": "exemplu",
                      "instructor_photo_url": "https://exemplu.ro",
                      "qa_enabled": true,
                      "reviews_enabled": true
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Cursuri: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/courses_input"
              },
              "example": {
                "title": "Curs de bază",
                "price": 250,
                "access_days": 365
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/courses"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/courses/{id}/publish": {
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Cursuri: publish",
        "description": "Publică cursul (cere cel puțin o lecție și video-urile gata).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/courses/{id}/unpublish": {
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Cursuri: unpublish",
        "description": "Retrage cursul în ciornă.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/courses/{id}/archive": {
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Cursuri: archive",
        "description": "Arhivează cursul: cursanții cu acces îl păstrează.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/courses/{id}/issue_certificates": {
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Cursuri: issue_certificates",
        "description": "Emite diplomele pentru cursanții care au terminat deja.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/courses/{id}/duplicate": {
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Cursuri: duplicate",
        "description": "Copiază cursul cu capitolele și lecțiile, în ciornă și fără cursanți.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/courses/{id}/reorder": {
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Cursuri: reorder",
        "description": "Ordinea capitolelor și a lecțiilor (se pot muta și între capitole). Trebuie trimise toate, exact o dată.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "sections"
                ],
                "properties": {
                  "sections": {
                    "type": "array",
                    "items": {},
                    "description": "[{ \"id\": capitol, \"lessons\": [id lecție] }], în ordinea dorită"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/courses/{id}": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Cursuri: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/courses"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Cursuri: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/courses_input"
              },
              "example": {
                "slug": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Cursuri: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_sections": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Capitole de curs: listare",
        "description": "Capitolele unui curs, în ordine. Filtrează cu filter[course_id]. Acțiunea move le reordonează.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/course_sections"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "46aa1b3d-0000-4000-8000-46aa1b3d0000",
                      "course_id": "0560ef98-0000-4000-8000-0560ef980000",
                      "title": "Exemplu",
                      "position": 1,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Capitole de curs: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/course_sections_input"
              },
              "example": {
                "course_id": "<id curs>",
                "title": "Introducere"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_sections"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_sections/{id}/move": {
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Capitole de curs: move",
        "description": "Mută cu o poziție în sus sau în jos.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "direction"
                ],
                "properties": {
                  "direction": {
                    "type": "string",
                    "description": "up sau down"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_sections/{id}": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Capitole de curs: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_sections"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Capitole de curs: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/course_sections_input"
              },
              "example": {
                "course_id": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Capitole de curs: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_lessons": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Lecții: listare",
        "description": "Lecțiile: capitol, titlu, text ca HTML curățat, video și previzualizare gratuită. Filtrează cu filter[course_id].",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/course_lessons"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "3405636a-0000-4000-8000-3405636a0000",
                      "course_id": "0560ef98-0000-4000-8000-0560ef980000",
                      "section_id": "2c222ffc-0000-4000-8000-2c222ffc0000",
                      "title": "Exemplu",
                      "body": "Text liber",
                      "video_id": "527fd066-0000-4000-8000-527fd0660000",
                      "is_preview": true,
                      "position": 1,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Lecții: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/course_lessons_input"
              },
              "example": {
                "section_id": "<id capitol>",
                "title": "Prima lecție",
                "is_preview": true
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_lessons"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_lessons/{id}/move": {
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Lecții: move",
        "description": "Mută cu o poziție în sus sau în jos.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "direction"
                ],
                "properties": {
                  "direction": {
                    "type": "string",
                    "description": "up sau down"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_lessons/{id}/duplicate": {
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Lecții: duplicate",
        "description": "Copiază lecția, imediat după original.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_lessons/{id}": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Lecții: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_lessons"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Lecții: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/course_lessons_input"
              },
              "example": {
                "body": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Lecții: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_lesson_files": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Atașamente la lecții: listare",
        "description": "Documentele din Galerie legate de lecții (`media_id`). Filtrează cu filter[lesson_id]. POST leagă un document, DELETE îl scoate din lecție (rămâne în Galerie).",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/course_lesson_files"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "caf787fb-0000-4000-8000-caf787fb0000",
                      "lesson_id": "c4b1315b-0000-4000-8000-c4b1315b0000",
                      "media_id": "d82e505d-0000-4000-8000-d82e505d0000",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Atașamente la lecții: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/course_lesson_files_input"
              },
              "example": {
                "lesson_id": "<id lecție>",
                "media_id": "<id document din Galerie>"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_lesson_files"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_lesson_files/{id}": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Atașamente la lecții: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_lesson_files"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Atașamente la lecții: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_quizzes": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Quiz-uri: listare",
        "description": "Setările quiz-ului unei lecții (notă de trecere, încercări, timp). Se salvează cu comanda courses.save_quiz.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/course_quizzes"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "b381e272-0000-4000-8000-b381e2720000",
                      "lesson_id": "c4b1315b-0000-4000-8000-c4b1315b0000",
                      "pass_percent": 1,
                      "max_attempts": 1,
                      "time_limit_minutes": 30,
                      "pick_count": 2,
                      "show_answers": true,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_quizzes/{id}": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Quiz-uri: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_quizzes"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_quiz_questions": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Întrebări de quiz: listare",
        "description": "Întrebările, cu variantele și răspunsurile corecte. Se salvează cu comanda courses.save_quiz. Fără webhooks.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/course_quiz_questions"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "22788328-0000-4000-8000-227883280000",
                      "lesson_id": "c4b1315b-0000-4000-8000-c4b1315b0000",
                      "kind": "standard",
                      "prompt": "exemplu",
                      "options": {},
                      "explanation": "exemplu",
                      "points": 1,
                      "position": 1,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_quiz_questions/{id}": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Întrebări de quiz: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_quiz_questions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_quiz_attempts": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Încercări la quiz: listare",
        "description": "Răspunsurile și nota cursanților. Acțiunea review dă puncte la răspunsurile scurte.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/course_quiz_attempts"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "0fd58dd5-0000-4000-8000-0fd58dd50000",
                      "enrollment_id": "6749838f-0000-4000-8000-6749838f0000",
                      "lesson_id": "c4b1315b-0000-4000-8000-c4b1315b0000",
                      "question_ids": {},
                      "answers": {},
                      "points": {},
                      "percent": 1,
                      "passed": true,
                      "started_at": "2026-01-31T09:30:00+00:00",
                      "submitted_at": "2026-01-31T09:30:00+00:00",
                      "reviewed_by": "exemplu",
                      "reviewed_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Încercări la quiz: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/course_quiz_attempts_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_quiz_attempts"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_quiz_attempts/{id}/review": {
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Încercări la quiz: review",
        "description": "Puncte pentru răspunsurile scurte; apoi încercarea primește notă.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "points"
                ],
                "properties": {
                  "points": {
                    "type": "object",
                    "description": "{ \"<id întrebare>\": puncte }"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_quiz_attempts/{id}": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Încercări la quiz: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_quiz_attempts"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_certificates": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Diplome: listare",
        "description": "Diplomele emise, cu codul de verificare. Se emit singure la finalizare; acțiuni: revoke, restore.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/course_certificates"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "95456b6f-0000-4000-8000-95456b6f0000",
                      "enrollment_id": "6749838f-0000-4000-8000-6749838f0000",
                      "course_id": "0560ef98-0000-4000-8000-0560ef980000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "code": "EX-001",
                      "holder_name": "Exemplu",
                      "course_title": "exemplu",
                      "issued_at": "2026-01-31T09:30:00+00:00",
                      "revoked_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "design": {},
                      "issuer_name": "Exemplu",
                      "pdf_sha256": "exemplu",
                      "sealed": true,
                      "ticket_id": "a9c4b307-0000-4000-8000-a9c4b3070000",
                      "event_id": "1e72c9e7-0000-4000-8000-1e72c9e70000",
                      "emailed_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Diplome: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/course_certificates_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_certificates"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_certificates/{id}/revoke": {
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Diplome: revoke",
        "description": "Anulează diploma: pagina de verificare o arată ca anulată.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_certificates/{id}/restore": {
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Diplome: restore",
        "description": "Redă o diplomă anulată.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_certificates/{id}": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Diplome: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_certificates"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_assignments": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Teme: listare",
        "description": "Cerința și regulile temei unei lecții (punctaj, termen, fișiere). Se salvează cu comanda courses.save_assignment.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/course_assignments"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "328e63ff-0000-4000-8000-328e63ff0000",
                      "lesson_id": "c4b1315b-0000-4000-8000-c4b1315b0000",
                      "instructions": "exemplu",
                      "max_points": 1,
                      "pass_points": 1,
                      "due_days": 2,
                      "allow_late": true,
                      "max_files": 1,
                      "max_file_mb": 1,
                      "required": true,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_assignments/{id}": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Teme: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_assignments"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_submissions": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Teme predate: listare",
        "description": "Ce au predat cursanții: text, stare (`submitted`, `returned`, `graded`), punctaj și comentariu. Acțiuni: grade, return.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/course_submissions"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "d41cc0fe-0000-4000-8000-d41cc0fe0000",
                      "enrollment_id": "6749838f-0000-4000-8000-6749838f0000",
                      "lesson_id": "c4b1315b-0000-4000-8000-c4b1315b0000",
                      "body": "Text liber",
                      "status": "active",
                      "late": true,
                      "points": 1,
                      "passed": true,
                      "feedback": "exemplu",
                      "graded_by": "exemplu",
                      "graded_at": "2026-01-31T09:30:00+00:00",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Teme predate: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/course_submissions_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_submissions"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_submissions/{id}/grade": {
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Teme predate: grade",
        "description": "Notează ultima predare a cursantului; peste punctajul de trecere, tema e trecută.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "points"
                ],
                "properties": {
                  "points": {
                    "type": "number",
                    "description": "punctajul"
                  },
                  "feedback": {
                    "type": "string",
                    "description": "comentariul pentru cursant"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_submissions/{id}/return": {
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Teme predate: return",
        "description": "Întoarce tema spre refacere.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "feedback"
                ],
                "properties": {
                  "feedback": {
                    "type": "string",
                    "description": "ce are de refăcut"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_submissions/{id}": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Teme predate: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_submissions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_submission_files": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Fișiere predate: listare",
        "description": "Fișierele temelor. Filtrează cu filter[submission_id]; acțiunea link dă o adresă de descărcare. Fără webhooks.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/course_submission_files"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "507f86e7-0000-4000-8000-507f86e70000",
                      "submission_id": "d0106647-0000-4000-8000-d01066470000",
                      "name": "Exemplu",
                      "file_type": "standard",
                      "size_bytes": 1,
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Fișiere predate: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/course_submission_files_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_submission_files"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_submission_files/{id}/link": {
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Fișiere predate: link",
        "description": "Un link de descărcare valabil 5 minute pentru fișierul predat.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_submission_files/{id}": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Fișiere predate: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_submission_files"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_questions": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Întrebări la lecții: listare",
        "description": "Întrebările cursanților. Acțiuni: resolve, reopen. DELETE o șterge cu răspunsuri.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/course_questions"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "5ca47fd8-0000-4000-8000-5ca47fd80000",
                      "course_id": "0560ef98-0000-4000-8000-0560ef980000",
                      "lesson_id": "c4b1315b-0000-4000-8000-c4b1315b0000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "author_name": "Exemplu",
                      "body": "Text liber",
                      "resolved_at": "2026-01-31T09:30:00+00:00",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Întrebări la lecții: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/course_questions_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_questions"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_questions/{id}/resolve": {
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Întrebări la lecții: resolve",
        "description": "Marchează întrebarea rezolvată.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_questions/{id}/reopen": {
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Întrebări la lecții: reopen",
        "description": "Redeschide întrebarea.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_questions/{id}": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Întrebări la lecții: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_questions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Întrebări la lecții: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_question_replies": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Răspunsuri la întrebări: listare",
        "description": "Răspunsurile de la companie și de la cursanți. POST adaugă răspunsul companiei (cursantul primește email).",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/course_question_replies"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "0b987d1c-0000-4000-8000-0b987d1c0000",
                      "question_id": "6f5569ad-0000-4000-8000-6f5569ad0000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "staff_user_id": "exemplu",
                      "from_staff": true,
                      "author_name": "Exemplu",
                      "body": "Text liber",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Răspunsuri la întrebări: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/course_question_replies_input"
              },
              "example": {
                "question_id": "<id întrebare>",
                "body": "Da, merge și așa."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_question_replies"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_question_replies/{id}": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Răspunsuri la întrebări: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_question_replies"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Răspunsuri la întrebări: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_reviews": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Recenzii de curs: listare",
        "description": "Stele (1-5) și text, cu stare (`pending`, `approved`, `rejected`). Pe site apar doar cele aprobate. Acțiuni: approve, reject.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/course_reviews"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "03d19d8a-0000-4000-8000-03d19d8a0000",
                      "course_id": "0560ef98-0000-4000-8000-0560ef980000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "author_name": "Exemplu",
                      "rating": 1,
                      "body": "Text liber",
                      "status": "active",
                      "moderated_by": "exemplu",
                      "moderated_at": "2026-01-31T09:30:00+00:00",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Recenzii de curs: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/course_reviews_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_reviews"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_reviews/{id}/approve": {
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Recenzii de curs: approve",
        "description": "Aprobă recenzia: apare pe pagina cursului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_reviews/{id}/reject": {
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Recenzii de curs: reject",
        "description": "Respinge recenzia.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_reviews/{id}": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Recenzii de curs: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_reviews"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Recenzii de curs: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_announcements": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Anunțuri de curs: listare",
        "description": "Anunțurile către cursanții unui curs; cu `email` pleacă și pe email.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/course_announcements"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "8fd79239-0000-4000-8000-8fd792390000",
                      "course_id": "0560ef98-0000-4000-8000-0560ef980000",
                      "title": "Exemplu",
                      "body": "Text liber",
                      "author_name": "Exemplu",
                      "emailed_count": 2,
                      "emailed_at": "2026-01-31T09:30:00+00:00",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "email": "nume@exemplu.ro"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Anunțuri de curs: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/course_announcements_input"
              },
              "example": {
                "course_id": "<id curs>",
                "title": "Lecție nouă",
                "body": "<p>Am adăugat o lecție.</p>"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_announcements"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_announcements/{id}": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Anunțuri de curs: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_announcements"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Anunțuri de curs: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/course_announcements_input"
              },
              "example": {
                "body": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Anunțuri de curs: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_orders": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Comenzi de cursuri: listare",
        "description": "Cursurile cumpărate: preț, reducere, stare (`pending`, `paid`, `cancelled`, `refunded`), factura și ce are de verificat un om (`issue`). Se creează din contul clientului. Acțiuni: refund, invoice, check.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/course_orders"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "99e5f3e6-0000-4000-8000-99e5f3e60000",
                      "course_id": "0560ef98-0000-4000-8000-0560ef980000",
                      "course_title": "exemplu",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "buyer_name": "Exemplu",
                      "email": "nume@exemplu.ro",
                      "list_price": 100.5,
                      "discount": 100.5,
                      "total": 100.5,
                      "currency": "RON",
                      "coupon_id": "01c2f7ad-0000-4000-8000-01c2f7ad0000",
                      "coupon_code": "EX-001",
                      "status": "active",
                      "provider": "exemplu",
                      "account_id": "exemplu",
                      "mode": "exemplu",
                      "external_id": "exemplu",
                      "checkout_url": "https://exemplu.ro",
                      "issue": "exemplu",
                      "enrollment_id": "6749838f-0000-4000-8000-6749838f0000",
                      "invoice_id": "8435a6b4-0000-4000-8000-8435a6b40000",
                      "invoice_error": "exemplu",
                      "invoice_claimed_at": "2026-01-31T09:30:00+00:00",
                      "paid_at": "2026-01-31T09:30:00+00:00",
                      "refunded_at": "2026-01-31T09:30:00+00:00",
                      "refund_note": "Text liber",
                      "refunded_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Comenzi de cursuri: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/course_orders_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_orders"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_orders/{id}/refund": {
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Comenzi de cursuri: refund",
        "description": "Marchează comanda rambursată și retrage accesul. Banii se returnează din panoul procesatorului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "note": {
                    "type": "string",
                    "description": "motivul"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_orders/{id}/invoice": {
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Comenzi de cursuri: invoice",
        "description": "Creează factura comenzii plătite, dacă nu există.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_orders/{id}/check": {
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Comenzi de cursuri: check",
        "description": "Verifică la procesator o comandă în așteptare.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_orders/{id}": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Comenzi de cursuri: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_orders"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_coupons": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Cupoane de curs: listare",
        "description": "Codurile de reducere: procent sau sumă, valabilitate, număr de folosiri, eventual doar la un curs.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/course_coupons"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "992c6758-0000-4000-8000-992c67580000",
                      "code": "EX-001",
                      "kind": "standard",
                      "value": 100.5,
                      "currency": "RON",
                      "course_id": "0560ef98-0000-4000-8000-0560ef980000",
                      "starts_at": "2026-01-31T09:30:00+00:00",
                      "ends_at": "2026-01-31T09:30:00+00:00",
                      "max_uses": 1,
                      "is_active": true,
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Cupoane de curs: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/course_coupons_input"
              },
              "example": {
                "code": "PRIMA10",
                "kind": "percent",
                "value": 10
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_coupons"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_coupons/{id}": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Cupoane de curs: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_coupons"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Cupoane de curs: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/course_coupons_input"
              },
              "example": {
                "kind": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Cupoane de curs: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_videos": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Video-uri de curs: listare",
        "description": "Video-urile încărcate: stare (`uploading`, `processing`, `ready`, `failed`), progres, durată și dimensiuni. Încărcarea: comanda courses.start_video_upload, apoi acțiunea complete_upload. Fără webhooks.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/course_videos"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "00b02293-0000-4000-8000-00b022930000",
                      "name": "Exemplu",
                      "size_bytes": 1,
                      "status": "active",
                      "progress": 1,
                      "error": "exemplu",
                      "job_id": "2d777fa4-0000-4000-8000-2d777fa40000",
                      "duration_seconds": 100.5,
                      "width": 1,
                      "height": 1,
                      "output_bytes": 1,
                      "files": {},
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Video-uri de curs: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/course_videos_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_videos"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_videos/{id}/complete_upload": {
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Video-uri de curs: complete_upload",
        "description": "Încheie încărcarea în bucăți și pornește conversia.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_videos/{id}/retry": {
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Video-uri de curs: retry",
        "description": "Reia o conversie eșuată.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_videos/{id}": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Video-uri de curs: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_videos"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Video-uri de curs: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_enrollments": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Înscrieri la cursuri: listare",
        "description": "Cine are acces la ce curs, de când și până când (`source`: manual sau purchase). POST dă acces; acțiuni: revoke, restore.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/course_enrollments"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "24074cb6-0000-4000-8000-24074cb60000",
                      "course_id": "0560ef98-0000-4000-8000-0560ef980000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "source": "exemplu",
                      "status": "active",
                      "starts_at": "2026-01-31T09:30:00+00:00",
                      "ends_at": "2026-01-31T09:30:00+00:00",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "completed_notified_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Înscrieri la cursuri: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/course_enrollments_input"
              },
              "example": {
                "course_id": "<id curs>",
                "party_id": "<id client>"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_enrollments"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_enrollments/{id}/revoke": {
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Înscrieri la cursuri: revoke",
        "description": "Retrage accesul; progresul rămâne.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_enrollments/{id}/restore": {
      "post": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Înscrieri la cursuri: restore",
        "description": "Redă accesul retras.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_enrollments/{id}": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Înscrieri la cursuri: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_enrollments"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Înscrieri la cursuri: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/course_enrollments_input"
              },
              "example": {
                "ends_at": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Înscrieri la cursuri: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_progress": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Progres la cursuri: listare",
        "description": "Unde a rămas fiecare cursant și ce lecții a terminat. Doar citire, fără webhooks (se scrie în timpul redării).",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/course_progress"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "67cac2de-0000-4000-8000-67cac2de0000",
                      "enrollment_id": "6749838f-0000-4000-8000-6749838f0000",
                      "lesson_id": "c4b1315b-0000-4000-8000-c4b1315b0000",
                      "position_seconds": 1,
                      "completed_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/course_progress/{id}": {
      "get": {
        "tags": [
          "Cursuri"
        ],
        "summary": "Progres la cursuri: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/course_progress"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_events": {
      "get": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Evenimente: listare",
        "description": "Evenimentele cu bilete: titlu, loc, dată, capacitate, stare (`draft`, `published`, `cancelled`). Acțiuni: publish, unpublish, cancel. Participanții se adaugă prin comenzi.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ticketed_events"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "9d068402-0000-4000-8000-9d0684020000",
                      "title": "Exemplu",
                      "summary": "exemplu",
                      "description": "Text liber",
                      "image_url": "https://exemplu.ro",
                      "venue_name": "Exemplu",
                      "venue_address": "Strada Exemplu 1",
                      "online_url": "https://exemplu.ro",
                      "starts_at": "2026-01-31T09:30:00+00:00",
                      "ends_at": "2026-01-31T09:30:00+00:00",
                      "timezone": "exemplu",
                      "currency": "RON",
                      "status": "active",
                      "capacity": 1,
                      "cancellation_policy": "exemplu",
                      "cancelled_at": "2026-01-31T09:30:00+00:00",
                      "version": 1,
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "public_code": "EX-001",
                      "photos": [],
                      "questions": {},
                      "waitlist_enabled": true,
                      "survey_key": "exemplu",
                      "certificate_template": "exemplu",
                      "certificate_color": "#791cf0",
                      "certificate_signer": "exemplu",
                      "starts_local": "exemplu",
                      "ends_local": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Evenimente: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ticketed_events_input"
              },
              "example": {
                "title": "Workshop",
                "starts_local": "2026-12-01T10:00",
                "ends_local": "2026-12-01T18:00"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ticketed_events"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_events/{id}/scan": {
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Evenimente: scan",
        "description": "Scanează un cod de bilet la intrare; întoarce rezultatul și contorul.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "code": {
                    "type": "string",
                    "description": "codul din QR"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_events/{id}/create_scan_link": {
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Evenimente: create_scan_link",
        "description": "Creează un link temporar de scanare pentru voluntari. Tokenul se întoarce o singură dată.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "label": {
                    "type": "string",
                    "description": "pentru cine e"
                  },
                  "hours": {
                    "type": "number",
                    "description": "câte ore ține, 1-72"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_events/{id}/publish": {
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Evenimente: publish",
        "description": "Publică evenimentul (cere cel puțin o categorie activă).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_events/{id}/unpublish": {
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Evenimente: unpublish",
        "description": "Retrage evenimentul în ciornă (doar fără bilete date).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_events/{id}/cancel": {
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Evenimente: cancel",
        "description": "Anulează evenimentul. Biletele și comenzile rămân, dar nu se mai adaugă participanți.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_events/{id}/notify_cancelled": {
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Evenimente: notify_cancelled",
        "description": "Trimite emailuri de anulare în lot (max. 25).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_events/{id}/after": {
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Evenimente: after",
        "description": "După eveniment: starea chestionarului și diplomele emise.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_events/{id}/after_settings": {
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Evenimente: after_settings",
        "description": "Alege chestionarul și aspectul diplomei de participare.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "survey_key": {
                    "type": "string",
                    "description": "cheia chestionarului din Recenzii"
                  },
                  "certificate_template": {
                    "type": "string",
                    "description": "classic, modern sau minimal"
                  },
                  "certificate_color": {
                    "type": "string",
                    "description": "culoare #rrggbb"
                  },
                  "certificate_signer": {
                    "type": "string",
                    "description": "cine semnează diploma"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_events/{id}/send_survey": {
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Evenimente: send_survey",
        "description": "Trimite chestionarul celor intrați, în lot (max. 25), după încheierea evenimentului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_events/{id}/issue_certificates": {
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Evenimente: issue_certificates",
        "description": "Emite diplomele de participare celor intrați care nu au una.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_events/{id}/send_certificates": {
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Evenimente: send_certificates",
        "description": "Trimite diplomele pe email, în lot (max. 25).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_events/{id}/certificate_pdf": {
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Evenimente: certificate_pdf",
        "description": "Diploma de participare ca PDF.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "certificate_id": {
                    "type": "string",
                    "description": "id-ul diplomei"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_events/{id}/revoke_certificate": {
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Evenimente: revoke_certificate",
        "description": "Anulează o diplomă de participare.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "certificate_id": {
                    "type": "string",
                    "description": "id-ul diplomei"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_events/{id}/restore_certificate": {
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Evenimente: restore_certificate",
        "description": "Repune o diplomă de participare anulată.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "certificate_id": {
                    "type": "string",
                    "description": "id-ul diplomei"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_events/{id}": {
      "get": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Evenimente: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ticketed_events"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Evenimente: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ticketed_events_input"
              },
              "example": {
                "summary": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Evenimente: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_types": {
      "get": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Categorii de bilete: listare",
        "description": "Categoriile unui eveniment: preț, TVA, locuri, ordine. Filtrează cu filter[event_id].",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ticketed_types"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "3794eadc-0000-4000-8000-3794eadc0000",
                      "event_id": "1e72c9e7-0000-4000-8000-1e72c9e70000",
                      "name": "Exemplu",
                      "description": "Text liber",
                      "price": 100.5,
                      "vat_rate": 19,
                      "seats": 1,
                      "position": 1,
                      "is_active": true,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "sale_from": "2026-01-31T09:30:00+00:00",
                      "sale_to": "2026-01-31T09:30:00+00:00",
                      "min_per_order": 1,
                      "max_per_order": 1,
                      "hidden": true,
                      "access_code": "EX-001"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Categorii de bilete: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ticketed_types_input"
              },
              "example": {
                "event_id": "<id eveniment>",
                "name": "Standard",
                "price": 120
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ticketed_types"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_types/{id}": {
      "get": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Categorii de bilete: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ticketed_types"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Categorii de bilete: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ticketed_types_input"
              },
              "example": {
                "description": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Categorii de bilete: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_orders": {
      "get": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Comenzi de bilete: listare",
        "description": "Cumpărătorul și biletele dintr-o singură comandă. POST creează participanți (manual sau API). Acțiuni: mark_paid, cancel, pdf.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ticketed_orders"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "83d01eb6-0000-4000-8000-83d01eb60000",
                      "event_id": "1e72c9e7-0000-4000-8000-1e72c9e70000",
                      "party_id": "54c2ae1b-0000-4000-8000-54c2ae1b0000",
                      "buyer_name": "Exemplu",
                      "email": "nume@exemplu.ro",
                      "phone": "+40 700 000 000",
                      "total": 100.5,
                      "currency": "RON",
                      "status": "active",
                      "reserved_until": "2026-01-31T09:30:00+00:00",
                      "source": "exemplu",
                      "note": "Text liber",
                      "paid_at": "2026-01-31T09:30:00+00:00",
                      "cancelled_at": "2026-01-31T09:30:00+00:00",
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "answers": {},
                      "language": "exemplu",
                      "confirmation_sent_at": "2026-01-31T09:30:00+00:00",
                      "cancel_notified_at": "2026-01-31T09:30:00+00:00",
                      "discount": 100.5,
                      "coupon_id": "01c2f7ad-0000-4000-8000-01c2f7ad0000",
                      "coupon_code": "EX-001",
                      "provider": "exemplu",
                      "account_id": "exemplu",
                      "mode": "exemplu",
                      "external_id": "exemplu",
                      "checkout_url": "https://exemplu.ro",
                      "expired_at": "2026-01-31T09:30:00+00:00",
                      "issue": "exemplu",
                      "invoice_id": "8435a6b4-0000-4000-8000-8435a6b40000",
                      "invoice_error": "exemplu",
                      "invoice_claimed_at": "2026-01-31T09:30:00+00:00",
                      "refunded_at": "2026-01-31T09:30:00+00:00",
                      "refund_note": "Text liber",
                      "refunded_by": "exemplu",
                      "link_template": "exemplu",
                      "tickets": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Comenzi de bilete: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ticketed_orders_input"
              },
              "example": {
                "event_id": "<id eveniment>",
                "buyer_name": "Ion Pop",
                "tickets": [
                  {
                    "type_id": "<id categorie>",
                    "quantity": 1
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ticketed_orders"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_orders/{id}/refund": {
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Comenzi de bilete: refund",
        "description": "Marchează comanda rambursată și anulează biletele nefolosite. Banii se returnează din panoul procesatorului.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "note": {
                    "type": "string",
                    "description": "motivul"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_orders/{id}/invoice": {
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Comenzi de bilete: invoice",
        "description": "Creează factura comenzii plătite, dacă nu există.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_orders/{id}/check": {
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Comenzi de bilete: check",
        "description": "Verifică la procesator o plată neconfirmată.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_orders/{id}/mark_paid": {
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Comenzi de bilete: mark_paid",
        "description": "Marchează o comandă în așteptare ca plătită.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_orders/{id}/send_confirmation": {
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Comenzi de bilete: send_confirmation",
        "description": "Retrimite emailul de confirmare cu biletele PDF.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_orders/{id}/cancel": {
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Comenzi de bilete: cancel",
        "description": "Anulează comanda și biletele ei (refuză dacă un bilet a fost folosit).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_orders/{id}/pdf": {
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Comenzi de bilete: pdf",
        "description": "PDF cu biletele comenzii (doar bilete valide).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_orders/{id}": {
      "get": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Comenzi de bilete: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ticketed_orders"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_coupons": {
      "get": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Cupoane la evenimente: listare",
        "description": "Codurile de reducere pentru bilete: procent sau sumă, valabilitate, număr de folosiri, eventual doar la un eveniment.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ticketed_coupons"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "ec879688-0000-4000-8000-ec8796880000",
                      "code": "EX-001",
                      "kind": "standard",
                      "value": 100.5,
                      "currency": "RON",
                      "event_id": "1e72c9e7-0000-4000-8000-1e72c9e70000",
                      "starts_at": "2026-01-31T09:30:00+00:00",
                      "ends_at": "2026-01-31T09:30:00+00:00",
                      "max_uses": 1,
                      "is_active": true,
                      "created_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Cupoane la evenimente: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ticketed_coupons_input"
              },
              "example": {
                "code": "EARLY10",
                "kind": "percent",
                "value": 10
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ticketed_coupons"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_coupons/{id}": {
      "get": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Cupoane la evenimente: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ticketed_coupons"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Cupoane la evenimente: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ticketed_coupons_input"
              },
              "example": {
                "kind": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Cupoane la evenimente: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_scans": {
      "get": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Scanări la intrare: listare",
        "description": "Jurnalul scanărilor, și al celor respinse (`ok`, `already`, `cancelled`, `unpaid`, `unknown`, `other_event`, `event_cancelled`, `undone`). Filtrează cu filter[event_id].",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ticketed_scans"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "2ad0c89f-0000-4000-8000-2ad0c89f0000",
                      "event_id": "1e72c9e7-0000-4000-8000-1e72c9e70000",
                      "ticket_id": "a9c4b307-0000-4000-8000-a9c4b3070000",
                      "result": "exemplu",
                      "method": "exemplu",
                      "scanned_by": "exemplu",
                      "created_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_scans/{id}": {
      "get": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Scanări la intrare: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ticketed_scans"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_tickets": {
      "get": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Bilete: listare",
        "description": "Fiecare bilet: participant, număr, preț, stare (`valid`, `used`, `cancelled`). Acțiuni: cancel, reissue, pdf.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ticketed_tickets"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "44bd466e-0000-4000-8000-44bd466e0000",
                      "order_id": "577108b3-0000-4000-8000-577108b30000",
                      "event_id": "1e72c9e7-0000-4000-8000-1e72c9e70000",
                      "type_id": "a44f1a59-0000-4000-8000-a44f1a590000",
                      "number": 1,
                      "attendee_name": "Exemplu",
                      "attendee_email": "nume@exemplu.ro",
                      "price": 100.5,
                      "status": "active",
                      "code_version": 1,
                      "checked_in_at": "2026-01-31T09:30:00+00:00",
                      "checked_in_by": "exemplu",
                      "cancelled_at": "2026-01-31T09:30:00+00:00",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Bilete: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ticketed_tickets_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ticketed_tickets"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_tickets/{id}/check_in": {
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Bilete: check_in",
        "description": "Marchează intrarea fără cod (telefon descărcat).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_tickets/{id}/undo_entry": {
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Bilete: undo_entry",
        "description": "Anulează o intrare făcută din greșeală.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_tickets/{id}/cancel": {
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Bilete: cancel",
        "description": "Anulează biletul și recalculează totalul comenzii.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_tickets/{id}/reissue": {
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Bilete: reissue",
        "description": "Transfer: cod nou și, opțional, participant nou.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "attendee_name": {
                    "type": "string"
                  },
                  "attendee_email": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_tickets/{id}/pdf": {
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Bilete: pdf",
        "description": "PDF pentru un bilet.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_tickets/{id}": {
      "get": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Bilete: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ticketed_tickets"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Bilete: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ticketed_tickets_input"
              },
              "example": {
                "attendee_name": "Exemplu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_waitlist": {
      "get": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Listă de așteptare: listare",
        "description": "Cereri de loc la evenimente cu vânzare epuizată. Acțiuni: invite, remove.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ticketed_waitlist"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "ef78fa88-0000-4000-8000-ef78fa880000",
                      "event_id": "1e72c9e7-0000-4000-8000-1e72c9e70000",
                      "type_id": "a44f1a59-0000-4000-8000-a44f1a590000",
                      "name": "Exemplu",
                      "email": "nume@exemplu.ro",
                      "phone": "+40 700 000 000",
                      "quantity": 1,
                      "language": "exemplu",
                      "status": "active",
                      "invited_at": "2026-01-31T09:30:00+00:00",
                      "invite_expires_at": "2026-01-31T09:30:00+00:00",
                      "order_id": "577108b3-0000-4000-8000-577108b30000",
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "link_template": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Listă de așteptare: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ticketed_waitlist_input"
              },
              "example": null
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ticketed_waitlist"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_waitlist/{id}/invite": {
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Listă de așteptare: invite",
        "description": "Invită de pe lista de așteptare (rezervă locuri pe durata invitației).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_waitlist/{id}/remove": {
      "post": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Listă de așteptare: remove",
        "description": "Scoate intrarea de pe lista de așteptare.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ticketed_waitlist/{id}": {
      "get": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Listă de așteptare: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ticketed_waitlist"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Evenimente"
        ],
        "summary": "Listă de așteptare: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/users": {
      "get": {
        "tags": [
          "access"
        ],
        "summary": "Utilizatori: listare",
        "description": "Conturile companiei. Un admin de platformă nu se creează și nu se modifică prin API. Datele complete: GET /team.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Câmpuri separate prin virgulă; prefix „-” pentru descrescător.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Căutare text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Doar aceste câmpuri, separate prin virgulă.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[câmp]",
            "in": "query",
            "description": "Filtru pe un câmp; operatori: filter[câmp][gte], [lte], [gt], [lt], [ne], [in], [like], [null].",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/users"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "fe0a1407-0000-4000-8000-fe0a14070000",
                      "payload_user_id": "exemplu",
                      "roles": [],
                      "location_scopes": [],
                      "preferences": {},
                      "employee_id": "6c5769e5-0000-4000-8000-6c5769e50000",
                      "is_active": true,
                      "created_at": "2026-01-31T09:30:00+00:00",
                      "updated_at": "2026-01-31T09:30:00+00:00",
                      "email": "nume@exemplu.ro",
                      "password": "exemplu",
                      "first_name": "Exemplu",
                      "last_name": "Exemplu",
                      "phone": "+40 700 000 000",
                      "role": "exemplu"
                    }
                  ],
                  "meta": {
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "access"
        ],
        "summary": "Utilizatori: creare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/users_input"
              },
              "example": {
                "email": "nume@exemplu.ro",
                "roles": [
                  "optiune"
                ],
                "password": "Exemplu",
                "first_name": "Exemplu",
                "last_name": "Exemplu",
                "phone": "+40 700 000 000"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/users"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/users/{id}": {
      "get": {
        "tags": [
          "access"
        ],
        "summary": "Utilizatori: citire",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/users"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "access"
        ],
        "summary": "Utilizatori: modificare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/users_input"
              },
              "example": {
                "roles": [
                  "optiune"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "access"
        ],
        "summary": "Utilizatori: ștergere",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Șters"
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Setările unice la care are acces cheia",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/billing.cashbook": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Registru de casă: auto_cash = numerarul intră singur în registru",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Registru de casă: auto_cash = numerarul intră singur în registru",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/loyalty.points": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Puncte de fidelitate: regulile de acordare și folosire",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Puncte de fidelitate: regulile de acordare și folosire",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/loyalty.giftcards": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Carduri cadou: cine vinde (confirmed_entity_ids), valabilitatea și textul pentru cumpărător",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Carduri cadou: cine vinde (confirmed_entity_ids), valabilitatea și textul pentru cumpărător",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/loyalty.settings": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Fidelizare: ce se cere la înscriere, verificarea contactului, fereastra de anulare",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Fidelizare: ce se cere la înscriere, verificarea contactului, fereastra de anulare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/subscriptions.settings": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Abonamente: factura, termen de plată, suspendare",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Abonamente: factura, termen de plată, suspendare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/courses.sales": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Cursuri: vânzare (cont de plată, firmă, factură, TVA, emailuri)",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Cursuri: vânzare (cont de plată, firmă, factură, TVA, emailuri)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/events.sales": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Evenimente: vânzarea biletelor (cont de plată, firmă, factură, TVA)",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Evenimente: vânzarea biletelor (cont de plată, firmă, factură, TVA)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/booking.config": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Rezervări online: preaviz, orizont, pas, mesaje",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Rezervări online: preaviz, orizont, pas, mesaje",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/booking.mode": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Rezervări online: meniu simplificat și formular generat",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Rezervări online: meniu simplificat și formular generat",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/booking.flow": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Rezervări online: ordinea pașilor și formularele",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Rezervări online: ordinea pașilor și formularele",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/booking.form": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Rezervări online: câmpuri și consimțăminte",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Rezervări online: câmpuri și consimțăminte",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/booking.texts": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Rezervări online: textele schimbate față de cele implicite",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Rezervări online: textele schimbate față de cele implicite",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/booking.design": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Rezervări online: aspectul paginii",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Rezervări online: aspectul paginii",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/booking.prices": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Rezervări online: monede și echivalente de preț",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Rezervări online: monede și echivalente de preț",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/booking.emails": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Rezervări online: textele emailurilor către client",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Rezervări online: textele emailurilor către client",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/company.profile": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Datele companiei",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Datele companiei",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/company.preferences": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Limbă și monedă implicite",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Limbă și monedă implicite",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/feedback.config": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Recenzii: trimitere automată, praguri, notificări",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Recenzii: trimitere automată, praguri, notificări",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/messaging.limits": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Mesaje: limite și cuvinte de răspuns",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Mesaje: limite și cuvinte de răspuns",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/messaging.queue": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Mesaje: ritmul trimiterilor în grup",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Mesaje: ritmul trimiterilor în grup",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/messaging.automations": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Mesaje: regulile mesajelor automate",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Mesaje: regulile mesajelor automate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/careers.design": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Cariere: aspectul paginii",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Cariere: aspectul paginii",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/careers.emails": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Cariere: emailurile către candidați",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Cariere: emailurile către candidați",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/careers.form": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Cariere: formularul de aplicare",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Cariere: formularul de aplicare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/careers.page": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Cariere: pagina publică",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Cariere: pagina publică",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/careers.pipeline": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Cariere: etapele candidaților",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Cariere: etapele candidaților",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/careers.rules": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Cariere: regulile automate",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Cariere: regulile automate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/careers.settings": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Cariere: setări generale",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Cariere: setări generale",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/careers.texts": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Cariere: textele schimbate",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Cariere: textele schimbate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/careers.i18n": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Cariere: limbi și traduceri",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Cariere: limbi și traduceri",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/careers.prices": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Cariere: monede și echivalente de salariu",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Cariere: monede și echivalente de salariu",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/feedback.channels": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Recenzii: canalele de trimitere",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Recenzii: canalele de trimitere",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/feedback.design": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Recenzii: aspectul paginii",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Recenzii: aspectul paginii",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/feedback.emails": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Recenzii: emailurile",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Recenzii: emailurile",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/feedback.form": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Recenzii: formularul",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Recenzii: formularul",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/feedback.i18n": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Recenzii: limbi și traduceri",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Recenzii: limbi și traduceri",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/feedback.replies": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Recenzii: răspunsurile și inbox-ul",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Recenzii: răspunsurile și inbox-ul",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/feedback.rules": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Recenzii: regulile",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Recenzii: regulile",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/feedback.texts": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Recenzii: textele schimbate",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Recenzii: textele schimbate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/feedback.triggers": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Recenzii: declanșatoarele",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Recenzii: declanșatoarele",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/feedback.wall": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Recenzii: peretele public",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Recenzii: peretele public",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/inventory.config": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Stoc: stoc negativ, consum automat, expirare",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Stoc: stoc negativ, consum automat, expirare",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/inventory.accounts": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Gestiune contabilă: conturile notelor de stoc (supplier, gain și expense pe tipul de stoc: goods, raw_materials, consumables, inventory_items, finished_goods, semi_finished, packaging). Un cont gol revine la cel standard.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Gestiune contabilă: conturile notelor de stoc (supplier, gain și expense pe tipul de stoc: goods, raw_materials, consumables, inventory_items, finished_goods, semi_finished, packaging). Un cont gol revine la cel standard.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/inventory.accounting": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Gestiune contabilă: data de început, metoda de evaluare (cmp sau fifo) și seriile documentelor de stoc",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Gestiune contabilă: data de început, metoda de evaluare (cmp sau fifo) și seriile documentelor de stoc",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/procurement.config": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Achiziții: praguri de aprobare și alerte de preț",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Achiziții: praguri de aprobare și alerte de preț",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/costing.config": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Costuri: contribuții, timp productiv, cota de cabinet",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Costuri: contribuții, timp productiv, cota de cabinet",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/scheduling.travel": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Programări: timpul de deplasare între locații",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Programări: timpul de deplasare între locații",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/invoices.design": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Facturi: șablon, culoare, logo, texte",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Facturi: șablon, culoare, logo, texte",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/company.menu": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Meniul din stânga: grupuri, ordine, elemente scoase în față sau ascunse (se salvează doar diferențele față de meniul implicit; `{ \"v\": 1, \"groups\": [{ \"id\", \"label\", \"items\": [\"m:<modul>\", \"p:<adresă>\"] }], \"hidden\": [] }`)",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Meniul din stânga: grupuri, ordine, elemente scoase în față sau ascunse (se salvează doar diferențele față de meniul implicit; `{ \"v\": 1, \"groups\": [{ \"id\", \"label\", \"items\": [\"m:<modul>\", \"p:<adresă>\"] }], \"hidden\": [] }`)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/documents.esign": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Semnare electronică: verificarea semnatarului (none, email, sms, code; pe email doar cu SMTP configurat), reamintiri automate, adresa serviciului de ștampilă de timp. Certificatul de sigiliu nu se expune.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Semnare electronică: verificarea semnatarului (none, email, sms, code; pe email doar cu SMTP configurat), reamintiri automate, adresa serviciului de ștampilă de timp. Certificatul de sigiliu nu se expune.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/company.signature": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Semnătura pentru rapoarte și documente",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Semnătura pentru rapoarte și documente",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/agreements.page": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Pagina acordului pe tabletă",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Pagina acordului pe tabletă",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/chat.settings": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Chat: cât se păstrează mesajele și AI-ul pe canalele noi",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Chat: cât se păstrează mesajele și AI-ul pe canalele noi",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/tasks.overview": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Taskuri: după câte zile un task e „uitat” sau „blocat la verificare” în overview",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Taskuri: după câte zile un task e „uitat” sau „blocat la verificare” în overview",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/support.config": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Support: SLA, pre-chat, widget, portal, SMTP, orar",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Support: SLA, pre-chat, widget, portal, SMTP, orar",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/stays.page": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Cazare: pagina publică de rezervări",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Cazare: pagina publică de rezervări",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/stays.payments": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Cazare: metodele de plată oferite oaspeților",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Cazare: metodele de plată oferite oaspeților",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings/stays.dynamic": {
      "get": {
        "tags": [
          "Setări"
        ],
        "summary": "Cazare: prețul dinamic",
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Setări"
        ],
        "summary": "Cazare: prețul dinamic",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/me": {
      "get": {
        "tags": [
          "API"
        ],
        "summary": "Cheia curentă, permisiunile și resursele disponibile",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "tags": [
          "API"
        ],
        "summary": "Verifică funcționarea API-ului",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/messages": {
      "get": {
        "tags": [
          "Mesaje"
        ],
        "summary": "Jurnalul de mesaje",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "party_id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "tags": [
          "Mesaje"
        ],
        "summary": "Trimite sau programează un mesaj",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "party_id",
                  "channel",
                  "body"
                ],
                "properties": {
                  "party_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "channel": {
                    "type": "string",
                    "enum": [
                      "sms",
                      "email"
                    ]
                  },
                  "body": {
                    "type": "string"
                  },
                  "subject": {
                    "type": "string"
                  },
                  "template_key": {
                    "type": "string"
                  },
                  "appointment_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "send_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/messages/list": {
      "post": {
        "tags": [
          "Mesaje"
        ],
        "summary": "Trimite unei liste prin coadă, cel mult 5000 de clienți",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "list_id",
                  "template_key"
                ],
                "properties": {
                  "list_id": {
                    "type": "string"
                  },
                  "template_key": {
                    "type": "string"
                  },
                  "channel": {
                    "type": "string",
                    "enum": [
                      "sms_first",
                      "sms",
                      "email"
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/messages/{id}": {
      "delete": {
        "tags": [
          "Mesaje"
        ],
        "summary": "Anulează un mesaj programat",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/team": {
      "get": {
        "tags": [
          "Conturi"
        ],
        "summary": "Conturile companiei (scope access:read)",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/commands": {
      "get": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Comenzile la care are acces cheia",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/commands/messaging.segment_count": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Câți clienți intră într-un segment și câți sunt excluși, pe motive. Nu salvează nimic.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "rules"
                ],
                "properties": {
                  "match": {
                    "type": "string",
                    "description": "all (implicit) sau any"
                  },
                  "rules": {
                    "type": "array",
                    "items": {},
                    "description": "Reguli: { field, op, value, key }"
                  },
                  "include": {
                    "type": "array",
                    "items": {},
                    "description": "Clienți adăugați de mână (UUID)"
                  },
                  "exclude": {
                    "type": "array",
                    "items": {},
                    "description": "Clienți scoși de mână (UUID)"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/roster.generate": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Generează turele din programul tipic, pe un interval. Cu `employee_id`, doar pentru acel angajat.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "from",
                  "to"
                ],
                "properties": {
                  "from": {
                    "type": "string"
                  },
                  "to": {
                    "type": "string"
                  },
                  "employee_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/roster.copy_week": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Copiază o săptămână; `from` și `to` sunt zile de luni. Cu `weeks`, peste atâtea săptămâni de la `to` (1-12); cu `employee_id`, doar turele acelui angajat.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "from",
                  "to"
                ],
                "properties": {
                  "from": {
                    "type": "string"
                  },
                  "to": {
                    "type": "string"
                  },
                  "weeks": {
                    "type": "number",
                    "description": "1-12, implicit 1"
                  },
                  "employee_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/stock.recalculate_costs": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Gestiune contabilă: recalculează costul tuturor ieșirilor din stoc după metoda companiei (CMP pe gestiune sau FIFO), de la data de început. Întoarce câte produse și mișcări au fost atinse.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/commands/stock.close_month": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Gestiune contabilă: închide o lună. Lunile se închid în ordine, după ce s-au terminat și fără ciorne de documente în ele; costurile se recalculează înainte. După închidere, niciun document sau mișcare de stoc nu mai poate avea dată în acea lună. Întoarce valoarea stocului la sfârșitul lunii.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "month"
                ],
                "properties": {
                  "month": {
                    "type": "string",
                    "description": "AAAA-LL"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/stock.reopen_month": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Gestiune contabilă: redeschide o lună închisă, cu motiv (trecut în jurnal). Lunile închise de după ea se redeschid și ele.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "month",
                  "reason"
                ],
                "properties": {
                  "month": {
                    "type": "string",
                    "description": "AAAA-LL"
                  },
                  "reason": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/stock.report": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Gestiune contabilă: un raport de stoc ca tabel (coloane, rânduri, total). `report`: `balance` (balanța stocurilor pe perioadă, pe produse sau cu `by` = `account` pe conturi), `ledger` (fișa de magazie a unui produs, cere `product_id`), `register` (registrul de intrări și ieșiri pe documente, `direction` = `in` sau `out`), `stock` (stocul la `date`, cu `lots` pe loturi), `count` (lista de inventariere a unei gestiuni la `date`, cere `warehouse_id`), `entries` (notele contabile de stoc pe perioadă; cu `by` = `account`, centralizatorul pe perechi de conturi). Valorile sunt la costul din evaluare.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "report"
                ],
                "properties": {
                  "report": {
                    "type": "string",
                    "description": "balance, ledger, register, stock, count sau entries"
                  },
                  "from": {
                    "type": "string",
                    "description": "YYYY-MM-DD, la rapoartele pe perioadă; implicit începutul lunii"
                  },
                  "to": {
                    "type": "string",
                    "description": "YYYY-MM-DD; implicit azi"
                  },
                  "date": {
                    "type": "string",
                    "description": "YYYY-MM-DD, la stock și count; implicit azi"
                  },
                  "warehouse_id": {
                    "type": "string"
                  },
                  "product_id": {
                    "type": "string"
                  },
                  "by": {
                    "type": "string",
                    "description": "product sau account"
                  },
                  "direction": {
                    "type": "string",
                    "description": "all, in sau out"
                  },
                  "lots": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/stock.entries": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Gestiune contabilă: notele contabile ale stocului pe o perioadă, pentru alt sistem de contabilitate. Câte un rând pe document și pe pereche de conturi: data, sursa (`source_type`: stock_document, client_invoice, goods_receipt, shop_order, appointment sau null pentru mișcările fără document), `source_id`, tipul documentului de stoc, numărul, gestiunea, partenerul, contul debitor, contul creditor și suma, la costul din evaluare. Conturile vin din setarea `inventory.accounts`.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "from",
                  "to"
                ],
                "properties": {
                  "from": {
                    "type": "string",
                    "description": "YYYY-MM-DD"
                  },
                  "to": {
                    "type": "string",
                    "description": "YYYY-MM-DD"
                  },
                  "warehouse_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/stock.product_profile": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Gestiune contabilă: datele profilurilor de business pornite pe un produs (ex. categoria de acciză). `profile` = { <profil>: { <câmp>: valoare } }; câmpurile fiecărui profil și tipul lor se văd în documentația profilului. Datele profilurilor oprite rămân neatinse. Întoarce datele salvate.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "product_id",
                  "profile"
                ],
                "properties": {
                  "product_id": {
                    "type": "string"
                  },
                  "profile": {
                    "type": "object",
                    "description": "{ <profil>: { <câmp>: valoare } }"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/stock.count_to_pvi": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Gestiune contabilă: inventarierea unei gestiuni. Primește cantitățile numărate (`items`: product_id, counted) și face o ciornă de PVI cu diferențele față de stocul scriptic (plus sau lipsă). Ciorna se postează cu acțiunea `post` a documentului. Întoarce id-ul ciornei (null dacă nu e nicio diferență).",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "warehouse_id",
                  "items"
                ],
                "properties": {
                  "warehouse_id": {
                    "type": "string"
                  },
                  "items": {
                    "type": "array",
                    "items": {},
                    "description": "product_id și counted pentru fiecare produs numărat"
                  },
                  "note": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/cashbook.register": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Registrul de casă pe o perioadă: rândurile (încasări și plăți manuale, încasări cash pe facturi și note, cu bonul fiscal, plăți cash către furnizori), sold inițial, total încasări, total plăți, sold final. Fără `book_id`, toate punctele de lucru.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "from",
                  "to"
                ],
                "properties": {
                  "from": {
                    "type": "string",
                    "description": "YYYY-MM-DD"
                  },
                  "to": {
                    "type": "string",
                    "description": "YYYY-MM-DD"
                  },
                  "book_id": {
                    "type": "string",
                    "description": "registrul de casă (punctul de lucru); gol = toate"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/holidays.sync": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Reîmprospătează sărbătorile legale ale anului.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "year"
                ],
                "properties": {
                  "year": {
                    "type": "number"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/closures.add_holidays": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Adaugă sărbătorile anului ca închideri pe toate locațiile.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "year"
                ],
                "properties": {
                  "year": {
                    "type": "number"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/scheduling.set_default_buffer": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Pauza implicită între programări, în minute.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "minutes"
                ],
                "properties": {
                  "minutes": {
                    "type": "number"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/shop.reindex": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Reindexează căutarea pe toate canalele.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/commands/labels.save": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Terminologia companiei. O valoare goală revine la implicit.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "labels"
                ],
                "properties": {
                  "labels": {
                    "type": "object"
                  },
                  "labelsI18n": {
                    "type": "object"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/fields.set_builtin_label": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Redenumește un câmp fix. Etichetă goală = implicit.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "entity",
                  "field_key"
                ],
                "properties": {
                  "entity": {
                    "type": "string"
                  },
                  "field_key": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "label_i18n": {
                    "type": "object"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/fields.reorder": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Ordinea câmpurilor personalizate.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "entity",
                  "ids"
                ],
                "properties": {
                  "entity": {
                    "type": "string"
                  },
                  "ids": {
                    "type": "array",
                    "items": {}
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/notifications.set": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Un tip de notificare: activ și pe ce canale (in_app, email, push; push doar cu in_app).",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "is_enabled": {
                    "type": "boolean"
                  },
                  "channels": {
                    "type": "array",
                    "items": {}
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/expenses.quick": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Cheltuială nouă dintr-un bon fotografiat.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "type",
                  "content_base64",
                  "amount"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "numele fișierului"
                  },
                  "type": {
                    "type": "string",
                    "description": "tipul MIME, ex. application/pdf"
                  },
                  "content_base64": {
                    "type": "string",
                    "description": "conținutul în base64, cel mult 25 MB"
                  },
                  "amount": {
                    "type": "number"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/media.import_existing": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Aduce în galerie imaginile existente din module, fără să le copieze. Se poate relua: ce e deja adus se sare.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/commands/media.add_external": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Adaugă în galerie o imagine de pe altă adresă https, fără să o descarce. O adresă deja adăugată nu se dublează.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "alt": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/media.list": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Lista galeriei cu starea de folosire a fiecărui fișier: `use_count`, `public_link`. Pentru curățenie: usage=unused.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "usage": {
                    "type": "string",
                    "description": "unused, used sau external"
                  },
                  "kind": {
                    "type": "string",
                    "description": "image sau file"
                  },
                  "q": {
                    "type": "string"
                  },
                  "page": {
                    "type": "number"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/timesheets.scan": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "O citire de cartelă de pontaj (pentru cititoarele legate în rețea). Fără `direction`, pornește pontajul angajatului dacă e oprit și îl oprește dacă e pornit; `in` / `out` forțează sensul. A doua citire a aceleiași cartele într-un minut se ignoră. Răspunsul: `result` (in, out, repeat, unknown), angajatul, intrarea de pontaj și un mesaj de afișat.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "card"
                ],
                "properties": {
                  "card": {
                    "type": "string",
                    "description": "codul citit de pe cartelă"
                  },
                  "direction": {
                    "type": "string",
                    "description": "in, out sau toggle (implicit)"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/support.create_ticket": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Creează un ticket Support cu primul mesaj (canal api).",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "body"
                ],
                "properties": {
                  "body": {
                    "type": "string"
                  },
                  "subject": {
                    "type": "string"
                  },
                  "party_id": {
                    "type": "string"
                  },
                  "team_id": {
                    "type": "string"
                  },
                  "assignee_user_id": {
                    "type": "string"
                  },
                  "priority": {
                    "type": "string"
                  },
                  "visitor_name": {
                    "type": "string"
                  },
                  "visitor_email": {
                    "type": "string"
                  },
                  "visitor_phone": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/tasks.from_source": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Unul sau mai multe taskuri (cel mult 10) din mesaje ale unui canal de chat (public sau privat, nu din mesajele directe). Mesajele se copiază ca context pe fiecare task, primul mesaj devine sursa, înregistrările pomenite cu # devin legături, iar progresul se vede în chat. `tasks`: listă de { title, description, assignee_id, due_date (YYYY-MM-DD), priority (low, normal, high, urgent) }.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "message_ids",
                  "tasks"
                ],
                "properties": {
                  "message_ids": {
                    "type": "array",
                    "items": {},
                    "description": "id-urile mesajelor, din același canal"
                  },
                  "tasks": {
                    "type": "array",
                    "items": {}
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/support.create_tasks": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Taskuri interne (cel mult 10) dintr-un ticket Support. Subiectul și mesajele alese (`message_ids`, doar cele vizibile clientului) se copiază ca context, clientul ticketului devine legătură, iar progresul se vede pe ticket. Când toate sunt gata, ticketul primește o notă internă; starea lui nu se schimbă. `tasks`: listă de { title, description, assignee_id, due_date (YYYY-MM-DD), priority }.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "ticket_id",
                  "tasks"
                ],
                "properties": {
                  "ticket_id": {
                    "type": "string"
                  },
                  "tasks": {
                    "type": "array",
                    "items": {}
                  },
                  "message_ids": {
                    "type": "array",
                    "items": {},
                    "description": "mesajele ticketului de copiat ca context"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/crm.follow_up": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Taskuri de follow-up (cel mult 10) pe un lead din CRM: lead-ul devine sursa, numele lui se copiază ca context, clientul în care s-a transformat (dacă există) devine legătură, iar progresul se vede în fișa lead-ului. `tasks`: listă de { title, description, assignee_id, due_date (YYYY-MM-DD), priority }.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "lead_id",
                  "tasks"
                ],
                "properties": {
                  "lead_id": {
                    "type": "string"
                  },
                  "tasks": {
                    "type": "array",
                    "items": {}
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/feedback.create_tasks": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Taskuri (cel mult 10) dintr-o recenzie: recenzia e sursa, scorul și comentariul se copiază ca context (fără telefon sau email), clientul legat devine legătură, iar progresul se vede în inbox. `tasks`: listă de { title, description, assignee_id, due_date (YYYY-MM-DD), priority }.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "response_id",
                  "tasks"
                ],
                "properties": {
                  "response_id": {
                    "type": "string"
                  },
                  "tasks": {
                    "type": "array",
                    "items": {}
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/feedback.create_ticket": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Ticket de recuperare în Support dintr-o recenzie (cel mult unul pe răspuns; a doua cerere întoarce ticketul existent). Scorul și comentariul devin primul mesaj; clientul legat de recenzie se leagă de ticket. Fără telefon sau email pe ticket.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "response_id"
                ],
                "properties": {
                  "response_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/shop.create_tasks": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Taskuri (cel mult 10) dintr-o comandă magazin: comanda e sursa, stările și notele se copiază ca context (fără telefon sau email), clientul legat devine legătură, iar progresul se vede pe comandă. `tasks`: listă de { title, description, assignee_id, due_date (YYYY-MM-DD), priority }.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "order_id",
                  "tasks"
                ],
                "properties": {
                  "order_id": {
                    "type": "string"
                  },
                  "tasks": {
                    "type": "array",
                    "items": {}
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/shop.create_return": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Retur dintr-un ticket Support pe o comandă a clientului legat (cel mult un retur pe ticket; a doua cerere întoarce returul existent). Motivele implicite: subiectul ticketului. Comanda trebuie să fie expediată sau livrată și în fereastra de retur.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "ticket_id",
                  "order_id"
                ],
                "properties": {
                  "ticket_id": {
                    "type": "string"
                  },
                  "order_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/procurement.create_tasks": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Taskuri (cel mult 10) dintr-o comandă de achiziție cu diferențe la recepție: comanda e sursa, liniile cu diferență se copiază ca context, iar progresul se vede pe comandă. `tasks`: listă de { title, description, assignee_id, due_date (YYYY-MM-DD), priority }.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "order_id",
                  "tasks"
                ],
                "properties": {
                  "order_id": {
                    "type": "string"
                  },
                  "tasks": {
                    "type": "array",
                    "items": {}
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/invoices.create_tasks": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Taskuri (cel mult 10) de încasare dintr-o factură: factura e sursa, scadența și restul se copiază ca context (fără telefon sau email), clientul facturii devine legătură, iar progresul se vede pe factură. `tasks`: listă de { title, description, assignee_id, due_date (YYYY-MM-DD), priority }.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "invoice_id",
                  "tasks"
                ],
                "properties": {
                  "invoice_id": {
                    "type": "string"
                  },
                  "tasks": {
                    "type": "array",
                    "items": {}
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/inventory.create_tasks": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Taskuri (cel mult 10) de reaprovizionare pe un produs: produsul e sursa, stocul și minimul se copiază ca context, iar progresul se vede pe fișa de stoc. `tasks`: listă de { title, description, assignee_id, due_date (YYYY-MM-DD), priority }.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "product_id",
                  "tasks"
                ],
                "properties": {
                  "product_id": {
                    "type": "string"
                  },
                  "tasks": {
                    "type": "array",
                    "items": {}
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/careers.create_tasks": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Taskuri de pregătire pentru intervievatorii unui interviu programat (cel mult o dată pe interviu; a doua cerere întoarce taskurile existente).",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "interview_id"
                ],
                "properties": {
                  "interview_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/scheduling.create_tasks": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Taskuri (cel mult 10) de pregătire pe o programare: programarea e sursa, ora și serviciul se copiază ca context (fără telefon sau email), clientul legat devine legătură. `tasks`: listă de { title, description, assignee_id, due_date (YYYY-MM-DD), priority }.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "appointment_id",
                  "tasks"
                ],
                "properties": {
                  "appointment_id": {
                    "type": "string"
                  },
                  "tasks": {
                    "type": "array",
                    "items": {}
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/reception.follow_up": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Taskuri (cel mult 10, de obicei „sună înapoi”) dintr-o conversație a Recepționerului AI: conversația devine sursa, rezumatul și mesajul lăsat se copiază ca context, clientul recunoscut devine legătură. `tasks`: listă de { title, description, assignee_id, due_date (YYYY-MM-DD), priority }.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "conversation_id",
                  "tasks"
                ],
                "properties": {
                  "conversation_id": {
                    "type": "string"
                  },
                  "tasks": {
                    "type": "array",
                    "items": {}
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/reception.create_ticket": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Ticket în Support dintr-o conversație a Recepționerului AI (cel mult unul pe conversație; a doua cerere întoarce ticketul existent). Rezumatul și mesajul lăsat devin primul mesaj, clientul recunoscut se leagă de ticket.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "conversation_id"
                ],
                "properties": {
                  "conversation_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/chat.create_ticket": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Ticket în Support dintr-un mesaj de canal de chat (cel mult unul pe mesaj; a doua cerere întoarce ticketul existent). Textul mesajului e primul mesaj al ticketului; clientul pomenit cu # (primul) se leagă de ticket. Nu din mesaje directe.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "message_id"
                ],
                "properties": {
                  "message_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/tasks.overview": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Overview-ul de taskuri pentru manageri, pe toată compania: KPI (terminate, deschise, peste termen, uitate, % la timp, timp mediu, cu perioada anterioară), taskurile deschise cu motivele de atenție, terminatele din perioadă, oamenii, tendința pe 12 săptămâni, livrabilele contractuale (cu modulul Contracte), recurentele și sursele, timpul pontat pe taskuri (`time`, cu Pontaj) și zilele disponibile ale fiecăruia în următoarele 7 zile (cu Program & ture sau Concedii). `period`: today, yesterday, 7d, 30d, 3m, 6m, month (implicit), lastMonth, ytd, lastYear sau custom (cu `from`, `to`, YYYY-MM-DD).",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "period": {
                    "type": "string"
                  },
                  "from": {
                    "type": "string"
                  },
                  "to": {
                    "type": "string"
                  },
                  "department_id": {
                    "type": "string"
                  },
                  "board_id": {
                    "type": "string"
                  },
                  "user_id": {
                    "type": "string",
                    "description": "id-ul omului sau „-” pentru taskurile fără responsabil"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/tasks.fill_deliverable": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Creează taskurile lipsă pentru un livrabil de contract în perioada curentă: câte unul pentru fiecare bucată rămasă neacoperită de taskuri deschise (cel mult 20), cu termen la sfârșitul perioadei.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "deliverable_id"
                ],
                "properties": {
                  "deliverable_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/esign.bulk_send": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Trimite în masă la semnat: un document din același șablon pentru fiecare persoană (cel mult 200), pe email. Primul semnatar al șablonului e persoana din rând. Răspunde cu rezultatul fiecărui rând; un rând care pică nu oprește celelalte.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "template_id",
                  "csv"
                ],
                "properties": {
                  "template_id": {
                    "type": "string"
                  },
                  "csv": {
                    "type": "string",
                    "description": "Rânduri CSV: nume, email, telefon (opțional), cu sau fără antet; separator ; , sau tab"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/files.upload": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Încarcă un fișier într-un câmp de tip „fișier” al unei înregistrări. Cere și scrierea pe modulul resursei.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "resource",
                  "id",
                  "field",
                  "name",
                  "type",
                  "content_base64"
                ],
                "properties": {
                  "resource": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string"
                  },
                  "field": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string",
                    "description": "numele fișierului"
                  },
                  "type": {
                    "type": "string",
                    "description": "tipul MIME, ex. application/pdf"
                  },
                  "content_base64": {
                    "type": "string",
                    "description": "conținutul în base64, cel mult 25 MB"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/content_install_template": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Instalează un șablon pe un site: blog, services, team, projects, testimonials, faq, events, pages sau settings. Reluabil; nu schimbă ce există. Cu `dry_run`, doar spune ce ar face.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "site_id",
                  "template"
                ],
                "properties": {
                  "site_id": {
                    "type": "string"
                  },
                  "template": {
                    "type": "string"
                  },
                  "entries": {
                    "type": "boolean",
                    "description": "adaugă și conținut de exemplu, ca ciorne"
                  },
                  "dry_run": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/content_export_schema": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Structura unui site, ca pachet JSON: tipuri, câmpuri, taxonomii. Cu `terms`, și termenii.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "site_id"
                ],
                "properties": {
                  "site_id": {
                    "type": "string"
                  },
                  "terms": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/content_import_schema": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Aplică un pachet pe un site, de exemplu exportul altui client. Adaugă doar ce lipsește. Cu `dry_run`, doar spune ce ar face.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "site_id",
                  "bundle"
                ],
                "properties": {
                  "site_id": {
                    "type": "string"
                  },
                  "bundle": {
                    "type": "object"
                  },
                  "dry_run": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/courses.save_assignment": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Salvează tema unei lecții. Fără `assignment` o scoate; predările rămân.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "lesson_id"
                ],
                "properties": {
                  "lesson_id": {
                    "type": "string"
                  },
                  "assignment": {
                    "type": "object",
                    "description": "{ instructions, maxPoints, passPoints, dueDays, allowLate, maxFiles, maxFileMb, required }"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/courses.save_quiz": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Salvează quiz-ul unei lecții (setări și toate întrebările). Lista goală de întrebări îl scoate.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "lesson_id",
                  "questions"
                ],
                "properties": {
                  "lesson_id": {
                    "type": "string"
                  },
                  "settings": {
                    "type": "object",
                    "description": "{ passPercent, maxAttempts, timeLimitMinutes, pickCount, showAnswers }"
                  },
                  "questions": {
                    "type": "array",
                    "items": {},
                    "description": "[{ kind: single|multiple|boolean|order|match|short, prompt, options, explanation, points }]"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/courses.start_video_upload": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Începe încărcarea unui video: întoarce id-ul, mărimea unei bucăți și câte un link PUT pentru fiecare bucată. Apoi acțiunea complete_upload pe course_videos.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "size"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "numele fișierului, cu extensie"
                  },
                  "size": {
                    "type": "number",
                    "description": "mărimea în octeți"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/subscriptions.report": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Cifrele abonamentelor, ca în Analiză: venit lunar recurent, abonați, noi și pierduți, rata de renunțare, plăți respinse și recuperate, pe planuri și pe ultimele 12 luni. Sume în lei, cu TVA. Fără date: ultimele 30 de zile.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/commands/subscriptions.run": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Aduce la zi toate abonamentele companiei (ca rularea zilnică). Se poate repeta fără dubluri.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/commands/loyalty.sell_gift_card": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Vinde un card cadou. Întoarce codul întreg. `cashbook_book_id` doar dacă numerarul trece în registrul de casă.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "value",
                  "sale_method"
                ],
                "properties": {
                  "value": {
                    "type": "number",
                    "description": "valoarea"
                  },
                  "sale_method": {
                    "type": "string",
                    "description": "cash, card, transfer sau other"
                  },
                  "legal_entity_id": {
                    "type": "string",
                    "description": "firma care vinde"
                  },
                  "cashbook_book_id": {
                    "type": "string"
                  },
                  "buyer_party_id": {
                    "type": "string"
                  },
                  "recipient_name": {
                    "type": "string"
                  },
                  "note": {
                    "type": "string"
                  },
                  "sale_reference": {
                    "type": "string",
                    "description": "documentul dat clientului"
                  },
                  "location_id": {
                    "type": "string"
                  },
                  "expires_on": {
                    "type": "string",
                    "description": "AAAA-LL-ZZ sau none"
                  },
                  "key": {
                    "type": "string",
                    "description": "cheie unică a operației"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/shop.issue_gift_card": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Vinde un card cadou din magazin (același card ca la casă). Întoarce codul întreg.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "value"
                ],
                "properties": {
                  "value": {
                    "type": "number",
                    "description": "valoarea"
                  },
                  "channel_id": {
                    "type": "string",
                    "description": "canalul; dă firma și moneda"
                  },
                  "currency": {
                    "type": "string"
                  },
                  "sale_method": {
                    "type": "string",
                    "description": "cash, card, transfer sau other"
                  },
                  "recipient_name": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "description": "AAAA-LL-ZZ sau none"
                  },
                  "confirm": {
                    "type": "boolean",
                    "description": "pornește vânzarea de carduri pentru firma canalului"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/shop.show_gift_code": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Arată din nou codul unui card cadou, din magazin. Deschiderea se notează pe card.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "card_id"
                ],
                "properties": {
                  "card_id": {
                    "type": "string",
                    "description": "cardul cadou"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/loyalty.save_challenge": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Creează sau modifică o provocare cu premiu în puncte.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "metric",
                  "goal",
                  "days",
                  "reward_points"
                ],
                "properties": {
                  "challenge_id": {
                    "type": "string",
                    "description": "gol la creare"
                  },
                  "name": {
                    "type": "string"
                  },
                  "metric": {
                    "type": "string",
                    "description": "visits sau spent"
                  },
                  "goal": {
                    "type": "number"
                  },
                  "days": {
                    "type": "number"
                  },
                  "reward_points": {
                    "type": "number"
                  },
                  "active": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/loyalty.delete_challenge": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Șterge o provocare; punctele date rămân.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "challenge_id"
                ],
                "properties": {
                  "challenge_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/loyalty.redeem_gift_card": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Scade un card cadou fără factură în aplicație. Pentru o factură folosește add_payment cu method gift_card.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "code",
                  "amount"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "description": "codul cardului"
                  },
                  "amount": {
                    "type": "number"
                  },
                  "reference": {
                    "type": "string",
                    "description": "pentru ce"
                  },
                  "location_id": {
                    "type": "string"
                  },
                  "key": {
                    "type": "string",
                    "description": "cheie unică a operației"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/loyalty.undo_gift_redemption": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Anulează o scădere făcută fără factură (gift_card_entries cu payment_source manual).",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "entry_id"
                ],
                "properties": {
                  "entry_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/loyalty.join_points": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Înscrie un client la puncte. Dacă are deja cont, îl întoarce pe acela.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "party_id"
                ],
                "properties": {
                  "party_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/loyalty.points_sale": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Trece o cumpărătură făcută în afara aplicației: folosește puncte (opțional) și dă puncte pentru ce rămâne de plată. Nu o folosi pentru o încasare făcută pe factură: aceea aduce puncte singură.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "account_id",
                  "amount"
                ],
                "properties": {
                  "account_id": {
                    "type": "string"
                  },
                  "amount": {
                    "type": "number",
                    "description": "cât e nota"
                  },
                  "use_points": {
                    "type": "number",
                    "description": "puncte folosite"
                  },
                  "reference": {
                    "type": "string",
                    "description": "pentru ce"
                  },
                  "location_id": {
                    "type": "string"
                  },
                  "key": {
                    "type": "string",
                    "description": "cheie unică a operației"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/loyalty.undo_points_sale": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Anulează o cumpărătură trecută fără factură (points_entries cu source counter).",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "entry_id"
                ],
                "properties": {
                  "entry_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/loyalty.gift_card_report": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Raportul lunar al cardurilor cadou: soldul fiecărui card, mișcările și totalul de onorat.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "month"
                ],
                "properties": {
                  "month": {
                    "type": "string",
                    "description": "AAAA-LL"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/fiscal.prepare": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Pregătește bonul fiscal al unei încasări în numerar sau cu cardul, pe casa aleasă. `source`: proforma_payment (nota de plată, avans) sau client_payment (factură). Răspunsul are comenzile pentru driver (`commands`, `content`), numele fișierului și, la trimiterea directă, adresa și corpul cererii HTTP. O încasare are un singur bon; unul deja trimis se refolosește doar cu `reprint`. După tipărire, trimite rezultatul cu acțiunea `result` pe `fiscal_receipts`.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "source",
                  "source_id",
                  "register_id"
                ],
                "properties": {
                  "source": {
                    "type": "string",
                    "description": "proforma_payment sau client_payment"
                  },
                  "source_id": {
                    "type": "string",
                    "description": "id-ul încasării"
                  },
                  "register_id": {
                    "type": "string",
                    "description": "casa de marcat"
                  },
                  "reprint": {
                    "type": "boolean",
                    "description": "retipărește un bon deja trimis"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/fiscal.operation": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Raport X, raport Z (închide ziua fiscală; al doilea Z în aceeași zi cere `force`), introducere sau scoatere de numerar pe casa aleasă (cu `cashbook_book_id`, nota intră și în Registrul de casă). `kind`: x_report, z_report, cash_in, cash_out; `amount` doar la numerar. Răspunsul are comenzile pentru driver, ca `fiscal.prepare`; rezultatul se trimite cu acțiunea `result` pe `fiscal_operations`.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "register_id",
                  "kind"
                ],
                "properties": {
                  "register_id": {
                    "type": "string",
                    "description": "casa de marcat"
                  },
                  "kind": {
                    "type": "string",
                    "description": "x_report, z_report, cash_in sau cash_out"
                  },
                  "amount": {
                    "type": "number",
                    "description": "suma în lei, la numerar"
                  },
                  "cashbook_book_id": {
                    "type": "string",
                    "description": "registrul de casă în care se scrie nota la numerar, după confirmarea casei"
                  },
                  "force": {
                    "type": "boolean",
                    "description": "al doilea raport Z în aceeași zi"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/fiscal.refund": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Bonul de retur pentru un bon fiscal deja dat (de exemplu când încasarea se anulează): aceleași rânduri și aceeași plată, întoarse. Un bon are un singur retur; unul deja trimis se refolosește doar cu `retry`. Casa implicită e a bonului.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "receipt_id"
                ],
                "properties": {
                  "receipt_id": {
                    "type": "string",
                    "description": "bonul de vânzare"
                  },
                  "register_id": {
                    "type": "string",
                    "description": "altă casă decât a bonului"
                  },
                  "retry": {
                    "type": "boolean",
                    "description": "retrimite un retur deja trimis"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/fiscal.day_summary": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Sumarul zilei de azi pe o casă (sau pe toate): fond de rest, bonuri și retururi pe numerar și card, scoateri, cât ar trebui să fie în sertar, ora raportului Z (zi închisă) și a ultimului raport X.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "register_id": {
                    "type": "string",
                    "description": "casa de marcat; gol = toate casele"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/fiscal.unreceipted": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Încasările în numerar sau cu cardul, în lei, din ultimele zile, care nu au bon dat pe casă (fără bon, bon netrimis sau respins). Bonul se dă cu `fiscal.prepare`.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "days": {
                    "type": "number",
                    "description": "câte zile în urmă, implicit 7, maxim 60"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/fiscal.invoice_receipts": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Bonurile fiscale date pe încasările unei facturi (direct sau pe nota de plată preluată), cu starea returului. Folosit după stornare; returul se dă cu `fiscal.refund`.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "invoice_id"
                ],
                "properties": {
                  "invoice_id": {
                    "type": "string",
                    "description": "factura"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/agents.run_result": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Rezumatul și rezultatul unei rulări, doar dacă ai drept de citire pe toate modulele pe care le-a atins (`agent_runs.modules`).",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "run_id"
                ],
                "properties": {
                  "run_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/agents.upload_document": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Încarcă un PDF sau o poză (cel mult 5 MB, tipul se verifică după conținut) pentru agentul de cheltuieli: devine propunere de cheltuială, validată de script, cu aprobarea unui om.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "type",
                  "content_base64"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "numele fișierului"
                  },
                  "type": {
                    "type": "string",
                    "description": "tipul MIME, ex. application/pdf"
                  },
                  "content_base64": {
                    "type": "string",
                    "description": "conținutul în base64, cel mult 25 MB"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/agents.export": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Toată rețeaua de agenți ca JSON: departamente, agenți cu versiunea curentă, skilluri, definițiile surselor, kitul de brand și harta. Fără chei, fără conexiuni, fără fragmente indexate.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/commands/agents.import": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Importă o rețea exportată cu `agents.export`, în aceeași companie sau în alta. Nu suprascrie nimic: agenții intră opriți și cer o probă, skillurile importate trec din nou prin verificări și așteaptă un om. Răspunsul spune ce s-a creat, ce s-a sărit și ce trebuie completat (canale, persoane, site-uri).",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "network"
                ],
                "properties": {
                  "network": {
                    "type": "object",
                    "description": "fișierul de la agents.export"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/agents.snapshots": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Instantaneele zilnice ale rețelei din S3 (ultimele 30 de zile). Cu `snapshot: true` face acum instantaneul zilei.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "snapshot": {
                    "type": "boolean",
                    "description": "true = fă instantaneul zilei acum"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commands/notes.restore": {
      "post": {
        "tags": [
          "Comenzi"
        ],
        "summary": "Scoate o notiță din coș (se păstrează 30 de zile). O poate restaura cine a șters-o (aceeași cheie sau omul) sau autorul. Notița trebuie să fie a companiei.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "id-ul notiței din coș"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/media_items/upload": {
      "post": {
        "tags": [
          "Galerie"
        ],
        "summary": "Încarcă o imagine (până la 8 MB) sau un document: PDF, Word, Excel, PowerPoint, OpenDocument, text, CSV, ZIP, video (până la 25 MB); tipul se verifică după conținut",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "alt": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/media_items/{id}/file": {
      "get": {
        "tags": [
          "Galerie"
        ],
        "summary": "Descarcă fișierul, inclusiv un document privat",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/documents/{id}/file": {
      "get": {
        "tags": [
          "Documente"
        ],
        "summary": "Descarcă fișierul documentului",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/job_applications/{id}/cv": {
      "get": {
        "tags": [
          "Cariere"
        ],
        "summary": "Descarcă CV-ul candidatului",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/stays/availability": {
      "get": {
        "tags": [
          "Cazare"
        ],
        "summary": "Unități libere și prețuri pe o perioadă",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "check_in",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "check_out",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "adults",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "children",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "child_ages",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "promo_code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "unit_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/stays/reservations": {
      "post": {
        "tags": [
          "Cazare"
        ],
        "summary": "Creează o rezervare; trimite Idempotency-Key",
        "responses": {
          "201": {
            "description": "Creată"
          },
          "409": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type_id",
                  "check_in",
                  "check_out",
                  "guest"
                ],
                "properties": {
                  "type_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "check_in": {
                    "type": "string",
                    "format": "date"
                  },
                  "check_out": {
                    "type": "string",
                    "format": "date"
                  },
                  "adults": {
                    "type": "integer"
                  },
                  "children": {
                    "type": "integer"
                  },
                  "child_ages": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  },
                  "unit_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "promo_code": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "confirmed",
                      "requested"
                    ]
                  },
                  "notes": {
                    "type": "string"
                  },
                  "guest": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "email": {
                        "type": "string"
                      },
                      "phone": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/stays/reservations/{id}/cancel": {
      "post": {
        "tags": [
          "Cazare"
        ],
        "summary": "Anulează rezervarea",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Eroare",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    }
  }
}