Complete Order

  • If you are using the Check Out / Driver Leaves Location API call, then this API call is not needed.
  • If you are only able to provide the Start Order and Complete Order events, then use this API call.

EXAMPLE PAYLOAD

{
  "task_id": 8502432,
  "lat": 40.671629,
  "lng": -73.875033,
  "reported_time": 1591272971000
}

BODY PARAMS

task_id

Int32

Bringg's unique Order ID

lat

double

The latitude of where the driver was when the action took place

lng

double

The latitude of where the driver was when the action took place

reported_time

integer

Unix Epoch time in milliseconds when the action took place

📘

What Bringg will send in response

{
    "success": true,
    "task": {
        "title": "Test order",
        "user_id": null,
        "created_at": "2020-06-18T11:50:49.114Z",
        "scheduled_at": "2020-06-18T12:50:49.076Z",
        "lat": null,
        "lng": null,
        "status": 4,
        "id": 8502432,
        "address": null,
        "active_way_point_id": null,
        "started_time": "2020-06-25T12:25:11.238Z",
        "asap": false,
        "late": true,
        "late_reason": null,
        "extras": null,
        "merchant_name": null,
        "external_id": "e760de4e",
        "uuid": "fc603ab7-1ef3-4a37-b6b2-2186691e3ddf",
        "priority": 8502432,
        "total_price": 100.0,
        "delivery_price": 50.0,
        "left_to_be_paid": null,
        "distance_traveled": null,
        "dispatcher_id": null,
        "tag_id": null,
        "cancelled_at": null,
        "discount": null,
        "tip_driver_enabled": false,
        "run_uuid": null,
        "scheduled_to_be_ready": null,
        "run_start_time": null,
        "run_end_time": null,
        "payment_type_name": null,
        "linked_task_id": null,
        "fleet_id": 180,
        "fleet_delivery_external_id": "ABCD1234",
        "first_way_point_has_to_leave_by": null,
        "origin_title": null,
        "customer": {
            "id": 7952567,
            "name": "Test Customer",
            "address": null,
            "address_second_line": null,
            "zipcode": null,
            "lat": null,
            "lng": null,
            "phone": null,
            "image": "/images/avatar.png",
            "email": "",
            "merchant_id": 1007,
            "external_id": "7952567",
            "confirmation_code": "3482",
            "client_version": null,
            "client_name": null,
            "mobile_type": 0,
            "allow_login": false,
            "extras": null,
            "city": null,
            "borough": null,
            "state": null,
            "street": null,
            "business_code": null,
            "language": null,
            "rank": null,
            "has_parking_area": null,
            "team_ids": [],
            "customer_notes": []
        },
        "user": null,
        "task_notes": [],
        "way_points": [
            {
                "id": 12948336,
                "scheduled_at": "2020-06-18T12:50:49.076Z",
                "has_to_leave_by": null,
                "task_id": 8502432,
                "customer_id": null,
                "done": true,
                "lat": 40.7350596,
                "lng": -73.9894768,
                "address": "10 Union Square E, NY , USA",
                "address_second_line": null,
                "zipcode": "10003",
                "position": 1,
                "city": "New York",
                "borough": null,
                "street": null,
                "checkin_time": "2020-06-25T12:25:11.238Z",
                "checkout_time": "2020-06-25T12:25:11.238Z",
                "note": null,
                "find_me": false,
                "asap": false,
                "late": true,
                "etl": "2020-06-25T12:25:11.238Z",
                "eta": null,
                "silent": false,
                "allow_editing_inventory": true,
                "allow_editing_payment": null,
                "allow_scanning_inventory": false,
                "automatic_checkin": null,
                "automatic_checkout": null,
                "phone": null,
                "distance_traveled_server": null,
                "must_approve_inventory": false,
                "contacts": [],
                "no_later_than": "2020-06-18T12:20:49.077Z",
                "no_earlier_than": "2020-06-18T12:20:49.077Z",
                "extra_customers": [],
                "pending_geocode": false,
                "etos": 300,
                "address_type": null,
                "location_name": null,
                "name": "Warehouse",
                "ui_data": null,
                "customer": null,
                "rating": null,
                "inventory_changes": []
            },
            {
                "id": 12948337,
                "scheduled_at": "2020-06-18T13:50:49.077Z",
                "has_to_leave_by": null,
                "task_id": 8502432,
                "customer_id": 7952567,
                "done": true,
                "lat": 40.751879,
                "lng": -73.982348,
                "address": "452 5th Ave, NY , USA",
                "address_second_line": null,
                "zipcode": "10018",
                "position": 2,
                "city": "New York",
                "borough": null,
                "street": null,
                "checkin_time": "2020-06-25T12:25:11.238Z",
                "checkout_time": "2020-06-25T12:25:11.238Z",
                "note": null,
                "find_me": false,
                "asap": false,
                "late": false,
                "etl": "2020-06-25T12:25:11.238Z",
                "eta": null,
                "silent": false,
                "allow_editing_inventory": true,
                "allow_editing_payment": null,
                "allow_scanning_inventory": false,
                "automatic_checkin": null,
                "automatic_checkout": null,
                "phone": null,
                "distance_traveled_server": null,
                "must_approve_inventory": false,
                "contacts": [],
                "no_later_than": "2020-06-18T14:20:49.077Z",
                "no_earlier_than": "2020-06-18T13:20:49.077Z",
                "extra_customers": [],
                "pending_geocode": false,
                "etos": 300,
                "address_type": null,
                "location_name": null,
                "name": "Test Customer",
                "ui_data": null,
                "customer": {
                    "id": 7952567,
                    "name": "Test Customer",
                    "address": null,
                    "address_second_line": null,
                    "zipcode": null,
                    "lat": null,
                    "lng": null,
                    "phone": null,
                    "image": "/images/avatar.png",
                    "email": "",
                    "merchant_id": 1007,
                    "external_id": "7952567",
                    "confirmation_code": "3482",
                    "client_version": null,
                    "client_name": null,
                    "mobile_type": 0,
                    "allow_login": false,
                    "extras": null,
                    "city": null,
                    "borough": null,
                    "state": null,
                    "street": null,
                    "business_code": null,
                    "language": null,
                    "rank": null,
                    "has_parking_area": null,
                    "team_ids": [],
                    "customer_notes": []
                },
                "rating": null,
                "inventory_changes": []
            }
        ],
        "shared_locations": [],
        "team_ids": [
            77910
        ],
        "task_inventories": [
            {
                "id": 33963047,
                "task_id": 8502432,
                "inventory_id": 16298819,
                "quantity": null,
                "original_quantity": 1,
                "merchant_id": 1007,
                "name": "Inventory",
                "price": 20.0,
                "image": "/images/product-placeholder.png",
                "way_point_id": 12948337,
                "scan_string": null,
                "pending": false,
                "note": null,
                "parent_task_inventory_id": null,
                "coc_type": null,
                "external_id": "16298819",
                "size": null,
                "weight": 100.0,
                "length": 50.0,
                "height": 100.0,
                "width": 50.0,
                "source_task_id": null,
                "rejected_quantity": 0,
                "assigned_serial": null,
                "actions_configuration_id": null,
                "scheduled_arrival": null,
                "inventory": {
                    "id": 16298819,
                    "name": "Inventory",
                    "price": 20.0,
                    "image": "/images/product-placeholder.png",
                    "merchant_id": 1007,
                    "external_id": "16298819",
                    "scan_string": "0911f01ec67c7c39",
                    "commodity": null,
                    "notes": null,
                    "weight": 100.0,
                    "size": null,
                    "extras": null,
                    "delivery_cost": null,
                    "completed": null,
                    "width": 50.0,
                    "height": 100.0,
                    "length": 50.0,
                    "volume": null,
                    "description": null,
                    "limitations": null,
                    "age_restricted": null
                }
            },
            {
                "id": 33963046,
                "task_id": 8502432,
                "inventory_id": 16298819,
                "quantity": null,
                "original_quantity": 1,
                "merchant_id": 1007,
                "name": "Inventory",
                "price": 20.0,
                "image": "/images/product-placeholder.png",
                "way_point_id": 12948336,
                "scan_string": null,
                "pending": true,
                "note": null,
                "parent_task_inventory_id": null,
                "coc_type": null,
                "external_id": "16298819",
                "size": null,
                "weight": 100.0,
                "length": 50.0,
                "height": 100.0,
                "width": 50.0,
                "source_task_id": null,
                "rejected_quantity": 0,
                "assigned_serial": null,
                "actions_configuration_id": null,
                "scheduled_arrival": null,
                "inventory": {
                    "id": 16298819,
                    "name": "Inventory",
                    "price": 20.0,
                    "image": "/images/product-placeholder.png",
                    "merchant_id": 1007,
                    "external_id": "16298819",
                    "scan_string": "0911f01ec67c7c39",
                    "commodity": null,
                    "notes": null,
                    "weight": 100.0,
                    "size": null,
                    "extras": null,
                    "delivery_cost": null,
                    "completed": null,
                    "width": 50.0,
                    "height": 100.0,
                    "length": 50.0,
                    "volume": null,
                    "description": null,
                    "limitations": null,
                    "age_restricted": null
                }
            }
        ],
        "scans": []
    }
}

OUTPUT PARAMS

For a more complete list of what all the fields refer to, see the Driver Arrived On Location documentation.

status

Int32

The status of the order. The values are:

  • 0 - Created
  • 1 - Assigned to a driver
  • 2 - Driver on the way
  • 3 - Driver has arrived / checked in
  • 4 - Complete / Delivered
  • 5 - This status is not in use
  • 6 - Order has been accepted
  • 7 - Cancelled
  • 8 - Rejected
  • 9 - Unacknowledged