====== Phase 3 — Spécification OpenAPI 3.1 Enterprise ====== ===== Objectif ===== À ce stade : Schema Prisma ≈ 110 modèles Architecture Hexagonale NestJS DDD CQRS RBAC Multi-Tenant Enterprise Security Internationalisation IA sont désormais définis. La prochaine étape consiste à construire la : Source de vérité contractuelle du système : openapi.yaml qui permettra ensuite de générer automatiquement : Swagger DTO NestJS Validation Zod SDK TypeScript Client React Query Mocks Tests contractuels Documentation API ---- ====== Stratégie ====== Vu la taille du projet : 100+ modèles 1000+ endpoints nous allons procéder par domaines. ---- ====== Découpage OpenAPI ====== ===== Domaine 1 ===== Core & Security /auth /users /roles /permissions /sessions /mfa /security ---- ===== Domaine 2 ===== Owners /owners /owner-documents /owner-bank-accounts ---- ===== Domaine 3 ===== Properties /properties /property-media /property-features /property-rates /property-availability ---- ===== Domaine 4 ===== Customers /customers /customer-documents /customer-notes ---- ===== Domaine 5 ===== Reservations /reservations /reservation-guests /reservation-pricing /reservation-events ---- ===== Domaine 6 ===== Contracts /contracts /contract-templates /signatures ---- ===== Domaine 7 ===== Finance /payments /refunds /invoices /accounting ---- ===== Domaine 8 ===== CRM /leads /opportunities /pipelines /tasks /activities ---- ===== Domaine 9 ===== Messaging /notifications /conversations /messages /emails /sms ---- ===== Domaine 10 ===== Marketing /campaigns /segments /marketing-events ---- ===== Domaine 11 ===== Governance /audit /workflows /feature-flags ---- ===== Domaine 12 ===== OTA /channels /distributions /channel-reservations /syncs ---- ===== Domaine 13 ===== Revenue /pricing-rules /dynamic-prices /revenue-forecasts ---- ===== Domaine 14 ===== Compliance /consents /risks /incidents /compliance-audits ---- ===== Domaine 15 ===== Internationalisation /countries /currencies /languages /translations ---- ===== Domaine 16 ===== IA /ai/conversations /ai/messages /knowledge /recommendations ---- ====== Ordre recommandé ====== Pour démarrer la génération réelle du backend : OpenAPI Domain 1 doit être produit en premier. ---- ====== Phase 3-A ====== Core Security API ===== Modules ===== Auth Users Roles Permissions Sessions MFA ---- ===== Livrable ===== Premier fichier : openapi-core-security.yaml contenant : * Security Schemes * JWT * Refresh Token * Users API * Roles API * Permissions API * Pagination * Error Model * Validation Model ---- ====== Exemple ====== ===== Security Scheme ===== components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT ---- ===== Endpoint ===== GET /users ---- ===== Réponse ===== 200: description: Users list content: application/json: schema: $ref: '#/components/schemas/UserListResponse' ---- ====== Phase 3-A.1 — OpenAPI Core Security ====== ===== Objectif ===== Définir le premier contrat API officiel de la plateforme. Ce document couvre : Auth Users Roles Permissions Sessions Refresh Tokens MFA Pagination Filtering Sorting Error Handling Compatible : OpenAPI 3.1 NestJS Swagger OpenAPI Generator Zod React Query ---- ====== Structure ====== ===== Fichier ===== apps/api/openapi/openapi-core-security.yaml ---- ====== En-tête OpenAPI ====== openapi: 3.1.0 info: title: Rental Platform API version: 1.0.0 description: Enterprise Rental Platform servers: - url: https://api.company.com/v1 description: Production - url: https://staging-api.company.com/v1 description: Staging tags: - name: Authentication - name: Users - name: Roles - name: Permissions - name: Sessions - name: MFA ---- ====== Security ====== ===== JWT ===== components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT ---- ====== Common Schemas ====== ===== UUID ===== Uuid: type: string format: uuid ---- ===== Timestamp ===== Timestamp: type: string format: date-time ---- ===== Pagination ===== PaginationMeta: type: object properties: page: type: integer pageSize: type: integer total: type: integer totalPages: type: integer ---- ====== Error Model ====== ===== ApiError ===== ApiError: type: object required: - code - message properties: code: type: string message: type: string details: type: object ---- ===== ValidationError ===== ValidationError: allOf: - $ref: '#/components/schemas/ApiError' - type: object properties: fields: type: array items: type: object properties: field: type: string message: type: string ---- ====== Authentication ====== ===== RegisterRequest ===== RegisterRequest: type: object required: - email - password - firstName - lastName properties: email: type: string format: email password: type: string minLength: 8 firstName: type: string lastName: type: string ---- ===== LoginRequest ===== LoginRequest: type: object required: - email - password properties: email: type: string format: email password: type: string ---- ===== TokenResponse ===== TokenResponse: type: object properties: accessToken: type: string refreshToken: type: string expiresIn: type: integer tokenType: type: string example: Bearer ---- ====== POST /auth/register ====== /auth/register: post: tags: - Authentication summary: Register user requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RegisterRequest' responses: '201': description: User created '400': description: Validation error ---- ====== POST /auth/login ====== /auth/login: post: tags: - Authentication summary: Login requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LoginRequest' responses: '200': description: Authentication success content: application/json: schema: $ref: '#/components/schemas/TokenResponse' ---- ====== POST /auth/refresh ====== /auth/refresh: post: tags: - Authentication summary: Refresh token ---- ====== POST /auth/logout ====== /auth/logout: post: security: - bearerAuth: [] tags: - Authentication summary: Logout ---- ====== Users ====== ===== User ===== User: type: object properties: id: $ref: '#/components/schemas/Uuid' email: type: string firstName: type: string lastName: type: string active: type: boolean createdAt: $ref: '#/components/schemas/Timestamp' ---- ===== UserListResponse ===== UserListResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/User' meta: $ref: '#/components/schemas/PaginationMeta' ---- ====== GET /users ====== /users: get: security: - bearerAuth: [] tags: - Users summary: List users parameters: - name: page in: query schema: type: integer - name: pageSize in: query schema: type: integer - name: search in: query schema: type: string - name: sort in: query schema: type: string responses: '200': description: User list content: application/json: schema: $ref: '#/components/schemas/UserListResponse' ---- ====== GET /users/{id} ====== /users/{id}: get: security: - bearerAuth: [] tags: - Users parameters: - name: id in: path required: true schema: format: uuid type: string responses: '200': description: User ---- ====== POST /users ====== /users: post: security: - bearerAuth: [] tags: - Users summary: Create user ---- ====== PATCH /users/{id} ====== /users/{id}: patch: security: - bearerAuth: [] tags: - Users ---- ====== DELETE /users/{id} ====== /users/{id}: delete: security: - bearerAuth: [] tags: - Users ---- ====== Roles ====== ===== Role ===== Role: type: object properties: id: type: string code: type: string name: type: string ---- ====== Endpoints ====== GET /roles POST /roles GET /roles/{id} PATCH /roles/{id} DELETE /roles/{id} ---- ====== Permissions ====== ===== Permission ===== Permission: type: object properties: id: type: string code: type: string name: type: string ---- ====== Endpoints ====== GET /permissions GET /permissions/{id} ---- ====== User Roles ====== ===== Endpoints ===== POST /users/{id}/roles DELETE /users/{id}/roles/{roleId} ---- ====== Sessions ====== ===== Session ===== Session: type: object properties: id: type: string ipAddress: type: string userAgent: type: string lastActivityAt: type: string format: date-time ---- ====== Endpoints ====== GET /sessions DELETE /sessions/{id} ---- ====== MFA ====== ===== Enable MFA ===== POST /mfa/enable ---- ===== Verify MFA ===== POST /mfa/verify ---- ===== Disable MFA ===== POST /mfa/disable ---- ====== HTTP Status Codes ====== 200 OK 201 Created 204 No Content 400 Bad Request 401 Unauthorized 403 Forbidden 404 Not Found 409 Conflict 422 Validation Error 429 Too Many Requests 500 Internal Server Error ---- ====== Headers ====== ===== Multi Tenant ===== X-Tenant-Id: required: true ---- ===== Correlation ===== X-Correlation-Id: required: false ---- ====== Volume API ====== Phase 3-A.1 fournit : ≈ 25 endpoints ≈ 15 schemas ≈ 6 tags ≈ 3 security flows ---- ====== Phase 3-A.2 — OpenAPI Owners & Properties ====== ===== Objectif ===== Définir le premier domaine métier principal de la plateforme : Owners Properties Property Media Property Features Property Availability Property Rates Ce domaine couvre : Sprint 3 Catalogue Immobilier et constitue le socle métier de : Réservations Contrats Paiements OTA Revenue Management ---- ====== Tags OpenAPI ====== tags: - name: Owners - name: OwnerDocuments - name: OwnerBankAccounts - name: Properties - name: PropertyMedia - name: PropertyFeatures - name: PropertyAvailability - name: PropertyRates ---- ====== Schémas ====== ===== Owner ===== Owner: type: object properties: id: type: string format: uuid ownerNumber: type: string firstName: type: string lastName: type: string email: type: string format: email phone: type: string active: type: boolean createdAt: type: string format: date-time ---- ===== CreateOwnerRequest ===== CreateOwnerRequest: type: object required: - firstName - lastName - email properties: firstName: type: string lastName: type: string email: type: string format: email phone: type: string ---- ====== Endpoints Owners ====== ===== Collection ===== GET /owners POST /owners ---- ===== Ressource ===== GET /owners/{id} PATCH /owners/{id} DELETE /owners/{id} ---- ===== Recherche ===== GET /owners ?page=1 &pageSize=20 &search=dupont &active=true &sort=lastName ---- ====== Owner Documents ====== ===== Endpoints ===== GET /owners/{id}/documents POST /owners/{id}/documents DELETE /owners/{id}/documents/{documentId} ---- ===== Upload ===== multipart/form-data ---- ===== Types ===== IDENTITY TAX INSURANCE MANDATE CONTRACT ---- ====== Owner Bank Accounts ====== ===== BankAccount ===== BankAccount: type: object properties: id: type: string iban: type: string bic: type: string accountHolder: type: string ---- ===== Endpoints ===== GET /owners/{id}/bank-accounts POST /owners/{id}/bank-accounts PATCH /owners/{id}/bank-accounts/{accountId} DELETE /owners/{id}/bank-accounts/{accountId} ---- ====== Properties ====== ===== Property ===== Property: type: object properties: id: type: string format: uuid code: type: string title: type: string slug: type: string propertyType: type: string status: type: string published: type: boolean maxGuests: type: integer bedrooms: type: integer bathrooms: type: integer surface: type: number createdAt: type: string format: date-time ---- ===== CreatePropertyRequest ===== CreatePropertyRequest: type: object required: - title - propertyType properties: title: type: string description: type: string propertyType: type: string maxGuests: type: integer bedrooms: type: integer bathrooms: type: integer ---- ====== Endpoints Properties ====== ===== Collection ===== GET /properties POST /properties ---- ===== Ressource ===== GET /properties/{id} PATCH /properties/{id} DELETE /properties/{id} ---- ===== Publication ===== POST /properties/{id}/publish POST /properties/{id}/unpublish ---- ===== Recherche ===== GET /properties ?search=villa ?propertyType=HOUSE ?published=true ?ownerId=xxx ?page=1 &pageSize=20 ---- ====== Property Address ====== ===== Endpoints ===== GET /properties/{id}/address PUT /properties/{id}/address ---- ====== Property Owners ====== ===== Affectation ===== GET /properties/{id}/owners POST /properties/{id}/owners DELETE /properties/{id}/owners/{ownerId} ---- ====== Property Media ====== ===== PropertyMedia ===== PropertyMedia: type: object properties: id: type: string fileUrl: type: string title: type: string position: type: integer isCover: type: boolean ---- ===== Endpoints ===== GET /properties/{id}/media POST /properties/{id}/media PATCH /properties/{id}/media/{mediaId} DELETE /properties/{id}/media/{mediaId} ---- ===== Upload ===== multipart/form-data ---- ====== Property Features ====== ===== PropertyFeature ===== PropertyFeature: type: object properties: id: type: string code: type: string label: type: string ---- ===== Exemples ===== POOL WIFI AIR_CONDITIONING PARKING SEA_VIEW JACUZZI ---- ===== Endpoints ===== GET /property-features GET /properties/{id}/features POST /properties/{id}/features DELETE /properties/{id}/features/{featureId} ---- ====== Property Availability ====== ===== Availability ===== Availability: type: object properties: id: type: string startDate: type: string format: date endDate: type: string format: date available: type: boolean ---- ===== Endpoints ===== GET /properties/{id}/availability POST /properties/{id}/availability PATCH /availability/{id} DELETE /availability/{id} ---- ===== Recherche ===== GET /properties/{id}/availability ?from=2026-07-01 &to=2026-07-31 ---- ====== Property Rates ====== ===== PropertyRate ===== PropertyRate: type: object properties: id: type: string startDate: type: string format: date endDate: type: string format: date nightlyRate: type: number minimumStay: type: integer ---- ===== Endpoints ===== GET /properties/{id}/rates POST /properties/{id}/rates PATCH /property-rates/{id} DELETE /property-rates/{id} ---- ====== Property Search API ====== ===== Endpoint public ===== GET /catalog/properties ---- ===== Filtres ===== destination checkIn checkOut guests priceMin priceMax bedrooms features ---- ===== Réponse ===== PropertySearchResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/Property' meta: $ref: '#/components/schemas/PaginationMeta' ---- ====== Permissions RBAC ====== ===== Owners ===== owners.read owners.create owners.update owners.delete ---- ===== Properties ===== properties.read properties.create properties.update properties.publish properties.delete ---- ====== Volume API ====== Cette phase ajoute : ≈ 42 endpoints ≈ 12 schémas OpenAPI ≈ 8 tags Swagger ---- ====== Cumul OpenAPI ====== Après Phase 3-A.2 : ≈ 67 endpoints ≈ 30 schémas ≈ 14 tags ---- ====== Phase 3-A.3 — OpenAPI Customers & Reservations ====== ===== Objectif ===== Définir le cœur transactionnel de la plateforme : Customers Reservations Reservation Guests Reservation Pricing Reservation Events Reservation Status History Cette phase couvre : Sprint 4 Réservation & Calendrier et constitue la base de : Contrats Paiements OTA Revenue Management CRM ---- ====== Tags OpenAPI ====== tags: - name: Customers - name: CustomerDocuments - name: CustomerNotes - name: Reservations - name: ReservationGuests - name: ReservationPricing - name: ReservationEvents - name: ReservationCalendar ---- ====== Customers ====== ===== Customer ===== Customer: type: object properties: id: type: string format: uuid customerNumber: type: string firstName: type: string lastName: type: string email: type: string format: email phone: type: string nationality: type: string active: type: boolean createdAt: type: string format: date-time ---- ===== CreateCustomerRequest ===== CreateCustomerRequest: type: object required: - firstName - lastName - email properties: firstName: type: string lastName: type: string email: type: string format: email phone: type: string nationality: type: string ---- ====== Endpoints Customers ====== ===== Collection ===== GET /customers POST /customers ---- ===== Ressource ===== GET /customers/{id} PATCH /customers/{id} DELETE /customers/{id} ---- ===== Recherche ===== GET /customers ?search=smith ?email=test@email.com ?page=1 &pageSize=20 ---- ====== Customer Documents ====== ===== Endpoints ===== GET /customers/{id}/documents POST /customers/{id}/documents DELETE /customers/{id}/documents/{documentId} ---- ====== Customer Notes ====== ===== Endpoints ===== GET /customers/{id}/notes POST /customers/{id}/notes PATCH /customer-notes/{id} DELETE /customer-notes/{id} ---- ====== Reservations ====== ===== Reservation ===== Reservation: type: object properties: id: type: string format: uuid reference: type: string propertyId: type: string format: uuid customerId: type: string format: uuid status: $ref: '#/components/schemas/ReservationStatus' checkInDate: type: string format: date checkOutDate: type: string format: date nights: type: integer adults: type: integer children: type: integer totalGuests: type: integer createdAt: type: string format: date-time ---- ===== ReservationStatus ===== ReservationStatus: type: string enum: - DRAFT - PENDING - OPTION - CONFIRMED - CONTRACT_SENT - CONTRACT_SIGNED - PARTIALLY_PAID - PAID - CHECKED_IN - CHECKED_OUT - COMPLETED - CANCELLED - REFUNDED ---- ===== CreateReservationRequest ===== CreateReservationRequest: type: object required: - propertyId - checkInDate - checkOutDate - adults properties: propertyId: type: string format: uuid customerId: type: string format: uuid checkInDate: type: string format: date checkOutDate: type: string format: date adults: type: integer children: type: integer customerNotes: type: string ---- ====== Endpoints Reservations ====== ===== Collection ===== GET /reservations POST /reservations ---- ===== Ressource ===== GET /reservations/{id} PATCH /reservations/{id} DELETE /reservations/{id} ---- ===== Recherche ===== GET /reservations ?status=CONFIRMED ?propertyId=xxx ?customerId=xxx ?from=2026-07-01 ?to=2026-07-31 ---- ====== Réservation Workflow ====== ===== Confirmation ===== POST /reservations/{id}/confirm ---- ===== Annulation ===== POST /reservations/{id}/cancel ---- ===== Check-In ===== POST /reservations/{id}/check-in ---- ===== Check-Out ===== POST /reservations/{id}/check-out ---- ====== Vérification Disponibilité ====== ===== Endpoint ===== POST /reservations/check-availability ---- ===== Request ===== AvailabilityCheckRequest: type: object properties: propertyId: type: string checkInDate: type: string format: date checkOutDate: type: string format: date ---- ===== Response ===== AvailabilityCheckResponse: type: object properties: available: type: boolean conflicts: type: array items: type: string ---- ====== Reservation Guests ====== ===== ReservationGuest ===== ReservationGuest: type: object properties: id: type: string firstName: type: string lastName: type: string nationality: type: string birthDate: type: string format: date isPrimary: type: boolean ---- ===== Endpoints ===== GET /reservations/{id}/guests POST /reservations/{id}/guests PATCH /reservation-guests/{id} DELETE /reservation-guests/{id} ---- ====== Reservation Pricing ====== ===== ReservationPricing ===== ReservationPricing: type: object properties: nightlyAmount: type: number cleaningFee: type: number touristTax: type: number extrasAmount: type: number discountAmount: type: number totalAmount: type: number currencyCode: type: string ---- ===== Endpoints ===== GET /reservations/{id}/pricing POST /reservations/{id}/pricing/recalculate ---- ====== Reservation Events ====== ===== ReservationEvent ===== ReservationEvent: type: object properties: id: type: string eventType: type: string payload: type: object createdAt: type: string format: date-time ---- ===== Endpoints ===== GET /reservations/{id}/events ---- ====== Historique des statuts ====== ===== Endpoint ===== GET /reservations/{id}/history ---- ===== Response ===== ReservationStatusHistory: type: object properties: previousStatus: type: string newStatus: type: string changedAt: type: string format: date-time changedBy: type: string ---- ====== Calendrier ====== ===== Calendrier d'un bien ===== GET /properties/{id}/calendar ---- ===== Paramètres ===== from to ---- ===== Réponse ===== CalendarDay: type: object properties: date: type: string available: type: boolean reservationId: type: string ---- ====== Catalogue Public ====== ===== Recherche ===== GET /catalog/search ---- ===== Filtres ===== destination checkInDate checkOutDate adults children priceMin priceMax features ---- ===== Réponse ===== CatalogSearchResponse: type: object properties: properties: type: array total: type: integer ---- ====== Permissions RBAC ====== ===== Customers ===== customers.read customers.create customers.update customers.delete ---- ===== Reservations ===== reservations.read reservations.create reservations.update reservations.cancel reservations.checkin reservations.checkout ---- ====== Volume API ====== Cette phase ajoute : ≈ 52 endpoints ≈ 18 schémas ≈ 8 tags Swagger ---- ====== Cumul OpenAPI ====== Après Phase 3-A.3 : ≈ 120 endpoints ≈ 48 schémas ≈ 22 tags ---- ====== Phase 3-A.4 — OpenAPI Contracts & Finance ====== ===== Objectif ===== Définir le domaine financier et contractuel de la plateforme. Cette phase couvre : Sprint 5 Contrats & Signature Électronique Sprint 6 Paiements & Facturation Elle permet : Réservation ↓ Contrat ↓ Signature ↓ Paiement ↓ Facture ↓ Comptabilité ---- ====== Tags OpenAPI ====== tags: - name: Contracts - name: ContractTemplates - name: ContractSignatures - name: Payments - name: Refunds - name: Invoices - name: Accounting ---- ====== Contracts ====== ===== Contract ===== Contract: type: object properties: id: type: string format: uuid contractNumber: type: string reservationId: type: string format: uuid status: $ref: '#/components/schemas/ContractStatus' generatedAt: type: string format: date-time signedAt: type: string format: date-time pdfUrl: type: string ---- ===== ContractStatus ===== ContractStatus: type: string enum: - DRAFT - GENERATED - SENT - VIEWED - SIGNED - CANCELLED ---- ====== Endpoints Contracts ====== ===== Collection ===== GET /contracts POST /contracts ---- ===== Ressource ===== GET /contracts/{id} PATCH /contracts/{id} DELETE /contracts/{id} ---- ===== Réservation ===== GET /reservations/{id}/contracts ---- ====== Génération ====== ===== Générer un contrat ===== POST /contracts/generate ---- ===== Request ===== GenerateContractRequest: type: object required: - reservationId - templateId properties: reservationId: type: string templateId: type: string ---- ===== Réponse ===== GenerateContractResponse: type: object properties: contractId: type: string pdfUrl: type: string ---- ====== PDF ====== ===== Télécharger ===== GET /contracts/{id}/pdf ---- ===== Régénérer ===== POST /contracts/{id}/regenerate ---- ====== Contract Templates ====== ===== ContractTemplate ===== ContractTemplate: type: object properties: id: type: string code: type: string name: type: string active: type: boolean ---- ===== Endpoints ===== GET /contract-templates POST /contract-templates GET /contract-templates/{id} PATCH /contract-templates/{id} DELETE /contract-templates/{id} ---- ====== Contract Signatures ====== ===== Signature ===== ContractSignature: type: object properties: id: type: string signerName: type: string signerEmail: type: string signedAt: type: string format: date-time status: type: string ---- ===== Envoyer pour signature ===== POST /contracts/{id}/send-signature ---- ===== Consulter ===== GET /contracts/{id}/signatures ---- ===== Relancer ===== POST /contracts/{id}/remind-signature ---- ===== Annuler ===== POST /contracts/{id}/cancel-signature ---- ====== Payments ====== ===== Payment ===== Payment: type: object properties: id: type: string format: uuid paymentReference: type: string reservationId: type: string amount: type: number currencyCode: type: string status: $ref: '#/components/schemas/PaymentStatus' paidAt: type: string format: date-time ---- ===== PaymentStatus ===== PaymentStatus: type: string enum: - PENDING - AUTHORIZED - PAID - FAILED - CANCELLED - REFUNDED ---- ====== Endpoints Payments ====== ===== Collection ===== GET /payments POST /payments ---- ===== Ressource ===== GET /payments/{id} PATCH /payments/{id} ---- ===== Réservation ===== GET /reservations/{id}/payments ---- ====== Paiement CB ====== ===== Créer session ===== POST /payments/checkout-session ---- ===== Request ===== CheckoutSessionRequest: type: object properties: reservationId: type: string amount: type: number ---- ===== Réponse ===== CheckoutSessionResponse: type: object properties: sessionId: type: string checkoutUrl: type: string ---- ====== Webhooks ====== ===== Stripe ===== POST /payments/webhooks/stripe ---- ===== PayPal ===== POST /payments/webhooks/paypal ---- ====== Transactions ====== ===== Historique ===== GET /payments/{id}/transactions ---- ====== Refunds ====== ===== Refund ===== Refund: type: object properties: id: type: string amount: type: number refundedAt: type: string format: date-time reason: type: string ---- ===== Endpoints ===== GET /refunds POST /refunds GET /refunds/{id} ---- ===== Rembourser ===== POST /payments/{id}/refund ---- ====== Invoices ====== ===== Invoice ===== Invoice: type: object properties: id: type: string invoiceNumber: type: string amountExclTax: type: number taxAmount: type: number amountInclTax: type: number status: $ref: '#/components/schemas/InvoiceStatus' issueDate: type: string format: date ---- ===== InvoiceStatus ===== InvoiceStatus: type: string enum: - DRAFT - ISSUED - PAID - PARTIALLY_PAID - CANCELLED ---- ====== Endpoints Invoices ====== ===== Collection ===== GET /invoices POST /invoices ---- ===== Ressource ===== GET /invoices/{id} PATCH /invoices/{id} ---- ===== Réservation ===== GET /reservations/{id}/invoices ---- ===== PDF ===== GET /invoices/{id}/pdf ---- ===== Envoi ===== POST /invoices/{id}/send ---- ====== Accounting ====== ===== AccountingEntry ===== AccountingEntry: type: object properties: id: type: string entryDate: type: string format: date accountCode: type: string label: type: string debit: type: number credit: type: number ---- ===== Endpoints ===== GET /accounting/entries GET /accounting/entries/{id} ---- ===== Export ===== GET /accounting/export ---- ===== Paramètres ===== from to format ---- ===== Formats ===== CSV XLSX FEC ---- ====== Workflow Métier ====== ===== Contrat ===== Reservation ↓ Generate Contract ↓ Send Signature ↓ Signed ---- ===== Paiement ===== Reservation ↓ Checkout Session ↓ Payment ↓ Invoice ---- ===== Remboursement ===== Payment ↓ Refund ↓ Accounting Entry ---- ====== Permissions RBAC ====== ===== Contrats ===== contracts.read contracts.create contracts.update contracts.send contracts.sign ---- ===== Paiements ===== payments.read payments.create payments.refund ---- ===== Facturation ===== invoices.read invoices.create invoices.send ---- ====== Volume API ====== Cette phase ajoute : ≈ 65 endpoints ≈ 22 schémas ≈ 7 tags Swagger ---- ====== Cumul OpenAPI ====== Après Phase 3-A.4 : ≈ 185 endpoints ≈ 70 schémas ≈ 29 tags ---- ====== Phase 3-A.5 — OpenAPI CRM & Relation Client ====== ===== Objectif ===== Mettre en place le CRM intégré de la plateforme. Cette phase couvre : Sprint 8 CRM & Relation Client Le CRM est directement connecté aux : Customers Reservations Contracts Payments Marketing Automation afin de disposer d'une vision 360° du client. ---- ====== Tags OpenAPI ====== tags: - name: Leads - name: LeadSources - name: Pipelines - name: PipelineStages - name: Opportunities - name: Activities - name: Tasks - name: CustomerNotes - name: Tags - name: Segments ---- ====== Leads ====== ===== Lead ===== Lead: type: object properties: id: type: string format: uuid leadNumber: type: string firstName: type: string lastName: type: string email: type: string phone: type: string source: type: string score: type: integer status: $ref: '#/components/schemas/LeadStatus' assignedUserId: type: string createdAt: type: string format: date-time ---- ===== LeadStatus ===== LeadStatus: type: string enum: - NEW - QUALIFIED - CONTACTED - PROPOSAL_SENT - NEGOTIATION - WON - LOST ---- ===== Endpoints ===== GET /leads POST /leads GET /leads/{id} PATCH /leads/{id} DELETE /leads/{id} ---- ===== Recherche ===== GET /leads ?status=NEW ?assignedUserId=xxx ?source=WEBSITE ?scoreMin=50 ---- ====== Lead Sources ====== ===== LeadSource ===== LeadSource: type: object properties: id: type: string code: type: string name: type: string active: type: boolean ---- ===== Endpoints ===== GET /lead-sources POST /lead-sources PATCH /lead-sources/{id} DELETE /lead-sources/{id} ---- ===== Exemples ===== WEBSITE GOOGLE FACEBOOK INSTAGRAM BOOKING AIRBNB REFERRAL PHONE ---- ====== Pipelines ====== ===== Pipeline ===== Pipeline: type: object properties: id: type: string format: uuid code: type: string name: type: string active: type: boolean createdAt: type: string format: date-time ---- ===== Endpoints ===== GET /pipelines POST /pipelines GET /pipelines/{id} PATCH /pipelines/{id} DELETE /pipelines/{id} ---- ====== Pipeline Stages ====== ===== PipelineStage ===== PipelineStage: type: object properties: id: type: string pipelineId: type: string code: type: string name: type: string position: type: integer probability: type: integer ---- ===== Exemples ===== NEW QUALIFICATION CONTACT VISIT PROPOSAL NEGOTIATION WON LOST ---- ===== Endpoints ===== GET /pipelines/{id}/stages POST /pipelines/{id}/stages PATCH /pipeline-stages/{id} DELETE /pipeline-stages/{id} ---- ====== Opportunities ====== ===== Opportunity ===== Opportunity: type: object properties: id: type: string format: uuid leadId: type: string pipelineId: type: string stageId: type: string title: type: string estimatedValue: type: number probability: type: integer expectedCloseDate: type: string format: date status: $ref: '#/components/schemas/OpportunityStatus' ---- ===== OpportunityStatus ===== OpportunityStatus: type: string enum: - OPEN - WON - LOST - CANCELLED ---- ===== Endpoints ===== GET /opportunities POST /opportunities GET /opportunities/{id} PATCH /opportunities/{id} DELETE /opportunities/{id} ---- ===== Changement d'étape ===== POST /opportunities/{id}/move ---- ===== Request ===== MoveOpportunityRequest: type: object properties: stageId: type: string ---- ====== Activities ====== ===== Activity ===== Activity: type: object properties: id: type: string activityType: type: string subject: type: string description: type: string dueDate: type: string format: date-time completed: type: boolean ---- ===== Activity Types ===== CALL EMAIL VISIT MEETING VIDEO_CALL FOLLOW_UP ---- ===== Endpoints ===== GET /activities POST /activities GET /activities/{id} PATCH /activities/{id} DELETE /activities/{id} ---- ===== Affectation ===== POST /activities/{id}/assign ---- ====== Tasks ====== ===== Task ===== Task: type: object properties: id: type: string title: type: string description: type: string priority: $ref: '#/components/schemas/TaskPriority' status: $ref: '#/components/schemas/TaskStatus' dueDate: type: string format: date-time assignedUserId: type: string ---- ===== TaskPriority ===== TaskPriority: type: string enum: - LOW - MEDIUM - HIGH - URGENT ---- ===== TaskStatus ===== TaskStatus: type: string enum: - TODO - IN_PROGRESS - DONE - CANCELLED ---- ===== Endpoints ===== GET /tasks POST /tasks GET /tasks/{id} PATCH /tasks/{id} DELETE /tasks/{id} ---- ===== Workflow ===== Create Task ↓ Assign User ↓ Execute ↓ Done ---- ====== Customer Notes ====== ===== CustomerNote ===== CustomerNote: type: object properties: id: type: string customerId: type: string content: type: string visibility: type: string createdAt: type: string format: date-time ---- ===== Visibility ===== PRIVATE TEAM PUBLIC ---- ===== Endpoints ===== GET /customers/{id}/notes POST /customers/{id}/notes PATCH /customer-notes/{id} DELETE /customer-notes/{id} ---- ====== Tags ====== ===== Tag ===== Tag: type: object properties: id: type: string code: type: string label: type: string color: type: string ---- ===== Endpoints ===== GET /tags POST /tags PATCH /tags/{id} DELETE /tags/{id} ---- ===== Exemples ===== VIP HOT_LEAD OWNER RETURNING_CUSTOMER HIGH_VALUE ---- ====== Segments ====== ===== Segment ===== Segment: type: object properties: id: type: string code: type: string name: type: string rules: type: object active: type: boolean ---- ===== Endpoints ===== GET /segments POST /segments GET /segments/{id} PATCH /segments/{id} DELETE /segments/{id} ---- ===== Exemples ===== CLIENTS_FIDELES CLIENTS_INACTIFS PROPRIETAIRES_ACTIFS PROSPECTS_CHAUDS ANNIVERSAIRES ---- ====== CRM Dashboard ====== ===== KPI ===== Leads créés Leads qualifiés Opportunités ouvertes CA potentiel Tâches ouvertes Activités réalisées Taux de conversion ---- ===== Endpoint ===== GET /crm/dashboard ---- ====== Conversions ====== ===== Lead → Customer ===== POST /leads/{id}/convert ---- ===== Résultat ===== Lead ↓ Customer ↓ Opportunity ↓ Reservation ---- ====== Automatisations ====== ===== Attribution automatique ===== POST /leads/{id}/auto-assign ---- ===== Scoring ===== POST /leads/{id}/calculate-score ---- ===== Relances ===== POST /tasks/{id}/remind ---- ====== Permissions RBAC ====== ===== Leads ===== leads.read leads.create leads.update leads.delete leads.convert ---- ===== CRM ===== crm.read crm.manage crm.assign crm.export ---- ===== Tasks ===== tasks.read tasks.create tasks.update tasks.complete ---- ====== Volume API ====== Cette phase ajoute : ≈ 72 endpoints ≈ 25 schémas ≈ 10 tags Swagger ---- ====== Cumul OpenAPI ====== Après Phase 3-A.5 : ≈ 257 endpoints ≈ 95 schémas ≈ 39 tags ---- ====== Phase 3-A.6 — OpenAPI Messaging & Notifications ====== ===== Objectif ===== Construire le centre de communication unifié de la plateforme. Cette phase couvre : Sprint 9 Messagerie & Notifications Elle permettra : Messagerie interne Emails transactionnels SMS transactionnels Notifications temps réel Templates Campagnes Marketing Centre de communication ---- ====== Tags OpenAPI ====== tags: - name: Conversations - name: Messages - name: Notifications - name: Emails - name: SMS - name: Templates - name: Campaigns ---- ====== Conversations ====== ===== Conversation ===== Conversation: type: object properties: id: type: string format: uuid subject: type: string conversationType: $ref: '#/components/schemas/ConversationType' status: $ref: '#/components/schemas/ConversationStatus' createdAt: type: string format: date-time ---- ===== ConversationType ===== ConversationType: type: string enum: - INTERNAL - CUSTOMER - OWNER - RESERVATION - SUPPORT ---- ===== ConversationStatus ===== ConversationStatus: type: string enum: - OPEN - PENDING - CLOSED - ARCHIVED ---- ===== Endpoints ===== GET /conversations POST /conversations GET /conversations/{id} PATCH /conversations/{id} DELETE /conversations/{id} ---- ====== Participants ====== ===== Endpoints ===== GET /conversations/{id}/participants POST /conversations/{id}/participants DELETE /conversations/{id}/participants/{userId} ---- ====== Messages ====== ===== Message ===== Message: type: object properties: id: type: string conversationId: type: string senderId: type: string content: type: string attachments: type: array createdAt: type: string format: date-time ---- ===== Endpoints ===== GET /conversations/{id}/messages POST /conversations/{id}/messages GET /messages/{id} PATCH /messages/{id} DELETE /messages/{id} ---- ===== Pièces jointes ===== POST /messages/{id}/attachments ---- ====== Notifications ====== ===== Notification ===== Notification: type: object properties: id: type: string userId: type: string type: $ref: '#/components/schemas/NotificationType' title: type: string message: type: string read: type: boolean createdAt: type: string format: date-time ---- ===== NotificationType ===== NotificationType: type: string enum: - INFO - SUCCESS - WARNING - ERROR - SYSTEM ---- ===== Endpoints ===== GET /notifications GET /notifications/{id} PATCH /notifications/{id}/read PATCH /notifications/read-all DELETE /notifications/{id} ---- ====== Notifications Temps Réel ====== ===== WebSocket ===== /ws/notifications ---- ===== Événements ===== notification.created message.received reservation.created payment.received contract.signed ---- ====== Emails ====== ===== Email ===== Email: type: object properties: id: type: string to: type: string subject: type: string status: $ref: '#/components/schemas/EmailStatus' sentAt: type: string format: date-time ---- ===== EmailStatus ===== EmailStatus: type: string enum: - DRAFT - QUEUED - SENT - DELIVERED - OPENED - CLICKED - BOUNCED - FAILED ---- ===== Endpoints ===== GET /emails GET /emails/{id} POST /emails/send POST /emails/test ---- ===== Envoi Transactionnel ===== POST /emails/send ---- ===== Request ===== SendEmailRequest: type: object properties: to: type: string templateCode: type: string variables: type: object ---- ====== SMS ====== ===== Sms ===== Sms: type: object properties: id: type: string phoneNumber: type: string message: type: string status: $ref: '#/components/schemas/SmsStatus' sentAt: type: string format: date-time ---- ===== SmsStatus ===== SmsStatus: type: string enum: - QUEUED - SENT - DELIVERED - FAILED ---- ===== Endpoints ===== GET /sms GET /sms/{id} POST /sms/send POST /sms/test ---- ====== Templates ====== ===== Template ===== Template: type: object properties: id: type: string code: type: string name: type: string channel: type: string subject: type: string active: type: boolean ---- ===== Endpoints ===== GET /templates POST /templates GET /templates/{id} PATCH /templates/{id} DELETE /templates/{id} ---- ===== Types ===== EMAIL SMS PUSH IN_APP ---- ===== Exemples ===== RESERVATION_CONFIRMED PAYMENT_RECEIVED CONTRACT_SIGNED CHECKIN_REMINDER OWNER_MONTHLY_REPORT ---- ====== Campaigns ====== ===== Campaign ===== Campaign: type: object properties: id: type: string code: type: string name: type: string campaignType: type: string status: type: string scheduledAt: type: string format: date-time ---- ===== Endpoints ===== GET /campaigns POST /campaigns GET /campaigns/{id} PATCH /campaigns/{id} DELETE /campaigns/{id} ---- ===== Destinataires ===== GET /campaigns/{id}/recipients POST /campaigns/{id}/recipients ---- ===== Exécution ===== POST /campaigns/{id}/schedule POST /campaigns/{id}/start POST /campaigns/{id}/pause POST /campaigns/{id}/cancel ---- ====== Statistiques Campagnes ====== ===== Endpoint ===== GET /campaigns/{id}/statistics ---- ===== Réponse ===== CampaignStatistics: type: object properties: recipients: type: integer sent: type: integer opened: type: integer clicked: type: integer unsubscribed: type: integer ---- ====== Inbox Unifiée ====== ===== Endpoint ===== GET /communication/inbox ---- ===== Agrège ===== Messages Emails SMS Notifications ---- ====== Communication Dashboard ====== ===== KPI ===== Messages envoyés Emails délivrés Taux ouverture Taux clic SMS délivrés Notifications lues ---- ===== Endpoint ===== GET /communication/dashboard ---- ====== Intégrations ====== ===== Email ===== SMTP SendGrid Mailgun Amazon SES ---- ===== SMS ===== Twilio OVH SMS MessageBird ---- ===== Push ===== Firebase OneSignal ---- ====== Permissions RBAC ====== ===== Messaging ===== messages.read messages.create messages.delete ---- ===== Notifications ===== notifications.read notifications.manage ---- ===== Campaigns ===== campaigns.read campaigns.create campaigns.execute campaigns.delete ---- ====== Volume API ====== Cette phase ajoute : ≈ 84 endpoints ≈ 28 schémas ≈ 7 tags Swagger ---- ====== Cumul OpenAPI ====== Après Phase 3-A.6 : ≈ 341 endpoints ≈ 123 schémas ≈ 46 tags ---- ====== Phase 3-A.7 — OpenAPI Marketing, Automatisation & IA ====== ===== Objectif ===== Construire la couche d'automatisation intelligente de la plateforme. Cette phase couvre : Sprint 13 IA & Automatisation Elle permet : Segmentation Marketing Automation Scénarios métiers Déclencheurs Recommandations IA Assistant IA Knowledge Base Recherche sémantique ---- ====== Tags OpenAPI ====== tags: - name: MarketingSegments - name: MarketingEvents - name: AutomationRules - name: AutomationScenarios - name: AutomationExecutions - name: Recommendations - name: AI - name: KnowledgeBase ---- ====== Marketing Segments ====== ===== MarketingSegment ===== MarketingSegment: type: object properties: id: type: string format: uuid code: type: string name: type: string description: type: string active: type: boolean rules: type: object ---- ===== Endpoints ===== GET /marketing-segments POST /marketing-segments GET /marketing-segments/{id} PATCH /marketing-segments/{id} DELETE /marketing-segments/{id} ---- ===== Aperçu ===== POST /marketing-segments/{id}/preview ---- ===== Réponse ===== SegmentPreview: type: object properties: customerCount: type: integer leadCount: type: integer ---- ====== Marketing Events ====== ===== MarketingEvent ===== MarketingEvent: type: object properties: id: type: string eventType: type: string customerId: type: string occurredAt: type: string format: date-time payload: type: object ---- ===== Endpoints ===== GET /marketing-events GET /marketing-events/{id} ---- ===== Filtres ===== eventType customerId from to ---- ===== Exemples ===== EMAIL_OPEN EMAIL_CLICK PAGE_VISIT FORM_SUBMIT RESERVATION_CREATED PAYMENT_COMPLETED ---- ====== Automation Rules ====== ===== AutomationRule ===== AutomationRule: type: object properties: id: type: string code: type: string name: type: string triggerEvent: type: string active: type: boolean ---- ===== Endpoints ===== GET /automation-rules POST /automation-rules GET /automation-rules/{id} PATCH /automation-rules/{id} DELETE /automation-rules/{id} ---- ===== Activer ===== POST /automation-rules/{id}/enable ---- ===== Désactiver ===== POST /automation-rules/{id}/disable ---- ====== Automation Scenarios ====== ===== AutomationScenario ===== AutomationScenario: type: object properties: id: type: string code: type: string name: type: string triggerType: type: string active: type: boolean ---- ===== Endpoints ===== GET /automation-scenarios POST /automation-scenarios GET /automation-scenarios/{id} PATCH /automation-scenarios/{id} DELETE /automation-scenarios/{id} ---- ===== Simuler ===== POST /automation-scenarios/{id}/simulate ---- ===== Exécuter ===== POST /automation-scenarios/{id}/execute ---- ===== Exemple ===== ReservationConfirmed ↓ GenerateContract ↓ SendEmail ↓ CreateTask ↓ NotifyOwner ---- ====== Automation Executions ====== ===== AutomationExecution ===== AutomationExecution: type: object properties: id: type: string status: type: string entityType: type: string entityId: type: string startedAt: type: string format: date-time completedAt: type: string format: date-time ---- ===== Endpoints ===== GET /automation-executions GET /automation-executions/{id} ---- ===== Relancer ===== POST /automation-executions/{id}/retry ---- ====== Recommendations ====== ===== Recommendation ===== Recommendation: type: object properties: id: type: string recommendationType: type: string title: type: string description: type: string confidenceScore: type: number accepted: type: boolean ---- ===== Endpoints ===== GET /recommendations GET /recommendations/{id} ---- ===== Accepter ===== POST /recommendations/{id}/accept ---- ===== Rejeter ===== POST /recommendations/{id}/reject ---- ===== Types ===== PRICE_OPTIMIZATION CUSTOMER_RETENTION LEAD_CONVERSION REVENUE_FORECAST PROPERTY_IMPROVEMENT RISK_ALERT ---- ====== AI Assistant ====== ===== Conversation ===== AiConversation: type: object properties: id: type: string title: type: string model: type: string createdAt: type: string format: date-time ---- ===== Endpoints ===== GET /ai/conversations POST /ai/conversations GET /ai/conversations/{id} DELETE /ai/conversations/{id} ---- ====== Messages IA ====== ===== Endpoint ===== GET /ai/conversations/{id}/messages POST /ai/conversations/{id}/messages ---- ===== Request ===== AiMessageRequest: type: object properties: content: type: string ---- ===== Response ===== AiMessageResponse: type: object properties: content: type: string sources: type: array ---- ===== Cas d'usage ===== Quels sont les biens les moins rentables ? ---------------- Quels clients présentent un risque ? ---------------- Prévois les revenus des 90 prochains jours ---- ====== Knowledge Base ====== ===== KnowledgeDocument ===== KnowledgeDocument: type: object properties: id: type: string title: type: string sourceType: type: string indexed: type: boolean ---- ===== Endpoints ===== GET /knowledge/documents POST /knowledge/documents GET /knowledge/documents/{id} DELETE /knowledge/documents/{id} ---- ===== Upload ===== POST /knowledge/documents/upload ---- ===== Indexation ===== POST /knowledge/documents/{id}/index ---- ===== Recherche Sémantique ===== POST /knowledge/search ---- ===== Request ===== KnowledgeSearchRequest: type: object properties: query: type: string limit: type: integer ---- ===== Réponse ===== KnowledgeSearchResponse: type: object properties: documents: type: array chunks: type: array ---- ====== Dashboard IA ====== ===== Endpoint ===== GET /ai/dashboard ---- ===== KPI ===== Conversations Documents indexés Automatisations exécutées Recommandations générées Taux acceptation Temps gagné ---- ====== Événements ====== ===== Marketing ===== lead.created lead.converted campaign.started campaign.completed ---- ===== IA ===== recommendation.created assistant.question assistant.answer ---- ===== Automation ===== automation.started automation.completed automation.failed ---- ====== Permissions RBAC ====== ===== IA ===== ai.read ai.chat ai.manage ---- ===== Automatisation ===== automation.read automation.execute automation.manage ---- ===== Knowledge Base ===== knowledge.read knowledge.create knowledge.index knowledge.delete ---- ====== Volume API ====== Cette phase ajoute : ≈ 92 endpoints ≈ 30 schémas ≈ 8 tags Swagger ---- ====== Cumul OpenAPI ====== Après Phase 3-A.7 : ≈ 433 endpoints ≈ 153 schémas ≈ 54 tags ---- ====== Phase 3-A.8 — OpenAPI Governance, Audit & Administration ====== ===== Objectif ===== Construire la couche transverse de gouvernance, administration et conformité. Cette phase couvre : Sprint 10 Reporting Sprint 11 Administration Sprint 19 Gouvernance & Conformité Elle permet : Audit complet Historisation Feature Flags Workflows Administration Paramétrage plateforme Conformité Supervision ---- ====== Tags OpenAPI ====== tags: - name: AuditLogs - name: EntityHistory - name: FeatureFlags - name: Workflows - name: WorkflowInstances - name: WorkflowExecutions - name: Administration - name: SystemSettings ---- ====== Audit Logs ====== ===== AuditLog ===== AuditLog: type: object properties: id: type: string format: uuid entityType: type: string entityId: type: string action: type: string userId: type: string ipAddress: type: string correlationId: type: string createdAt: type: string format: date-time ---- ===== Endpoints ===== GET /audit-logs GET /audit-logs/{id} ---- ===== Recherche ===== GET /audit-logs ?entityType=Reservation ?entityId=xxx ?userId=xxx ?action=UPDATE ?from=2026-01-01 ?to=2026-01-31 ---- ===== Export ===== GET /audit-logs/export ---- ===== Formats ===== CSV XLSX JSON ---- ====== Entity History ====== ===== EntityHistory ===== EntityHistory: type: object properties: id: type: string entityType: type: string entityId: type: string version: type: integer snapshot: type: object createdAt: type: string format: date-time ---- ===== Endpoints ===== GET /entity-history GET /entity-history/{id} ---- ===== Historique d'une entité ===== GET /entity-history/{entityType}/{entityId} ---- ===== Restauration ===== POST /entity-history/{id}/restore ---- ====== Feature Flags ====== ===== FeatureFlag ===== FeatureFlag: type: object properties: id: type: string code: type: string name: type: string enabled: type: boolean configuration: type: object ---- ===== Endpoints ===== GET /feature-flags POST /feature-flags GET /feature-flags/{id} PATCH /feature-flags/{id} DELETE /feature-flags/{id} ---- ===== Activation ===== POST /feature-flags/{id}/enable POST /feature-flags/{id}/disable ---- ===== Exemples ===== AI_ASSISTANT ADVANCED_REPORTING OTA_V2 REVENUE_MANAGEMENT OWNER_PORTAL_V2 ---- ====== Workflows ====== ===== Workflow ===== Workflow: type: object properties: id: type: string code: type: string name: type: string entityType: type: string active: type: boolean ---- ===== Endpoints ===== GET /workflows POST /workflows GET /workflows/{id} PATCH /workflows/{id} DELETE /workflows/{id} ---- ====== Workflow Steps ====== ===== WorkflowStep ===== WorkflowStep: type: object properties: id: type: string workflowId: type: string code: type: string name: type: string position: type: integer approverRole: type: string ---- ===== Endpoints ===== GET /workflows/{id}/steps POST /workflows/{id}/steps PATCH /workflow-steps/{id} DELETE /workflow-steps/{id} ---- ===== Exemple ===== Reservation Approval ↓ Manager Approval ↓ Contract Generation ↓ Payment Validation ↓ Completed ---- ====== Workflow Instances ====== ===== WorkflowInstance ===== WorkflowInstance: type: object properties: id: type: string workflowId: type: string entityType: type: string entityId: type: string status: type: string ---- ===== Endpoints ===== GET /workflow-instances GET /workflow-instances/{id} ---- ===== Démarrer ===== POST /workflow-instances/start ---- ===== Approuver ===== POST /workflow-instances/{id}/approve ---- ===== Rejeter ===== POST /workflow-instances/{id}/reject ---- ===== Annuler ===== POST /workflow-instances/{id}/cancel ---- ====== Workflow Executions ====== ===== WorkflowExecution ===== WorkflowExecution: type: object properties: id: type: string workflowInstanceId: type: string workflowStepId: type: string status: type: string executedAt: type: string format: date-time ---- ===== Endpoints ===== GET /workflow-executions GET /workflow-executions/{id} ---- ====== Administration ====== ===== Tenant Administration ===== ===== Endpoints ===== GET /admin/tenants POST /admin/tenants GET /admin/tenants/{id} PATCH /admin/tenants/{id} ---- ===== Activation ===== POST /admin/tenants/{id}/activate POST /admin/tenants/{id}/suspend ---- ====== Agences ====== ===== Endpoints ===== GET /admin/agencies POST /admin/agencies GET /admin/agencies/{id} PATCH /admin/agencies/{id} DELETE /admin/agencies/{id} ---- ====== Paramètres Système ====== ===== SystemSetting ===== SystemSetting: type: object properties: code: type: string value: type: string category: type: string ---- ===== Endpoints ===== GET /system-settings GET /system-settings/{code} PUT /system-settings/{code} ---- ===== Catégories ===== SECURITY PAYMENTS EMAIL SMS OTA BOOKING INVOICING ---- ====== Gestion des Jobs ====== ===== Endpoints ===== GET /admin/jobs GET /admin/jobs/{id} POST /admin/jobs/{id}/retry POST /admin/jobs/{id}/cancel ---- ====== Santé de la plateforme ====== ===== Health Check ===== GET /admin/health ---- ===== Réponse ===== HealthResponse: type: object properties: database: type: string redis: type: string storage: type: string queue: type: string status: type: string ---- ====== Monitoring ====== ===== Endpoints ===== GET /admin/metrics GET /admin/version GET /admin/build ---- ====== Reporting ====== ===== Dashboard Gouvernance ===== GET /governance/dashboard ---- ===== KPI ===== Audit Logs Feature Flags Workflows actifs Incidents sécurité Conformité Risques ouverts ---- ====== Conformité ====== ===== Export RGPD ===== POST /governance/privacy/export ---- ===== Effacement ===== POST /governance/privacy/delete ---- ===== Consentements ===== GET /governance/consents ---- ====== Permissions RBAC ====== ===== Audit ===== audit.read audit.export ---- ===== Administration ===== admin.read admin.manage admin.settings ---- ===== Workflows ===== workflow.read workflow.manage workflow.execute ---- ===== Gouvernance ===== governance.read governance.manage ---- ====== Volume API ====== Cette phase ajoute : ≈ 86 endpoints ≈ 26 schémas ≈ 8 tags Swagger ---- ====== Cumul OpenAPI ====== Après Phase 3-A.8 : ≈ 519 endpoints ≈ 179 schémas ≈ 62 tags ---- ====== Phase 3-A.9 — OpenAPI OTA, Distribution & Channel Manager ====== ===== Objectif ===== Construire la couche de distribution multicanal de la plateforme. Cette phase couvre : Sprint 12 OTA & Distribution Sprint 14 API & Partenaires Sprint 18 Channel Manager Enterprise Cette couche permet : Publication OTA Synchronisation calendriers Synchronisation tarifs Synchronisation réservations Gestion erreurs OTA Connecteurs partenaires ---- ====== Tags OpenAPI ====== tags: - name: Channels - name: ChannelConnections - name: PropertyDistribution - name: ChannelReservations - name: Synchronization - name: SyncErrors - name: Partners ---- ====== Channels ====== ===== Channel ===== Channel: type: object properties: id: type: string format: uuid code: type: string name: type: string channelType: type: string active: type: boolean ---- ===== Endpoints ===== GET /channels GET /channels/{id} ---- ===== Canaux supportés ===== AIRBNB BOOKING VRBO ABRITEL EXPEDIA DIRECT ---- ====== Channel Connections ====== ===== ChannelConnection ===== ChannelConnection: type: object properties: id: type: string channelId: type: string connectionName: type: string accountIdentifier: type: string active: type: boolean lastSyncAt: type: string format: date-time ---- ===== Endpoints ===== GET /channel-connections POST /channel-connections GET /channel-connections/{id} PATCH /channel-connections/{id} DELETE /channel-connections/{id} ---- ===== Tester la connexion ===== POST /channel-connections/{id}/test ---- ===== Activer ===== POST /channel-connections/{id}/enable ---- ===== Désactiver ===== POST /channel-connections/{id}/disable ---- ====== Property Distribution ====== ===== PropertyDistribution ===== PropertyDistribution: type: object properties: id: type: string propertyId: type: string channelId: type: string published: type: boolean publicationStatus: type: string externalPropertyId: type: string ---- ===== Endpoints ===== GET /property-distributions POST /property-distributions GET /property-distributions/{id} PATCH /property-distributions/{id} DELETE /property-distributions/{id} ---- ===== Publication ===== POST /property-distributions/{id}/publish POST /property-distributions/{id}/unpublish ---- ===== Synchronisation ===== POST /property-distributions/{id}/sync ---- ====== Publication d'un bien ====== ===== Endpoint ===== POST /properties/{id}/publish-to-channel ---- ===== Request ===== PublishPropertyRequest: type: object properties: channelConnectionId: type: string ---- ====== Channel Reservations ====== ===== ChannelReservation ===== ChannelReservation: type: object properties: id: type: string reservationId: type: string externalReservationId: type: string externalStatus: type: string importedAt: type: string format: date-time ---- ===== Endpoints ===== GET /channel-reservations GET /channel-reservations/{id} ---- ===== Import OTA ===== POST /channel-reservations/import ---- ===== Réconciliation ===== POST /channel-reservations/{id}/reconcile ---- ====== Synchronization ====== ===== SyncExecution ===== SyncExecution: type: object properties: id: type: string syncType: type: string status: type: string startedAt: type: string format: date-time completedAt: type: string format: date-time processedCount: type: integer successCount: type: integer errorCount: type: integer ---- ===== Endpoints ===== GET /synchronizations GET /synchronizations/{id} ---- ===== Lancer ===== POST /synchronizations/start ---- ===== Synchronisation complète ===== POST /synchronizations/full ---- ===== Synchronisation calendrier ===== POST /synchronizations/calendar ---- ===== Synchronisation tarifs ===== POST /synchronizations/rates ---- ===== Synchronisation réservations ===== POST /synchronizations/reservations ---- ====== Types ====== PROPERTY_EXPORT AVAILABILITY_EXPORT RATE_EXPORT RESERVATION_IMPORT FULL_SYNC ---- ====== Sync Errors ====== ===== SyncError ===== SyncError: type: object properties: id: type: string errorCode: type: string errorMessage: type: string entityType: type: string entityId: type: string occurredAt: type: string format: date-time ---- ===== Endpoints ===== GET /sync-errors GET /sync-errors/{id} ---- ===== Relancer ===== POST /sync-errors/{id}/retry ---- ===== Ignorer ===== POST /sync-errors/{id}/ignore ---- ====== Calendrier OTA ====== ===== Endpoint ===== GET /channels/{channelId}/calendar ---- ===== Paramètres ===== propertyId from to ---- ====== Tarifs OTA ====== ===== Endpoint ===== GET /channels/{channelId}/rates ---- ===== Mise à jour ===== POST /channels/{channelId}/rates/push ---- ====== Dashboard OTA ====== ===== Endpoint ===== GET /ota/dashboard ---- ===== KPI ===== Biens publiés OTA connectés Synchronisations Erreurs OTA Réservations importées Temps moyen synchronisation ---- ====== Partenaires ====== ===== Partner ===== Partner: type: object properties: id: type: string code: type: string name: type: string active: type: boolean ---- ===== Endpoints ===== GET /partners POST /partners GET /partners/{id} PATCH /partners/{id} DELETE /partners/{id} ---- ===== API Keys ===== GET /partners/{id}/api-keys POST /partners/{id}/api-keys DELETE /partners/{id}/api-keys/{keyId} ---- ===== Webhooks ===== GET /partners/{id}/webhooks POST /partners/{id}/webhooks PATCH /partners/{id}/webhooks/{webhookId} DELETE /partners/{id}/webhooks/{webhookId} ---- ====== Marketplace ====== ===== Endpoint ===== GET /marketplace/connectors ---- ===== Connecteurs ===== Airbnb Booking Stripe Twilio Mailgun DocuSign Zapier ---- ====== Webhooks OTA ====== ===== Réservations ===== POST /webhooks/ota/reservation-created POST /webhooks/ota/reservation-updated POST /webhooks/ota/reservation-cancelled ---- ===== Calendrier ===== POST /webhooks/ota/calendar-updated ---- ===== Tarifs ===== POST /webhooks/ota/rate-updated ---- ====== Permissions RBAC ====== ===== OTA ===== ota.read ota.manage ota.sync ota.publish ---- ===== Partenaires ===== partners.read partners.manage partners.api ---- ====== Volume API ====== Cette phase ajoute : ≈ 76 endpoints ≈ 24 schémas ≈ 7 tags Swagger ---- ====== Cumul OpenAPI ====== Après Phase 3-A.9 : ≈ 595 endpoints ≈ 203 schémas ≈ 69 tags ---- ====== Phase 3-A.10 — OpenAPI Revenue Management & Business Intelligence ====== ===== Objectif ===== Construire la couche décisionnelle avancée de la plateforme. Cette phase couvre : Sprint 10 Reporting & Business Intelligence Sprint 13 Prévisions IA Sprint 17 Revenue Management Sprint 20 Enterprise Analytics Elle permet : Tarification dynamique Yield Management Prévisions Simulations Benchmark concurrence KPI avancés Pilotage financier ---- ====== Tags OpenAPI ====== tags: - name: PricingRules - name: DynamicPrices - name: RevenueForecasts - name: RevenueSimulations - name: CompetitorSnapshots - name: MarketDemand - name: Dashboards - name: Analytics ---- ====== Pricing Rules ====== ===== PricingRule ===== PricingRule: type: object properties: id: type: string format: uuid code: type: string name: type: string priority: type: integer active: type: boolean conditions: type: object actions: type: object ---- ===== Endpoints ===== GET /pricing-rules POST /pricing-rules GET /pricing-rules/{id} PATCH /pricing-rules/{id} DELETE /pricing-rules/{id} ---- ===== Activation ===== POST /pricing-rules/{id}/enable POST /pricing-rules/{id}/disable ---- ===== Simulation ===== POST /pricing-rules/{id}/simulate ---- ===== Exemples ===== Occupation > 80% ↓ +15% ---------------- Weekend ↓ +10% ---------------- Haute saison ↓ +25% ---- ====== Dynamic Prices ====== ===== DynamicPrice ===== DynamicPrice: type: object properties: id: type: string propertyId: type: string pricingDate: type: string format: date basePrice: type: number adjustedPrice: type: number demandFactor: type: number competitorFactor: type: number ---- ===== Endpoints ===== GET /dynamic-prices GET /dynamic-prices/{id} ---- ===== Calcul ===== POST /dynamic-prices/calculate ---- ===== Recalcul ===== POST /dynamic-prices/recalculate ---- ===== Recherche ===== GET /dynamic-prices ?propertyId=xxx ?from=2026-07-01 ?to=2026-07-31 ---- ====== Revenue Forecasts ====== ===== RevenueForecast ===== RevenueForecast: type: object properties: id: type: string propertyId: type: string forecastPeriodStart: type: string format: date forecastPeriodEnd: type: string format: date expectedRevenue: type: number expectedOccupancy: type: number confidenceLevel: type: number ---- ===== Endpoints ===== GET /revenue-forecasts GET /revenue-forecasts/{id} ---- ===== Génération ===== POST /revenue-forecasts/generate ---- ===== Prévisions ===== 7 jours 30 jours 90 jours 180 jours 365 jours ---- ====== Revenue Simulations ====== ===== RevenueSimulation ===== RevenueSimulation: type: object properties: id: type: string name: type: string projectedRevenue: type: number projectedOccupancy: type: number ---- ===== Endpoints ===== GET /revenue-simulations POST /revenue-simulations GET /revenue-simulations/{id} DELETE /revenue-simulations/{id} ---- ===== Exécuter ===== POST /revenue-simulations/{id}/run ---- ===== Comparer ===== POST /revenue-simulations/compare ---- ===== Exemple ===== Prix +10% ↓ Occupation -3% ↓ CA +6% ---- ====== Competitor Snapshots ====== ===== CompetitorSnapshot ===== CompetitorSnapshot: type: object properties: id: type: string propertyId: type: string competitorName: type: string nightlyRate: type: number occupancy: type: number snapshotDate: type: string format: date ---- ===== Endpoints ===== GET /competitor-snapshots GET /competitor-snapshots/{id} POST /competitor-snapshots/import ---- ===== Benchmark ===== GET /competitor-snapshots/benchmark ---- ===== Réponse ===== CompetitorBenchmark: type: object properties: marketAverage: type: number propertyAverage: type: number variance: type: number ---- ====== Market Demand ====== ===== MarketDemand ===== MarketDemand: type: object properties: id: type: string regionCode: type: string demandIndex: type: number occupancyIndex: type: number averageDailyRate: type: number demandDate: type: string format: date ---- ===== Endpoints ===== GET /market-demand GET /market-demand/{id} ---- ===== Tendances ===== GET /market-demand/trends ---- ===== Prévisions ===== GET /market-demand/forecast ---- ====== Revenue Dashboard ====== ===== Endpoint ===== GET /revenue/dashboard ---- ===== KPI ===== RevPAR ADR Occupancy Rate Revenue Forecast Accuracy Average Stay Cancellation Rate ---- ===== Réponse ===== RevenueDashboard: type: object properties: revenue: type: number occupancyRate: type: number averageDailyRate: type: number revPar: type: number ---- ====== Property Analytics ====== ===== Endpoint ===== GET /analytics/properties/{id} ---- ===== KPI ===== Occupation Revenus Tarif moyen Réservations Annulations ---- ====== Owner Analytics ====== ===== Endpoint ===== GET /analytics/owners/{id} ---- ===== KPI ===== Revenus Biens Occupation Commissions Paiements ---- ====== Reservation Analytics ====== ===== Endpoint ===== GET /analytics/reservations ---- ===== Filtres ===== from to propertyId ownerId ---- ====== Financial Analytics ====== ===== Endpoint ===== GET /analytics/financial ---- ===== KPI ===== Revenue Facturation Paiements Remboursements Commissions ---- ====== Forecast Analytics ====== ===== Endpoint ===== GET /analytics/forecast ---- ===== Réponse ===== ForecastAnalytics: type: object properties: next30Days: type: number next90Days: type: number next365Days: type: number ---- ====== Exports ====== ===== Endpoint ===== GET /analytics/export ---- ===== Formats ===== CSV XLSX PDF JSON ---- ===== Paramètres ===== dashboard from to format ---- ====== IA & Revenue Management ====== ===== Suggestions ===== GET /revenue/recommendations ---- ===== Types ===== PRICE_INCREASE PRICE_DECREASE PROMOTION MINIMUM_STAY AVAILABILITY_OPTIMIZATION ---- ===== Validation ===== POST /revenue/recommendations/{id}/accept POST /revenue/recommendations/{id}/reject ---- ====== Reporting Exécutif ====== ===== Endpoint ===== GET /executive/dashboard ---- ===== KPI ===== CA Total CA Prévisionnel Taux Occupation Top Biens Top Agences Top Propriétaires Taux Conversion ---- ====== Permissions RBAC ====== ===== Revenue ===== revenue.read revenue.manage revenue.forecast revenue.simulate ---- ===== Analytics ===== analytics.read analytics.export ---- ===== Reporting ===== reporting.read reporting.executive ---- ====== Volume API ====== Cette phase ajoute : ≈ 82 endpoints ≈ 32 schémas ≈ 8 tags Swagger ---- ====== Cumul OpenAPI ====== Après Phase 3-A.10 : ≈ 677 endpoints ≈ 235 schémas ≈ 77 tags ---- ====== Phase 3-A.11 — OpenAPI Security, Compliance & Enterprise ====== ===== Objectif ===== Construire la couche Enterprise Security de la plateforme. Cette phase couvre : Sprint 19 Gouvernance & Conformité Enterprise Security RGPD ISO 27001 SOC2 OWASP ASVS Elle permet : MFA SSO Consentements RGPD Gestion des risques Classification des données Politiques de sécurité Incidents Audits ---- ====== Tags OpenAPI ====== tags: - name: MFA - name: Identity - name: Sessions - name: Consents - name: Privacy - name: Risks - name: SecurityIncidents - name: ComplianceAudits - name: DataClassification - name: RetentionPolicies - name: SecurityPolicies ---- ====== MFA ====== ===== MfaConfiguration ===== MfaConfiguration: type: object properties: enabled: type: boolean method: $ref: '#/components/schemas/MfaMethod' backupCodesRemaining: type: integer ---- ===== MfaMethod ===== MfaMethod: type: string enum: - TOTP - EMAIL - SMS ---- ===== Endpoints ===== GET /security/mfa POST /security/mfa/enable POST /security/mfa/verify POST /security/mfa/disable POST /security/mfa/regenerate-backup-codes ---- ===== QR Code ===== GET /security/mfa/qrcode ---- ====== Identity & SSO ====== ===== IdentityProvider ===== IdentityProvider: type: object properties: id: type: string providerType: type: string name: type: string enabled: type: boolean ---- ===== Types ===== SAML OIDC AZURE_AD OKTA AUTH0 KEYCLOAK ---- ===== Endpoints ===== GET /identity/providers POST /identity/providers GET /identity/providers/{id} PATCH /identity/providers/{id} DELETE /identity/providers/{id} ---- ===== SAML ===== POST /identity/saml/configuration POST /identity/saml/test ---- ===== OIDC ===== POST /identity/oidc/configuration POST /identity/oidc/test ---- ====== Sessions ====== ===== ActiveSession ===== ActiveSession: type: object properties: id: type: string ipAddress: type: string country: type: string userAgent: type: string createdAt: type: string format: date-time lastActivityAt: type: string format: date-time ---- ===== Endpoints ===== GET /sessions GET /sessions/{id} DELETE /sessions/{id} DELETE /sessions/revoke-all ---- ====== Consents ====== ===== Consent ===== Consent: type: object properties: id: type: string consentType: type: string granted: type: boolean grantedAt: type: string format: date-time version: type: string ---- ===== Consent Types ===== GDPR COOKIES EMAIL_MARKETING SMS_MARKETING PROFILING ---- ===== Endpoints ===== GET /consents POST /consents GET /consents/{id} DELETE /consents/{id} ---- ===== Historique ===== GET /users/{id}/consents ---- ====== Privacy ====== ===== Export RGPD ===== POST /privacy/export ---- ===== Request ===== PrivacyExportRequest: type: object properties: format: type: string ---- ===== Formats ===== ZIP JSON PDF ---- ===== Droit à l'effacement ===== POST /privacy/erase ---- ===== Droit à la rectification ===== POST /privacy/rectify ---- ===== Droit à la limitation ===== POST /privacy/restrict-processing ---- ===== Registre traitements ===== GET /privacy/processing-register ---- ====== Risk Management ====== ===== Risk ===== Risk: type: object properties: id: type: string title: type: string probability: type: integer impact: type: integer score: type: integer level: $ref: '#/components/schemas/RiskLevel' ---- ===== RiskLevel ===== RiskLevel: type: string enum: - LOW - MEDIUM - HIGH - CRITICAL ---- ===== Endpoints ===== GET /risk-management/risks POST /risk-management/risks GET /risk-management/risks/{id} PATCH /risk-management/risks/{id} DELETE /risk-management/risks/{id} ---- ===== Évaluation ===== POST /risk-management/risks/{id}/evaluate ---- ===== Traitement ===== POST /risk-management/risks/{id}/mitigate ---- ====== Security Incidents ====== ===== SecurityIncident ===== SecurityIncident: type: object properties: id: type: string title: type: string severity: type: string status: type: string detectedAt: type: string format: date-time ---- ===== Endpoints ===== GET /security-incidents POST /security-incidents GET /security-incidents/{id} PATCH /security-incidents/{id} ---- ===== Workflow ===== Detected ↓ Qualified ↓ Investigating ↓ Resolved ↓ Closed ---- ===== Détection ===== POST /security-incidents/detect ---- ====== Compliance Audits ====== ===== ComplianceAudit ===== ComplianceAudit: type: object properties: id: type: string auditType: type: string status: type: string executedAt: type: string format: date-time ---- ===== Types ===== GDPR ISO27001 SOC2 NIS2 OWASP ---- ===== Endpoints ===== GET /compliance-audits POST /compliance-audits GET /compliance-audits/{id} PATCH /compliance-audits/{id} ---- ===== Rapport ===== GET /compliance-audits/{id}/report ---- ====== Data Classification ====== ===== DataClassification ===== DataClassification: type: object properties: id: type: string entityType: type: string classification: $ref: '#/components/schemas/DataSensitivity' ---- ===== DataSensitivity ===== DataSensitivity: type: string enum: - PUBLIC - INTERNAL - CONFIDENTIAL - RESTRICTED ---- ===== Endpoints ===== GET /data-classification POST /data-classification PATCH /data-classification/{id} ---- ====== Retention Policies ====== ===== RetentionPolicy ===== RetentionPolicy: type: object properties: id: type: string entityType: type: string retentionPeriodDays: type: integer archiveEnabled: type: boolean ---- ===== Endpoints ===== GET /retention-policies POST /retention-policies PATCH /retention-policies/{id} DELETE /retention-policies/{id} ---- ===== Exemples ===== AuditLogs 3650 jours Contracts 3650 jours Consents 1825 jours Sessions 365 jours Notifications 90 jours ---- ====== Security Policies ====== ===== SecurityPolicy ===== SecurityPolicy: type: object properties: id: type: string code: type: string configuration: type: object ---- ===== Endpoints ===== GET /security/policies PUT /security/policies ---- ===== Exemples ===== Password Policy Session Duration MFA Required Allowed Countries API Rate Limits ---- ====== Security Dashboard ====== ===== Endpoint ===== GET /security/dashboard ---- ===== KPI ===== MFA Enabled Users Active Sessions Open Risks Security Incidents Compliance Score Audit Success Rate ---- ====== Enterprise Monitoring ====== ===== Endpoint ===== GET /security/monitoring ---- ===== Détections ===== Impossible Travel Privilege Escalation Mass Export Brute Force Suspicious Login ---- ====== Permissions RBAC ====== ===== Security ===== security.read security.manage security.audit ---- ===== Compliance ===== compliance.read compliance.manage compliance.audit ---- ===== Privacy ===== privacy.read privacy.export privacy.erase ---- ====== Volume API ====== Cette phase ajoute : ≈ 94 endpoints ≈ 35 schémas ≈ 11 tags Swagger ---- ====== Cumul OpenAPI ====== Après Phase 3-A.11 : ≈ 771 endpoints ≈ 270 schémas ≈ 88 tags ---- ====== Phase 3-A.12 — OpenAPI Internationalisation, Multi-sites & Enterprise Release ====== ===== Objectif ===== Finaliser le contrat API Enterprise 4.0. Cette phase couvre : Sprint 15 Multi-sites & Réseau Sprint 20 Internationalisation Release Enterprise 4.0 Elle permet : Multi-langues Multi-devises Multi-fuseaux horaires Multi-régions Multi-sites Marque blanche Réseaux d'agences Licences Enterprise ---- ====== Tags OpenAPI ====== tags: - name: Countries - name: Currencies - name: Languages - name: Timezones - name: CurrencyRates - name: Translations - name: Regions - name: Sites - name: WhiteLabel - name: EnterpriseLicenses ---- ====== Countries ====== ===== Country ===== Country: type: object properties: id: type: string format: uuid isoCode: type: string name: type: string currencyCode: type: string languageCode: type: string timezone: type: string ---- ===== Endpoints ===== GET /countries GET /countries/{id} ---- ====== Currencies ====== ===== Currency ===== Currency: type: object properties: code: type: string name: type: string symbol: type: string decimals: type: integer ---- ===== Endpoints ===== GET /currencies GET /currencies/{code} ---- ===== Exemples ===== EUR USD GBP CHF CAD AED ---- ====== Currency Rates ====== ===== CurrencyRate ===== CurrencyRate: type: object properties: id: type: string baseCurrency: type: string targetCurrency: type: string exchangeRate: type: number effectiveDate: type: string format: date ---- ===== Endpoints ===== GET /currency-rates POST /currency-rates/synchronize ---- ===== Conversion ===== POST /currencies/convert ---- ===== Request ===== CurrencyConversionRequest: type: object properties: amount: type: number sourceCurrency: type: string targetCurrency: type: string ---- ====== Languages ====== ===== Language ===== Language: type: object properties: code: type: string name: type: string locale: type: string active: type: boolean ---- ===== Endpoints ===== GET /languages GET /languages/{code} PATCH /languages/{code} ---- ===== Exemples ===== fr-FR en-US en-GB es-ES it-IT de-DE nl-NL ---- ====== Timezones ====== ===== Timezone ===== Timezone: type: object properties: code: type: string offset: type: string label: type: string ---- ===== Endpoints ===== GET /timezones GET /timezones/{code} ---- ====== Translations ====== ===== Translation ===== Translation: type: object properties: id: type: string locale: type: string namespace: type: string translationKey: type: string translationValue: type: string ---- ===== Endpoints ===== GET /translations POST /translations PATCH /translations/{id} DELETE /translations/{id} ---- ===== Import ===== POST /translations/import ---- ===== Export ===== GET /translations/export ---- ====== Regions ====== ===== Region ===== Region: type: object properties: id: type: string code: type: string name: type: string defaultCurrency: type: string defaultLanguage: type: string ---- ===== Endpoints ===== GET /regions POST /regions GET /regions/{id} PATCH /regions/{id} DELETE /regions/{id} ---- ===== Exemples ===== EUROPE NORTH_AMERICA MIDDLE_EAST ASIA_PACIFIC ---- ====== Sites ====== ===== Site ===== Site: type: object properties: id: type: string code: type: string name: type: string domain: type: string active: type: boolean defaultLanguage: type: string ---- ===== Endpoints ===== GET /sites POST /sites GET /sites/{id} PATCH /sites/{id} DELETE /sites/{id} ---- ===== Domaines ===== POST /sites/{id}/domains DELETE /sites/{id}/domains/{domainId} ---- ====== White Label ====== ===== WhiteLabelConfiguration ===== WhiteLabelConfiguration: type: object properties: id: type: string logoUrl: type: string faviconUrl: type: string primaryColor: type: string secondaryColor: type: string ---- ===== Endpoints ===== GET /white-label PUT /white-label ---- ===== Personnalisation ===== Theme Logo Emails Domaines SEO ---- ====== Agency Network ====== ===== Endpoints ===== GET /agency-network POST /agency-network/join POST /agency-network/share-property ---- ===== Mutualisation ===== Réservations inter-agences Catalogue mutualisé Reporting mutualisé ---- ====== Enterprise Licenses ====== ===== EnterpriseLicense ===== EnterpriseLicense: type: object properties: id: type: string licenseKey: type: string licenseType: type: string validUntil: type: string format: date maxUsers: type: integer maxProperties: type: integer ---- ===== Endpoints ===== GET /enterprise-licenses POST /enterprise-licenses GET /enterprise-licenses/{id} PATCH /enterprise-licenses/{id} ---- ===== Validation ===== POST /enterprise-licenses/validate ---- ====== Multi-Régions ====== ===== Déploiements ===== GET /regions/deployments ---- ===== Réponse ===== EU-West US-East US-West Middle-East Asia-Pacific ---- ====== Paramètres de Localisation ====== ===== Endpoint ===== GET /localization/settings ---- ===== Réponse ===== LocalizationSettings: type: object properties: defaultLanguage: type: string defaultCurrency: type: string defaultTimezone: type: string ---- ====== Enterprise Dashboard ====== ===== Endpoint ===== GET /enterprise/dashboard ---- ===== KPI ===== Sites actifs Pays actifs Langues actives Régions actives Licences Agences connectées ---- ====== Permissions RBAC ====== ===== Internationalisation ===== i18n.read i18n.manage ---- ===== Multi-sites ===== sites.read sites.manage ---- ===== Enterprise ===== enterprise.read enterprise.manage enterprise.license ---- ====== Volume API ====== Cette phase ajoute : ≈ 88 endpoints ≈ 28 schémas ≈ 10 tags Swagger ---- ====== Cumul Final OpenAPI ====== Après Phase 3-A.12 : ≈ 859 endpoints ≈ 298 schémas ≈ 98 tags Swagger ≈ 110 domaines métier ≈ 1 contrat API Enterprise complet ---- ====== OpenAPI Enterprise 4.0 — TERMINÉ ====== Le contrat fonctionnel couvre désormais : ✓ Auth ✓ Users ✓ RBAC ✓ Owners ✓ Properties ✓ Customers ✓ Reservations ✓ Contracts ✓ Signatures ✓ Payments ✓ Invoices ✓ CRM ✓ Messaging ✓ Marketing ✓ Automation ✓ AI ✓ Knowledge Base ✓ Governance ✓ Administration ✓ OTA ✓ Channel Manager ✓ Revenue Management ✓ Analytics ✓ Security ✓ Compliance ✓ Internationalisation ✓ Multi-sites ✓ Enterprise ---- ====== Étape suivante recommandée ====== Le travail de conception est désormais terminé. Le prochain livrable devrait être : ===== Phase 4 ===== Génération du code exécutable 4-A Prisma Schema final consolidé 4-B DTO NestJS générés 4-C SDK TypeScript généré 4-D Structure NestJS complète 4-E Structure NextJS complète 4-F Docker Compose 4-G GitHub Actions 4-H Helm Charts 4-I Terraform Infrastructure 4-J Monorepo final À partir de ce point, on quitte la phase d'architecture pour entrer dans la phase d'industrialisation et de génération automatique du code source.