Mock Service API
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 theX-API-Keyheader. 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
200response is not a confirmationThe mock answers
200when it accepts the request, before it sends the event. Themessagetext, for exampleLast 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 withGET /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
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_idYour 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_idThe 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_typeEvent to trigger.
carrier_nameYour 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.
provider_nameThe provider of the test locker. Read it from provider.name in GET /lockers/by-uid, or from providerName in GET /parcels.
shipment_typeFIRST_MILE or RETURN.
labellessOptional. 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.
messageTrigger 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_idYour 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_idThe 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_nameYour 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.
provider_nameThe provider of the test locker. Read it from provider.name in GET /lockers/by-uid, or from providerName in GET /parcels.
shipment_typeFIRST_MILE or RETURN.
labellessOptional. 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.
messageTrigger 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_idYour 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_idThe 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_typeEvent to trigger.
carrier_nameYour 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.
provider_nameThe provider of the test locker. Read it from provider.name in GET /lockers/by-uid, or from providerName in GET /parcels.
shipment_typeLAST_MILE or 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.
messageTrigger 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_idThe 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_nameThe provider of the test locker. Read it from provider.name in GET /lockers/by-uid, or from providerName in GET /parcels.
locker_statusTarget locker status.
carrier_nameYour 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.
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.
messageGet received parcel events
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.
path Parameters
idYour 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.
carrierParcelIdshipmentUidlockerUidcarrierLockerIdcompartmentIdcompartmentSizemdmLocationIdbarcodeContentshipmentTypedimensionsStatusshipmentStatusisFinalaccessCodesconsigneeallocationTypecarrierNameproviderNameproviderLockerIdshipmentSignaturerequiresAccessibleCompartmentlabelTypereferenceCodesecondaryShipmentIdeventTimestampGet received locker events
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.
path Parameters
lockerUidThe 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.
eventTimestampuidcarrierproviderlocationfeaturesopeningHoursSame structure as openingHours in the Locker Updates webhook.
ownedByCarrierGet received collection events
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.
path Parameters
lockerUidThe 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.
lockerUideventTimestampcarrierLockerIdcourierAccessCode