Staging: carrier-integration-api main at 8eb88c7. Carriers do not see this version yet.
Mock Service API (staging)

Staging-only trigger operations that simulate parcel and locker events. For the first steps, read the Testing guide.

Staging only

Base URL: https://api.staging.glsnxt.com/ooh-mock-service/v1. Authenticate with your regular carrier staging API key in the X-API-Key header. You do not need a separate mock-service key.

Request bodies use snake_case field names. A booking uses the platform lockerUid. A trigger request uses the provider-side provider_locker_id. For a test locker the two values can be equal, but this is not always true. Read provider_locker_id from the platform (see the Testing guide, section 2.1).

A 200 response is not a confirmation

The mock answers 200 when it accepts the request, before it sends the event. The message text, for example Last Mile event triggered successfully, has the same meaning. The platform processes the event a few seconds later. If the platform rejects or drops the event, you get no error from the mock. Always check the result in your webhooks or with GET /parcels (Testing guide, section 2.2).

Always send your own carrier name in carrier_name. With a different carrier name, the mock returns 200, but the platform drops the event.


Trigger first-mile event

POST
https://api.staging.glsnxt.com/ooh-mock-service/v1
/parcel/first-mile/event

Triggers one first-mile or return parcel event for the selected provider and carrier. A 200 response means only that the mock accepted the request. Check the new status in your webhooks or with GET /parcels.

Trigger first-mile event › Request Body

parcel_id
​string · required

Your parcel ID (carrierParcelId). For a booked parcel, use the ID from the booking. For a new test parcel, use a new ID that starts with 000.

provider_locker_id
​string · required

The locker ID on the provider side. This is not always the platform lockerUid. Read it from provider.lockerUid in GET /lockers/by-uid, or from providerLockerId in GET /parcels.

event_type
​string · enum · required

Event to trigger.

Enum values:
BOOKING_CREATED
COURIER_COLLECTED
CONSIGNEE_DELIVERED
carrier_name
​string · enum · required

Your own carrier name: the carrier that owns your X-API-Key, the parcel and the locker. The mock does not compare this value with your API key. With a different carrier name, the mock returns 200, but the platform drops the event and the parcel status does not change.

Enum values:
GLS_NXT
GLS_DE
GLS_AT
DPD_DE
GLS_ES
GLS_IT
GLS_PT
GLS_DK
provider_name
​string · enum · required

The provider of the test locker. Read it from provider.name in GET /lockers/by-uid, or from providerName in GET /parcels.

Enum values:
KEBA
MYFLEXBOX_DE
MYFLEXBOX_AT
TAMBURI_AT
QUADIENT
BLOQ
CAINIAO_FR
shipment_type
​string · enum · required

FIRST_MILE or RETURN.

Enum values:
FIRST_MILE
RETURN
labelless
​boolean

Optional. Set true only for confirmed label-less combinations.

Trigger first-mile event › Responses

Request accepted. This does not confirm that the platform applied the event: the mock sends the event a few seconds later. Check the result in your webhooks or with GET /parcels.

message
​string · required

Trigger first-mile sequence

POST
https://api.staging.glsnxt.com/ooh-mock-service/v1
/parcel/first-mile/sequence

Triggers a full first-mile or return event sequence. Do not send event_type. The mock selects the sequence from provider_name, shipment_type and labelless. The events arrive through your webhooks after the 200 response.

Trigger first-mile sequence › Request Body

parcel_id
​string · required

Your parcel ID (carrierParcelId). For a booked parcel, use the ID from the booking. For a new test parcel, use a new ID that starts with 000.

provider_locker_id
​string · required

The locker ID on the provider side. This is not always the platform lockerUid. Read it from provider.lockerUid in GET /lockers/by-uid, or from providerLockerId in GET /parcels.

carrier_name
​string · enum · required

Your own carrier name: the carrier that owns your X-API-Key, the parcel and the locker. The mock does not compare this value with your API key. With a different carrier name, the mock returns 200, but the platform drops the event and the parcel status does not change.

Enum values:
GLS_NXT
GLS_DE
GLS_AT
DPD_DE
GLS_ES
GLS_IT
GLS_PT
GLS_DK
provider_name
​string · enum · required

The provider of the test locker. Read it from provider.name in GET /lockers/by-uid, or from providerName in GET /parcels.

Enum values:
KEBA
MYFLEXBOX_DE
MYFLEXBOX_AT
TAMBURI_AT
QUADIENT
BLOQ
CAINIAO_FR
shipment_type
​string · enum · required

FIRST_MILE or RETURN.

Enum values:
FIRST_MILE
RETURN
labelless
​boolean

Optional. Set true only for confirmed label-less combinations.

Trigger first-mile sequence › Responses

Request accepted. This does not confirm that the platform applied the events: the mock sends them one after another, starting a few seconds later. Check the result in your webhooks or with GET /parcels.

message
​string · required

Trigger last-mile event

POST
https://api.staging.glsnxt.com/ooh-mock-service/v1
/parcel/last-mile/event

Triggers one last-mile parcel event for the selected provider and carrier. For a parcel that you booked through POST /parcels/data, send the same parcel ID, your own carrier name, and the provider and provider locker ID of the booking. For a new parcel_id without a booking, send COURIER_DELIVERED first. The platform creates the shipment and sets this status in one step. If the first event for a new parcel_id is a different event, the platform ignores it. After COURIER_DELIVERED, send the next statuses for the same parcel. A 200 response means only that the mock accepted the request. Check the new status in your webhooks or with GET /parcels.

Trigger last-mile event › Request Body

parcel_id
​string · required

Your parcel ID (carrierParcelId). For a booked parcel, use the ID from the booking. For a new test parcel, use a new ID that starts with 000.

provider_locker_id
​string · required

The locker ID on the provider side. This is not always the platform lockerUid. Read it from provider.lockerUid in GET /lockers/by-uid, or from providerLockerId in GET /parcels.

event_type
​string · enum · required

Event to trigger.

Enum values:
COURIER_DELIVERED
CONSIGNEE_COLLECTED
CONSIGNEE_COLLECTION_EXPIRED
BOOKING_CANCELLED
COURIER_COLLECTED_EXPIRED
COURIER_DELIVERY_ERROR
carrier_name
​string · enum · required

Your own carrier name: the carrier that owns your X-API-Key, the parcel and the locker. The mock does not compare this value with your API key. With a different carrier name, the mock returns 200, but the platform drops the event and the parcel status does not change.

Enum values:
GLS_NXT
GLS_DE
GLS_AT
DPD_DE
GLS_ES
GLS_IT
GLS_PT
GLS_DK
provider_name
​string · enum · required

The provider of the test locker. Read it from provider.name in GET /lockers/by-uid, or from providerName in GET /parcels.

Enum values:
KEBA
MYFLEXBOX_DE
MYFLEXBOX_AT
TAMBURI_AT
LOCKY_PT
QUADIENT
BLOQ
AMAZON_DE
shipment_type
​string · enum · required

LAST_MILE or ALTERNATIVE_DELIVERY.

Enum values:
LAST_MILE
ALTERNATIVE_DELIVERY

Trigger last-mile event › Responses

Request accepted. This does not confirm that the platform applied the event: the mock sends the event a few seconds later. Check the result in your webhooks or with GET /parcels.

message
​string · required

Trigger locker event

POST
https://api.staging.glsnxt.com/ooh-mock-service/v1
/locker/event

Triggers a locker status event for the specified provider. A 200 response means only that the mock accepted the request. For AMAZON_DE and CAINIAO_FR, include provider_payload. GLS/NXT supplies the required payload. Other providers do not need provider_payload.

Trigger locker event › Request Body

provider_locker_id
​string · required

The locker ID on the provider side. This is not always the platform lockerUid. Read it from provider.lockerUid in GET /lockers/by-uid, or from providerLockerId in GET /parcels.

provider_name
​string · enum · required

The provider of the test locker. Read it from provider.name in GET /lockers/by-uid, or from providerName in GET /parcels.

Enum values:
BLOQ
KEBA
MYFLEXBOX_DE
MYFLEXBOX_AT
TAMBURI_AT
LOCKY_PT
AMAZON_DE
CAINIAO_FR
locker_status
​string · enum · required

Target locker status.

Enum values:
ACTIVE
INACTIVE
carrier_name
​string · enum · required

Your own carrier name: the carrier that owns your X-API-Key and the locker. The mock does not compare this value with your API key. Send your own carrier name, so that the platform applies the event to your locker.

Enum values:
GLS_NXT
GLS_DE
GLS_AT
DPD_DE
GLS_ES
GLS_IT
GLS_PT
GLS_DK
​object

Required for AMAZON_DE and CAINIAO_FR. GLS/NXT supplies the payload. Do not include this field for KEBA and other providers that do not need it.

Trigger locker event › Responses

Request accepted. This does not confirm that the platform applied the event: the mock sends the event a few seconds later. Check the result in your Locker Updates webhooks or with GET /lockers/by-uid.

message
​string · required

Get received parcel events

GET
https://api.staging.glsnxt.com/ooh-mock-service/v1
/parcel/events/{id}

Returns the Parcel Updates webhook bodies that the mock received for one parcel, oldest first. The mock receives these webhooks only for carriers whose staging webhook URL points at the mock, and stores only events for test lockers (carrierLockerId starts with 996633; without carrierLockerId, lockerUid). Each event is kept for one hour. The response is an empty array when the mock has no event yet. Poll until the event that you expect arrives.

Get received parcel events › path Parameters

id
​string · required

Your parcel ID (carrierParcelId).

Get received parcel events › Responses

The stored parcel events. The array is empty when the mock has no event for this parcel.

A Parcel Updates webhook body, unchanged. The fields below are the ones that the platform sends; see the Parcel Updates webhook for their meaning. This schema is documentation only. The mock does not check the stored body against it, and the tests check it only against sample bodies. The Parcel Updates webhook in the carrier-gateway specification is the contract.
carrierParcelId
​string · required
shipmentUid
​string
lockerUid
​string
carrierLockerId
​string | null
compartmentId
​string | null
compartmentSize
​string | null
mdmLocationId
​string | null
barcodeContent
​string | null
shipmentType
​string
dimensionsStatus
​string
shipmentStatus
​string | null
isFinal
​boolean | null
accessCodes
​object | null
consignee
​object | null
​array | null
allocationType
​string | null
carrierName
​string | null
providerName
​string | null
providerLockerId
​string | null
shipmentSignature
​object | null
requiresAccessibleCompartment
​boolean | null
labelType
​string | null
referenceCode
​string | null
secondaryShipmentId
​string | null
eventTimestamp
​string | null · date-time

Get received locker events

GET
https://api.staging.glsnxt.com/ooh-mock-service/v1
/locker/events/{lockerUid}

Returns the Locker Updates webhook bodies that the mock received for one locker, oldest first. The mock receives these webhooks only for carriers whose staging webhook URL points at the mock, and stores only events for test lockers (carrier.lockerId starts with 996633; without carrier.lockerId, uid). Each event is kept for one hour. The response is an empty array when the mock has no event yet. Poll until the event that you expect arrives.

Get received locker events › path Parameters

lockerUid
​string · required

The platform lockerUid (uid in the Locker Updates webhook).

Get received locker events › Responses

The stored locker events. The array is empty when the mock has no event for this locker.

A Locker Updates webhook body, unchanged. The fields below are the ones that the platform sends; see the Locker Updates webhook for their meaning. This schema is documentation only. The mock does not check the stored body against it, and the tests check it only against sample bodies. The Locker Updates webhook in the carrier-gateway specification is the contract.
eventTimestamp
​string · date-time · required
uid
​string · required
carrier
​object | null
provider
​object | null
location
​object | null
features
​object | null
openingHours
​object | null

Same structure as openingHours in the Locker Updates webhook.

​array | null
ownedByCarrier
​string | null
​array | null

Get received collection events

GET
https://api.staging.glsnxt.com/ooh-mock-service/v1
/collection/events/{lockerUid}

Returns the Collection Notification webhook bodies that the mock received for one locker, oldest first. The mock receives these webhooks only for carriers whose staging webhook URL points at the mock, and stores only events for test lockers (carrierLockerId starts with 996633). Each event is kept for one hour. The response is an empty array when the mock has no event yet. Poll until the event that you expect arrives.

Get received collection events › path Parameters

lockerUid
​string · required

The platform lockerUid of the locker.

Get received collection events › Responses

The stored collection events. The array is empty when the mock has no event for this locker.

A Collection Notification webhook body, unchanged. The fields below are the ones that the platform sends; see the Collection Notification webhook for their meaning. This schema is documentation only. The mock does not check the stored body against it, and the tests check it only against sample bodies. The Collection Notification webhook in the carrier-gateway specification is the contract.
lockerUid
​string · required
eventTimestamp
​string · date-time
carrierLockerId
​string | null
courierAccessCode
​string | null
​array | null