Skip to content

2.1 Create last-mile bookings with depth parameters to trigger scenarios

Send a normal last-mile booking through the public Carrier Integration API, and let the mock provider run a scripted scenario for it. This method needs no calls to the mock service itself.

  1. Send a normal last-mile booking to POST https://api.staging.glsnxt.com/ooh/carrier-connector/v1/parcels/data, using your carrier staging X-API-Key.
  2. Use a unique carrierParcelId that begins with 000.
  3. Use a test lockerUid that GLS/NXT supplies. It must belong to a mock-enabled provider and use a mock locker prefix (996633 or QA).
  4. Set dimensions.depth to one of the sequence codes below. This selects which scenario the mock runs after booking.
  5. Follow the simulated lifecycle through your Parcel Updates webhooks.
curl --request POST \
  --url https://api.staging.glsnxt.com/ooh/carrier-connector/v1/parcels/data \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <CARRIER_STAGING_API_KEY>' \
  --data '{
    "eventType": "BOOKING",
    "shipmentType": "LAST_MILE",
    "allocationType": "HARD_RESERVATION",
    "carrierParcelId": "000<UNIQUE_PARCEL_ID>",
    "lockerUid": "<GLSNXT_TEST_LOCKER_UID>",
    "dimensions": { "depth": 200, "height": 100, "width": 150 }
  }'