Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

An example of a POST request for a TIME reservation starting from 13. 11. 2023 and expiring 1514. 11. 2023 with additional NextReservationTimes:

  • starting from 14. 11. 2023 and expiring 16. 11. 2023,

  • starting from 15. 11. 2023 and expiring 17. 11. 2023.(no expiration date defined, thus root one shall be used)

Code Block
languagejson
POST /parcel-lockers/v2/reservation
{
  "data": {
    "reservation": {
      "id": "RES123",
      "attributes": {
        "startReservationDate": "2023-11-13T00:00:00.000Z",
        "expirationDate": "2023-11-14T00:00:00.000Z",
        "blocked": false,
        "packages": [
          {
            ...
          }
        ],
        "type": "TIME",
        "nextReservationTimes": [
          {
            "startReservationDate": "2023-11-14T00:00:00.000Z",
            "expirationDate": "2023-11-16T00:00:00.000Z",
          },
          {
            "startReservationDate": "2023-11-15T00:00:00.000Z",
            //NOTE: Since expirationDate is not supplied in here, 
            //the root expirationDate shall be used, that is "2023-11-14T00:00:00.000Z"
          }
        ]
      },
      "relationships": {
        "box": {
          "id": 1234,
          "pid": "PID9876"
        }
      }
    }
  }
}