Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

Version 1 Next »

What we want to change:

Add an ability to filter reservations by package’s barcode

Why we want to change:

  • To filter reservations by package’s barcode

When we want to change:

Test environment: 3.7.2023

Production environemnt: 6.7.2023

Affected enpoints

GET /v2/reservations

Example of change:

When a caller wants to filter reservations by package’s barcode (focus on a request and barcode filter).

Request:

GET /parcel-lockers/v2/reservations?filter%5Bstatus%5D=RETURNED&page%5Blimit%5D=20&page%5Boffset%5D=0&filter%5Bbarcode%5D=NB0235067241M'

Response:

{
  "data": {
    "reservations": [
      {
        "id": "4da5bea2-337d-44ac-97c8-bcee546e5459",
        "attributes": {
          "status": "RETURNED",
          "createdAt": "2023-06-14T08:57:14.71Z",
          "expirationDate": "2023-06-16T05:00:00Z",
          "startReservationDate": "2023-06-14T09:02:00Z",
          "packages": [
            {
              "depth": 16.5,
              "height": 7,
              "width": 13.5,
              "barcode": "NB0235067241M",
              "packageState": "TAKEN_OUT_BY_SHIPPER"
            }
          ],
          "paymentData": null,
          "pin": "",
          "type": "TIME"
        },
        "relationships": {
          "box": {
            "id": 2677,
            "pid": "70305"
          }
        }
      }
    ]
  },
  "metadata": null,
  "errors": null
}

API specification diff:

TBD

  • No labels