Skip to main content

Webhook

As soon as the status of any of the lockers' parcels changes, a webhook is sent to a pre-determined URL for each parcel.

Sample webhook:

{
"id": "61",
"uuid": "36d3a7c7-a767-4266-8d5f-dae9e717225f",
"process": "lastmile",
"status": "occupied",
"shipment": {
"external_id": "Test1",
"parcels": [
{
"pk": 54,
"external_id": "Test1_1",
"size": null,
"weight": null,
"value": null,
"content": null
}
]
},
"station": {
"pk": 21,
"address": "Station Address",
"location": "35.70820037199022, 51.46982257116468",
"nickname": "Station Name",
"slug": "85943805",
"images": []
},
"external_id": "Test1",
"check_in": "2024-10-09 17:20:32",
"check_out": null,
"human_readable_expeced_duration": 1,
"pick_up_web_app_url": "?stationSlug=85943805",
"sms_type": "Ganje_Received",
"sms_title": "occupied"
}

Below are the explanations of some of the fields:

  • uuid: The unique identifier of the parcel in Ganje.
  • process: The service to which the parcel is associated.
  • status: The current status of the occupancy, which can have the following values:
    • reserved: The occupancy has not yet been placed in the locker.
    • occupied: The occupancy has been placed in the locker.
    • unoccupied: The occupancy has been retrieved from the locker by the end user.
    • expired: The deadline for retrieving the occupancy has passed, but the occupancy has not yet been removed from the locker.
    • returned: The deadline for retrieving the occupancy has passed and the occupancy has been removed by the courier from the locker.
  • shipment: Information related to the occupancy is included in this field. This includes the following details:
    • external_id: The occupancy's identifier in the service provider's system.
    • parcels: An array of the parcels (items) related to this shipment. Since each parcel may have a different identifier in the service provider's system, an external_id is defined for each parcel.
  • station: Information related to the station is included in this field. This includes the following details:
    • nickname: The name of the station.
    • address: The address of the station.
    • location: The geographical location of the station.
    • slug: The unique identifier of the station.
  • check_in: The date and time when the parcel was placed in the locker.
  • check_out: The date and time when the parcel was removed from the locker.