Impacts migration of the route GET /v0/customers/{customer_id}/commercial_offers

  • Obsolète
  • 10 novembre 2023
  • 1 route liée

Context

Upgrade from GET - /v0/customers/{customer_id}/commercial_offers to GET - /v1/customers/{customer_id}/commercial_offers

⭐ Key benefits : Give the ability to display booking informations for multistays.

ℹ️ We added a new stays array instead of the field stay_date

Impacts

Route to call:

  • GET - /v0/customers/{customer_id}/commercial_offers

Input parameters : unchanged

Output Model : ⚠️ Evolved

[
  {
    "id": 1234567,
    "type": "CREDIT_NOTE",
    "amount": 350.25,
    "currency": "EUR",
    "validity_start_date": "20180328",
    "validity_end_date": "20190328",
    "date_of_use": "20181113",
    "origin_type": "CLAIM",
    "origin": {
      "booking_id": "2324252",
-      "stay_date": "20210403"
+      "stays": [
+        {
+          "start_date": "20210403",
+          "end_date": "20200416",
+          "product_id": "KABC"
+        }
+      ]
    },
    "status": "UNAVAILABLE",
    "godchild_information": {
      "last_name": "Doe",
      "unicode_last_name": "王",
      "first_name": "John",
      "unicode_first_name": "北"
    },
    "godfather_information": {
      "last_name": "Doe",
      "unicode_last_name": "王",
      "first_name": "John",
      "unicode_first_name": "北"
    }
  }
]

Model

Champ APIDéfinitionExampleType
origin.stays[].start_datestart day of the stay20240403string
origin.stays[].end_dateend day of the stay20240403string
origin.stays[].product_idproduct concerned by the stayKABCstring