This event is sent to the WebHook when a customer cancels a delivery or a return.
Event properties
type
:"cancel-delivery"
idempotency_key
: A random key, unique to the event. Can be uses to recognize subsequent retries of the same event.data
: The event data:id
: The delivery identifiertype
: One of"DELIVERY"
or"RETURN"
status
:"CANCELLED"
customer
: The customer object:id
: The customer IDcompany
: The name of the customer company, ornull
address
: The delivery address:address1
: The first line of the addressaddress2
: The second line of the address, if providedcity
: The city namecountry
: A country ISO code
contact
: The customer contact object:name
: The name of the customer contactemail
: The email address of the customer contact
request
: The request object:timestamp
: The timestamp when the delivery was requested in ISO 8601 formatcompany
: The requesting company name, ornull
customer_id
: The customer ID, ornull
cost_center
: The cost center, ornull
address
: The delivery address:address1
: The first line of the addressaddress2
: The second line of the address, if providedcity
: The city namecountry
: A country ISO code
user
: The user who sent the delivery:name
: The name of the useremail
: The email address of the user
scheduled
: The desired schedule date and optional time, ornull
if none was specified:date
: The date in the formatYYYY-MM-DD
time
: The optional time in the formatHH:mm
items
: The array of item objects:id
: The product identifiername
: The product namevessel
: The vessel object, if available:id
: The custom vessel identifiersize
: Integer size of the vessel in the specified unitunit
: One of"l"
,"dl"
,"cl"
,"ml"
,"kg"
,"g"
or"quantity"
type
: See vessel and bundle types
count
: The count of bundles or vessels orderedbundle
: The bundle object, ornull
:id
: The custom bundle identifiertype
: See vessel and bundle typessize
: The number of vessels in the bundle, or the number of bundles on the pallet iftype
is"PX"
pallet_bundle
: Only iftype
is"PX"
. Specifies the bundle on the pallet:type
: See vessel and bundle typessize
: The number of vessels in the bundle
vessel_count
: The total count of vessels (count * bundle.size
orcount * bundle.size * bundle.pallet_bundle.size
)price
: The expected unit price in cents
message
: A message provided by the user
cancelled
: The cancel data:timestamp
: The timestamp when the delivery was cancelled in ISO 8601 formatuser
: The user who cancelled the delivery:name
: The name of the useremail
: The email address of the user
message
: A message provided by the user
Example message
{
"type": "cancel-delivery",
"idempotency_key": "aJb5iQs18NrZqg3H-tiDq",
"data": {
"id": 123456789,
"type": "DELIVERY",
"status": "REQUESTED",
"customer": {
"id": "12345",
"company": "Mein Club AG",
"address": {
"address1": "Beispielstrasse 1",
"zip": "8045",
"city": "Zürich",
"country": "CH"
},
"contact": {
"name": "Besitzer",
"email": "besitzer@mein-club.ch"
}
},
"request": {
"timestamp": "2021-06-23T14:46:48.309Z",
"address": {
"address1": "Beispielstrasse 42",
"zip": "8045",
"city": "Zürich",
"country": "CH"
},
"scheduled": {
"date": "2020-05-26",
"time": "12:30"
},
"items": [
{
"id": "2",
"name": "Gin",
"vessel": {
"size": 7,
"unit": "dl",
"type": "BO"
},
"count": 2,
"bundle": {
"id": "001",
"type": "CT",
"size": 6
},
"vessel_count": 12,
"price": 750
}
],
"user": {
"name": "Lagerist",
"email": "lagerist@mein-club.ch"
},
"message": "Vielen Dank!"
},
"cancelled": {
"timestamp": "2021-06-23T14:46:48.309Z",
"user": {
"name": "Lagerist",
"email": "lagerist@mein-club.ch"
},
"message": "Sorry!"
}
}
}