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

« Previous Version 3 Next »

What we want to change:

Add ability to get unique object identification compatible with other parts of the the system

Why we want to change:

  • To support get unique object identification

When we want to change:

Test environment: TBD

Production environemnt: TBD

Affected enpoints

POST /v2/reservation

PATCH /v2/reservation

GET /v2/reservation

GET /v2/reservations

Example of change:

When a caller wants to get unique object identification (focus on a new openerKey attribute on line 1 and filter for openerKey inside query string on the first line and in response body line 6).

Request:

POST /parcel-lockers/v2/reservation?fields%5Breservation%5D=openerKey

  "data": {
    "reservation": {
      "id": "test.res.1",
      "attributes": {
        "expirationDate": "2023-03-17T15:05:06.687Z",
        "packages": [
          {
            "depth": 3.5,
            "height": 2.8,
            "width": 4.2,
            "barcode": "test.pkg.1"
          }
        ],
        "type": "NON_BINDING",
      },
      "relationships": {
        "box": {
          "id": 5,
        }
      }
    }
  }
}'

Response:

{
  "data": {
    "id": "test.res.1",
    "attributes": {
      "status": "RESERVED",
      "openerKey": "PARC5431234",
      "createdAt": "2023-03-15T15:06:25.0824894Z",
      "expirationDate": "2023-03-17T15:05:06.687Z",
      "startReservationDate": null,
      "packages": [
        {
          "depth": 3.5,
          "height": 2.8,
          "width": 4.2,
          "barcode": "test.pkg.1",
          "packageState": "DISPATCHED"
        }
      ],
      "paymentData": null,
      "pin": "844840",
      "type": "NON_BINDING"
    },
    "relationships": {
      "box": {
        "id": 5,
        "pid": null
      }
    }
  },
  "metadata": null,
  "errors": null
}

And similar for other endpoints.

API specification diff:

TBD

  • No labels