التوثيق متوفّر بالفرنسية والإنجليزية. يُعرض المحتوى هنا بالفرنسية — اختر EN من القائمة العلوية لقراءته بالإنجليزية.

المطوّرون
المرجع · Location

Réservations

Lister les réservations #

GET/api/public/v1/quosuite/car-rental/bookings
الصلاحية : rental_bookings:readlistRentalBookings

Réservations prises sur le site de location ou par l’API (source), avec leur statut montré, déduit du module (status=CONFIRMED,IN_PROGRESS). Filtres : site, véhicule, client, agence, email, départ (startFrom / startTo), attention=true (à traiter par l’agence), updatedSince. Tri permis : startAt, createdAt, updatedAt, number (défaut -createdAt).

المعاملات

  • langstringالاستعلام

    Langue des libellés (et du PDF). Défaut : Accept-Language, sinon la langue de l’espace.

    frenar
  • pagenumberالاستعلام

    Numéro de page (à partir de 1).

  • pageSizenumberالاستعلام

    Éléments par page (100 au plus).

  • sortstringالاستعلام

    Tri : champs séparés par des virgules, préfixe - pour l’ordre décroissant. Champs permis : voir la description de la route. Un dernier critère sur id rend la pagination stable.

  • updatedSincestringالاستعلام

    Ne renvoie que les éléments créés ou modifiés depuis cet instant (ISO 8601, inclus). Avec sort=updatedAt, c’est la forme recommandée d’une synchronisation incrémentale.

  • cursorstringالاستعلام

    Pagination par curseur : nextCursor de la page précédente, à repasser tel quel avec les mêmes filtres et le même tri. Stable même si des éléments sont créés pendant le parcours, et de coût constant quelle que soit la profondeur. Exclusif de page.

  • limitnumberالاستعلام

    Pagination par curseur : éléments par page (100 au plus). ?limit=100 ouvre un parcours par curseur ; la réponse rend pagination.nextCursor.

  • statusstring[]الاستعلام

    Statuts montrés, séparés par des virgules.

  • sourcestringالاستعلام
    WEBSITEAPI
  • siteIdstring (uuid)الاستعلام
  • vehicleIdstring (uuid)الاستعلام
  • customerIdstring (uuid)الاستعلام

    Client ERP.

  • agencyIdstring (uuid)الاستعلام

    Agence de départ ou de retour.

  • emailstringالاستعلام
  • startFromstringالاستعلام

    Départ à partir du (inclus).

  • startTostringالاستعلام

    Départ jusqu’au (inclus).

  • attentionbooleanالاستعلام

    Seulement celles qui demandent une action de l’agence.

الاستجابة 200application/json

Succès.

  • itemsRentalBookingDto[]إلزامي
    تفاصيل RentalBookingDto
  • paginationPaginationDtoإلزامي
    تفاصيل PaginationDto

الأخطاء

400VALIDATION_FAILEDIDEMPOTENCY_KEY_INVALIDINVALID_CURSOR

Paramètre ou corps invalide (champ manquant, inconnu, mal typé, tri non permis), ou curseur de pagination émis pour un autre tri ou d’autres filtres.

401API_KEY_MISSINGAPI_KEY_INVALIDAPI_KEY_REVOKEDAPI_KEY_EXPIRED

Jeton absent, invalide, révoqué ou expiré.

403API_KEY_WRONG_PERIMETERAPI_INSUFFICIENT_SCOPEAPI_ORIGIN_NOT_ALLOWEDAPI_TENANT_MISMATCHAPI_TENANT_INACTIVEAPI_MODULE_UNAVAILABLEAPI_FEATURE_UNAVAILABLE

Jeton valide mais insuffisant : mauvais périmètre, scope manquant, origine refusée, abonnement inactif ou module / option non inclus dans le plan.

429API_RATE_LIMITEDAPI_AUTH_BLOCKED

Quota du jeton ou de l’espace atteint (voir Retry-After), ou adresse bloquée.

500INTERNAL_ERROR

Erreur inattendue. Citez requestId au support.

503SERVICE_UNAVAILABLE

Indisponibilité temporaire (voir Retry-After). Aucun détail d’infrastructure.

مثال طلب
curl 'https://quosuite.com/api/public/v1/quosuite/car-rental/bookings' \
  -H "Authorization: Bearer $QUOSUITE_API_KEY"
مثال استجابة
{
  "success": true,
  "data": {
    "items": [
      {
        "id": "c3f8c2b0-25e0-431c-8558-8cc1a4cc0565",
        "number": "RES-2026-0042",
        "source": "WEBSITE",
        "status": "PENDING_PAYMENT",
        "statusLabel": "Confirmée",
        "paymentMode": "ONLINE",
        "paymentStatus": "NONE",
        "holdExpiresAt": "2026-10-02T09:15:00.000Z",
        "requestExpiresAt": "2026-10-02T09:15:00.000Z",
        "acceptedAt": "2026-10-02T09:15:00.000Z",
        "paymentTerm": {
          "type": "FULL",
          "value": 30
        },
        "paymentLink": {
          "id": "83ffc5fd-bdc9-4062-8087-a7ae7c56738d",
          "url": "https://portail.quosuite.com/pay/…",
          "amount": 287.69,
          "paidAmount": 0,
          "currency": "TND",
          "status": "ACTIVE",
          "expiresAt": "2026-10-02T09:15:00.000Z"
        },
        "siteId": "7dd62b53-1dd0-499a-8fb5-3edc84123531",
        "vehicle": {
          "id": "a2ad2669-1a21-406a-8d6d-91e8ed6ff091",
          "plate": "245 TU 1234",
          "brand": "Peugeot",
          "model": "208",
          "category": "Citadine",
          "fuel": "DIESEL",
          "gearbox": "Manuelle",
          "seats": 5
        },
        "period": {
          "startAt": "2026-12-20T09:00:00.000Z",
          "endAt": "2026-12-27T09:00:00.000Z",
          "days": 7
        },
        "pickupAgency": {
          "id": "b91c3927-1f63-45da-8d9c-9f48a57b7481",
          "code": "TUN",
          "name": "Tunis Centre"
        },
        "returnAgency": {
          "id": "b91c3927-1f63-45da-8d9c-9f48a57b7481",
          "code": "TUN",
          "name": "Tunis Centre"
        },
        "options": [
          {
            "optionId": "e966bb34-017e-440c-8e00-473dd1ccd625",
            "code": "gps",
            "label": "GPS",
            "quantity": 1,
            "perDay": true,
            "totalExclTax": 35,
            "totalInclTax": 41.65
          }
        ],
        "amounts": {
          "currency": "TND",
          "totalExclTax": 805,
          "totalVat": 152.95,
          "totalInclTax": 958.95,
          "deposit": 500,
          "due": 287.69,
          "paid": 958.95,
          "refunded": 0,
          "balanceDue": 0,
          "displayCurrency": "EUR",
          "displayTotalInclTax": 286.25
        },
        "deposit": {
          "status": "NONE",
          "statusLabel": "Détenue",
          "amount": 500,
          "method": "CASH",
          "returned": 0,
          "retained": 0
        },
        "customer": {
          "partnerId": "e85b60de-77d7-4856-8804-216b603b1c25",
          "name": "Sami Ben Ali",
          "email": "sami@example.tn",
          "phone": null
        },
        "driver": {
          "firstName": null,
          "lastName": null,
          "phone": null,
          "flightNumber": "TU 712",
          "secondDriverName": null
        },
        "notes": null,
        "reservation": {
          "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
          "number": "CTR-2026-0042",
          "status": "OPEN",
          "statusLabel": "En cours"
        },
        "contract": {
          "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
          "number": "CTR-2026-0042",
          "status": "OPEN",
          "statusLabel": "En cours"
        },
        "invoice": {
          "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
          "number": "CTR-2026-0042",
          "status": "OPEN",
          "statusLabel": "En cours"
        },
        "paymentId": "2f67d634-7e73-4b9a-8a0e-7f794a4147c9",
        "documents": {
          "voucher": true,
          "contract": true,
          "invoice": true
        },
        "erp": {
          "posted": true,
          "postedAt": "2026-10-02T09:15:00.000Z",
          "attention": true,
          "error": null
        },
        "trackingUrl": "https://location.exemple.tn/booking/track/…",
        "createdAt": "2026-10-02T09:15:00.000Z",
        "updatedAt": "2026-10-02T09:15:00.000Z"
      }
    ],
    "pagination": {
      "page": 1,
      "pageSize": 25,
      "totalItems": 132,
      "totalPages": 6,
      "limit": 100,
      "nextCursor": "c1.eyJzIjoiZGF0ZTpkZXNjLGlkOmFzYyIsImYiOiJ…",
      "hasMore": true
    }
  },
  "timestamp": "2026-10-02T09:15:00.000Z"
}
جرّب هذا الطلب

Créer une réservation #

POST/api/public/v1/quosuite/car-rental/bookings
الصلاحية : rental_bookings:writeآمن عند الإعادةcreateRentalBooking

Réserve un véhicule de la flotte — avec ou sans site de location — par le même parcours que le site : prix recalculé par le module (jamais repris de la requête), délai minimal, conducteur contrôlé, client retrouvé par email (ou customerId), véhicule retenu sous verrou. Sans siteId : tout véhicule actif, sans options ; avec : véhicule publié et options du site (module Site web). Les réglages du canal API s’appliquent (ouverture, politique de paiement, délais, agences, emails — GET /car-rental/booking-settings). Paiement : AGENCY (demande, acceptée ensuite par …/accept ou refusée), ONLINE (lien de paiement de l’acompte ou du total, paymentLink.url, véhicule retenu holdMinutes — politique PAY_ON_BOOKING), PREPAID (déjà encaissé, total ou acompte — scope payments:write en plus). Véhicule pris entre-temps : 409 CONFLICT (detail.rule: UNAVAILABLE) ; conducteur refusé : 422 (detail.rule: DRIVER_INVALID, detail.problems) ; mode refusé par la politique : 422 (detail.rule: PAYMENT_MODE). En-tête X-Rental-Session facultatif : la réservation est rattachée au compte du client connecté, dans son royaume (voir POST /car-rental/accounts/me/bookings).

المعاملات

  • Idempotency-Keystringترويسةإلزامي

    Obligatoire sur cette route. Clé d'idempotence (1–255 caractères ASCII imprimables, UUID v4 recommandé). Un nouvel essai avec la même clé et le même corps dans les 24 h rejoue la réponse du premier appel réussi (en-tête Idempotent-Replayed: true) au lieu de créer une seconde fois. Même clé, corps différent : 422 IDEMPOTENCY_KEY_REUSED. Premier appel encore en cours : 409 IDEMPOTENCY_IN_PROGRESS. Pour une réservation, la clé reste gardée sans échéance sur la réservation : rejouée même après 24 h, elle rend la même réservation ; même clé, autre véhicule ou autres dates : 422 IDEMPOTENCY_KEY_REUSED.

جسم الطلب application/json

  • siteIdstring (uuid)

    Site de location dont le catalogue s’applique (véhicule publié sur ce site, options payantes ; module Site web). Sans site : tout véhicule actif de la flotte, sans options. Dans les deux cas, ce sont les réglages du canal API qui s’appliquent (ouverture, politique de paiement, délais, agences, emails).

  • vehicleIdstring (uuid)إلزامي

    Véhicule de la flotte (publié sur le site si siteId est donné).

  • startAtstringإلزامي
    مثال2026-12-20T09:00:00Z
  • endAtstringإلزامي
    مثال2026-12-27T09:00:00Z
  • pickupAgencyIdstring (uuid)
  • returnAgencyIdstring (uuid)
  • optionsRentalOptionChoiceInput[]
    تفاصيل RentalOptionChoiceInput
  • langstring
    القيمfrenar
  • customerIdstring (uuid)

    Client ERP existant ; sans lui, le client est retrouvé par l’email du conducteur, ou créé.

  • driverRentalDriverInputإلزامي
    تفاصيل RentalDriverInput
  • paymentRentalBookingPaymentInputإلزامي
    تفاصيل RentalBookingPaymentInput
  • acceptTermsbooleanإلزامي

    Le client a accepté les conditions de location du site (obligatoire, true) — l’empreinte du texte accepté est gardée sur la réservation.

  • notesstring
    أقصىlength 1000

الاستجابة 201application/json

Créé.

  • idstring (uuid)إلزامي
  • numberstringإلزامي

    Numéro de la réservation du module.

    مثالRES-2026-0042
  • sourcestringإلزامي

    WEBSITE (site de location) ou API.

    القيمWEBSITEAPI
  • statusstringإلزامي

    Statut montré, déduit du module.

    القيمPENDING_PAYMENTREQUESTEDCONFIRMEDIN_PROGRESSRETURNEDCANCELLEDEXPIRED
  • statusLabelstringإلزامي
    مثالConfirmée
  • paymentModestringإلزامي
    القيمONLINEAGENCY
  • paymentStatusstringإلزامي
    القيمNONEPENDINGPAIDFAILEDPARTIALLY_REFUNDEDREFUNDEDPARTIALLY_PAID
  • holdExpiresAtstring | null

    Paiement en ligne attendu jusqu’à cet instant ; ensuite le véhicule est relâché.

  • requestExpiresAtstring | null

    Demande : l’agence répond avant cet instant, sinon elle expire (véhicule relâché).

  • acceptedAtstring | null

    Demande acceptée le…

  • paymentTermRentalPaymentTermDto | null

    Terme de paiement retenu (à la réservation, ou choisi à l’acceptation).

    تفاصيل RentalPaymentTermDto
  • paymentLinkRentalPaymentLinkDto | null

    Lien de paiement en cours (page /pay/…) : à transmettre au client s’il n’est pas prévenu par email (réglage notifyCustomer du canal API).

    تفاصيل RentalPaymentLinkDto
  • siteIdstring (uuid) | null

    Site dont le catalogue a servi ; null pour une réservation API sans site.

  • vehicleRentalVehicleSummaryDtoإلزامي
    تفاصيل RentalVehicleSummaryDto
  • periodRentalPeriodDtoإلزامي
    تفاصيل RentalPeriodDto
  • pickupAgencyRentalAgencyRefDto | null
    تفاصيل RentalAgencyRefDto
  • returnAgencyRentalAgencyRefDto | null
    تفاصيل RentalAgencyRefDto
  • optionsRentalBookingOptionDto[]إلزامي
    تفاصيل RentalBookingOptionDto
  • amountsRentalBookingAmountsDtoإلزامي
    تفاصيل RentalBookingAmountsDto
  • depositRentalDepositStateDto | null

    Caution du contrat (perçue à la remise) ; null tant qu’il n’y a pas de contrat.

    تفاصيل RentalDepositStateDto
  • customerRentalCustomerRefDtoإلزامي
    تفاصيل RentalCustomerRefDto
  • driverRentalBookingDriverDtoإلزامي

    Conducteur — pièces d’identité et permis : GET /car-rental/customers/{id}.

    تفاصيل RentalBookingDriverDto
  • notesstring | null
  • reservationRentalDocumentRefDto | null

    Réservation du module.

    تفاصيل RentalDocumentRefDto
  • contractRentalDocumentRefDto | null

    Contrat de location.

    تفاصيل RentalDocumentRefDto
  • invoiceRentalDocumentRefDto | null

    Facture ERP (aussi lisible par GET /sales/invoices/{id}).

    تفاصيل RentalDocumentRefDto
  • paymentIdstring (uuid) | null

    Encaissement ERP.

  • documentsRentalBookingDocumentsDtoإلزامي
    تفاصيل RentalBookingDocumentsDto
  • erpRentalBookingErpDtoإلزامي
    تفاصيل RentalBookingErpDto
  • trackingUrlstring | null

    Page de suivi du client sur le site (lien secret : à transmettre au client seulement).

    مثالhttps://location.exemple.tn/booking/track/…
  • createdAtstringإلزامي
  • updatedAtstringإلزامي
  • paymentErrorstring | null

    Lien de paiement non émis (payment.mode: ONLINE) : la réservation reste retenue holdMinutes ; l’agence peut l’accepter ou l’annuler.

الأخطاء

400VALIDATION_FAILEDIDEMPOTENCY_KEY_INVALIDINVALID_CURSOR

Paramètre ou corps invalide (champ manquant, inconnu, mal typé, tri non permis), ou curseur de pagination émis pour un autre tri ou d’autres filtres.

401API_KEY_MISSINGAPI_KEY_INVALIDAPI_KEY_REVOKEDAPI_KEY_EXPIRED

Jeton absent, invalide, révoqué ou expiré.

402PLAN_QUOTA_EXCEEDEDFEATURE_NOT_INCLUDEDMODULE_NOT_INCLUDED

Limite ou option du plan d’abonnement (quota mensuel de documents, multi-devise…).

403API_KEY_WRONG_PERIMETERAPI_INSUFFICIENT_SCOPEAPI_ORIGIN_NOT_ALLOWEDAPI_TENANT_MISMATCHAPI_TENANT_INACTIVEAPI_MODULE_UNAVAILABLEAPI_FEATURE_UNAVAILABLE

Jeton valide mais insuffisant : mauvais périmètre, scope manquant, origine refusée, abonnement inactif ou module / option non inclus dans le plan.

404NOT_FOUND

Ressource absente — ou appartenant à un autre espace, ce qui revient au même.

409CONFLICTIDEMPOTENCY_IN_PROGRESS

Conflit : valeur unique déjà prise, ou même clé d’idempotence encore en cours.

422BUSINESS_RULE_VIOLATIONIDEMPOTENCY_KEY_REUSED

Requête bien formée mais refusée par une règle de gestion de l’ERP (transition de statut interdite, pièce réglée verrouillée, stock…), ou clé d’idempotence réutilisée.

429API_RATE_LIMITEDAPI_AUTH_BLOCKED

Quota du jeton ou de l’espace atteint (voir Retry-After), ou adresse bloquée.

500INTERNAL_ERROR

Erreur inattendue. Citez requestId au support.

503SERVICE_UNAVAILABLE

Indisponibilité temporaire (voir Retry-After). Aucun détail d’infrastructure.

مثال طلب
# Une clé par opération, réutilisée telle quelle à chaque nouvel essai.
curl -X POST 'https://quosuite.com/api/public/v1/quosuite/car-rental/bookings' \
  -H "Authorization: Bearer $QUOSUITE_API_KEY" \
  -H 'Idempotency-Key: 3f1c2a9e-5b7d-4e8a-9c1f-2d6b8e4a7c30' \
  -H 'Content-Type: application/json' \
  -d '{
  "vehicleId": "1ceeeeaf-de4f-4482-89e9-619e1015a25d",
  "startAt": "2026-12-20T09:00:00Z",
  "endAt": "2026-12-27T09:00:00Z",
  "driver": {
    "firstName": "Sami",
    "lastName": "Ben Ali",
    "email": "sami@example.tn"
  },
  "payment": {
    "mode": "AGENCY"
  },
  "acceptTerms": true
}'
مثال استجابة
{
  "success": true,
  "data": {
    "id": "f1b9a734-178b-43b2-8331-6bcd2ce5c385",
    "number": "RES-2026-0042",
    "source": "WEBSITE",
    "status": "PENDING_PAYMENT",
    "statusLabel": "Confirmée",
    "paymentMode": "ONLINE",
    "paymentStatus": "NONE",
    "holdExpiresAt": "2026-10-02T09:15:00.000Z",
    "requestExpiresAt": "2026-10-02T09:15:00.000Z",
    "acceptedAt": "2026-10-02T09:15:00.000Z",
    "paymentTerm": {
      "type": "FULL",
      "value": 30
    },
    "paymentLink": {
      "id": "83ffc5fd-bdc9-4062-8087-a7ae7c56738d",
      "url": "https://portail.quosuite.com/pay/…",
      "amount": 287.69,
      "paidAmount": 0,
      "currency": "TND",
      "status": "ACTIVE",
      "expiresAt": "2026-10-02T09:15:00.000Z"
    },
    "siteId": "e10bb107-d58b-42d6-88d6-23b632aff3e9",
    "vehicle": {
      "id": "a2ad2669-1a21-406a-8d6d-91e8ed6ff091",
      "plate": "245 TU 1234",
      "brand": "Peugeot",
      "model": "208",
      "category": "Citadine",
      "fuel": "DIESEL",
      "gearbox": "Manuelle",
      "seats": 5
    },
    "period": {
      "startAt": "2026-12-20T09:00:00.000Z",
      "endAt": "2026-12-27T09:00:00.000Z",
      "days": 7
    },
    "pickupAgency": {
      "id": "b91c3927-1f63-45da-8d9c-9f48a57b7481",
      "code": "TUN",
      "name": "Tunis Centre"
    },
    "returnAgency": {
      "id": "b91c3927-1f63-45da-8d9c-9f48a57b7481",
      "code": "TUN",
      "name": "Tunis Centre"
    },
    "options": [
      {
        "optionId": "e966bb34-017e-440c-8e00-473dd1ccd625",
        "code": "gps",
        "label": "GPS",
        "quantity": 1,
        "perDay": true,
        "totalExclTax": 35,
        "totalInclTax": 41.65
      }
    ],
    "amounts": {
      "currency": "TND",
      "totalExclTax": 805,
      "totalVat": 152.95,
      "totalInclTax": 958.95,
      "deposit": 500,
      "due": 287.69,
      "paid": 958.95,
      "refunded": 0,
      "balanceDue": 0,
      "displayCurrency": "EUR",
      "displayTotalInclTax": 286.25
    },
    "deposit": {
      "status": "NONE",
      "statusLabel": "Détenue",
      "amount": 500,
      "method": "CASH",
      "returned": 0,
      "retained": 0
    },
    "customer": {
      "partnerId": "e85b60de-77d7-4856-8804-216b603b1c25",
      "name": "Sami Ben Ali",
      "email": "sami@example.tn",
      "phone": null
    },
    "driver": {
      "firstName": null,
      "lastName": null,
      "phone": null,
      "flightNumber": "TU 712",
      "secondDriverName": null
    },
    "notes": null,
    "reservation": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "contract": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "invoice": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "paymentId": "fd563560-219d-4768-8fdd-34b9956c9d5d",
    "documents": {
      "voucher": true,
      "contract": true,
      "invoice": true
    },
    "erp": {
      "posted": true,
      "postedAt": "2026-10-02T09:15:00.000Z",
      "attention": true,
      "error": null
    },
    "trackingUrl": "https://location.exemple.tn/booking/track/…",
    "createdAt": "2026-10-02T09:15:00.000Z",
    "updatedAt": "2026-10-02T09:15:00.000Z",
    "paymentError": null
  },
  "timestamp": "2026-10-02T09:15:00.000Z"
}

Détail d’une réservation #

GET/api/public/v1/quosuite/car-rental/bookings/{id}
الصلاحية : rental_bookings:readgetRentalBooking

Statut montré, paiement, véhicule, période, agences, options, montants, caution, client, réservation du module, contrat, facture, état de la mise en gestion.

المعاملات

  • idstring (uuid)المسارإلزامي
  • langstringالاستعلام

    Langue des libellés (et du PDF). Défaut : Accept-Language, sinon la langue de l’espace.

    frenar

الاستجابة 200application/json

Succès.

  • idstring (uuid)إلزامي
  • numberstringإلزامي

    Numéro de la réservation du module.

    مثالRES-2026-0042
  • sourcestringإلزامي

    WEBSITE (site de location) ou API.

    القيمWEBSITEAPI
  • statusstringإلزامي

    Statut montré, déduit du module.

    القيمPENDING_PAYMENTREQUESTEDCONFIRMEDIN_PROGRESSRETURNEDCANCELLEDEXPIRED
  • statusLabelstringإلزامي
    مثالConfirmée
  • paymentModestringإلزامي
    القيمONLINEAGENCY
  • paymentStatusstringإلزامي
    القيمNONEPENDINGPAIDFAILEDPARTIALLY_REFUNDEDREFUNDEDPARTIALLY_PAID
  • holdExpiresAtstring | null

    Paiement en ligne attendu jusqu’à cet instant ; ensuite le véhicule est relâché.

  • requestExpiresAtstring | null

    Demande : l’agence répond avant cet instant, sinon elle expire (véhicule relâché).

  • acceptedAtstring | null

    Demande acceptée le…

  • paymentTermRentalPaymentTermDto | null

    Terme de paiement retenu (à la réservation, ou choisi à l’acceptation).

    تفاصيل RentalPaymentTermDto
  • paymentLinkRentalPaymentLinkDto | null

    Lien de paiement en cours (page /pay/…) : à transmettre au client s’il n’est pas prévenu par email (réglage notifyCustomer du canal API).

    تفاصيل RentalPaymentLinkDto
  • siteIdstring (uuid) | null

    Site dont le catalogue a servi ; null pour une réservation API sans site.

  • vehicleRentalVehicleSummaryDtoإلزامي
    تفاصيل RentalVehicleSummaryDto
  • periodRentalPeriodDtoإلزامي
    تفاصيل RentalPeriodDto
  • pickupAgencyRentalAgencyRefDto | null
    تفاصيل RentalAgencyRefDto
  • returnAgencyRentalAgencyRefDto | null
    تفاصيل RentalAgencyRefDto
  • optionsRentalBookingOptionDto[]إلزامي
    تفاصيل RentalBookingOptionDto
  • amountsRentalBookingAmountsDtoإلزامي
    تفاصيل RentalBookingAmountsDto
  • depositRentalDepositStateDto | null

    Caution du contrat (perçue à la remise) ; null tant qu’il n’y a pas de contrat.

    تفاصيل RentalDepositStateDto
  • customerRentalCustomerRefDtoإلزامي
    تفاصيل RentalCustomerRefDto
  • driverRentalBookingDriverDtoإلزامي

    Conducteur — pièces d’identité et permis : GET /car-rental/customers/{id}.

    تفاصيل RentalBookingDriverDto
  • notesstring | null
  • reservationRentalDocumentRefDto | null

    Réservation du module.

    تفاصيل RentalDocumentRefDto
  • contractRentalDocumentRefDto | null

    Contrat de location.

    تفاصيل RentalDocumentRefDto
  • invoiceRentalDocumentRefDto | null

    Facture ERP (aussi lisible par GET /sales/invoices/{id}).

    تفاصيل RentalDocumentRefDto
  • paymentIdstring (uuid) | null

    Encaissement ERP.

  • documentsRentalBookingDocumentsDtoإلزامي
    تفاصيل RentalBookingDocumentsDto
  • erpRentalBookingErpDtoإلزامي
    تفاصيل RentalBookingErpDto
  • trackingUrlstring | null

    Page de suivi du client sur le site (lien secret : à transmettre au client seulement).

    مثالhttps://location.exemple.tn/booking/track/…
  • createdAtstringإلزامي
  • updatedAtstringإلزامي

الأخطاء

400VALIDATION_FAILEDIDEMPOTENCY_KEY_INVALIDINVALID_CURSOR

Paramètre ou corps invalide (champ manquant, inconnu, mal typé, tri non permis), ou curseur de pagination émis pour un autre tri ou d’autres filtres.

401API_KEY_MISSINGAPI_KEY_INVALIDAPI_KEY_REVOKEDAPI_KEY_EXPIRED

Jeton absent, invalide, révoqué ou expiré.

403API_KEY_WRONG_PERIMETERAPI_INSUFFICIENT_SCOPEAPI_ORIGIN_NOT_ALLOWEDAPI_TENANT_MISMATCHAPI_TENANT_INACTIVEAPI_MODULE_UNAVAILABLEAPI_FEATURE_UNAVAILABLE

Jeton valide mais insuffisant : mauvais périmètre, scope manquant, origine refusée, abonnement inactif ou module / option non inclus dans le plan.

404NOT_FOUND

Ressource absente — ou appartenant à un autre espace, ce qui revient au même.

429API_RATE_LIMITEDAPI_AUTH_BLOCKED

Quota du jeton ou de l’espace atteint (voir Retry-After), ou adresse bloquée.

500INTERNAL_ERROR

Erreur inattendue. Citez requestId au support.

503SERVICE_UNAVAILABLE

Indisponibilité temporaire (voir Retry-After). Aucun détail d’infrastructure.

مثال طلب
curl 'https://quosuite.com/api/public/v1/quosuite/car-rental/bookings/aac39e3a-0c40-44b2-8697-b597f357c5a9' \
  -H "Authorization: Bearer $QUOSUITE_API_KEY"
مثال استجابة
{
  "success": true,
  "data": {
    "id": "c3f8c2b0-25e0-431c-8558-8cc1a4cc0565",
    "number": "RES-2026-0042",
    "source": "WEBSITE",
    "status": "PENDING_PAYMENT",
    "statusLabel": "Confirmée",
    "paymentMode": "ONLINE",
    "paymentStatus": "NONE",
    "holdExpiresAt": "2026-10-02T09:15:00.000Z",
    "requestExpiresAt": "2026-10-02T09:15:00.000Z",
    "acceptedAt": "2026-10-02T09:15:00.000Z",
    "paymentTerm": {
      "type": "FULL",
      "value": 30
    },
    "paymentLink": {
      "id": "83ffc5fd-bdc9-4062-8087-a7ae7c56738d",
      "url": "https://portail.quosuite.com/pay/…",
      "amount": 287.69,
      "paidAmount": 0,
      "currency": "TND",
      "status": "ACTIVE",
      "expiresAt": "2026-10-02T09:15:00.000Z"
    },
    "siteId": "7dd62b53-1dd0-499a-8fb5-3edc84123531",
    "vehicle": {
      "id": "a2ad2669-1a21-406a-8d6d-91e8ed6ff091",
      "plate": "245 TU 1234",
      "brand": "Peugeot",
      "model": "208",
      "category": "Citadine",
      "fuel": "DIESEL",
      "gearbox": "Manuelle",
      "seats": 5
    },
    "period": {
      "startAt": "2026-12-20T09:00:00.000Z",
      "endAt": "2026-12-27T09:00:00.000Z",
      "days": 7
    },
    "pickupAgency": {
      "id": "b91c3927-1f63-45da-8d9c-9f48a57b7481",
      "code": "TUN",
      "name": "Tunis Centre"
    },
    "returnAgency": {
      "id": "b91c3927-1f63-45da-8d9c-9f48a57b7481",
      "code": "TUN",
      "name": "Tunis Centre"
    },
    "options": [
      {
        "optionId": "e966bb34-017e-440c-8e00-473dd1ccd625",
        "code": "gps",
        "label": "GPS",
        "quantity": 1,
        "perDay": true,
        "totalExclTax": 35,
        "totalInclTax": 41.65
      }
    ],
    "amounts": {
      "currency": "TND",
      "totalExclTax": 805,
      "totalVat": 152.95,
      "totalInclTax": 958.95,
      "deposit": 500,
      "due": 287.69,
      "paid": 958.95,
      "refunded": 0,
      "balanceDue": 0,
      "displayCurrency": "EUR",
      "displayTotalInclTax": 286.25
    },
    "deposit": {
      "status": "NONE",
      "statusLabel": "Détenue",
      "amount": 500,
      "method": "CASH",
      "returned": 0,
      "retained": 0
    },
    "customer": {
      "partnerId": "e85b60de-77d7-4856-8804-216b603b1c25",
      "name": "Sami Ben Ali",
      "email": "sami@example.tn",
      "phone": null
    },
    "driver": {
      "firstName": null,
      "lastName": null,
      "phone": null,
      "flightNumber": "TU 712",
      "secondDriverName": null
    },
    "notes": null,
    "reservation": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "contract": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "invoice": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "paymentId": "2f67d634-7e73-4b9a-8a0e-7f794a4147c9",
    "documents": {
      "voucher": true,
      "contract": true,
      "invoice": true
    },
    "erp": {
      "posted": true,
      "postedAt": "2026-10-02T09:15:00.000Z",
      "attention": true,
      "error": null
    },
    "trackingUrl": "https://location.exemple.tn/booking/track/…",
    "createdAt": "2026-10-02T09:15:00.000Z",
    "updatedAt": "2026-10-02T09:15:00.000Z"
  },
  "timestamp": "2026-10-02T09:15:00.000Z"
}
جرّب هذا الطلب

Accepter une demande (terme de paiement) #

POST/api/public/v1/quosuite/car-rental/bookings/{id}/accept
الصلاحية : rental_bookings:writeآمن عند الإعادةacceptRentalBooking

Accepte une demande (REQUESTED) en choisissant le terme de paiement : FULL (total), PERCENT (acompte en %), FIXED (acompte fixe) — défaut : onAcceptance de la politique. Un lien de paiement du montant est émis (paymentLink) et envoyé au client (sauf notifyCustomer: false) ; le véhicule reste retenu jusqu’à holdExpiresAt (deadlineHours, jamais au-delà du départ). Statut PENDING_PAYMENT, puis CONFIRMED au paiement — sinon EXPIRED, véhicule relâché. NONE : confirmée sans paiement.

المعاملات

  • idstring (uuid)المسارإلزامي
  • Idempotency-Keystringترويسة

    Clé d'idempotence (1–255 caractères ASCII imprimables, UUID v4 recommandé). Un nouvel essai avec la même clé et le même corps dans les 24 h rejoue la réponse du premier appel réussi (en-tête Idempotent-Replayed: true) au lieu de créer une seconde fois. Même clé, corps différent : 422 IDEMPOTENCY_KEY_REUSED. Premier appel encore en cours : 409 IDEMPOTENCY_IN_PROGRESS.

جسم الطلب application/json

  • termRentalPaymentTermInput

    Défaut : onAcceptance de la politique de paiement du canal.

    تفاصيل RentalPaymentTermInput
  • deadlineHoursnumber

    Validité du lien (heures) ; défaut : paymentDeadlineHours, jamais au-delà du départ.

    أدنى1أقصى1440مثال48

الاستجابة 200application/json

Succès.

  • idstring (uuid)إلزامي
  • numberstringإلزامي

    Numéro de la réservation du module.

    مثالRES-2026-0042
  • sourcestringإلزامي

    WEBSITE (site de location) ou API.

    القيمWEBSITEAPI
  • statusstringإلزامي

    Statut montré, déduit du module.

    القيمPENDING_PAYMENTREQUESTEDCONFIRMEDIN_PROGRESSRETURNEDCANCELLEDEXPIRED
  • statusLabelstringإلزامي
    مثالConfirmée
  • paymentModestringإلزامي
    القيمONLINEAGENCY
  • paymentStatusstringإلزامي
    القيمNONEPENDINGPAIDFAILEDPARTIALLY_REFUNDEDREFUNDEDPARTIALLY_PAID
  • holdExpiresAtstring | null

    Paiement en ligne attendu jusqu’à cet instant ; ensuite le véhicule est relâché.

  • requestExpiresAtstring | null

    Demande : l’agence répond avant cet instant, sinon elle expire (véhicule relâché).

  • acceptedAtstring | null

    Demande acceptée le…

  • paymentTermRentalPaymentTermDto | null

    Terme de paiement retenu (à la réservation, ou choisi à l’acceptation).

    تفاصيل RentalPaymentTermDto
  • paymentLinkRentalPaymentLinkDto | null

    Lien de paiement en cours (page /pay/…) : à transmettre au client s’il n’est pas prévenu par email (réglage notifyCustomer du canal API).

    تفاصيل RentalPaymentLinkDto
  • siteIdstring (uuid) | null

    Site dont le catalogue a servi ; null pour une réservation API sans site.

  • vehicleRentalVehicleSummaryDtoإلزامي
    تفاصيل RentalVehicleSummaryDto
  • periodRentalPeriodDtoإلزامي
    تفاصيل RentalPeriodDto
  • pickupAgencyRentalAgencyRefDto | null
    تفاصيل RentalAgencyRefDto
  • returnAgencyRentalAgencyRefDto | null
    تفاصيل RentalAgencyRefDto
  • optionsRentalBookingOptionDto[]إلزامي
    تفاصيل RentalBookingOptionDto
  • amountsRentalBookingAmountsDtoإلزامي
    تفاصيل RentalBookingAmountsDto
  • depositRentalDepositStateDto | null

    Caution du contrat (perçue à la remise) ; null tant qu’il n’y a pas de contrat.

    تفاصيل RentalDepositStateDto
  • customerRentalCustomerRefDtoإلزامي
    تفاصيل RentalCustomerRefDto
  • driverRentalBookingDriverDtoإلزامي

    Conducteur — pièces d’identité et permis : GET /car-rental/customers/{id}.

    تفاصيل RentalBookingDriverDto
  • notesstring | null
  • reservationRentalDocumentRefDto | null

    Réservation du module.

    تفاصيل RentalDocumentRefDto
  • contractRentalDocumentRefDto | null

    Contrat de location.

    تفاصيل RentalDocumentRefDto
  • invoiceRentalDocumentRefDto | null

    Facture ERP (aussi lisible par GET /sales/invoices/{id}).

    تفاصيل RentalDocumentRefDto
  • paymentIdstring (uuid) | null

    Encaissement ERP.

  • documentsRentalBookingDocumentsDtoإلزامي
    تفاصيل RentalBookingDocumentsDto
  • erpRentalBookingErpDtoإلزامي
    تفاصيل RentalBookingErpDto
  • trackingUrlstring | null

    Page de suivi du client sur le site (lien secret : à transmettre au client seulement).

    مثالhttps://location.exemple.tn/booking/track/…
  • createdAtstringإلزامي
  • updatedAtstringإلزامي

الأخطاء

400VALIDATION_FAILEDIDEMPOTENCY_KEY_INVALIDINVALID_CURSOR

Paramètre ou corps invalide (champ manquant, inconnu, mal typé, tri non permis), ou curseur de pagination émis pour un autre tri ou d’autres filtres.

401API_KEY_MISSINGAPI_KEY_INVALIDAPI_KEY_REVOKEDAPI_KEY_EXPIRED

Jeton absent, invalide, révoqué ou expiré.

403API_KEY_WRONG_PERIMETERAPI_INSUFFICIENT_SCOPEAPI_ORIGIN_NOT_ALLOWEDAPI_TENANT_MISMATCHAPI_TENANT_INACTIVEAPI_MODULE_UNAVAILABLEAPI_FEATURE_UNAVAILABLE

Jeton valide mais insuffisant : mauvais périmètre, scope manquant, origine refusée, abonnement inactif ou module / option non inclus dans le plan.

404NOT_FOUND

Ressource absente — ou appartenant à un autre espace, ce qui revient au même.

409CONFLICTIDEMPOTENCY_IN_PROGRESS

Conflit : valeur unique déjà prise, ou même clé d’idempotence encore en cours.

422BUSINESS_RULE_VIOLATIONIDEMPOTENCY_KEY_REUSED

Requête bien formée mais refusée par une règle de gestion de l’ERP (transition de statut interdite, pièce réglée verrouillée, stock…), ou clé d’idempotence réutilisée.

429API_RATE_LIMITEDAPI_AUTH_BLOCKED

Quota du jeton ou de l’espace atteint (voir Retry-After), ou adresse bloquée.

500INTERNAL_ERROR

Erreur inattendue. Citez requestId au support.

503SERVICE_UNAVAILABLE

Indisponibilité temporaire (voir Retry-After). Aucun détail d’infrastructure.

مثال طلب
# Une clé par opération, réutilisée telle quelle à chaque nouvel essai.
curl -X POST 'https://quosuite.com/api/public/v1/quosuite/car-rental/bookings/aac39e3a-0c40-44b2-8697-b597f357c5a9/accept' \
  -H "Authorization: Bearer $QUOSUITE_API_KEY" \
  -H 'Idempotency-Key: 3f1c2a9e-5b7d-4e8a-9c1f-2d6b8e4a7c30' \
  -H 'Content-Type: application/json' \
  -d '{
  "term": {
    "type": "FULL"
  },
  "deadlineHours": 48
}'
مثال استجابة
{
  "success": true,
  "data": {
    "id": "c3f8c2b0-25e0-431c-8558-8cc1a4cc0565",
    "number": "RES-2026-0042",
    "source": "WEBSITE",
    "status": "PENDING_PAYMENT",
    "statusLabel": "Confirmée",
    "paymentMode": "ONLINE",
    "paymentStatus": "NONE",
    "holdExpiresAt": "2026-10-02T09:15:00.000Z",
    "requestExpiresAt": "2026-10-02T09:15:00.000Z",
    "acceptedAt": "2026-10-02T09:15:00.000Z",
    "paymentTerm": {
      "type": "FULL",
      "value": 30
    },
    "paymentLink": {
      "id": "83ffc5fd-bdc9-4062-8087-a7ae7c56738d",
      "url": "https://portail.quosuite.com/pay/…",
      "amount": 287.69,
      "paidAmount": 0,
      "currency": "TND",
      "status": "ACTIVE",
      "expiresAt": "2026-10-02T09:15:00.000Z"
    },
    "siteId": "7dd62b53-1dd0-499a-8fb5-3edc84123531",
    "vehicle": {
      "id": "a2ad2669-1a21-406a-8d6d-91e8ed6ff091",
      "plate": "245 TU 1234",
      "brand": "Peugeot",
      "model": "208",
      "category": "Citadine",
      "fuel": "DIESEL",
      "gearbox": "Manuelle",
      "seats": 5
    },
    "period": {
      "startAt": "2026-12-20T09:00:00.000Z",
      "endAt": "2026-12-27T09:00:00.000Z",
      "days": 7
    },
    "pickupAgency": {
      "id": "b91c3927-1f63-45da-8d9c-9f48a57b7481",
      "code": "TUN",
      "name": "Tunis Centre"
    },
    "returnAgency": {
      "id": "b91c3927-1f63-45da-8d9c-9f48a57b7481",
      "code": "TUN",
      "name": "Tunis Centre"
    },
    "options": [
      {
        "optionId": "e966bb34-017e-440c-8e00-473dd1ccd625",
        "code": "gps",
        "label": "GPS",
        "quantity": 1,
        "perDay": true,
        "totalExclTax": 35,
        "totalInclTax": 41.65
      }
    ],
    "amounts": {
      "currency": "TND",
      "totalExclTax": 805,
      "totalVat": 152.95,
      "totalInclTax": 958.95,
      "deposit": 500,
      "due": 287.69,
      "paid": 958.95,
      "refunded": 0,
      "balanceDue": 0,
      "displayCurrency": "EUR",
      "displayTotalInclTax": 286.25
    },
    "deposit": {
      "status": "NONE",
      "statusLabel": "Détenue",
      "amount": 500,
      "method": "CASH",
      "returned": 0,
      "retained": 0
    },
    "customer": {
      "partnerId": "e85b60de-77d7-4856-8804-216b603b1c25",
      "name": "Sami Ben Ali",
      "email": "sami@example.tn",
      "phone": null
    },
    "driver": {
      "firstName": null,
      "lastName": null,
      "phone": null,
      "flightNumber": "TU 712",
      "secondDriverName": null
    },
    "notes": null,
    "reservation": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "contract": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "invoice": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "paymentId": "2f67d634-7e73-4b9a-8a0e-7f794a4147c9",
    "documents": {
      "voucher": true,
      "contract": true,
      "invoice": true
    },
    "erp": {
      "posted": true,
      "postedAt": "2026-10-02T09:15:00.000Z",
      "attention": true,
      "error": null
    },
    "trackingUrl": "https://location.exemple.tn/booking/track/…",
    "createdAt": "2026-10-02T09:15:00.000Z",
    "updatedAt": "2026-10-02T09:15:00.000Z"
  },
  "timestamp": "2026-10-02T09:15:00.000Z"
}

Annuler une réservation #

POST/api/public/v1/quosuite/car-rental/bookings/{id}/cancel
الصلاحية : rental_bookings:writeآمن عند الإعادةcancelRentalBooking

Annule tant que le véhicule n’est pas rendu : véhicule relâché par le module (contrat annulé, caution détenue rendue), paiement en ligne et lien de paiement en cours clos. Argent reçu : remboursement du montant rendu (facturée : avoir + décaissement ; acompte seul : décaissement) — par défaut celui de la politique d’annulation du canal, ou refundAmount (plafonné au payé) ; scope payments:write en plus.

المعاملات

  • idstring (uuid)المسارإلزامي
  • Idempotency-Keystringترويسة

    Clé d'idempotence (1–255 caractères ASCII imprimables, UUID v4 recommandé). Un nouvel essai avec la même clé et le même corps dans les 24 h rejoue la réponse du premier appel réussi (en-tête Idempotent-Replayed: true) au lieu de créer une seconde fois. Même clé, corps différent : 422 IDEMPOTENCY_KEY_REUSED. Premier appel encore en cours : 409 IDEMPOTENCY_IN_PROGRESS.

جسم الطلب application/json

  • reasonstring
    مثالVol annulé
  • refundAmountnumber

    Montant rendu (devise de la réservation) ; défaut : celui de la politique d’annulation du canal. Facturée : avoir + décaissement ; acompte seul : décaissement sur la réservation. Scope payments:write en plus.

    مثال767.16
  • notifyCustomerboolean

    Prévenir le client par email (défaut : oui).

الاستجابة 200application/json

Succès.

  • idstring (uuid)إلزامي
  • numberstringإلزامي

    Numéro de la réservation du module.

    مثالRES-2026-0042
  • sourcestringإلزامي

    WEBSITE (site de location) ou API.

    القيمWEBSITEAPI
  • statusstringإلزامي

    Statut montré, déduit du module.

    القيمPENDING_PAYMENTREQUESTEDCONFIRMEDIN_PROGRESSRETURNEDCANCELLEDEXPIRED
  • statusLabelstringإلزامي
    مثالConfirmée
  • paymentModestringإلزامي
    القيمONLINEAGENCY
  • paymentStatusstringإلزامي
    القيمNONEPENDINGPAIDFAILEDPARTIALLY_REFUNDEDREFUNDEDPARTIALLY_PAID
  • holdExpiresAtstring | null

    Paiement en ligne attendu jusqu’à cet instant ; ensuite le véhicule est relâché.

  • requestExpiresAtstring | null

    Demande : l’agence répond avant cet instant, sinon elle expire (véhicule relâché).

  • acceptedAtstring | null

    Demande acceptée le…

  • paymentTermRentalPaymentTermDto | null

    Terme de paiement retenu (à la réservation, ou choisi à l’acceptation).

    تفاصيل RentalPaymentTermDto
  • paymentLinkRentalPaymentLinkDto | null

    Lien de paiement en cours (page /pay/…) : à transmettre au client s’il n’est pas prévenu par email (réglage notifyCustomer du canal API).

    تفاصيل RentalPaymentLinkDto
  • siteIdstring (uuid) | null

    Site dont le catalogue a servi ; null pour une réservation API sans site.

  • vehicleRentalVehicleSummaryDtoإلزامي
    تفاصيل RentalVehicleSummaryDto
  • periodRentalPeriodDtoإلزامي
    تفاصيل RentalPeriodDto
  • pickupAgencyRentalAgencyRefDto | null
    تفاصيل RentalAgencyRefDto
  • returnAgencyRentalAgencyRefDto | null
    تفاصيل RentalAgencyRefDto
  • optionsRentalBookingOptionDto[]إلزامي
    تفاصيل RentalBookingOptionDto
  • amountsRentalBookingAmountsDtoإلزامي
    تفاصيل RentalBookingAmountsDto
  • depositRentalDepositStateDto | null

    Caution du contrat (perçue à la remise) ; null tant qu’il n’y a pas de contrat.

    تفاصيل RentalDepositStateDto
  • customerRentalCustomerRefDtoإلزامي
    تفاصيل RentalCustomerRefDto
  • driverRentalBookingDriverDtoإلزامي

    Conducteur — pièces d’identité et permis : GET /car-rental/customers/{id}.

    تفاصيل RentalBookingDriverDto
  • notesstring | null
  • reservationRentalDocumentRefDto | null

    Réservation du module.

    تفاصيل RentalDocumentRefDto
  • contractRentalDocumentRefDto | null

    Contrat de location.

    تفاصيل RentalDocumentRefDto
  • invoiceRentalDocumentRefDto | null

    Facture ERP (aussi lisible par GET /sales/invoices/{id}).

    تفاصيل RentalDocumentRefDto
  • paymentIdstring (uuid) | null

    Encaissement ERP.

  • documentsRentalBookingDocumentsDtoإلزامي
    تفاصيل RentalBookingDocumentsDto
  • erpRentalBookingErpDtoإلزامي
    تفاصيل RentalBookingErpDto
  • trackingUrlstring | null

    Page de suivi du client sur le site (lien secret : à transmettre au client seulement).

    مثالhttps://location.exemple.tn/booking/track/…
  • createdAtstringإلزامي
  • updatedAtstringإلزامي

الأخطاء

400VALIDATION_FAILEDIDEMPOTENCY_KEY_INVALIDINVALID_CURSOR

Paramètre ou corps invalide (champ manquant, inconnu, mal typé, tri non permis), ou curseur de pagination émis pour un autre tri ou d’autres filtres.

401API_KEY_MISSINGAPI_KEY_INVALIDAPI_KEY_REVOKEDAPI_KEY_EXPIRED

Jeton absent, invalide, révoqué ou expiré.

403API_KEY_WRONG_PERIMETERAPI_INSUFFICIENT_SCOPEAPI_ORIGIN_NOT_ALLOWEDAPI_TENANT_MISMATCHAPI_TENANT_INACTIVEAPI_MODULE_UNAVAILABLEAPI_FEATURE_UNAVAILABLE

Jeton valide mais insuffisant : mauvais périmètre, scope manquant, origine refusée, abonnement inactif ou module / option non inclus dans le plan.

404NOT_FOUND

Ressource absente — ou appartenant à un autre espace, ce qui revient au même.

409CONFLICTIDEMPOTENCY_IN_PROGRESS

Conflit : valeur unique déjà prise, ou même clé d’idempotence encore en cours.

422BUSINESS_RULE_VIOLATIONIDEMPOTENCY_KEY_REUSED

Requête bien formée mais refusée par une règle de gestion de l’ERP (transition de statut interdite, pièce réglée verrouillée, stock…), ou clé d’idempotence réutilisée.

429API_RATE_LIMITEDAPI_AUTH_BLOCKED

Quota du jeton ou de l’espace atteint (voir Retry-After), ou adresse bloquée.

500INTERNAL_ERROR

Erreur inattendue. Citez requestId au support.

503SERVICE_UNAVAILABLE

Indisponibilité temporaire (voir Retry-After). Aucun détail d’infrastructure.

مثال طلب
# Une clé par opération, réutilisée telle quelle à chaque nouvel essai.
curl -X POST 'https://quosuite.com/api/public/v1/quosuite/car-rental/bookings/aac39e3a-0c40-44b2-8697-b597f357c5a9/cancel' \
  -H "Authorization: Bearer $QUOSUITE_API_KEY" \
  -H 'Idempotency-Key: 3f1c2a9e-5b7d-4e8a-9c1f-2d6b8e4a7c30' \
  -H 'Content-Type: application/json' \
  -d '{
  "reason": "Vol annulé",
  "refundAmount": 767.16
}'
مثال استجابة
{
  "success": true,
  "data": {
    "id": "c3f8c2b0-25e0-431c-8558-8cc1a4cc0565",
    "number": "RES-2026-0042",
    "source": "WEBSITE",
    "status": "PENDING_PAYMENT",
    "statusLabel": "Confirmée",
    "paymentMode": "ONLINE",
    "paymentStatus": "NONE",
    "holdExpiresAt": "2026-10-02T09:15:00.000Z",
    "requestExpiresAt": "2026-10-02T09:15:00.000Z",
    "acceptedAt": "2026-10-02T09:15:00.000Z",
    "paymentTerm": {
      "type": "FULL",
      "value": 30
    },
    "paymentLink": {
      "id": "83ffc5fd-bdc9-4062-8087-a7ae7c56738d",
      "url": "https://portail.quosuite.com/pay/…",
      "amount": 287.69,
      "paidAmount": 0,
      "currency": "TND",
      "status": "ACTIVE",
      "expiresAt": "2026-10-02T09:15:00.000Z"
    },
    "siteId": "7dd62b53-1dd0-499a-8fb5-3edc84123531",
    "vehicle": {
      "id": "a2ad2669-1a21-406a-8d6d-91e8ed6ff091",
      "plate": "245 TU 1234",
      "brand": "Peugeot",
      "model": "208",
      "category": "Citadine",
      "fuel": "DIESEL",
      "gearbox": "Manuelle",
      "seats": 5
    },
    "period": {
      "startAt": "2026-12-20T09:00:00.000Z",
      "endAt": "2026-12-27T09:00:00.000Z",
      "days": 7
    },
    "pickupAgency": {
      "id": "b91c3927-1f63-45da-8d9c-9f48a57b7481",
      "code": "TUN",
      "name": "Tunis Centre"
    },
    "returnAgency": {
      "id": "b91c3927-1f63-45da-8d9c-9f48a57b7481",
      "code": "TUN",
      "name": "Tunis Centre"
    },
    "options": [
      {
        "optionId": "e966bb34-017e-440c-8e00-473dd1ccd625",
        "code": "gps",
        "label": "GPS",
        "quantity": 1,
        "perDay": true,
        "totalExclTax": 35,
        "totalInclTax": 41.65
      }
    ],
    "amounts": {
      "currency": "TND",
      "totalExclTax": 805,
      "totalVat": 152.95,
      "totalInclTax": 958.95,
      "deposit": 500,
      "due": 287.69,
      "paid": 958.95,
      "refunded": 0,
      "balanceDue": 0,
      "displayCurrency": "EUR",
      "displayTotalInclTax": 286.25
    },
    "deposit": {
      "status": "NONE",
      "statusLabel": "Détenue",
      "amount": 500,
      "method": "CASH",
      "returned": 0,
      "retained": 0
    },
    "customer": {
      "partnerId": "e85b60de-77d7-4856-8804-216b603b1c25",
      "name": "Sami Ben Ali",
      "email": "sami@example.tn",
      "phone": null
    },
    "driver": {
      "firstName": null,
      "lastName": null,
      "phone": null,
      "flightNumber": "TU 712",
      "secondDriverName": null
    },
    "notes": null,
    "reservation": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "contract": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "invoice": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "paymentId": "2f67d634-7e73-4b9a-8a0e-7f794a4147c9",
    "documents": {
      "voucher": true,
      "contract": true,
      "invoice": true
    },
    "erp": {
      "posted": true,
      "postedAt": "2026-10-02T09:15:00.000Z",
      "attention": true,
      "error": null
    },
    "trackingUrl": "https://location.exemple.tn/booking/track/…",
    "createdAt": "2026-10-02T09:15:00.000Z",
    "updatedAt": "2026-10-02T09:15:00.000Z"
  },
  "timestamp": "2026-10-02T09:15:00.000Z"
}

Confirmer une demande sans paiement #

POST/api/public/v1/quosuite/car-rental/bookings/{id}/confirm
الصلاحية : rental_bookings:writeconfirmRentalBooking

Accepte une demande (REQUESTED) sans paiement — réglée à l’agence : la réservation du module passe confirmée, le client est prévenu. Équivaut à …/accept avec term.type: NONE. Une réservation payée en ligne se confirme seule.

المعاملات

  • idstring (uuid)المسارإلزامي
  • langstringالاستعلام

    Langue des libellés (et du PDF). Défaut : Accept-Language, sinon la langue de l’espace.

    frenar

الاستجابة 200application/json

Succès.

  • idstring (uuid)إلزامي
  • numberstringإلزامي

    Numéro de la réservation du module.

    مثالRES-2026-0042
  • sourcestringإلزامي

    WEBSITE (site de location) ou API.

    القيمWEBSITEAPI
  • statusstringإلزامي

    Statut montré, déduit du module.

    القيمPENDING_PAYMENTREQUESTEDCONFIRMEDIN_PROGRESSRETURNEDCANCELLEDEXPIRED
  • statusLabelstringإلزامي
    مثالConfirmée
  • paymentModestringإلزامي
    القيمONLINEAGENCY
  • paymentStatusstringإلزامي
    القيمNONEPENDINGPAIDFAILEDPARTIALLY_REFUNDEDREFUNDEDPARTIALLY_PAID
  • holdExpiresAtstring | null

    Paiement en ligne attendu jusqu’à cet instant ; ensuite le véhicule est relâché.

  • requestExpiresAtstring | null

    Demande : l’agence répond avant cet instant, sinon elle expire (véhicule relâché).

  • acceptedAtstring | null

    Demande acceptée le…

  • paymentTermRentalPaymentTermDto | null

    Terme de paiement retenu (à la réservation, ou choisi à l’acceptation).

    تفاصيل RentalPaymentTermDto
  • paymentLinkRentalPaymentLinkDto | null

    Lien de paiement en cours (page /pay/…) : à transmettre au client s’il n’est pas prévenu par email (réglage notifyCustomer du canal API).

    تفاصيل RentalPaymentLinkDto
  • siteIdstring (uuid) | null

    Site dont le catalogue a servi ; null pour une réservation API sans site.

  • vehicleRentalVehicleSummaryDtoإلزامي
    تفاصيل RentalVehicleSummaryDto
  • periodRentalPeriodDtoإلزامي
    تفاصيل RentalPeriodDto
  • pickupAgencyRentalAgencyRefDto | null
    تفاصيل RentalAgencyRefDto
  • returnAgencyRentalAgencyRefDto | null
    تفاصيل RentalAgencyRefDto
  • optionsRentalBookingOptionDto[]إلزامي
    تفاصيل RentalBookingOptionDto
  • amountsRentalBookingAmountsDtoإلزامي
    تفاصيل RentalBookingAmountsDto
  • depositRentalDepositStateDto | null

    Caution du contrat (perçue à la remise) ; null tant qu’il n’y a pas de contrat.

    تفاصيل RentalDepositStateDto
  • customerRentalCustomerRefDtoإلزامي
    تفاصيل RentalCustomerRefDto
  • driverRentalBookingDriverDtoإلزامي

    Conducteur — pièces d’identité et permis : GET /car-rental/customers/{id}.

    تفاصيل RentalBookingDriverDto
  • notesstring | null
  • reservationRentalDocumentRefDto | null

    Réservation du module.

    تفاصيل RentalDocumentRefDto
  • contractRentalDocumentRefDto | null

    Contrat de location.

    تفاصيل RentalDocumentRefDto
  • invoiceRentalDocumentRefDto | null

    Facture ERP (aussi lisible par GET /sales/invoices/{id}).

    تفاصيل RentalDocumentRefDto
  • paymentIdstring (uuid) | null

    Encaissement ERP.

  • documentsRentalBookingDocumentsDtoإلزامي
    تفاصيل RentalBookingDocumentsDto
  • erpRentalBookingErpDtoإلزامي
    تفاصيل RentalBookingErpDto
  • trackingUrlstring | null

    Page de suivi du client sur le site (lien secret : à transmettre au client seulement).

    مثالhttps://location.exemple.tn/booking/track/…
  • createdAtstringإلزامي
  • updatedAtstringإلزامي

الأخطاء

400VALIDATION_FAILEDIDEMPOTENCY_KEY_INVALIDINVALID_CURSOR

Paramètre ou corps invalide (champ manquant, inconnu, mal typé, tri non permis), ou curseur de pagination émis pour un autre tri ou d’autres filtres.

401API_KEY_MISSINGAPI_KEY_INVALIDAPI_KEY_REVOKEDAPI_KEY_EXPIRED

Jeton absent, invalide, révoqué ou expiré.

403API_KEY_WRONG_PERIMETERAPI_INSUFFICIENT_SCOPEAPI_ORIGIN_NOT_ALLOWEDAPI_TENANT_MISMATCHAPI_TENANT_INACTIVEAPI_MODULE_UNAVAILABLEAPI_FEATURE_UNAVAILABLE

Jeton valide mais insuffisant : mauvais périmètre, scope manquant, origine refusée, abonnement inactif ou module / option non inclus dans le plan.

404NOT_FOUND

Ressource absente — ou appartenant à un autre espace, ce qui revient au même.

409CONFLICTIDEMPOTENCY_IN_PROGRESS

Conflit : valeur unique déjà prise, ou même clé d’idempotence encore en cours.

422BUSINESS_RULE_VIOLATIONIDEMPOTENCY_KEY_REUSED

Requête bien formée mais refusée par une règle de gestion de l’ERP (transition de statut interdite, pièce réglée verrouillée, stock…), ou clé d’idempotence réutilisée.

429API_RATE_LIMITEDAPI_AUTH_BLOCKED

Quota du jeton ou de l’espace atteint (voir Retry-After), ou adresse bloquée.

500INTERNAL_ERROR

Erreur inattendue. Citez requestId au support.

503SERVICE_UNAVAILABLE

Indisponibilité temporaire (voir Retry-After). Aucun détail d’infrastructure.

مثال طلب
curl -X POST 'https://quosuite.com/api/public/v1/quosuite/car-rental/bookings/aac39e3a-0c40-44b2-8697-b597f357c5a9/confirm' \
  -H "Authorization: Bearer $QUOSUITE_API_KEY"
مثال استجابة
{
  "success": true,
  "data": {
    "id": "c3f8c2b0-25e0-431c-8558-8cc1a4cc0565",
    "number": "RES-2026-0042",
    "source": "WEBSITE",
    "status": "PENDING_PAYMENT",
    "statusLabel": "Confirmée",
    "paymentMode": "ONLINE",
    "paymentStatus": "NONE",
    "holdExpiresAt": "2026-10-02T09:15:00.000Z",
    "requestExpiresAt": "2026-10-02T09:15:00.000Z",
    "acceptedAt": "2026-10-02T09:15:00.000Z",
    "paymentTerm": {
      "type": "FULL",
      "value": 30
    },
    "paymentLink": {
      "id": "83ffc5fd-bdc9-4062-8087-a7ae7c56738d",
      "url": "https://portail.quosuite.com/pay/…",
      "amount": 287.69,
      "paidAmount": 0,
      "currency": "TND",
      "status": "ACTIVE",
      "expiresAt": "2026-10-02T09:15:00.000Z"
    },
    "siteId": "7dd62b53-1dd0-499a-8fb5-3edc84123531",
    "vehicle": {
      "id": "a2ad2669-1a21-406a-8d6d-91e8ed6ff091",
      "plate": "245 TU 1234",
      "brand": "Peugeot",
      "model": "208",
      "category": "Citadine",
      "fuel": "DIESEL",
      "gearbox": "Manuelle",
      "seats": 5
    },
    "period": {
      "startAt": "2026-12-20T09:00:00.000Z",
      "endAt": "2026-12-27T09:00:00.000Z",
      "days": 7
    },
    "pickupAgency": {
      "id": "b91c3927-1f63-45da-8d9c-9f48a57b7481",
      "code": "TUN",
      "name": "Tunis Centre"
    },
    "returnAgency": {
      "id": "b91c3927-1f63-45da-8d9c-9f48a57b7481",
      "code": "TUN",
      "name": "Tunis Centre"
    },
    "options": [
      {
        "optionId": "e966bb34-017e-440c-8e00-473dd1ccd625",
        "code": "gps",
        "label": "GPS",
        "quantity": 1,
        "perDay": true,
        "totalExclTax": 35,
        "totalInclTax": 41.65
      }
    ],
    "amounts": {
      "currency": "TND",
      "totalExclTax": 805,
      "totalVat": 152.95,
      "totalInclTax": 958.95,
      "deposit": 500,
      "due": 287.69,
      "paid": 958.95,
      "refunded": 0,
      "balanceDue": 0,
      "displayCurrency": "EUR",
      "displayTotalInclTax": 286.25
    },
    "deposit": {
      "status": "NONE",
      "statusLabel": "Détenue",
      "amount": 500,
      "method": "CASH",
      "returned": 0,
      "retained": 0
    },
    "customer": {
      "partnerId": "e85b60de-77d7-4856-8804-216b603b1c25",
      "name": "Sami Ben Ali",
      "email": "sami@example.tn",
      "phone": null
    },
    "driver": {
      "firstName": null,
      "lastName": null,
      "phone": null,
      "flightNumber": "TU 712",
      "secondDriverName": null
    },
    "notes": null,
    "reservation": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "contract": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "invoice": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "paymentId": "2f67d634-7e73-4b9a-8a0e-7f794a4147c9",
    "documents": {
      "voucher": true,
      "contract": true,
      "invoice": true
    },
    "erp": {
      "posted": true,
      "postedAt": "2026-10-02T09:15:00.000Z",
      "attention": true,
      "error": null
    },
    "trackingUrl": "https://location.exemple.tn/booking/track/…",
    "createdAt": "2026-10-02T09:15:00.000Z",
    "updatedAt": "2026-10-02T09:15:00.000Z"
  },
  "timestamp": "2026-10-02T09:15:00.000Z"
}

Générer le contrat #

POST/api/public/v1/quosuite/car-rental/bookings/{id}/contract
الصلاحية : rental_bookings:writeprepareRentalContract

Crée le contrat de location (en préparation) depuis la réservation — repris s’il existe déjà. Préparer une demande vaut confirmation. Le PDF : GET …/documents/contract.

المعاملات

  • idstring (uuid)المسارإلزامي
  • langstringالاستعلام

    Langue des libellés (et du PDF). Défaut : Accept-Language, sinon la langue de l’espace.

    frenar

الاستجابة 200application/json

Succès.

  • idstring (uuid)إلزامي
  • numberstringإلزامي

    Numéro de la réservation du module.

    مثالRES-2026-0042
  • sourcestringإلزامي

    WEBSITE (site de location) ou API.

    القيمWEBSITEAPI
  • statusstringإلزامي

    Statut montré, déduit du module.

    القيمPENDING_PAYMENTREQUESTEDCONFIRMEDIN_PROGRESSRETURNEDCANCELLEDEXPIRED
  • statusLabelstringإلزامي
    مثالConfirmée
  • paymentModestringإلزامي
    القيمONLINEAGENCY
  • paymentStatusstringإلزامي
    القيمNONEPENDINGPAIDFAILEDPARTIALLY_REFUNDEDREFUNDEDPARTIALLY_PAID
  • holdExpiresAtstring | null

    Paiement en ligne attendu jusqu’à cet instant ; ensuite le véhicule est relâché.

  • requestExpiresAtstring | null

    Demande : l’agence répond avant cet instant, sinon elle expire (véhicule relâché).

  • acceptedAtstring | null

    Demande acceptée le…

  • paymentTermRentalPaymentTermDto | null

    Terme de paiement retenu (à la réservation, ou choisi à l’acceptation).

    تفاصيل RentalPaymentTermDto
  • paymentLinkRentalPaymentLinkDto | null

    Lien de paiement en cours (page /pay/…) : à transmettre au client s’il n’est pas prévenu par email (réglage notifyCustomer du canal API).

    تفاصيل RentalPaymentLinkDto
  • siteIdstring (uuid) | null

    Site dont le catalogue a servi ; null pour une réservation API sans site.

  • vehicleRentalVehicleSummaryDtoإلزامي
    تفاصيل RentalVehicleSummaryDto
  • periodRentalPeriodDtoإلزامي
    تفاصيل RentalPeriodDto
  • pickupAgencyRentalAgencyRefDto | null
    تفاصيل RentalAgencyRefDto
  • returnAgencyRentalAgencyRefDto | null
    تفاصيل RentalAgencyRefDto
  • optionsRentalBookingOptionDto[]إلزامي
    تفاصيل RentalBookingOptionDto
  • amountsRentalBookingAmountsDtoإلزامي
    تفاصيل RentalBookingAmountsDto
  • depositRentalDepositStateDto | null

    Caution du contrat (perçue à la remise) ; null tant qu’il n’y a pas de contrat.

    تفاصيل RentalDepositStateDto
  • customerRentalCustomerRefDtoإلزامي
    تفاصيل RentalCustomerRefDto
  • driverRentalBookingDriverDtoإلزامي

    Conducteur — pièces d’identité et permis : GET /car-rental/customers/{id}.

    تفاصيل RentalBookingDriverDto
  • notesstring | null
  • reservationRentalDocumentRefDto | null

    Réservation du module.

    تفاصيل RentalDocumentRefDto
  • contractRentalDocumentRefDto | null

    Contrat de location.

    تفاصيل RentalDocumentRefDto
  • invoiceRentalDocumentRefDto | null

    Facture ERP (aussi lisible par GET /sales/invoices/{id}).

    تفاصيل RentalDocumentRefDto
  • paymentIdstring (uuid) | null

    Encaissement ERP.

  • documentsRentalBookingDocumentsDtoإلزامي
    تفاصيل RentalBookingDocumentsDto
  • erpRentalBookingErpDtoإلزامي
    تفاصيل RentalBookingErpDto
  • trackingUrlstring | null

    Page de suivi du client sur le site (lien secret : à transmettre au client seulement).

    مثالhttps://location.exemple.tn/booking/track/…
  • createdAtstringإلزامي
  • updatedAtstringإلزامي

الأخطاء

400VALIDATION_FAILEDIDEMPOTENCY_KEY_INVALIDINVALID_CURSOR

Paramètre ou corps invalide (champ manquant, inconnu, mal typé, tri non permis), ou curseur de pagination émis pour un autre tri ou d’autres filtres.

401API_KEY_MISSINGAPI_KEY_INVALIDAPI_KEY_REVOKEDAPI_KEY_EXPIRED

Jeton absent, invalide, révoqué ou expiré.

403API_KEY_WRONG_PERIMETERAPI_INSUFFICIENT_SCOPEAPI_ORIGIN_NOT_ALLOWEDAPI_TENANT_MISMATCHAPI_TENANT_INACTIVEAPI_MODULE_UNAVAILABLEAPI_FEATURE_UNAVAILABLE

Jeton valide mais insuffisant : mauvais périmètre, scope manquant, origine refusée, abonnement inactif ou module / option non inclus dans le plan.

404NOT_FOUND

Ressource absente — ou appartenant à un autre espace, ce qui revient au même.

409CONFLICTIDEMPOTENCY_IN_PROGRESS

Conflit : valeur unique déjà prise, ou même clé d’idempotence encore en cours.

422BUSINESS_RULE_VIOLATIONIDEMPOTENCY_KEY_REUSED

Requête bien formée mais refusée par une règle de gestion de l’ERP (transition de statut interdite, pièce réglée verrouillée, stock…), ou clé d’idempotence réutilisée.

429API_RATE_LIMITEDAPI_AUTH_BLOCKED

Quota du jeton ou de l’espace atteint (voir Retry-After), ou adresse bloquée.

500INTERNAL_ERROR

Erreur inattendue. Citez requestId au support.

503SERVICE_UNAVAILABLE

Indisponibilité temporaire (voir Retry-After). Aucun détail d’infrastructure.

مثال طلب
curl -X POST 'https://quosuite.com/api/public/v1/quosuite/car-rental/bookings/aac39e3a-0c40-44b2-8697-b597f357c5a9/contract' \
  -H "Authorization: Bearer $QUOSUITE_API_KEY"
مثال استجابة
{
  "success": true,
  "data": {
    "id": "c3f8c2b0-25e0-431c-8558-8cc1a4cc0565",
    "number": "RES-2026-0042",
    "source": "WEBSITE",
    "status": "PENDING_PAYMENT",
    "statusLabel": "Confirmée",
    "paymentMode": "ONLINE",
    "paymentStatus": "NONE",
    "holdExpiresAt": "2026-10-02T09:15:00.000Z",
    "requestExpiresAt": "2026-10-02T09:15:00.000Z",
    "acceptedAt": "2026-10-02T09:15:00.000Z",
    "paymentTerm": {
      "type": "FULL",
      "value": 30
    },
    "paymentLink": {
      "id": "83ffc5fd-bdc9-4062-8087-a7ae7c56738d",
      "url": "https://portail.quosuite.com/pay/…",
      "amount": 287.69,
      "paidAmount": 0,
      "currency": "TND",
      "status": "ACTIVE",
      "expiresAt": "2026-10-02T09:15:00.000Z"
    },
    "siteId": "7dd62b53-1dd0-499a-8fb5-3edc84123531",
    "vehicle": {
      "id": "a2ad2669-1a21-406a-8d6d-91e8ed6ff091",
      "plate": "245 TU 1234",
      "brand": "Peugeot",
      "model": "208",
      "category": "Citadine",
      "fuel": "DIESEL",
      "gearbox": "Manuelle",
      "seats": 5
    },
    "period": {
      "startAt": "2026-12-20T09:00:00.000Z",
      "endAt": "2026-12-27T09:00:00.000Z",
      "days": 7
    },
    "pickupAgency": {
      "id": "b91c3927-1f63-45da-8d9c-9f48a57b7481",
      "code": "TUN",
      "name": "Tunis Centre"
    },
    "returnAgency": {
      "id": "b91c3927-1f63-45da-8d9c-9f48a57b7481",
      "code": "TUN",
      "name": "Tunis Centre"
    },
    "options": [
      {
        "optionId": "e966bb34-017e-440c-8e00-473dd1ccd625",
        "code": "gps",
        "label": "GPS",
        "quantity": 1,
        "perDay": true,
        "totalExclTax": 35,
        "totalInclTax": 41.65
      }
    ],
    "amounts": {
      "currency": "TND",
      "totalExclTax": 805,
      "totalVat": 152.95,
      "totalInclTax": 958.95,
      "deposit": 500,
      "due": 287.69,
      "paid": 958.95,
      "refunded": 0,
      "balanceDue": 0,
      "displayCurrency": "EUR",
      "displayTotalInclTax": 286.25
    },
    "deposit": {
      "status": "NONE",
      "statusLabel": "Détenue",
      "amount": 500,
      "method": "CASH",
      "returned": 0,
      "retained": 0
    },
    "customer": {
      "partnerId": "e85b60de-77d7-4856-8804-216b603b1c25",
      "name": "Sami Ben Ali",
      "email": "sami@example.tn",
      "phone": null
    },
    "driver": {
      "firstName": null,
      "lastName": null,
      "phone": null,
      "flightNumber": "TU 712",
      "secondDriverName": null
    },
    "notes": null,
    "reservation": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "contract": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "invoice": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "paymentId": "2f67d634-7e73-4b9a-8a0e-7f794a4147c9",
    "documents": {
      "voucher": true,
      "contract": true,
      "invoice": true
    },
    "erp": {
      "posted": true,
      "postedAt": "2026-10-02T09:15:00.000Z",
      "attention": true,
      "error": null
    },
    "trackingUrl": "https://location.exemple.tn/booking/track/…",
    "createdAt": "2026-10-02T09:15:00.000Z",
    "updatedAt": "2026-10-02T09:15:00.000Z"
  },
  "timestamp": "2026-10-02T09:15:00.000Z"
}

Porter un paiement reçu #

POST/api/public/v1/quosuite/car-rental/bookings/{id}/payments
الصلاحية : rental_bookings:writeآمن عند الإعادةrecordRentalBookingPayment

Un encaissement fait hors QuoSuite (votre prestataire, l’agence) : la réservation est mise en gestion par le même chemin que le webhook de paiement. Première mise en gestion entièrement payée : confirmée, contrat, facture validée et encaissement lettré, ensemble ; acompte : confirmée dès que l’exigé (amounts.due) est atteint, avance sur la réservation (lettrée par la facture du contrat) ; solde d’une réservation déjà confirmée : un encaissement de plus, sans génération automatique de contrat ni de facture manquants. Une même reference n’est portée qu’une fois (rejouée : relance seulement une mise en gestion interrompue). Référence utilisée sur une autre réservation : 409 CONFLICT (detail.rule: PAYMENT_REFERENCE_USED) ; réservation déjà soldée : 409 (ALREADY_PAID) ; montant supérieur au reste dû : 422 BUSINESS_RULE_VIOLATION (PAYMENT_AMOUNT_MISMATCH). Scope payments:write en plus.

المعاملات

  • idstring (uuid)المسارإلزامي
  • Idempotency-Keystringترويسة

    Clé d'idempotence (1–255 caractères ASCII imprimables, UUID v4 recommandé). Un nouvel essai avec la même clé et le même corps dans les 24 h rejoue la réponse du premier appel réussi (en-tête Idempotent-Replayed: true) au lieu de créer une seconde fois. Même clé, corps différent : 422 IDEMPOTENCY_KEY_REUSED. Premier appel encore en cours : 409 IDEMPOTENCY_IN_PROGRESS.

جسم الطلب application/json

  • amountnumberإلزامي

    Montant encaissé (devise de la réservation) : acompte, solde ou total.

    مثال958.95
  • referencestringإلزامي

    Référence de l’encaissement chez vous — un même paiement n’est porté qu’une fois.

    مثالPSP-778812
  • methodstring
    القيمCASHCHECKDRAFTTRANSFERCARDLOYALTYBALANCECREDITOTHERافتراضي"CARD"
  • paidAtstring

    Défaut : maintenant.

الاستجابة 201application/json

Créé.

  • idstring (uuid)إلزامي
  • numberstringإلزامي

    Numéro de la réservation du module.

    مثالRES-2026-0042
  • sourcestringإلزامي

    WEBSITE (site de location) ou API.

    القيمWEBSITEAPI
  • statusstringإلزامي

    Statut montré, déduit du module.

    القيمPENDING_PAYMENTREQUESTEDCONFIRMEDIN_PROGRESSRETURNEDCANCELLEDEXPIRED
  • statusLabelstringإلزامي
    مثالConfirmée
  • paymentModestringإلزامي
    القيمONLINEAGENCY
  • paymentStatusstringإلزامي
    القيمNONEPENDINGPAIDFAILEDPARTIALLY_REFUNDEDREFUNDEDPARTIALLY_PAID
  • holdExpiresAtstring | null

    Paiement en ligne attendu jusqu’à cet instant ; ensuite le véhicule est relâché.

  • requestExpiresAtstring | null

    Demande : l’agence répond avant cet instant, sinon elle expire (véhicule relâché).

  • acceptedAtstring | null

    Demande acceptée le…

  • paymentTermRentalPaymentTermDto | null

    Terme de paiement retenu (à la réservation, ou choisi à l’acceptation).

    تفاصيل RentalPaymentTermDto
  • paymentLinkRentalPaymentLinkDto | null

    Lien de paiement en cours (page /pay/…) : à transmettre au client s’il n’est pas prévenu par email (réglage notifyCustomer du canal API).

    تفاصيل RentalPaymentLinkDto
  • siteIdstring (uuid) | null

    Site dont le catalogue a servi ; null pour une réservation API sans site.

  • vehicleRentalVehicleSummaryDtoإلزامي
    تفاصيل RentalVehicleSummaryDto
  • periodRentalPeriodDtoإلزامي
    تفاصيل RentalPeriodDto
  • pickupAgencyRentalAgencyRefDto | null
    تفاصيل RentalAgencyRefDto
  • returnAgencyRentalAgencyRefDto | null
    تفاصيل RentalAgencyRefDto
  • optionsRentalBookingOptionDto[]إلزامي
    تفاصيل RentalBookingOptionDto
  • amountsRentalBookingAmountsDtoإلزامي
    تفاصيل RentalBookingAmountsDto
  • depositRentalDepositStateDto | null

    Caution du contrat (perçue à la remise) ; null tant qu’il n’y a pas de contrat.

    تفاصيل RentalDepositStateDto
  • customerRentalCustomerRefDtoإلزامي
    تفاصيل RentalCustomerRefDto
  • driverRentalBookingDriverDtoإلزامي

    Conducteur — pièces d’identité et permis : GET /car-rental/customers/{id}.

    تفاصيل RentalBookingDriverDto
  • notesstring | null
  • reservationRentalDocumentRefDto | null

    Réservation du module.

    تفاصيل RentalDocumentRefDto
  • contractRentalDocumentRefDto | null

    Contrat de location.

    تفاصيل RentalDocumentRefDto
  • invoiceRentalDocumentRefDto | null

    Facture ERP (aussi lisible par GET /sales/invoices/{id}).

    تفاصيل RentalDocumentRefDto
  • paymentIdstring (uuid) | null

    Encaissement ERP.

  • documentsRentalBookingDocumentsDtoإلزامي
    تفاصيل RentalBookingDocumentsDto
  • erpRentalBookingErpDtoإلزامي
    تفاصيل RentalBookingErpDto
  • trackingUrlstring | null

    Page de suivi du client sur le site (lien secret : à transmettre au client seulement).

    مثالhttps://location.exemple.tn/booking/track/…
  • createdAtstringإلزامي
  • updatedAtstringإلزامي

الأخطاء

400VALIDATION_FAILEDIDEMPOTENCY_KEY_INVALIDINVALID_CURSOR

Paramètre ou corps invalide (champ manquant, inconnu, mal typé, tri non permis), ou curseur de pagination émis pour un autre tri ou d’autres filtres.

401API_KEY_MISSINGAPI_KEY_INVALIDAPI_KEY_REVOKEDAPI_KEY_EXPIRED

Jeton absent, invalide, révoqué ou expiré.

403API_KEY_WRONG_PERIMETERAPI_INSUFFICIENT_SCOPEAPI_ORIGIN_NOT_ALLOWEDAPI_TENANT_MISMATCHAPI_TENANT_INACTIVEAPI_MODULE_UNAVAILABLEAPI_FEATURE_UNAVAILABLE

Jeton valide mais insuffisant : mauvais périmètre, scope manquant, origine refusée, abonnement inactif ou module / option non inclus dans le plan.

404NOT_FOUND

Ressource absente — ou appartenant à un autre espace, ce qui revient au même.

409CONFLICTIDEMPOTENCY_IN_PROGRESS

Conflit : valeur unique déjà prise, ou même clé d’idempotence encore en cours.

422BUSINESS_RULE_VIOLATIONIDEMPOTENCY_KEY_REUSED

Requête bien formée mais refusée par une règle de gestion de l’ERP (transition de statut interdite, pièce réglée verrouillée, stock…), ou clé d’idempotence réutilisée.

429API_RATE_LIMITEDAPI_AUTH_BLOCKED

Quota du jeton ou de l’espace atteint (voir Retry-After), ou adresse bloquée.

500INTERNAL_ERROR

Erreur inattendue. Citez requestId au support.

503SERVICE_UNAVAILABLE

Indisponibilité temporaire (voir Retry-After). Aucun détail d’infrastructure.

مثال طلب
# Une clé par opération, réutilisée telle quelle à chaque nouvel essai.
curl -X POST 'https://quosuite.com/api/public/v1/quosuite/car-rental/bookings/aac39e3a-0c40-44b2-8697-b597f357c5a9/payments' \
  -H "Authorization: Bearer $QUOSUITE_API_KEY" \
  -H 'Idempotency-Key: 3f1c2a9e-5b7d-4e8a-9c1f-2d6b8e4a7c30' \
  -H 'Content-Type: application/json' \
  -d '{
  "amount": 958.95,
  "reference": "PSP-778812"
}'
مثال استجابة
{
  "success": true,
  "data": {
    "id": "c3f8c2b0-25e0-431c-8558-8cc1a4cc0565",
    "number": "RES-2026-0042",
    "source": "WEBSITE",
    "status": "PENDING_PAYMENT",
    "statusLabel": "Confirmée",
    "paymentMode": "ONLINE",
    "paymentStatus": "NONE",
    "holdExpiresAt": "2026-10-02T09:15:00.000Z",
    "requestExpiresAt": "2026-10-02T09:15:00.000Z",
    "acceptedAt": "2026-10-02T09:15:00.000Z",
    "paymentTerm": {
      "type": "FULL",
      "value": 30
    },
    "paymentLink": {
      "id": "83ffc5fd-bdc9-4062-8087-a7ae7c56738d",
      "url": "https://portail.quosuite.com/pay/…",
      "amount": 287.69,
      "paidAmount": 0,
      "currency": "TND",
      "status": "ACTIVE",
      "expiresAt": "2026-10-02T09:15:00.000Z"
    },
    "siteId": "7dd62b53-1dd0-499a-8fb5-3edc84123531",
    "vehicle": {
      "id": "a2ad2669-1a21-406a-8d6d-91e8ed6ff091",
      "plate": "245 TU 1234",
      "brand": "Peugeot",
      "model": "208",
      "category": "Citadine",
      "fuel": "DIESEL",
      "gearbox": "Manuelle",
      "seats": 5
    },
    "period": {
      "startAt": "2026-12-20T09:00:00.000Z",
      "endAt": "2026-12-27T09:00:00.000Z",
      "days": 7
    },
    "pickupAgency": {
      "id": "b91c3927-1f63-45da-8d9c-9f48a57b7481",
      "code": "TUN",
      "name": "Tunis Centre"
    },
    "returnAgency": {
      "id": "b91c3927-1f63-45da-8d9c-9f48a57b7481",
      "code": "TUN",
      "name": "Tunis Centre"
    },
    "options": [
      {
        "optionId": "e966bb34-017e-440c-8e00-473dd1ccd625",
        "code": "gps",
        "label": "GPS",
        "quantity": 1,
        "perDay": true,
        "totalExclTax": 35,
        "totalInclTax": 41.65
      }
    ],
    "amounts": {
      "currency": "TND",
      "totalExclTax": 805,
      "totalVat": 152.95,
      "totalInclTax": 958.95,
      "deposit": 500,
      "due": 287.69,
      "paid": 958.95,
      "refunded": 0,
      "balanceDue": 0,
      "displayCurrency": "EUR",
      "displayTotalInclTax": 286.25
    },
    "deposit": {
      "status": "NONE",
      "statusLabel": "Détenue",
      "amount": 500,
      "method": "CASH",
      "returned": 0,
      "retained": 0
    },
    "customer": {
      "partnerId": "e85b60de-77d7-4856-8804-216b603b1c25",
      "name": "Sami Ben Ali",
      "email": "sami@example.tn",
      "phone": null
    },
    "driver": {
      "firstName": null,
      "lastName": null,
      "phone": null,
      "flightNumber": "TU 712",
      "secondDriverName": null
    },
    "notes": null,
    "reservation": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "contract": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "invoice": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "paymentId": "2f67d634-7e73-4b9a-8a0e-7f794a4147c9",
    "documents": {
      "voucher": true,
      "contract": true,
      "invoice": true
    },
    "erp": {
      "posted": true,
      "postedAt": "2026-10-02T09:15:00.000Z",
      "attention": true,
      "error": null
    },
    "trackingUrl": "https://location.exemple.tn/booking/track/…",
    "createdAt": "2026-10-02T09:15:00.000Z",
    "updatedAt": "2026-10-02T09:15:00.000Z"
  },
  "timestamp": "2026-10-02T09:15:00.000Z"
}

Remettre le véhicule #

POST/api/public/v1/quosuite/car-rental/bookings/{id}/pickup
الصلاحية : rental_bookings:writeآمن عند الإعادةpickUpRentalBooking

Départ du client : le contrat s’ouvre (créé au besoin), compteur et carburant relevés, caution perçue si depositCollected (scope payments:write en plus). Statut IN_PROGRESS.

المعاملات

  • idstring (uuid)المسارإلزامي
  • Idempotency-Keystringترويسة

    Clé d'idempotence (1–255 caractères ASCII imprimables, UUID v4 recommandé). Un nouvel essai avec la même clé et le même corps dans les 24 h rejoue la réponse du premier appel réussi (en-tête Idempotent-Replayed: true) au lieu de créer une seconde fois. Même clé, corps différent : 422 IDEMPOTENCY_KEY_REUSED. Premier appel encore en cours : 409 IDEMPOTENCY_IN_PROGRESS.

جسم الطلب application/json

  • mileageOutnumber
    مثال18250
  • fuelOutnumber

    Carburant en huitièmes.

    أدنى0أقصى8
  • depositCollectedboolean

    Caution perçue à la remise (scope payments:write en plus).

  • depositMethodstring
    القيمCASHCHECKDRAFTTRANSFERCARDLOYALTYBALANCECREDITOTHER
  • depositReferencestring
    مثالEMP-4421

الاستجابة 200application/json

Succès.

  • idstring (uuid)إلزامي
  • numberstringإلزامي

    Numéro de la réservation du module.

    مثالRES-2026-0042
  • sourcestringإلزامي

    WEBSITE (site de location) ou API.

    القيمWEBSITEAPI
  • statusstringإلزامي

    Statut montré, déduit du module.

    القيمPENDING_PAYMENTREQUESTEDCONFIRMEDIN_PROGRESSRETURNEDCANCELLEDEXPIRED
  • statusLabelstringإلزامي
    مثالConfirmée
  • paymentModestringإلزامي
    القيمONLINEAGENCY
  • paymentStatusstringإلزامي
    القيمNONEPENDINGPAIDFAILEDPARTIALLY_REFUNDEDREFUNDEDPARTIALLY_PAID
  • holdExpiresAtstring | null

    Paiement en ligne attendu jusqu’à cet instant ; ensuite le véhicule est relâché.

  • requestExpiresAtstring | null

    Demande : l’agence répond avant cet instant, sinon elle expire (véhicule relâché).

  • acceptedAtstring | null

    Demande acceptée le…

  • paymentTermRentalPaymentTermDto | null

    Terme de paiement retenu (à la réservation, ou choisi à l’acceptation).

    تفاصيل RentalPaymentTermDto
  • paymentLinkRentalPaymentLinkDto | null

    Lien de paiement en cours (page /pay/…) : à transmettre au client s’il n’est pas prévenu par email (réglage notifyCustomer du canal API).

    تفاصيل RentalPaymentLinkDto
  • siteIdstring (uuid) | null

    Site dont le catalogue a servi ; null pour une réservation API sans site.

  • vehicleRentalVehicleSummaryDtoإلزامي
    تفاصيل RentalVehicleSummaryDto
  • periodRentalPeriodDtoإلزامي
    تفاصيل RentalPeriodDto
  • pickupAgencyRentalAgencyRefDto | null
    تفاصيل RentalAgencyRefDto
  • returnAgencyRentalAgencyRefDto | null
    تفاصيل RentalAgencyRefDto
  • optionsRentalBookingOptionDto[]إلزامي
    تفاصيل RentalBookingOptionDto
  • amountsRentalBookingAmountsDtoإلزامي
    تفاصيل RentalBookingAmountsDto
  • depositRentalDepositStateDto | null

    Caution du contrat (perçue à la remise) ; null tant qu’il n’y a pas de contrat.

    تفاصيل RentalDepositStateDto
  • customerRentalCustomerRefDtoإلزامي
    تفاصيل RentalCustomerRefDto
  • driverRentalBookingDriverDtoإلزامي

    Conducteur — pièces d’identité et permis : GET /car-rental/customers/{id}.

    تفاصيل RentalBookingDriverDto
  • notesstring | null
  • reservationRentalDocumentRefDto | null

    Réservation du module.

    تفاصيل RentalDocumentRefDto
  • contractRentalDocumentRefDto | null

    Contrat de location.

    تفاصيل RentalDocumentRefDto
  • invoiceRentalDocumentRefDto | null

    Facture ERP (aussi lisible par GET /sales/invoices/{id}).

    تفاصيل RentalDocumentRefDto
  • paymentIdstring (uuid) | null

    Encaissement ERP.

  • documentsRentalBookingDocumentsDtoإلزامي
    تفاصيل RentalBookingDocumentsDto
  • erpRentalBookingErpDtoإلزامي
    تفاصيل RentalBookingErpDto
  • trackingUrlstring | null

    Page de suivi du client sur le site (lien secret : à transmettre au client seulement).

    مثالhttps://location.exemple.tn/booking/track/…
  • createdAtstringإلزامي
  • updatedAtstringإلزامي

الأخطاء

400VALIDATION_FAILEDIDEMPOTENCY_KEY_INVALIDINVALID_CURSOR

Paramètre ou corps invalide (champ manquant, inconnu, mal typé, tri non permis), ou curseur de pagination émis pour un autre tri ou d’autres filtres.

401API_KEY_MISSINGAPI_KEY_INVALIDAPI_KEY_REVOKEDAPI_KEY_EXPIRED

Jeton absent, invalide, révoqué ou expiré.

403API_KEY_WRONG_PERIMETERAPI_INSUFFICIENT_SCOPEAPI_ORIGIN_NOT_ALLOWEDAPI_TENANT_MISMATCHAPI_TENANT_INACTIVEAPI_MODULE_UNAVAILABLEAPI_FEATURE_UNAVAILABLE

Jeton valide mais insuffisant : mauvais périmètre, scope manquant, origine refusée, abonnement inactif ou module / option non inclus dans le plan.

404NOT_FOUND

Ressource absente — ou appartenant à un autre espace, ce qui revient au même.

409CONFLICTIDEMPOTENCY_IN_PROGRESS

Conflit : valeur unique déjà prise, ou même clé d’idempotence encore en cours.

422BUSINESS_RULE_VIOLATIONIDEMPOTENCY_KEY_REUSED

Requête bien formée mais refusée par une règle de gestion de l’ERP (transition de statut interdite, pièce réglée verrouillée, stock…), ou clé d’idempotence réutilisée.

429API_RATE_LIMITEDAPI_AUTH_BLOCKED

Quota du jeton ou de l’espace atteint (voir Retry-After), ou adresse bloquée.

500INTERNAL_ERROR

Erreur inattendue. Citez requestId au support.

503SERVICE_UNAVAILABLE

Indisponibilité temporaire (voir Retry-After). Aucun détail d’infrastructure.

مثال طلب
# Une clé par opération, réutilisée telle quelle à chaque nouvel essai.
curl -X POST 'https://quosuite.com/api/public/v1/quosuite/car-rental/bookings/aac39e3a-0c40-44b2-8697-b597f357c5a9/pickup' \
  -H "Authorization: Bearer $QUOSUITE_API_KEY" \
  -H 'Idempotency-Key: 3f1c2a9e-5b7d-4e8a-9c1f-2d6b8e4a7c30' \
  -H 'Content-Type: application/json' \
  -d '{
  "mileageOut": 18250,
  "depositReference": "EMP-4421"
}'
مثال استجابة
{
  "success": true,
  "data": {
    "id": "c3f8c2b0-25e0-431c-8558-8cc1a4cc0565",
    "number": "RES-2026-0042",
    "source": "WEBSITE",
    "status": "PENDING_PAYMENT",
    "statusLabel": "Confirmée",
    "paymentMode": "ONLINE",
    "paymentStatus": "NONE",
    "holdExpiresAt": "2026-10-02T09:15:00.000Z",
    "requestExpiresAt": "2026-10-02T09:15:00.000Z",
    "acceptedAt": "2026-10-02T09:15:00.000Z",
    "paymentTerm": {
      "type": "FULL",
      "value": 30
    },
    "paymentLink": {
      "id": "83ffc5fd-bdc9-4062-8087-a7ae7c56738d",
      "url": "https://portail.quosuite.com/pay/…",
      "amount": 287.69,
      "paidAmount": 0,
      "currency": "TND",
      "status": "ACTIVE",
      "expiresAt": "2026-10-02T09:15:00.000Z"
    },
    "siteId": "7dd62b53-1dd0-499a-8fb5-3edc84123531",
    "vehicle": {
      "id": "a2ad2669-1a21-406a-8d6d-91e8ed6ff091",
      "plate": "245 TU 1234",
      "brand": "Peugeot",
      "model": "208",
      "category": "Citadine",
      "fuel": "DIESEL",
      "gearbox": "Manuelle",
      "seats": 5
    },
    "period": {
      "startAt": "2026-12-20T09:00:00.000Z",
      "endAt": "2026-12-27T09:00:00.000Z",
      "days": 7
    },
    "pickupAgency": {
      "id": "b91c3927-1f63-45da-8d9c-9f48a57b7481",
      "code": "TUN",
      "name": "Tunis Centre"
    },
    "returnAgency": {
      "id": "b91c3927-1f63-45da-8d9c-9f48a57b7481",
      "code": "TUN",
      "name": "Tunis Centre"
    },
    "options": [
      {
        "optionId": "e966bb34-017e-440c-8e00-473dd1ccd625",
        "code": "gps",
        "label": "GPS",
        "quantity": 1,
        "perDay": true,
        "totalExclTax": 35,
        "totalInclTax": 41.65
      }
    ],
    "amounts": {
      "currency": "TND",
      "totalExclTax": 805,
      "totalVat": 152.95,
      "totalInclTax": 958.95,
      "deposit": 500,
      "due": 287.69,
      "paid": 958.95,
      "refunded": 0,
      "balanceDue": 0,
      "displayCurrency": "EUR",
      "displayTotalInclTax": 286.25
    },
    "deposit": {
      "status": "NONE",
      "statusLabel": "Détenue",
      "amount": 500,
      "method": "CASH",
      "returned": 0,
      "retained": 0
    },
    "customer": {
      "partnerId": "e85b60de-77d7-4856-8804-216b603b1c25",
      "name": "Sami Ben Ali",
      "email": "sami@example.tn",
      "phone": null
    },
    "driver": {
      "firstName": null,
      "lastName": null,
      "phone": null,
      "flightNumber": "TU 712",
      "secondDriverName": null
    },
    "notes": null,
    "reservation": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "contract": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "invoice": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "paymentId": "2f67d634-7e73-4b9a-8a0e-7f794a4147c9",
    "documents": {
      "voucher": true,
      "contract": true,
      "invoice": true
    },
    "erp": {
      "posted": true,
      "postedAt": "2026-10-02T09:15:00.000Z",
      "attention": true,
      "error": null
    },
    "trackingUrl": "https://location.exemple.tn/booking/track/…",
    "createdAt": "2026-10-02T09:15:00.000Z",
    "updatedAt": "2026-10-02T09:15:00.000Z"
  },
  "timestamp": "2026-10-02T09:15:00.000Z"
}

Refuser une demande #

POST/api/public/v1/quosuite/car-rental/bookings/{id}/refuse
الصلاحية : rental_bookings:writeآمن عند الإعادةrefuseRentalBooking

Refuse une demande (REQUESTED) : véhicule relâché, client prévenu (motif reason facultatif). Statut CANCELLED.

المعاملات

  • idstring (uuid)المسارإلزامي
  • Idempotency-Keystringترويسة

    Clé d'idempotence (1–255 caractères ASCII imprimables, UUID v4 recommandé). Un nouvel essai avec la même clé et le même corps dans les 24 h rejoue la réponse du premier appel réussi (en-tête Idempotent-Replayed: true) au lieu de créer une seconde fois. Même clé, corps différent : 422 IDEMPOTENCY_KEY_REUSED. Premier appel encore en cours : 409 IDEMPOTENCY_IN_PROGRESS.

جسم الطلب application/json

  • reasonstring
    مثالVéhicule immobilisé

الاستجابة 200application/json

Succès.

  • idstring (uuid)إلزامي
  • numberstringإلزامي

    Numéro de la réservation du module.

    مثالRES-2026-0042
  • sourcestringإلزامي

    WEBSITE (site de location) ou API.

    القيمWEBSITEAPI
  • statusstringإلزامي

    Statut montré, déduit du module.

    القيمPENDING_PAYMENTREQUESTEDCONFIRMEDIN_PROGRESSRETURNEDCANCELLEDEXPIRED
  • statusLabelstringإلزامي
    مثالConfirmée
  • paymentModestringإلزامي
    القيمONLINEAGENCY
  • paymentStatusstringإلزامي
    القيمNONEPENDINGPAIDFAILEDPARTIALLY_REFUNDEDREFUNDEDPARTIALLY_PAID
  • holdExpiresAtstring | null

    Paiement en ligne attendu jusqu’à cet instant ; ensuite le véhicule est relâché.

  • requestExpiresAtstring | null

    Demande : l’agence répond avant cet instant, sinon elle expire (véhicule relâché).

  • acceptedAtstring | null

    Demande acceptée le…

  • paymentTermRentalPaymentTermDto | null

    Terme de paiement retenu (à la réservation, ou choisi à l’acceptation).

    تفاصيل RentalPaymentTermDto
  • paymentLinkRentalPaymentLinkDto | null

    Lien de paiement en cours (page /pay/…) : à transmettre au client s’il n’est pas prévenu par email (réglage notifyCustomer du canal API).

    تفاصيل RentalPaymentLinkDto
  • siteIdstring (uuid) | null

    Site dont le catalogue a servi ; null pour une réservation API sans site.

  • vehicleRentalVehicleSummaryDtoإلزامي
    تفاصيل RentalVehicleSummaryDto
  • periodRentalPeriodDtoإلزامي
    تفاصيل RentalPeriodDto
  • pickupAgencyRentalAgencyRefDto | null
    تفاصيل RentalAgencyRefDto
  • returnAgencyRentalAgencyRefDto | null
    تفاصيل RentalAgencyRefDto
  • optionsRentalBookingOptionDto[]إلزامي
    تفاصيل RentalBookingOptionDto
  • amountsRentalBookingAmountsDtoإلزامي
    تفاصيل RentalBookingAmountsDto
  • depositRentalDepositStateDto | null

    Caution du contrat (perçue à la remise) ; null tant qu’il n’y a pas de contrat.

    تفاصيل RentalDepositStateDto
  • customerRentalCustomerRefDtoإلزامي
    تفاصيل RentalCustomerRefDto
  • driverRentalBookingDriverDtoإلزامي

    Conducteur — pièces d’identité et permis : GET /car-rental/customers/{id}.

    تفاصيل RentalBookingDriverDto
  • notesstring | null
  • reservationRentalDocumentRefDto | null

    Réservation du module.

    تفاصيل RentalDocumentRefDto
  • contractRentalDocumentRefDto | null

    Contrat de location.

    تفاصيل RentalDocumentRefDto
  • invoiceRentalDocumentRefDto | null

    Facture ERP (aussi lisible par GET /sales/invoices/{id}).

    تفاصيل RentalDocumentRefDto
  • paymentIdstring (uuid) | null

    Encaissement ERP.

  • documentsRentalBookingDocumentsDtoإلزامي
    تفاصيل RentalBookingDocumentsDto
  • erpRentalBookingErpDtoإلزامي
    تفاصيل RentalBookingErpDto
  • trackingUrlstring | null

    Page de suivi du client sur le site (lien secret : à transmettre au client seulement).

    مثالhttps://location.exemple.tn/booking/track/…
  • createdAtstringإلزامي
  • updatedAtstringإلزامي

الأخطاء

400VALIDATION_FAILEDIDEMPOTENCY_KEY_INVALIDINVALID_CURSOR

Paramètre ou corps invalide (champ manquant, inconnu, mal typé, tri non permis), ou curseur de pagination émis pour un autre tri ou d’autres filtres.

401API_KEY_MISSINGAPI_KEY_INVALIDAPI_KEY_REVOKEDAPI_KEY_EXPIRED

Jeton absent, invalide, révoqué ou expiré.

403API_KEY_WRONG_PERIMETERAPI_INSUFFICIENT_SCOPEAPI_ORIGIN_NOT_ALLOWEDAPI_TENANT_MISMATCHAPI_TENANT_INACTIVEAPI_MODULE_UNAVAILABLEAPI_FEATURE_UNAVAILABLE

Jeton valide mais insuffisant : mauvais périmètre, scope manquant, origine refusée, abonnement inactif ou module / option non inclus dans le plan.

404NOT_FOUND

Ressource absente — ou appartenant à un autre espace, ce qui revient au même.

409CONFLICTIDEMPOTENCY_IN_PROGRESS

Conflit : valeur unique déjà prise, ou même clé d’idempotence encore en cours.

422BUSINESS_RULE_VIOLATIONIDEMPOTENCY_KEY_REUSED

Requête bien formée mais refusée par une règle de gestion de l’ERP (transition de statut interdite, pièce réglée verrouillée, stock…), ou clé d’idempotence réutilisée.

429API_RATE_LIMITEDAPI_AUTH_BLOCKED

Quota du jeton ou de l’espace atteint (voir Retry-After), ou adresse bloquée.

500INTERNAL_ERROR

Erreur inattendue. Citez requestId au support.

503SERVICE_UNAVAILABLE

Indisponibilité temporaire (voir Retry-After). Aucun détail d’infrastructure.

مثال طلب
# Une clé par opération, réutilisée telle quelle à chaque nouvel essai.
curl -X POST 'https://quosuite.com/api/public/v1/quosuite/car-rental/bookings/aac39e3a-0c40-44b2-8697-b597f357c5a9/refuse' \
  -H "Authorization: Bearer $QUOSUITE_API_KEY" \
  -H 'Idempotency-Key: 3f1c2a9e-5b7d-4e8a-9c1f-2d6b8e4a7c30' \
  -H 'Content-Type: application/json' \
  -d '{
  "reason": "Véhicule immobilisé"
}'
مثال استجابة
{
  "success": true,
  "data": {
    "id": "c3f8c2b0-25e0-431c-8558-8cc1a4cc0565",
    "number": "RES-2026-0042",
    "source": "WEBSITE",
    "status": "PENDING_PAYMENT",
    "statusLabel": "Confirmée",
    "paymentMode": "ONLINE",
    "paymentStatus": "NONE",
    "holdExpiresAt": "2026-10-02T09:15:00.000Z",
    "requestExpiresAt": "2026-10-02T09:15:00.000Z",
    "acceptedAt": "2026-10-02T09:15:00.000Z",
    "paymentTerm": {
      "type": "FULL",
      "value": 30
    },
    "paymentLink": {
      "id": "83ffc5fd-bdc9-4062-8087-a7ae7c56738d",
      "url": "https://portail.quosuite.com/pay/…",
      "amount": 287.69,
      "paidAmount": 0,
      "currency": "TND",
      "status": "ACTIVE",
      "expiresAt": "2026-10-02T09:15:00.000Z"
    },
    "siteId": "7dd62b53-1dd0-499a-8fb5-3edc84123531",
    "vehicle": {
      "id": "a2ad2669-1a21-406a-8d6d-91e8ed6ff091",
      "plate": "245 TU 1234",
      "brand": "Peugeot",
      "model": "208",
      "category": "Citadine",
      "fuel": "DIESEL",
      "gearbox": "Manuelle",
      "seats": 5
    },
    "period": {
      "startAt": "2026-12-20T09:00:00.000Z",
      "endAt": "2026-12-27T09:00:00.000Z",
      "days": 7
    },
    "pickupAgency": {
      "id": "b91c3927-1f63-45da-8d9c-9f48a57b7481",
      "code": "TUN",
      "name": "Tunis Centre"
    },
    "returnAgency": {
      "id": "b91c3927-1f63-45da-8d9c-9f48a57b7481",
      "code": "TUN",
      "name": "Tunis Centre"
    },
    "options": [
      {
        "optionId": "e966bb34-017e-440c-8e00-473dd1ccd625",
        "code": "gps",
        "label": "GPS",
        "quantity": 1,
        "perDay": true,
        "totalExclTax": 35,
        "totalInclTax": 41.65
      }
    ],
    "amounts": {
      "currency": "TND",
      "totalExclTax": 805,
      "totalVat": 152.95,
      "totalInclTax": 958.95,
      "deposit": 500,
      "due": 287.69,
      "paid": 958.95,
      "refunded": 0,
      "balanceDue": 0,
      "displayCurrency": "EUR",
      "displayTotalInclTax": 286.25
    },
    "deposit": {
      "status": "NONE",
      "statusLabel": "Détenue",
      "amount": 500,
      "method": "CASH",
      "returned": 0,
      "retained": 0
    },
    "customer": {
      "partnerId": "e85b60de-77d7-4856-8804-216b603b1c25",
      "name": "Sami Ben Ali",
      "email": "sami@example.tn",
      "phone": null
    },
    "driver": {
      "firstName": null,
      "lastName": null,
      "phone": null,
      "flightNumber": "TU 712",
      "secondDriverName": null
    },
    "notes": null,
    "reservation": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "contract": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "invoice": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "paymentId": "2f67d634-7e73-4b9a-8a0e-7f794a4147c9",
    "documents": {
      "voucher": true,
      "contract": true,
      "invoice": true
    },
    "erp": {
      "posted": true,
      "postedAt": "2026-10-02T09:15:00.000Z",
      "attention": true,
      "error": null
    },
    "trackingUrl": "https://location.exemple.tn/booking/track/…",
    "createdAt": "2026-10-02T09:15:00.000Z",
    "updatedAt": "2026-10-02T09:15:00.000Z"
  },
  "timestamp": "2026-10-02T09:15:00.000Z"
}

Constater le retour #

POST/api/public/v1/quosuite/car-rental/bookings/{id}/return
الصلاحية : rental_bookings:writeآمن عند الإعادةreturnRentalBooking

Retour du véhicule : le contrat se clôt, kilomètres supplémentaires facturés (sauf chargeExtraKm: false), caution restituée ou retenue (deposit, scope payments:write en plus). La somme rendue et retenue doit égaler la caution détenue ; une retenue exige un motif et ne dépasse pas le reste dû du contrat ou de sa facture. Omettre returnedAt avec un jeton API : une date explicite exige la permission utilisateur RENTAL_CONTRACTS:FORCE (403 sinon). Statut RETURNED ; le véhicule revient au planning.

المعاملات

  • idstring (uuid)المسارإلزامي
  • Idempotency-Keystringترويسة

    Clé d'idempotence (1–255 caractères ASCII imprimables, UUID v4 recommandé). Un nouvel essai avec la même clé et le même corps dans les 24 h rejoue la réponse du premier appel réussi (en-tête Idempotent-Replayed: true) au lieu de créer une seconde fois. Même clé, corps différent : 422 IDEMPOTENCY_KEY_REUSED. Premier appel encore en cours : 409 IDEMPOTENCY_IN_PROGRESS.

جسم الطلب application/json

  • mileageInnumber
    مثال19150
  • fuelInnumber
    أدنى0أقصى8
  • returnedAtstring

    Omettre avec un jeton API : défaut maintenant. Une date explicite exige la permission utilisateur RENTAL_CONTRACTS:FORCE (403 sinon) et ne peut précéder le départ réel.

  • depositRentalDepositSettlementInput

    Solde de la caution détenue (scope payments:write en plus).

    تفاصيل RentalDepositSettlementInput
  • chargeExtraKmboolean

    Facturer les km supplémentaires (défaut : oui).

الاستجابة 200application/json

Succès.

  • idstring (uuid)إلزامي
  • numberstringإلزامي

    Numéro de la réservation du module.

    مثالRES-2026-0042
  • sourcestringإلزامي

    WEBSITE (site de location) ou API.

    القيمWEBSITEAPI
  • statusstringإلزامي

    Statut montré, déduit du module.

    القيمPENDING_PAYMENTREQUESTEDCONFIRMEDIN_PROGRESSRETURNEDCANCELLEDEXPIRED
  • statusLabelstringإلزامي
    مثالConfirmée
  • paymentModestringإلزامي
    القيمONLINEAGENCY
  • paymentStatusstringإلزامي
    القيمNONEPENDINGPAIDFAILEDPARTIALLY_REFUNDEDREFUNDEDPARTIALLY_PAID
  • holdExpiresAtstring | null

    Paiement en ligne attendu jusqu’à cet instant ; ensuite le véhicule est relâché.

  • requestExpiresAtstring | null

    Demande : l’agence répond avant cet instant, sinon elle expire (véhicule relâché).

  • acceptedAtstring | null

    Demande acceptée le…

  • paymentTermRentalPaymentTermDto | null

    Terme de paiement retenu (à la réservation, ou choisi à l’acceptation).

    تفاصيل RentalPaymentTermDto
  • paymentLinkRentalPaymentLinkDto | null

    Lien de paiement en cours (page /pay/…) : à transmettre au client s’il n’est pas prévenu par email (réglage notifyCustomer du canal API).

    تفاصيل RentalPaymentLinkDto
  • siteIdstring (uuid) | null

    Site dont le catalogue a servi ; null pour une réservation API sans site.

  • vehicleRentalVehicleSummaryDtoإلزامي
    تفاصيل RentalVehicleSummaryDto
  • periodRentalPeriodDtoإلزامي
    تفاصيل RentalPeriodDto
  • pickupAgencyRentalAgencyRefDto | null
    تفاصيل RentalAgencyRefDto
  • returnAgencyRentalAgencyRefDto | null
    تفاصيل RentalAgencyRefDto
  • optionsRentalBookingOptionDto[]إلزامي
    تفاصيل RentalBookingOptionDto
  • amountsRentalBookingAmountsDtoإلزامي
    تفاصيل RentalBookingAmountsDto
  • depositRentalDepositStateDto | null

    Caution du contrat (perçue à la remise) ; null tant qu’il n’y a pas de contrat.

    تفاصيل RentalDepositStateDto
  • customerRentalCustomerRefDtoإلزامي
    تفاصيل RentalCustomerRefDto
  • driverRentalBookingDriverDtoإلزامي

    Conducteur — pièces d’identité et permis : GET /car-rental/customers/{id}.

    تفاصيل RentalBookingDriverDto
  • notesstring | null
  • reservationRentalDocumentRefDto | null

    Réservation du module.

    تفاصيل RentalDocumentRefDto
  • contractRentalDocumentRefDto | null

    Contrat de location.

    تفاصيل RentalDocumentRefDto
  • invoiceRentalDocumentRefDto | null

    Facture ERP (aussi lisible par GET /sales/invoices/{id}).

    تفاصيل RentalDocumentRefDto
  • paymentIdstring (uuid) | null

    Encaissement ERP.

  • documentsRentalBookingDocumentsDtoإلزامي
    تفاصيل RentalBookingDocumentsDto
  • erpRentalBookingErpDtoإلزامي
    تفاصيل RentalBookingErpDto
  • trackingUrlstring | null

    Page de suivi du client sur le site (lien secret : à transmettre au client seulement).

    مثالhttps://location.exemple.tn/booking/track/…
  • createdAtstringإلزامي
  • updatedAtstringإلزامي

الأخطاء

400VALIDATION_FAILEDIDEMPOTENCY_KEY_INVALIDINVALID_CURSOR

Paramètre ou corps invalide (champ manquant, inconnu, mal typé, tri non permis), ou curseur de pagination émis pour un autre tri ou d’autres filtres.

401API_KEY_MISSINGAPI_KEY_INVALIDAPI_KEY_REVOKEDAPI_KEY_EXPIRED

Jeton absent, invalide, révoqué ou expiré.

403API_KEY_WRONG_PERIMETERAPI_INSUFFICIENT_SCOPEAPI_ORIGIN_NOT_ALLOWEDAPI_TENANT_MISMATCHAPI_TENANT_INACTIVEAPI_MODULE_UNAVAILABLEAPI_FEATURE_UNAVAILABLE

Jeton valide mais insuffisant : mauvais périmètre, scope manquant, origine refusée, abonnement inactif ou module / option non inclus dans le plan.

404NOT_FOUND

Ressource absente — ou appartenant à un autre espace, ce qui revient au même.

409CONFLICTIDEMPOTENCY_IN_PROGRESS

Conflit : valeur unique déjà prise, ou même clé d’idempotence encore en cours.

422BUSINESS_RULE_VIOLATIONIDEMPOTENCY_KEY_REUSED

Requête bien formée mais refusée par une règle de gestion de l’ERP (transition de statut interdite, pièce réglée verrouillée, stock…), ou clé d’idempotence réutilisée.

429API_RATE_LIMITEDAPI_AUTH_BLOCKED

Quota du jeton ou de l’espace atteint (voir Retry-After), ou adresse bloquée.

500INTERNAL_ERROR

Erreur inattendue. Citez requestId au support.

503SERVICE_UNAVAILABLE

Indisponibilité temporaire (voir Retry-After). Aucun détail d’infrastructure.

مثال طلب
# Une clé par opération, réutilisée telle quelle à chaque nouvel essai.
curl -X POST 'https://quosuite.com/api/public/v1/quosuite/car-rental/bookings/aac39e3a-0c40-44b2-8697-b597f357c5a9/return' \
  -H "Authorization: Bearer $QUOSUITE_API_KEY" \
  -H 'Idempotency-Key: 3f1c2a9e-5b7d-4e8a-9c1f-2d6b8e4a7c30' \
  -H 'Content-Type: application/json' \
  -d '{
  "mileageIn": 19150,
  "deposit": {
    "returnedAmount": 500,
    "retainedAmount": 0
  }
}'
مثال استجابة
{
  "success": true,
  "data": {
    "id": "c3f8c2b0-25e0-431c-8558-8cc1a4cc0565",
    "number": "RES-2026-0042",
    "source": "WEBSITE",
    "status": "PENDING_PAYMENT",
    "statusLabel": "Confirmée",
    "paymentMode": "ONLINE",
    "paymentStatus": "NONE",
    "holdExpiresAt": "2026-10-02T09:15:00.000Z",
    "requestExpiresAt": "2026-10-02T09:15:00.000Z",
    "acceptedAt": "2026-10-02T09:15:00.000Z",
    "paymentTerm": {
      "type": "FULL",
      "value": 30
    },
    "paymentLink": {
      "id": "83ffc5fd-bdc9-4062-8087-a7ae7c56738d",
      "url": "https://portail.quosuite.com/pay/…",
      "amount": 287.69,
      "paidAmount": 0,
      "currency": "TND",
      "status": "ACTIVE",
      "expiresAt": "2026-10-02T09:15:00.000Z"
    },
    "siteId": "7dd62b53-1dd0-499a-8fb5-3edc84123531",
    "vehicle": {
      "id": "a2ad2669-1a21-406a-8d6d-91e8ed6ff091",
      "plate": "245 TU 1234",
      "brand": "Peugeot",
      "model": "208",
      "category": "Citadine",
      "fuel": "DIESEL",
      "gearbox": "Manuelle",
      "seats": 5
    },
    "period": {
      "startAt": "2026-12-20T09:00:00.000Z",
      "endAt": "2026-12-27T09:00:00.000Z",
      "days": 7
    },
    "pickupAgency": {
      "id": "b91c3927-1f63-45da-8d9c-9f48a57b7481",
      "code": "TUN",
      "name": "Tunis Centre"
    },
    "returnAgency": {
      "id": "b91c3927-1f63-45da-8d9c-9f48a57b7481",
      "code": "TUN",
      "name": "Tunis Centre"
    },
    "options": [
      {
        "optionId": "e966bb34-017e-440c-8e00-473dd1ccd625",
        "code": "gps",
        "label": "GPS",
        "quantity": 1,
        "perDay": true,
        "totalExclTax": 35,
        "totalInclTax": 41.65
      }
    ],
    "amounts": {
      "currency": "TND",
      "totalExclTax": 805,
      "totalVat": 152.95,
      "totalInclTax": 958.95,
      "deposit": 500,
      "due": 287.69,
      "paid": 958.95,
      "refunded": 0,
      "balanceDue": 0,
      "displayCurrency": "EUR",
      "displayTotalInclTax": 286.25
    },
    "deposit": {
      "status": "NONE",
      "statusLabel": "Détenue",
      "amount": 500,
      "method": "CASH",
      "returned": 0,
      "retained": 0
    },
    "customer": {
      "partnerId": "e85b60de-77d7-4856-8804-216b603b1c25",
      "name": "Sami Ben Ali",
      "email": "sami@example.tn",
      "phone": null
    },
    "driver": {
      "firstName": null,
      "lastName": null,
      "phone": null,
      "flightNumber": "TU 712",
      "secondDriverName": null
    },
    "notes": null,
    "reservation": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "contract": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "invoice": {
      "id": "3b0018f9-d0d9-4ee2-89c4-7486bc993345",
      "number": "CTR-2026-0042",
      "status": "OPEN",
      "statusLabel": "En cours"
    },
    "paymentId": "2f67d634-7e73-4b9a-8a0e-7f794a4147c9",
    "documents": {
      "voucher": true,
      "contract": true,
      "invoice": true
    },
    "erp": {
      "posted": true,
      "postedAt": "2026-10-02T09:15:00.000Z",
      "attention": true,
      "error": null
    },
    "trackingUrl": "https://location.exemple.tn/booking/track/…",
    "createdAt": "2026-10-02T09:15:00.000Z",
    "updatedAt": "2026-10-02T09:15:00.000Z"
  },
  "timestamp": "2026-10-02T09:15:00.000Z"
}

Réglages de réservation par l’API #

GET/api/public/v1/quosuite/car-rental/booking-settings
الصلاحية : rental:readgetRentalBookingSettings

Ce qui s’applique aux réservations de l’API (avec ou sans site) : ouverture, demandes sans paiement admises, verrou, délai minimal, politique de paiement (payer à la réservation — total, % ou montant fixe — ou demande acceptée puis lien de paiement), politique d’annulation, agences, emails au client. Se règlent dans l’application (Location › Paramètres › Réservation par l’API).

Jetons QuoRent (qsr_) : admis — mêmes scopes ; payments:write s’y lit rental_payments:write.

الاستجابة 200application/json

Succès.

  • enabledbooleanإلزامي

    Réservation par l’API ouverte.

  • payAtAgencybooleanإلزامي

    Demandes sans paiement (AGENCY) admises.

  • holdMinutesnumberإلزامي
    مثال30
  • minLeadHoursnumberإلزامي
    مثال2
  • paymentRentalPaymentPolicyDtoإلزامي
    تفاصيل RentalPaymentPolicyDto
  • cancellationPolicyRentalCancellationPolicyDtoإلزامي
    تفاصيل RentalCancellationPolicyDto
  • agencyIdsstring[]إلزامي

    Agences ouvertes à l’API (vide = toutes).

  • notifyCustomerbooleanإلزامي

    QuoSuite écrit au client (accusé, lien de paiement, confirmation, annulation).

الأخطاء

400VALIDATION_FAILEDIDEMPOTENCY_KEY_INVALIDINVALID_CURSOR

Paramètre ou corps invalide (champ manquant, inconnu, mal typé, tri non permis), ou curseur de pagination émis pour un autre tri ou d’autres filtres.

401API_KEY_MISSINGAPI_KEY_INVALIDAPI_KEY_REVOKEDAPI_KEY_EXPIRED

Jeton absent, invalide, révoqué ou expiré.

403API_KEY_WRONG_PERIMETERAPI_INSUFFICIENT_SCOPEAPI_ORIGIN_NOT_ALLOWEDAPI_TENANT_MISMATCHAPI_TENANT_INACTIVEAPI_MODULE_UNAVAILABLEAPI_FEATURE_UNAVAILABLE

Jeton valide mais insuffisant : mauvais périmètre, scope manquant, origine refusée, abonnement inactif ou module / option non inclus dans le plan.

404NOT_FOUND

Ressource absente — ou appartenant à un autre espace, ce qui revient au même.

429API_RATE_LIMITEDAPI_AUTH_BLOCKED

Quota du jeton ou de l’espace atteint (voir Retry-After), ou adresse bloquée.

500INTERNAL_ERROR

Erreur inattendue. Citez requestId au support.

503SERVICE_UNAVAILABLE

Indisponibilité temporaire (voir Retry-After). Aucun détail d’infrastructure.

مثال طلب
curl 'https://quosuite.com/api/public/v1/quosuite/car-rental/booking-settings' \
  -H "Authorization: Bearer $QUOSUITE_API_KEY"
مثال استجابة
{
  "success": true,
  "data": {
    "enabled": true,
    "payAtAgency": true,
    "holdMinutes": 30,
    "minLeadHours": 2,
    "payment": {
      "flow": "PAY_ON_BOOKING",
      "onBooking": {
        "type": "FULL",
        "value": 30
      },
      "onAcceptance": {
        "type": "FULL",
        "value": 30
      },
      "requestTtlHours": 24,
      "paymentDeadlineHours": 48
    },
    "cancellationPolicy": {
      "customerCancel": true,
      "freeUntilHours": 48,
      "feePercent": 20,
      "feeFixed": 0,
      "noRefundWithinHours": 0,
      "modifyUntilHours": 24
    },
    "agencyIds": [
      "string"
    ],
    "notifyCustomer": true
  },
  "timestamp": "2026-10-02T09:15:00.000Z"
}
جرّب هذا الطلب

Lister les réservations du module #

GET/api/public/v1/quosuite/car-rental/reservations
الصلاحية : rental_bookings:readlistRentalReservations

Toutes les réservations du module Car Rental — comptoir, téléphone, site, API — telles que le planning les connaît (bookingId relie celles qui viennent du site ou de l’API). Lecture seule : on réserve par POST /car-rental/bookings. Tri permis : startAt, createdAt, updatedAt, number (défaut -startAt).

المعاملات

  • langstringالاستعلام

    Langue des libellés (et du PDF). Défaut : Accept-Language, sinon la langue de l’espace.

    frenar
  • pagenumberالاستعلام

    Numéro de page (à partir de 1).

  • pageSizenumberالاستعلام

    Éléments par page (100 au plus).

  • sortstringالاستعلام

    Tri : champs séparés par des virgules, préfixe - pour l’ordre décroissant. Champs permis : voir la description de la route. Un dernier critère sur id rend la pagination stable.

  • updatedSincestringالاستعلام

    Ne renvoie que les éléments créés ou modifiés depuis cet instant (ISO 8601, inclus). Avec sort=updatedAt, c’est la forme recommandée d’une synchronisation incrémentale.

  • cursorstringالاستعلام

    Pagination par curseur : nextCursor de la page précédente, à repasser tel quel avec les mêmes filtres et le même tri. Stable même si des éléments sont créés pendant le parcours, et de coût constant quelle que soit la profondeur. Exclusif de page.

  • limitnumberالاستعلام

    Pagination par curseur : éléments par page (100 au plus). ?limit=100 ouvre un parcours par curseur ; la réponse rend pagination.nextCursor.

  • statusstring[]الاستعلام

    Statuts, séparés par des virgules.

  • vehicleIdstring (uuid)الاستعلام
  • customerIdstring (uuid)الاستعلام
  • agencyIdstring (uuid)الاستعلام
  • startFromstringالاستعلام
  • startTostringالاستعلام

الاستجابة 200application/json

Succès.

  • itemsRentalReservationDto[]إلزامي
    تفاصيل RentalReservationDto
  • paginationPaginationDtoإلزامي
    تفاصيل PaginationDto

الأخطاء

400VALIDATION_FAILEDIDEMPOTENCY_KEY_INVALIDINVALID_CURSOR

Paramètre ou corps invalide (champ manquant, inconnu, mal typé, tri non permis), ou curseur de pagination émis pour un autre tri ou d’autres filtres.

401API_KEY_MISSINGAPI_KEY_INVALIDAPI_KEY_REVOKEDAPI_KEY_EXPIRED

Jeton absent, invalide, révoqué ou expiré.

403API_KEY_WRONG_PERIMETERAPI_INSUFFICIENT_SCOPEAPI_ORIGIN_NOT_ALLOWEDAPI_TENANT_MISMATCHAPI_TENANT_INACTIVEAPI_MODULE_UNAVAILABLEAPI_FEATURE_UNAVAILABLE

Jeton valide mais insuffisant : mauvais périmètre, scope manquant, origine refusée, abonnement inactif ou module / option non inclus dans le plan.

429API_RATE_LIMITEDAPI_AUTH_BLOCKED

Quota du jeton ou de l’espace atteint (voir Retry-After), ou adresse bloquée.

500INTERNAL_ERROR

Erreur inattendue. Citez requestId au support.

503SERVICE_UNAVAILABLE

Indisponibilité temporaire (voir Retry-After). Aucun détail d’infrastructure.

مثال طلب
curl 'https://quosuite.com/api/public/v1/quosuite/car-rental/reservations' \
  -H "Authorization: Bearer $QUOSUITE_API_KEY"
مثال استجابة
{
  "success": true,
  "data": {
    "items": [
      {
        "id": "3ecd7ed5-62aa-47f2-83dc-ac1eac54b2fd",
        "number": "RES-2026-0042",
        "status": "PENDING",
        "statusLabel": "Confirmée",
        "source": "Téléphone",
        "customerId": "693de195-fe69-4372-82bb-8562c4626305",
        "billToId": "9e77a7a1-b6ef-487a-8626-9f66cdcdb7c5",
        "vehicleId": "e3d567b9-de78-4062-8517-098437afde11",
        "requestedCategory": null,
        "requestedModel": null,
        "period": {
          "startAt": "2026-12-20T09:00:00.000Z",
          "endAt": "2026-12-27T09:00:00.000Z",
          "days": 7
        },
        "pickupAgencyId": "65311296-22bb-4a18-8bcf-a95bf50261c1",
        "returnAgencyId": "8d829984-0de6-4374-828b-261ded42c265",
        "dailyRate": 100,
        "vatRate": 19,
        "currency": "TND",
        "deposit": 500,
        "lines": [
          {
            "label": "Siège enfant",
            "quantity": 1,
            "unitPrice": 5,
            "vatRate": 19,
            "perDay": true
          }
        ],
        "totals": {
          "totalExclTax": 805,
          "totalVat": 152.95,
          "taxes": [
            {
              "label": "Timbre fiscal",
              "amount": 1,
              "taxRateId": "fa39be0f-bd54-45e6-8881-f6669dd38479",
              "computation": "PERCENTAGE",
              "stage": "BEFORE_VAT",
              "rate": 0,
              "base": 0,
              "unitAmount": 0,
              "position": 0
            }
          ],
          "totalInclTax": 958.95
        },
        "contractId": "22d51c47-eaad-4172-81f6-ede053a7e1e9",
        "bookingId": "4292ef26-afda-4772-858c-a3d315b796b1",
        "createdAt": "2026-10-02T09:15:00.000Z",
        "updatedAt": "2026-10-02T09:15:00.000Z"
      }
    ],
    "pagination": {
      "page": 1,
      "pageSize": 25,
      "totalItems": 132,
      "totalPages": 6,
      "limit": 100,
      "nextCursor": "c1.eyJzIjoiZGF0ZTpkZXNjLGlkOmFzYyIsImYiOiJ…",
      "hasMore": true
    }
  },
  "timestamp": "2026-10-02T09:15:00.000Z"
}
جرّب هذا الطلب

Détail d’une réservation du module #

GET/api/public/v1/quosuite/car-rental/reservations/{id}
الصلاحية : rental_bookings:readgetRentalReservation

Avec son chiffrage par le module (totals : HT, TVA, taxes de pied, TTC).

المعاملات

  • idstring (uuid)المسارإلزامي
  • langstringالاستعلام

    Langue des libellés (et du PDF). Défaut : Accept-Language, sinon la langue de l’espace.

    frenar

الاستجابة 200application/json

Succès.

  • idstring (uuid)إلزامي
  • numberstringإلزامي
    مثالRES-2026-0042
  • statusstringإلزامي
    القيمPENDINGCONFIRMEDCONVERTEDCANCELLEDNO_SHOW
  • statusLabelstringإلزامي
    مثالConfirmée
  • sourcestring | null
    مثالTéléphone
  • customerIdstring (uuid)إلزامي

    Conducteur (client ERP).

  • billToIdstring (uuid) | null

    Société facturée.

  • vehicleIdstring (uuid) | null
  • requestedCategorystring | null

    Catégorie demandée (réservation sans véhicule désigné : rien n’est retenu).

  • requestedModelstring | null
  • periodRentalPeriodDtoإلزامي
    تفاصيل RentalPeriodDto
  • pickupAgencyIdstring (uuid) | null
  • returnAgencyIdstring (uuid) | null
  • dailyRatenumberإلزامي
    مثال100
  • vatRatenumber | null
    مثال19
  • currencystringإلزامي
    مثالTND
  • depositnumberإلزامي
    مثال500
  • linesRentalLineDto[]إلزامي
    تفاصيل RentalLineDto
  • totalsRentalTotalsDto | null

    Chiffrage du module (détail seulement).

    تفاصيل RentalTotalsDto
  • contractIdstring (uuid) | null
  • bookingIdstring (uuid) | null

    Réservation en ligne (site ou API) qui l’a créée.

  • createdAtstringإلزامي
  • updatedAtstringإلزامي

الأخطاء

400VALIDATION_FAILEDIDEMPOTENCY_KEY_INVALIDINVALID_CURSOR

Paramètre ou corps invalide (champ manquant, inconnu, mal typé, tri non permis), ou curseur de pagination émis pour un autre tri ou d’autres filtres.

401API_KEY_MISSINGAPI_KEY_INVALIDAPI_KEY_REVOKEDAPI_KEY_EXPIRED

Jeton absent, invalide, révoqué ou expiré.

403API_KEY_WRONG_PERIMETERAPI_INSUFFICIENT_SCOPEAPI_ORIGIN_NOT_ALLOWEDAPI_TENANT_MISMATCHAPI_TENANT_INACTIVEAPI_MODULE_UNAVAILABLEAPI_FEATURE_UNAVAILABLE

Jeton valide mais insuffisant : mauvais périmètre, scope manquant, origine refusée, abonnement inactif ou module / option non inclus dans le plan.

404NOT_FOUND

Ressource absente — ou appartenant à un autre espace, ce qui revient au même.

429API_RATE_LIMITEDAPI_AUTH_BLOCKED

Quota du jeton ou de l’espace atteint (voir Retry-After), ou adresse bloquée.

500INTERNAL_ERROR

Erreur inattendue. Citez requestId au support.

503SERVICE_UNAVAILABLE

Indisponibilité temporaire (voir Retry-After). Aucun détail d’infrastructure.

مثال طلب
curl 'https://quosuite.com/api/public/v1/quosuite/car-rental/reservations/aac39e3a-0c40-44b2-8697-b597f357c5a9' \
  -H "Authorization: Bearer $QUOSUITE_API_KEY"
مثال استجابة
{
  "success": true,
  "data": {
    "id": "3ecd7ed5-62aa-47f2-83dc-ac1eac54b2fd",
    "number": "RES-2026-0042",
    "status": "PENDING",
    "statusLabel": "Confirmée",
    "source": "Téléphone",
    "customerId": "693de195-fe69-4372-82bb-8562c4626305",
    "billToId": "9e77a7a1-b6ef-487a-8626-9f66cdcdb7c5",
    "vehicleId": "e3d567b9-de78-4062-8517-098437afde11",
    "requestedCategory": null,
    "requestedModel": null,
    "period": {
      "startAt": "2026-12-20T09:00:00.000Z",
      "endAt": "2026-12-27T09:00:00.000Z",
      "days": 7
    },
    "pickupAgencyId": "65311296-22bb-4a18-8bcf-a95bf50261c1",
    "returnAgencyId": "8d829984-0de6-4374-828b-261ded42c265",
    "dailyRate": 100,
    "vatRate": 19,
    "currency": "TND",
    "deposit": 500,
    "lines": [
      {
        "label": "Siège enfant",
        "quantity": 1,
        "unitPrice": 5,
        "vatRate": 19,
        "perDay": true
      }
    ],
    "totals": {
      "totalExclTax": 805,
      "totalVat": 152.95,
      "taxes": [
        {
          "label": "Timbre fiscal",
          "amount": 1,
          "taxRateId": "fa39be0f-bd54-45e6-8881-f6669dd38479",
          "computation": "PERCENTAGE",
          "stage": "BEFORE_VAT",
          "rate": 0,
          "base": 0,
          "unitAmount": 0,
          "position": 0
        }
      ],
      "totalInclTax": 958.95
    },
    "contractId": "22d51c47-eaad-4172-81f6-ede053a7e1e9",
    "bookingId": "4292ef26-afda-4772-858c-a3d315b796b1",
    "createdAt": "2026-10-02T09:15:00.000Z",
    "updatedAt": "2026-10-02T09:15:00.000Z"
  },
  "timestamp": "2026-10-02T09:15:00.000Z"
}
جرّب هذا الطلب

مولَّدة من عقد OpenAPI لـ QuoSuite API الإصدار 1.0.0.