Shipday sends order update events via webhook subscription. Updates are sent over HTTP POST requests.

3rd party system needs to provide an endpoint to receive webhooks.

Along with providing an endpoint 3rd party system can provide a token (max 32 character) to validate the webhook payload data. Validation token is sent in the webhook header data as “token”.

Attributes


timestamp Long Integer
timestamp of the event


event String
type of event, Indicates the event type. Possible value can be any of the following:

Possible enum values of 'event'
ORDER_ASSIGNED
ORDER_ACCEPTED_AND_STARTED
ORDER_ONTHEWAY
ORDER_COMPLETED
ORDER_FAILED
ORDER_INCOMPLETE
ORDER_DELETE
ORDER_INSERTED
ORDER_PIKEDUP
ORDER_UNASSIGNED
ORDER_ACCEPTED_AND_STARTED
ORDER_PIKEDUP_REMOVED
ORDER_ONTHEWAY_REMOVED

order_status String
order status after the event, Indicates the current status of the order.

Possible enum values of 'order_status'
NOT_ASSIGNED
NOT_ACCEPTED
NOT_STARTED_YET
STARTED
PICKED_UP
READY_TO_DELIVER
ALREADY_DELIVERED
INCOMPLETE
FAILED_DELIVERY

order Object
Details of an order. It is a JSON object. It has the following format

Child attributes

id Integer
Unique Order Id


order_number String
Order number to identify the order form user side


provider String
Name of the external order source if available.


order_item Array
Order Items Array


delivery_note String
Provided delivery note (if given)


order_source String
Source of the order


auto_assignment_status String
Auto assignment status of the order

Possible values are: "NOT_ASSIGNED", "ASSIGNED", "NO_AVAILABLE_CARRIER", "NO_VALID_CARRIER"


parent_id Integer
Parent id (if available). Parent id indicates original order_id for redropped order.


order_sequence_number Integer
Order Sequence number if the order is a part of a route.


payment_method String

Method of payment for the order.
Possible values are: "CASH", "CARD", "ONLINE", "CREDIT_CARD", "CARD_PHONE"


total_cost Double
Total Cost of order


delivery_fee Double
Delivery Fee of order


predefined_tip Double
Predefined Tip amount of the order


cash_tip Double
Cash tip amount


discount_amount Double
Discount Amount of the order


tax Double
Tax amount of the order


driving_duration Integer
Driving time duration in seconds


eta Long Integer
Estimated timestamp of product delivery in milliseconds


driving_distance Integer
Driving Distance in meter


placement_time Long Integer
Order placement timestamp in milliseconds


expected_pickup_time Long Integer
Expected pickup timestamp in milliseconds


expected_delivery_time Long Integer
Expected delivery timestamp in milliseconds


assigned_time Long Integer
Time that the order was assigned (timestamp in milliseconds)


start_time Long Integer
Starting time for the order (timestamp in milliseconds)


pickedup_time Long Integer
Order pickup timestamp in milliseconds


arrived_time Long Integer
Order arrival timestamp in milliseconds


delivery_time Long Integer

Order delivery time in milliseconds


podUrls array

Array of proof of delivery url strings


company Object
Details of the company to which the order belongs. It is a JSON object. It has the following format:

Child attributes

id Integer
Company Id


name String
Company name


description String
Company description


address String
Company Address


principal_area_id Integer
Principal area id


order_acceptance_timeout Integer
Order Acceptance timeout for the company in seconds


average_speed_mps Integer
Average speed in meter per sec


fixed_driver_fee Double
Fixed Driver Fee


order_activation_time_mins Integer
Order activation time in minutes


currency_code Integer
Currency code


schedule_order_lead_time_sec Integer
Schedule order lead time in sec


max_assigned_order Integer
maximum number of assigned orders per carrier


routing Integer
Routing enabled or not (if available)


country Integer
Country code


admin_area String
Admin area


routing_cost String
Company's selected routing cost strategy.
Possible values: "TRAVEL_TIME", "DISTANCE"


delivery_details Object
Delivery Details data. It is a JSON object. It has the following format:

Child attributes

id Integer
Delivery Id


name String
Delivery name


phone String
Delivery phone


email String
Delivery email


address String
Delivery address


formatted_address String
Delivery address Formatted


location hash

Location details for the delivery address.

lat double

Latitude of the delivery location


lng double

Longitude of the delivery location


pickup_details Object
Pickup Details data. It is a JSON object. It has the following format:

Child attributes

name String
Pickup name


phone String
Pickup phone


email String
Pickup email


address String
Pickup address


formatted_address String
Pickup address Formatted


location hash

Location details for the pickup address.

lat double

Latitude of the pickup location


lng double

Longitude of the pickup location


carrier Object
Details of the driver/carrier (if assigned) of the order. It is a JSON object. It has the following format:

Child attributes

id Integer
Carrier Id


name String
Carrier name


phone String
Carrier phone


email String
Carrier email


status String
Carrier status.

Possible enum values of 'status'
ONLINE
OFFLINE

current_order Integer
Current order id


plate_number String
Carrier plate number


vehicle_description String
Carrier vehicle description


thirdPartyDeliveryOrder Object

Details of the third party if the order is dispatched to a third party carrier

Child attributes

orderId Integer

Order Id for the specific order


thirdPartyName String

Name of the third party provider


referenceId String

Reference Id of the order


status String

Status of the order

Possible values are: "REQUESTED", "STARTED", "PICKEDUP", "DELIVERED", "CANCELLED", "FAILED"


insertedAt Integer

Insert time for the Order


thirdPartyFee Double

Third party delivery fee amount


driverName String

Name of the third party driver


driverPhone String

Phone number of the driver

Following is the format of a webhook payload:

{
    "timestamp": 1684644196349,
    "event": "ORDER_PIKEDUP",
    "order_status": "PICKED_UP",
    "order": {
        "id": 123456,
        "order_number": "808713698",
        "provider": "TOAST",
        "order_item": "[]",
        "delivery_note": "Please ring the doorbell twice",
        "order_source": "NOT PROVIDED",
        "auto_assignment_status": "NOT_ASSIGNED",
        "parent_id": 0,
        "order_sequence_number": 0,
        "payment_method":"CASH",
        "total_cost": 572.63,
        "delivery_fee": 38.63,
        "predefined_tip": 0,
        "cash_tip": 0,
        "discount_amount": 0,
        "tax": 0,
        "podUrls": ["https://s3-us-west-2.amazonaws.com/qt.com.dashboard.order.signature/a7dc65d0e8d44ef397e705512beb913d.jpg"],
        "driving_duration": 1060,
        "eta": "",
        "driving_distance": 5983,
        "placement_time": 1684643399000,
        "expected_pickup_time": 1684643998000,
        "expected_delivery_time": 1684645498000,
        "assigned_time": 1684644057000,
        "start_time": 1684644057000,
        "pickedup_time": 1684644196000,
        "arrived_time":1684644196000,
        "delivery_time":1684644196000
    },
    "company": {
        "id": 14849,
        "name": "Puzzles Dist Inc.",
        "description": "N/A",
        "address": "19 MANDALAY PL, SOUTH SAN FRANCISCO, CA 94080-1669, USA",
        "principal_area_id": 14848,
        "order_acceptance_timeout": 1800,
        "average_speed_mps": 8,
        "fixed_driver_fee": 0,
        "order_activation_time_mins": 90,
        "currency_code": 484,
        "schedule_order_lead_time_sec": 259200,
        "max_assigned_order": 3,
        "routing": 0,
        "country": 134,
        "admin_area": "SOUTH SAN FRANCISCO",
        "routing_cost": "DISTANCE"
    },
    "delivery_details": {
        "id": 12513717,
        "name": "John Doe",
        "phone": "123456789",
        "email": "[email protected]",
        "address": "794 Mcallister St, San Francisco, CA, 94102",
        "formatted_address":"794 Mcallister St, San Francisco, CA, 94102",
        "location": {
            "lat": 19.3894172,
            "lng": -99.1845193
        }
    },
    "pickup_details": {
        "name": "Puzzles Foods",
        "phone": "1234566789",
        "address": "66 Ceres St, San Francisco, CA, 94124",
        "formatted_address": "66 Ceres St, San Francisco, CA, 94124",
        "location": {
            "lat": 19.4234928,
            "lng": -99.16628899999999
        }
    },
    "carrier": {
        "id": 134,
        "name": "Jane Doe",
        "phone": "45678432",
        "email": "[email protected]",
        "status": "ONLINE",
        "current_order": -1,
        "plate_number": "",
        "vehicle_description": ""
    },
    "thirdPartyDeliveryOrder": {
        "orderId": 343432,
        "thirdPartyName": "DoorDash 2",
        "referenceId": "12371573",
        "status": "STARTED",
        "insertedAt": 1684658096,
        "thirdPartyFee": 3.21,
        "driverName": "john efg",
        "driverPhone": "+11111111111"
    }
}