Skip to content

Lock or unlock a parcel

Request

Lock or unlock a parcel in its locker compartment. Locking prevents the consignee from collecting the parcel — for example while a cash-on-delivery payment is still pending — and unlocking releases it for collection. The carrier is identified by the API key.

Security
ApiKeyAuth
Path
parcelIdstringrequired

The identifier of the parcel in the carrier's system.

Example:1234567890
Bodyapplication/jsonrequired
statusstringrequired

The lock state to apply. LOCKED blocks the consignee from collecting the parcel; UNLOCKED releases it for collection.

Enum:"LOCKED""UNLOCKED"
Example:"LOCKED"
reasonstring

Why the parcel is being locked. Optional. On LOCKED it defaults to CASH_ON_DELIVERY when omitted. On UNLOCKED it is ignored — the parcel's original lock reason determines how it is released.

Enum:"CASH_ON_DELIVERY""POLICE_HOLD""OTHER"
Example:"CASH_ON_DELIVERY"
curl -i -X PATCH \
  https://docs.glsnxt.com/_mock/openapi-carrier-integration-api/parcels/1234567890/lock \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "status": "LOCKED",
    "reason": "CASH_ON_DELIVERY"
  }'

Responses

Lock state updated successfully.

Response
No content