Courier Location Update Webhook

This webhook is called when the courier's location changes.

Every webhook contain a header named x-qdelivery-signature which contains a HMAC signature of combination of payload_id as data/message and your secret as the key. You can validate the payload by using HMAC with SHA256 algorithm:

Algorithm: sha256
Message: {webhook payload_id}
Key: {your secret key}

{
  "event": "courier_location_updated",
  "payload_id": "90201abb-76df-45be-adff-64f2607cb30f",
  "courier": {
    "id": 614,
    "name": "Test Courier",
    "avatar_url": "https://qdelivery-api.test/images/avatar.png",
    "phone_country": "TR",
    "phone": "+905431112233",
    "courier_detail": {
      "code": null,
      "vehicle_license_plate": null,
      "vehicle_type": null,
      "vehicle_type_slug": null,
      "vehicle_description": null,
      "vehicle_color": null,
      "capacity": null,
      "pool_capacity": null,
      "vehicle_icon": "https://api.dev-new.qdelivery.app/"
    },
    "courier_location": {
      "is_online": true,
      "is_working": true,
      "on_duty": false,
      "lat": 43.123456,
      "lng": 28.123456,
      "last_seen_at": "2022-05-10T17:37:59.000000Z"
    }
  },
  "tasks": [
    {
      "id": 4,
      "integration_id": null,
      "status_category_slug": "assigned",
      "status_at": "2022-05-10T17:37:59.000000Z",
      "status": {
        "id": 27,
        "name": "Atandı",
        "notes": "",
        "description": ""
      },
      "starts_at": "2022-05-09T21:00:00.000000Z",
      "ends_at": "2022-05-10T21:00:00.000000Z",
      "started_at": null,
      "ended_at": null,
      "distance": 0,
      "duration": 0,
      "remaining_distance": 368,
      "remaining_time": 73,
      "tags": ["istanbul"]
    },
    {
      "id": 27,
      "integration_id": null,
      "status_category_slug": "in_progress",
      "status_at": "2022-05-16T11:19:43.000000Z",
      "status": {
        "id": 28,
        "name": "İşleniyor",
        "notes": "",
        "description": ""
      },
      "starts_at": "2022-05-16T11:18:34.000000Z",
      "ends_at": "2022-05-16T17:18:37.000000Z",
      "started_at": null,
      "ended_at": null,
      "distance": 12968,
      "duration": 1516,
      "remaining_distance": 13021,
      "remaining_time": 1484,
      "tags": ["istanbul"]
    }
  ]
}