Skip to main content

Shipment Webhook

Information can be provided with the OMS Shipment record types below:

  • shipment.created
  • shipment.status.updated
  • shipment.cancelled

Occurring events have different payloads for package and transfer. Events are triggered when a shipment is created, updated or canceled.

Note: For each event, data is sent in the following scheme. The part that changes is the shipment status.

Example of event data sent for package shipping information

{
"event": {
"type": "shipment.created",
"uuid": "3a192b78-48fe-4ca5-9f61-a341d41ce159"
},
"payload": {
"id": 1,
"cargo_company": {
"id": 4,
"shipping_company": "chrono_diali",
"created_date": "2021-01-07T12:10:49.010125Z",
"modified_date": "2021-01-07T12:10:49.010152Z",
"name": "PTT",
"erp_code": "ptt",
"is_active": true
},
"package": {
"packageitem_set": [
{
"id": 2,
"state": {
"id": 67,
"created_date": "2021-01-07T12:10:42.943475Z",
"modified_date": "2021-01-07T12:10:42.943503Z",
"name": "Shipped",
"config": {},
"enum_class": "PackageItemStatus",
"enum_value": "800",
"content_type": 4
},
"commands": [],
"denial_reason": null,
"order_item": {
"id": 2,
"state": {
"id": 30,
"created_date": "2021-01-07T12:10:42.618179Z",
"modified_date": "2021-01-07T12:10:42.618224Z",
"name": "Shipped",
"config": {},
"enum_class": "OrderStatus",
"enum_value": "500",
"content_type": 2
},
"commands": [],
"product": {
"id": 1,
"productimage_set": [],
"created_date": "2021-01-07T12:10:48.930479Z",
"modified_date": "2021-01-07T12:10:48.930502Z",
"omnitron_id": 685,
"name": "NKZxsbRMqoyN",
"base_code": "xMONUdVd",
"sku": "sku_0",
"barcode": null,
"attributes": {},
"attributes_kwargs": {},
"extra_attributes": {},
"remote_modified_date": null
},
"created_date": "2021-01-07T12:10:48.997948Z",
"modified_date": "2021-01-07T12:10:48.997976Z",
"omnitron_id": 3,
"net_amount": "411.24",
"price": "91.56",
"price_currency": "eur",
"retail_price": "53.17",
"tax_rate": "16.03",
"tax_amount": "16.77",
"discount_amount": "15.24",
"without_net_amount": "2.85",
"installment_interest_amount": "14.52",
"attributes": {},
"attributes_kwargs": {},
"image": null,
"price_list": null,
"stock_list": null,
"extra_field": {},
"order": 3
},
"transfer_order": null,
"created_date": "2021-01-07T12:10:49.005584Z",
"modified_date": "2021-01-07T12:10:49.005614Z",
"selected_barcode": null,
"unit_weight": null,
"package": 2
}
],
"order_number": "744971671520",
"date_placed": "2021-01-07T12:10:37.194Z",
"city": "City_TjrEMA",
"channel_name": "Channel_xoRUUf",
"payment_type": "cash_register",
"state": {
"id": 44,
"created_date": "2021-01-07T12:10:42.740780Z",
"modified_date": "2021-01-07T12:10:42.740807Z",
"name": "Shipped",
"config": {},
"enum_class": "PackageStatus",
"enum_value": "700",
"content_type": 3
},
"number": "290076093103",
"tracking_number": "414141414141",
"id": 2,
"shipping_address": {
"id": 5,
"city": {
"pk": 6,
"name": "City_pfDZNE",
"country": 6,
"is_active": true,
"longitude": "34.90391900",
"latitude": "38.42237880"
},
"country": {
"pk": 6,
"name": "Country_CrzGzU",
"code": "vBW",
"is_active": true,
"longitude": "42.62144160",
"latitude": "37.79111710"
},
"township": {
"pk": 6,
"name": "Township_ygHuAu",
"city": 6,
"is_active": true,
"longitude": "36.74161320",
"latitude": "41.64377970"
},
"district": {
"pk": 6,
"name": "District_nXvExU",
"city": 6,
"township": 6,
"is_active": true,
"longitude": "37.23471900",
"latitude": "38.36873530"
},
"customer": {
"email": "IhGyuR@oms.com",
"first_name": "HlUywc",
"last_name": "paHeTu",
"phone_number": "05416076411",
"erp_code": "ERP_wmDv",
"pk": 6,
"channel": 8
},
"address_type": "retail_store",
"created_date": "2021-01-07T12:10:48.847458Z",
"modified_date": "2021-01-07T12:10:48.847489Z",
"omnitron_id": 6,
"mapping": null,
"title": "Title_jyeJWzbVNT",
"is_active": true,
"line": "Line lorem ipsum dolor sit amet.",
"postcode": "292271",
"notes": "Note lorem ipsum dolor sit amet.",
"email": "afugMX@oms.com",
"phone_number": null,
"first_name": "wqxENT",
"last_name": "TxYaDB",
"company_name": "ztBicq",
"tax_office": "JSktav",
"tax_no": "cRxEGS",
"e_bill_taxpayer": true
},
"target_packing_date": "2021-01-07T12:10:37.216110Z",
"order_id": 3,
"stock_location": {
"id": 1,
"stock_location_type": "warehouse",
"address": {
"id": 1,
"city": {
"pk": 1,
"name": "City_MfOLcg",
"country": 1,
"is_active": true,
"longitude": "25.43060960",
"latitude": "40.02184870"
},
"country": {
"pk": 1,
"name": "Country_zoVabc",
"code": "bqo",
"is_active": true,
"longitude": "40.30578930",
"latitude": "40.27676590"
},
"township": {
"pk": 1,
"name": "Township_ymtuCT",
"city": 1,
"is_active": true,
"longitude": "33.66398410",
"latitude": "36.95247500"
},
"district": {
"pk": 1,
"name": "District_fkLcoN",
"city": 1,
"township": 1,
"is_active": true,
"longitude": "42.19727910",
"latitude": "36.13805450"
},
"mapping": null,
"title": "Title_acBwEaIAWm",
"is_active": true,
"line": "Line lorem ipsum dolor sit amet.",
"postcode": "023375",
"notes": "Note lorem ipsum dolor sit amet.",
"longitude": "33.64598750",
"latitude": "39.08743550"
},
"engine": null,
"created_date": "2021-01-07T12:10:48.712198Z",
"modified_date": "2021-01-07T12:10:48.712228Z",
"name": "SL_oirpTKTx",
"is_fulfillment_center": true,
"is_pickup_location": false,
"is_delivery_location": false,
"is_return_available": true,
"is_fast_delivery_available": false,
"is_active": true,
"priority": 1,
"conf": {},
"daytime_phone": "05428930734",
"evening_phone": "05095284240",
"fax_number": "02703777568",
"email": "vKUykn@oms.com",
"target_packing_interval": "5 00:00:00",
"target_transfer_interval": "3 00:00:00",
"erp_code": "ERP_Ybrq",
"use_as_shipper_location": false
},
"commands": [
{
"id": 1,
"is_packageitem_parameter_required": false,
"command": "UPDATE_PACKAGE_SHIPMENT_STATUS",
"label": "Update Package Shipment Status",
"ui_visibility": [
"oms_web",
"instore",
"third_party"
],
"source_state": 44,
"destination_state": 47
}
],
"shipment": {
"id": 1,
"cargo_company": {
"id": 4,
"shipping_company": "chrono_diali",
"created_date": "2021-01-07T12:10:49.010125Z",
"modified_date": "2021-01-07T12:10:49.010152Z",
"name": "PTT",
"erp_code": "ptt",
"is_active": true
},
"created_date": "2021-01-07T12:10:49.041373Z",
"modified_date": "2021-01-07T12:10:49.041397Z",
"awb_number": "414141414141",
"update_date_time": "2021-01-07T12:10:37.221337Z",
"state": 95,
"package": 2,
"invoice": 3
},
"shipping_label": null,
"order_gift_box_note": null,
"order_retail_store_id": null,
"invoice_number": null,
"remote_id": null,
"is_click_and_collect": false,
"delivery_range": null,
"shipment_date": null,
"order_notes": null,
"created_date": "2021-01-07T12:10:48.928874Z",
"modified_date": "2021-01-07T12:10:48.928903Z"
},
"created_date": "2021-01-07T12:10:49.041373Z",
"modified_date": "2021-01-07T12:10:49.041397Z",
"awb_number": "414141414141",
"update_date_time": "2021-01-07T12:10:37.221337Z",
"state": 95,
"invoice": 3
}
}

Example of event data sent for transfer shipment information

{
"event": {
"type": "shipment.created",
"uuid": "2db1acb1-5f14-492e-8ff4-4c60996abd61"
},
"payload": {
"id": 1,
"cargo_company": {
"id": 4,
"shipping_company": "ups",
"created_date": "2021-01-07T12:38:36.290269Z",
"modified_date": "2021-01-07T12:38:36.290295Z",
"name": "OltayZSFBFLS Cargo",
"erp_code": "hnb",
"is_active": true
},
"transfer_order": {
"id": 1,
"source": {
"id": 1,
"stock_location_type": "warehouse",
"address": {
"id": 1,
"city": {
"pk": 3,
"name": "City_PYDanX",
"country": 3,
"is_active": true,
"longitude": "32.66208510",
"latitude": "36.08363250"
},
"country": {
"pk": 3,
"name": "Country_EySoLy",
"code": "GlJ",
"is_active": true,
"longitude": "30.21078510",
"latitude": "39.13139900"
},
"township": {
"pk": 3,
"name": "Township_zFdqNV",
"city": 3,
"is_active": true,
"longitude": "36.57612670",
"latitude": "36.22429280"
},
"district": {
"pk": 3,
"name": "District_WfxlvP",
"city": 3,
"township": 3,
"is_active": true,
"longitude": "33.34040060",
"latitude": "39.41786590"
},
"mapping": null,
"title": "Title_DYeLLByrfr",
"is_active": true,
"line": "Line lorem ipsum dolor sit amet.",
"postcode": "522558",
"notes": "Note lorem ipsum dolor sit amet.",
"longitude": "37.76074460",
"latitude": "35.91023800"
},
"engine": null,
"created_date": "2021-01-07T12:38:36.081532Z",
"modified_date": "2021-01-07T12:38:36.081558Z",
"name": "W1",
"is_fulfillment_center": true,
"is_pickup_location": true,
"is_delivery_location": true,
"is_return_available": false,
"is_fast_delivery_available": false,
"is_active": true,
"priority": 1,
"conf": {},
"daytime_phone": "05461567784",
"evening_phone": "05762933077",
"fax_number": "02334324272",
"email": "pWUate@oms.com",
"target_packing_interval": "5 00:00:00",
"target_transfer_interval": "3 00:00:00",
"erp_code": "ERP_lLHb",
"use_as_shipper_location": false
},
"destination": {
"id": 2,
"stock_location_type": "warehouse",
"address": {
"id": 2,
"city": {
"pk": 4,
"name": "City_joomnT",
"country": 4,
"is_active": true,
"longitude": "43.19320260",
"latitude": "38.03408060"
},
"country": {
"pk": 4,
"name": "Country_wHEVVc",
"code": "GLa",
"is_active": true,
"longitude": "39.51146230",
"latitude": "39.56024340"
},
"township": {
"pk": 4,
"name": "Township_cJKepl",
"city": 4,
"is_active": true,
"longitude": "42.17487130",
"latitude": "40.28138100"
},
"district": {
"pk": 4,
"name": "District_POiFBc",
"city": 4,
"township": 4,
"is_active": true,
"longitude": "36.94370040",
"latitude": "39.82443890"
},
"mapping": null,
"title": "Title_rIaPBUuHwp",
"is_active": true,
"line": "Line lorem ipsum dolor sit amet.",
"postcode": "272389",
"notes": "Note lorem ipsum dolor sit amet.",
"longitude": "30.94512870",
"latitude": "39.43347630"
},
"engine": null,
"created_date": "2021-01-07T12:38:36.105678Z",
"modified_date": "2021-01-07T12:38:36.105703Z",
"name": "W",
"is_fulfillment_center": true,
"is_pickup_location": true,
"is_delivery_location": true,
"is_return_available": false,
"is_fast_delivery_available": false,
"is_active": true,
"priority": 2,
"conf": {},
"daytime_phone": "05XXXXXXXXXXX",
"evening_phone": "05XXXXXXXXXXX",
"fax_number": "02362646040",
"email": "thKRJk@oms.com",
"target_packing_interval": "5 00:00:00",
"target_transfer_interval": "3 00:00:00",
"erp_code": "ERP_CPlV",
"use_as_shipper_location": false
},
"transferitem_set": [
{
"id": 1,
"state": {
"id": 78,
"created_date": "2021-01-07T12:38:30.180465Z",
"modified_date": "2021-01-07T12:38:30.180492Z",
"name": "Waiting",
"config": {},
"enum_class": "TransferStatus",
"enum_value": "waiting",
"content_type": 6
},
"commands": [],
"unit_type": "liter",
"package_item": {
"id": 1,
"state": {
"id": 54,
"created_date": "2021-01-07T12:38:29.965447Z",
"modified_date": "2021-01-07T12:38:29.965474Z",
"name": "Waiting",
"config": {},
"enum_class": "PackageItemStatus",
"enum_value": "100",
"content_type": 4
},
"commands": [],
"order_item": {
"id": 1,
"state": null,
"commands": [],
"product": {
"id": 1,
"productimage_set": [],
"created_date": "2021-01-07T12:38:36.057109Z",
"modified_date": "2021-01-07T12:38:36.057134Z",
"omnitron_id": 1,
"name": "OssiAFMNzLaf",
"base_code": "SPmbYGQO",
"sku": "3335555",
"barcode": null,
"attributes": {},
"attributes_kwargs": {},
"extra_attributes": {},
"remote_modified_date": null
},
"created_date": "2021-01-07T12:38:36.061000Z",
"modified_date": "2021-01-07T12:38:36.061025Z",
"omnitron_id": 1,
"net_amount": "708.24",
"price": "55.26",
"price_currency": "eur",
"retail_price": "89.56",
"tax_rate": "9.53",
"tax_amount": "14.14",
"discount_amount": "7.60",
"without_net_amount": "17.10",
"installment_interest_amount": "7.31",
"attributes": {},
"attributes_kwargs": {},
"image": null,
"price_list": null,
"stock_list": null,
"extra_field": {},
"order": 1
},
"created_date": "2021-01-07T12:38:36.217493Z",
"modified_date": "2021-01-07T12:38:36.217521Z",
"selected_barcode": null,
"unit_weight": null,
"package": 1
},
"product": {
"id": 1,
"productimage_set": [],
"created_date": "2021-01-07T12:38:36.057109Z",
"modified_date": "2021-01-07T12:38:36.057134Z",
"omnitron_id": 1,
"name": "OssiAFMNzLaf",
"base_code": "SPmbYGQO",
"sku": "3335555",
"barcode": null,
"attributes": {},
"attributes_kwargs": {},
"extra_attributes": {},
"remote_modified_date": null
},
"created_date": "2021-01-07T12:38:36.285243Z",
"modified_date": "2021-01-07T12:38:36.285271Z",
"name": "TI_GNMgLXYg",
"quantity": "1.85",
"stock_code": "StockCode_qMmX",
"barcode": "Barcode_JoSM",
"transfer_order": 1
}
],
"number": "T0001",
"order": 1,
"order_number": "4443333222",
"package": 1,
"package_number": "P123",
"target_transfer_date": "2021-01-07T12:38:24.225760Z",
"order_date_placed": "2021-01-07T12:38:24.200Z",
"state": {
"id": 71,
"created_date": "2021-01-07T12:38:30.113513Z",
"modified_date": "2021-01-07T12:38:30.113541Z",
"name": "Waiting",
"config": {},
"enum_class": "TransferStatus",
"enum_value": "waiting",
"content_type": 5
},
"commands": [],
"invoice_number": null,
"remote_id": "47056944"
},
"created_date": "2021-01-07T12:38:36.291857Z",
"modified_date": "2021-01-07T12:38:36.291881Z",
"awb_number": "27368480",
"update_date_time": "2021-01-07T12:38:24.228460Z",
"url": "https://cargo-company.com/shipping_labels/vkEpeMUGaVhilyeodTfu.png",
"file_data": null,
"uuid": "95f485b3-38ec-4da0-91d8-5c8ebb36dd14",
"state": null
}
}