Use this API call when you need to cancel an order/delivery.
Providing a reason for the cancellation is optional.
Task ID or Task External ID
Use either the Bringg order ID (task_id) OR the Client's order ID (task_external_id).
EXAMPLE PAYLOAD
{
"task_id": 30145621,
"reason_id": 0,
"reason": "Reason for cancelling",
"lat": 35.6826875,
"lng": -78.6702802,
"reported_time": 1591272971000
}
{
"task_external_id": "ABC123",
"reason_id": 123,
"reason": "Reason for cancelling",
"lat": 35.6826875,
"lng": -78.6702802,
"reported_time": 1591272971000
}
BODY PARAMS
*task_id Int32 |
Bringg's unique ID for this order. Use either this field or task_external_id to identify the relevant order. |
*task_external_id String |
Client's Order ID for this order. Use either this field or task_id to identify the relevant order. |
*reason_id Int32 |
MANDATORY: Bringg's reason ID for this order |
reason string |
The reason you are cancelling the order/delivery |
lat double |
The latitude of where the driver was when the order was started |
lng double |
The latitude of where the driver was when the order was started |
reported_time integer |
The time in milliseconds when the order was started |
* Mandatory fields
What Bringg will send in response
{
"success": true,
"task": {
"title": "1234567",
"user_id": 662319,
"created_at": "2020-06-09T12:47:38.868Z",
"scheduled_at": "2020-06-30T11:00:00.000Z",
"lat": 35.7686299,
"lng": -78.5487832,
"status": 7,
"id": 7694849,
"address": "5210 TRADEMARK DRIVE, RALEIGH, NC",
"active_way_point_id": null,
"started_time": null,
"cancelled_at": "2020-06-11T13:05:54.913Z",
"cancellation_lat": 35.8826875,
"cancellation_lng": -78.8702802,
"late": false,
"extras": {
"integration": {
"trackingNumber": "1234567",
"uniqueIdentifier": "ABC"
}
},
"external_id": "Ext-1234567",
"customer_id": 7518500,
"asap": null,
"ended_time": "2020-06-11T13:05:54.955Z",
"priority": 7694849,
"distance_traveled": null,
"total_price": null,
"delivery_cost": null,
"delivery_price": null,
"tip": null,
"pre_delivery_tip": null,
"post_delivery_tip_cash": null,
"post_delivery_tip_credit": null,
"left_to_be_paid": null,
"task_cancellation_reason": null,
"dispatcher_id": null,
"uuid": "1d5835c3-cafc-4f1e-a921-b79d2c5ef664",
"ready_to_execute": true,
"discount": null,
"tip_driver_enabled": false,
"tax_price": null,
"price_before_tax": null,
"tag_id": 588,
"group_uuid": null,
"group_leader_id": null,
"automatically_cancelled": 4,
"parent_task_id": null,
"payment_method": null,
"payment_type_name": null,
"linked_task_id": null,
"preparation_status": 0,
"preparation_start_time_planned": null,
"preparation_end_time_planned": null,
"preparation_ready_for_pickup_time_planned": "2020-06-30T11:00:00.000Z",
"invalidated": false,
"automatically_assigned": false,
"task_type_id": 4,
"origin_title": "Service",
"task_configuration_id": null,
"required_skills": [],
"team_ids": [
77910
],
"virtual_task": false,
"run_id": null,
"fleet_id": 180,
"preparation_external_id": null,
"rank": null,
"fleet_delivery_external_id": "123",
"task_notes": [
{
"title": "09 Jun, 2020 12:59 PM, Dispatcher",
"note": "Customer added a note",
"created_at": "2020-06-09T12:59:29.885Z",
"author_name": "Dispatcher",
"id": 10284560,
"way_point_id": 11812926,
"url": null,
"type": "TaskNote",
"user_id": 660963,
"lat": null,
"lng": null,
"form_group_uuid": null,
"action_id": null,
"task_inventory_id": null,
"external_id": "10284560",
"task_id": 7694849,
"form_field_key": null
},
{
"title": "09 Jun, 2020 12:59 PM, Dispatcher",
"note": "Customer added a note",
"created_at": "2020-06-09T12:59:29.883Z",
"author_name": "Dispatcher",
"id": 10284559,
"way_point_id": 11812926,
"url": null,
"type": "TaskNote",
"user_id": 660963,
"lat": null,
"lng": null,
"form_group_uuid": null,
"action_id": null,
"task_inventory_id": null,
"external_id": "10284559",
"task_id": 7694849,
"form_field_key": null
}
],
"way_points": [
{
"id": 11812925,
"scheduled_at": "2020-06-30T11:00:00.000Z",
"has_to_leave_by": null,
"task_id": 7694849,
"customer_id": 7518501,
"done": true,
"lat": 35.7686299,
"lng": -78.5487832,
"address": "5210 TRADEMARK DRIVE, RALEIGH, NC",
"address_second_line": null,
"zipcode": "27610",
"position": 1,
"checkin_time": null,
"checkout_time": null,
"note": null,
"find_me": null,
"asap": null,
"late": false,
"etl": "2020-06-09T14:49:03.867Z",
"eta": "2020-06-09T14:44:03.867Z",
"silent": false,
"city": "Raleigh",
"borough": null,
"full_address": "5210 TRADEMARK DRIVE, RALEIGH, NC, Raleigh, 27610",
"automatic_checkin": false,
"automatic_checkout": false,
"phone": null,
"email": null,
"no_later_than": "2020-06-30T17:00:00.000Z",
"no_earlier_than": "2020-06-30T09:00:00.000Z",
"rating": null,
"checkin_lat": null,
"checkin_lng": null,
"checkout_lat": null,
"checkout_lng": null,
"district": null,
"house_number": null,
"company_name": null,
"pickup_dropoff_option": 0,
"etos": 300,
"address_type": null,
"location_name": null,
"scheduled_arrival": null,
"name": "Warehouse Name",
"ui_data": null,
"customer": {
"id": 7518501,
"name": "Warehouse",
"address": null,
"lat": null,
"lng": null,
"created_at": "2020-06-09T12:47:38.720Z",
"updated_at": "2020-06-09T12:47:38.730Z",
"phone": null,
"merchant_id": 1007,
"image": null,
"access_token": "ebe277ac-cc36-4c16-824c-579d9189b72f",
"confirmation_code": "9935",
"salt": null,
"approved": false,
"push_token": null,
"uuid": "849a6bc1-b1fd-451f-ba1e-5a6e081250d9",
"email": null,
"external_id": "7518501",
"delete_at": null,
"facebook_id": null,
"extras": null,
"original_lat_lng_changed": null,
"encrypted_password": "",
"blocked_email": false,
"address_second_line": null,
"zipcode": null,
"allow_login": false,
"stripe_id": null,
"original_phone_number": null,
"last_open_at": null,
"last_order_at": null,
"uploaded_profile_image": {
"url": "/images/avatar.png"
},
"original_lat": null,
"original_lng": null,
"consecutive_checkins_out_of_geofence": 0,
"allow_sending_email": true,
"allow_sending_sms": true,
"reset_password_token": null,
"reset_password_sent_at": null,
"mobile_version": null,
"mobile_type": 0,
"mobile_maker": null,
"client_version": null,
"client_name": null,
"city": null,
"borough": null,
"state": null,
"dev": false,
"business_code": null,
"language": null,
"district": null,
"house_number": null,
"street": null,
"allow_dynamically_updating_location": null,
"is_sales_rep": false,
"address_type": null,
"tax_payer_external_id": null,
"tax_payer_name": null,
"rank": null,
"user_id": null
}
},
{
"id": 11812926,
"scheduled_at": "2020-06-30T15:00:00.000Z",
"has_to_leave_by": null,
"task_id": 7694849,
"customer_id": 7518502,
"done": true,
"lat": 35.6959427,
"lng": -78.6918617,
"address": "6307 LAKE WHEELER RD",
"address_second_line": null,
"zipcode": "27603",
"position": 2,
"checkin_time": null,
"checkout_time": null,
"note": null,
"find_me": null,
"asap": null,
"late": false,
"etl": "2020-06-09T15:12:59.869Z",
"eta": "2020-06-09T15:07:59.869Z",
"silent": false,
"city": "RALEIGH",
"borough": null,
"full_address": "6307 LAKE WHEELER RD, RALEIGH, NC, 27603",
"automatic_checkin": false,
"automatic_checkout": false,
"phone": "+15555555555",
"email": null,
"no_later_than": null,
"no_earlier_than": null,
"rating": null,
"checkin_lat": null,
"checkin_lng": null,
"checkout_lat": null,
"checkout_lng": null,
"district": null,
"house_number": null,
"company_name": null,
"pickup_dropoff_option": 1,
"etos": 300,
"address_type": null,
"location_name": null,
"scheduled_arrival": null,
"name": "JaneSmith",
"ui_data": null,
"customer": {
"id": 7518502,
"name": "John Smith",
"address": null,
"lat": null,
"lng": null,
"created_at": "2020-06-09T12:47:38.787Z",
"updated_at": "2020-06-09T12:47:38.798Z",
"phone": null,
"merchant_id": 1007,
"image": null,
"access_token": "6f8e4396-e922-45fb-adfe-b64c53c55045",
"confirmation_code": "8230",
"salt": null,
"approved": false,
"push_token": null,
"uuid": "a4a5fade-c101-4458-bbda-30f720630dd6",
"email": null,
"external_id": "7518502",
"delete_at": null,
"facebook_id": null,
"extras": null,
"original_lat_lng_changed": null,
"encrypted_password": "",
"blocked_email": false,
"address_second_line": null,
"zipcode": null,
"allow_login": false,
"stripe_id": null,
"original_phone_number": "+15555555555",
"last_open_at": null,
"last_order_at": null,
"uploaded_profile_image": {
"url": "/images/avatar.png"
},
"original_lat": null,
"original_lng": null,
"consecutive_checkins_out_of_geofence": 0,
"allow_sending_email": true,
"allow_sending_sms": true,
"reset_password_token": null,
"reset_password_sent_at": null,
"mobile_version": null,
"mobile_type": 0,
"mobile_maker": null,
"client_version": null,
"client_name": null,
"city": null,
"borough": null,
"state": null,
"dev": false,
"business_code": null,
"language": null,
"district": null,
"house_number": null,
"street": null,
"allow_dynamically_updating_location": null,
"is_sales_rep": false,
"address_type": null,
"tax_payer_external_id": null,
"tax_payer_name": null,
"rank": null,
"user_id": null
}
}
],
"shared_locations": [],
"task_inventories": [
{
"id": 31423005,
"task_id": 7694849,
"inventory_id": 15214736,
"quantity": 0,
"original_quantity": 1,
"merchant_id": 1007,
"name": "MODULES",
"price": null,
"image": "/images/product-placeholder.png",
"way_point_id": 11812926,
"scan_string": "1234567",
"pending": false,
"note": "Other",
"parent_task_inventory_id": null,
"coc_type": null,
"external_id": "15214736",
"size": null,
"weight": 450.0,
"length": null,
"height": null,
"width": null,
"source_task_id": null,
"rejected_quantity": 0,
"assigned_serial": null,
"actions_configuration_id": null,
"scheduled_arrival": null,
"inventory": {
"id": 15214736,
"name": "MODULES",
"price": null,
"image": "/images/product-placeholder.png",
"merchant_id": 1007,
"external_id": "15214736",
"scan_string": "1234567",
"commodity": null,
"notes": null,
"weight": 450.0,
"size": null,
"extras": null,
"delivery_cost": null,
"completed": null,
"width": null,
"height": null,
"length": null,
"volume": null,
"description": null,
"limitations": null,
"age_restricted": null
}
},
{
"id": 31423004,
"task_id": 7694849,
"inventory_id": 15214735,
"quantity": 0,
"original_quantity": 3,
"merchant_id": 1007,
"name": "MODULES",
"price": null,
"image": "/images/product-placeholder.png",
"way_point_id": 11812925,
"scan_string": "1234567",
"pending": true,
"note": "Other",
"parent_task_inventory_id": null,
"coc_type": null,
"external_id": "15214735",
"size": null,
"weight": 450.0,
"length": null,
"height": null,
"width": null,
"source_task_id": null,
"rejected_quantity": 0,
"assigned_serial": null,
"actions_configuration_id": null,
"scheduled_arrival": null,
"inventory": {
"id": 15214735,
"name": "MODULES",
"price": null,
"image": "/images/product-placeholder.png",
"merchant_id": 1007,
"external_id": "15214735",
"scan_string": "1234567",
"commodity": null,
"notes": null,
"weight": 450.0,
"size": null,
"extras": null,
"delivery_cost": null,
"completed": null,
"width": null,
"height": null,
"length": null,
"volume": null,
"description": null,
"limitations": null,
"age_restricted": null
}
}
],
"scans": [],
"invalid_reasons": [],
"service_plan": null
}
}