Webhook

Evermile Webhook Event Types

This is the list of event types that we currently send.
For guidance on how to listen to these events, take a look at Svix's guide to consuming webhooks.

order.created

Callback on order creation

Example order.created
JSON
{
  "order": {
    "actualDropoff": "2024-04-09T13:57:55.163Z",
    "actualPickup": "2024-04-09T11:55:55.163Z",
    "actualVehicleType": "car",
    "additionalProperties": {},
    "communicatedDropoff": {
      "end": "2024-04-09T15:00:00:00.000Z",
      "start": "2024-04-09T11:00:00.000Z"
    },
    "communicatedPickup": {
      "end": "2024-04-09T15:00:00:00.000Z",
      "start": "2024-04-09T11:00:00.000Z"
    },
    "costBreakdown": [
      {
        "name": "CostItemDeliveryCost",
        "price": {
          "bookingFeeCents": 100,
          "currency": "GBP",
          "discount": {
            "discountPercent": 10,
            "listPriceCents": 420,
            "reason": "batching"
          },
          "liabilityPriceCents": 200,
          "value": 678
        }
      }
    ],
    "courierLocation": {
      "lat": 51.529483875563876,
      "lng": -0.12406103897631127
    },
    "customer": {
      "email": "joe@malone.org",
      "id": "87ee2ca2-6715-4e46-9dd1-bd9a0c373542",
      "name": "Joe Malone",
      "phone": "+441234567890",
      "recipientId": "30adc349-27ce-4b10-8d70-f8d1cafb0255"
    },
    "customerTrackingUrl": "https://p.evml.io/GFASD4",
    "deliveryCompany": "Uber",
    "deliveryMethod": "delivery",
    "destination": {
      "addressLine1": "10 Argyle Street",
      "addressLine2": "The Standard Hotel",
      "city": "London",
      "external": false,
      "geoLocation": {
        "lat": 51.529483875563876,
        "lng": -0.12406103897631127
      },
      "postalCode": "NW1 2ST"
    },
    "dropoffEta": "2024-04-09T13:57:55.163Z",
    "estimatedPickupWithinStoreHours": true,
    "expectedVehicleType": "car",
    "externalOrderId": "Order 1",
    "handling": [
      "alcohol"
    ],
    "id": "0674ad55-9ad4-4e06-ad36-af69623f5cf7",
    "instructions": "Please leave at reception",
    "isGift": true,
    "isReturn": false,
    "labelPrintTime": "2024-04-09T10:55:55.163Z",
    "labelRequired": false,
    "labelUrl": "https://p.evml.io/GFASD4",
    "merchantName": "Evermile Merchant",
    "notes": [
      "Was left at reception"
    ],
    "orderTrackingInfo": {
      "courierLocation": {
        "lat": 51.529483875563876,
        "lng": -0.12406103897631127
      },
      "courierName": "Isaac",
      "courierPhone": "+441234567890",
      "dropoffEta": "2024-04-09T11:55:55.163Z",
      "dropoffWindowEnd": "2024-04-09T11:55:55.163Z",
      "dropoffWindowStart": "2024-04-09T11:55:55.163Z",
      "dropoffWindowType": "committed",
      "isCourierAssigned": true,
      "isOnWayToPickup": true,
      "labelUrl": "https://p.evml.io/GFASD4",
      "pickupEta": "2024-04-09T11:55:55.163Z",
      "pickupWindowEnd": "2024-04-09T11:55:55.163Z",
      "pickupWindowStart": "2024-04-09T11:55:55.163Z",
      "vehicleType": "pushbike"
    },
    "origin": {
      "addressLine1": "some string",
      "addressLine2": "some string",
      "city": "some string",
      "external": true,
      "geoLocation": {
        "lat": 3.14,
        "lng": 3.14
      },
      "name": "some string",
      "postalCode": "some string",
      "type": "office"
    },
    "parcels": [
      {
        "dimensions": {
          "heightCm": 60,
          "lengthCm": 70,
          "name": "Case of Beer",
          "widthCm": 60
        },
        "id": "7358891d-f6a1-4db5-a81d-efc90b95509e",
        "parcelType": "Package",
        "referenceId": "Ref-1",
        "templateName": "Alcohol",
        "weightKg": 8
      }
    ],
    "pickupContactInfo": {
      "email": "jack@beers.co.uk",
      "id": "73551241-7ca9-4459-bd68-6d3a71128147",
      "name": "Jack Straw",
      "phone": "+441234567890",
      "recipientId": "3e6ff959-0765-42b7-940b-04eb2f57843d"
    },
    "pickupEta": "2024-04-09T11:55:55.163Z",
    "proofOfDelivery": [
      {
        "type": "signature",
        "urls": [
          "some string"
        ]
      }
    ],
    "proofOfDeliveryRequirement": [
      "signature"
    ],
    "proposalTypes": [
      "Green"
    ],
    "recipientMessage": "some string",
    "requestedSla": "express",
    "routeInfo": {
      "externalId": "some string",
      "id": "270eade9-e61c-4780-94b3-0229976c3986",
      "numOrders": 42
    },
    "scheduleInfo": {
      "confirmed": true,
      "scheduleDetails": {
        "endCondition": "never",
        "endDate": "some string",
        "frequency": "daily",
        "occurrencesLimit": 42,
        "scheduledDate": "some string",
        "weekdays": [
          {
            "day": "Monday"
          }
        ]
      },
      "scheduleId": "77dbb446-ea5a-474e-8bb9-1edea6995e38",
      "scheduledDate": "some string"
    },
    "senderContactDetails": {
      "contactEmail": "some string",
      "contactName": "some string",
      "contactPhone": "some string",
      "revealSenderInfo": true
    },
    "senderTrackingUrl": "some string",
    "simulatedOrder": true,
    "status": {
      "lifeCycleStatus": "preCollection",
      "manuallyUpdated": true,
      "orderStatus": "Pending",
      "reporter": "some string",
      "reporting_time": "2024-04-09T11:55:55.163Z"
    },
    "usedCredits": true,
    "username": "Jerry Garcia"
  },
  "timestamp": "2024-04-09T11:55:55.163Z"
}

order.liveUpdate

Callback on order live tracking info update

Example order.liveUpdate
JSON
{}

order.updated

Callback on order update

Example order.updated
JSON
{}