Assign Driver

Use this API call when you:

  • Assign a driver to the order (delivery)
  • Reassign a different driver
  • Adding delivery cost to the order

Example Payload

  • If this is the first time you are creating the driver in Bringg, fill in all the relevant fields for the "user" object, including "external_id". Bringg will then create a driver in Bringg with those details.
  • If you have previously created the driver in Bringg and want to assign the driver using your Driver ID, you only have to include the "external_id" field in the "user" object. See the example below in the 2nd tab.
  • delivery_cost is a float field that allows the fleet to send back their delivery cost to Bringg in Cents units.
{
   "task_id": 1234567,
   "user": {
      "external_id": "driver1",
      "name": "Driver Name",
      "job_description": "Driver's job description",
      "profile_image": "https://url.to.image",
      "phone": "+15555555555",
      "email": "[email protected]"
   },
   "delivery_cost": 1299,
   "green_delivery": true
}
{
  "task_id": 9883062,
  "user_external_id": "driver1",
  "delivery_cost": 1299,
  "green_delivery": true
}

🚧

International Phone Number Format

If you do provide a driver phone number, make sure that it is valid and in the international format i.e. starts with +{country dialing code}
e.g. +15555555555

BODY PARAMS

* task_id

Int32

Bringg's unique Order ID. You will have received this ID in the "Delivery Created" webhook.

* external_id

string

The ID of the driver in your system. This is a mandatory field.
Maximum number of characters: 255

*name

string

The name of the driver. This is a mandatory field. If you don't know the name, then send "Delivery Driver" rather than null. If you send null, then you will receive a 400 error.

profile_image

string

If you have a profile picture for the driver, put the URL here. Not mandatory. However, it is best practice to include some number so that the customer or the merchant can get in touch. The driver phone number can be a masked phone number, or it can be the phone number of your Customer Service. If you don't want to sha

phone

string

The driver's phone number. Not mandatory.

However, if you do specify a phone number, make sure that it is valid and in the international format i.e. starts with +{country dialing code}
e.g. +15555555555

email

string

The driver's email address. Not mandatory.

delivery_cost

float

Allow the fleet to send back their delivery cost to Bringg in Cents units. OPTIONAL

green_delivery

boolean

Show the consumer if the order was delivered by a green vehicle. OPTIONAL

* Mandatory fields

📘

What Bringg will send you in response

Example Response

Optional : You can save the task > "user_id"

{
    "success": true,
    "task": {
        "title": "1591107425",
        "user_id": 662319,
        "created_at": "2020-06-02T14:17:05.803Z",
        "scheduled_at": null,
        "lat": 35.7686299,
        "lng": -78.5487832,
        "status": 6,
        "id": 7197059,
        "address": "5210 TRADEMARK DRIVE, RALEIGH, NC",
        "active_way_point_id": 11070509,
        "started_time": null,
        "cancelled_at": null,
        "cancellation_lat": null,
        "cancellation_lng": null,
        "late": false,
        "extras": {
            "integration": {
                "trackingNumber": "1591107425",
                "uniqueIdentifier": "ABC"
            }
        },
        "external_id": "1591107425",
        "customer_id": 7201388,
        "asap": null,
        "ended_time": null,
        "priority": 7197059,
        "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": "8ec4c9a6-4fcb-4fb1-b94d-79aeeeb745cd",
        "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": 0,
        "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": null,
        "invalidated": false,
        "automatically_assigned": true,
        "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": [],
        "way_points": [
            {
                "id": 11070509,
                "scheduled_at": null,
                "has_to_leave_by": null,
                "task_id": 7197059,
                "customer_id": 7201389,
                "done": false,
                "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": null,
                "eta": null,
                "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": 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": 0,
                "etos": 300,
                "address_type": null,
                "location_name": null,
                "scheduled_arrival": null,
                "name": "Warehouse",
                "ui_data": null,
                "customer": {
                    "id": 7201389,
                    "name": "Warehouse",
                    "address": null,
                    "lat": null,
                    "lng": null,
                    "created_at": "2020-06-02T14:17:05.634Z",
                    "updated_at": "2020-06-02T14:17:05.645Z",
                    "phone": null,
                    "merchant_id": 1007,
                    "image": null,
                    "access_token": "159d159e-8027-45eb-8652-9c54948ee0ad",
                    "confirmation_code": "4301",
                    "salt": null,
                    "approved": false,
                    "push_token": null,
                    "uuid": "7e94a794-fcaf-4d21-b23e-766c6865ef9a",
                    "email": null,
                    "external_id": "7201389",
                    "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": 11070510,
                "scheduled_at": null,
                "has_to_leave_by": null,
                "task_id": 7197059,
                "customer_id": 7199049,
                "done": false,
                "lat": 35.6961331,
                "lng": -78.6922998,
                "address": "6305 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": null,
                "eta": null,
                "silent": false,
                "city": "RALEIGH",
                "borough": null,
                "full_address": "6305 LAKE WHEELER RD, RALEIGH, NC, 27603",
                "automatic_checkin": false,
                "automatic_checkout": false,
                "phone": "+19192054392",
                "email": "",
                "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": "DO SUPPLY INC",
                "ui_data": null,
                "customer": {
                    "id": 7199049,
                    "name": "John Smith",
                    "address": null,
                    "lat": null,
                    "lng": null,
                    "created_at": "2020-06-02T08:01:47.114Z",
                    "updated_at": "2020-06-02T08:47:06.584Z",
                    "phone": "+15555555555",
                    "merchant_id": 1007,
                    "image": null,
                    "access_token": "767305d7-4eac-43fb-b731-6028f9f1d41b",
                    "confirmation_code": "1543",
                    "salt": null,
                    "approved": false,
                    "push_token": null,
                    "uuid": "0846443f-abcf-4a36-b033-387da774be06",
                    "email": "",
                    "external_id": "7199049",
                    "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": 29433150,
                "task_id": 7197059,
                "inventory_id": 14336497,
                "quantity": 0,
                "original_quantity": 1,
                "merchant_id": 1007,
                "name": "MODULES",
                "price": null,
                "image": "/images/product-placeholder.png",
                "way_point_id": 11070509,
                "scan_string": "1591107425",
                "pending": true,
                "note": "Other",
                "parent_task_inventory_id": null,
                "coc_type": null,
                "external_id": "14336497",
                "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": 14336497,
                    "name": "MODULES",
                    "price": null,
                    "image": "/images/product-placeholder.png",
                    "merchant_id": 1007,
                    "external_id": "14336497",
                    "scan_string": "1591107425",
                    "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": 29433151,
                "task_id": 7197059,
                "inventory_id": 14336498,
                "quantity": 0,
                "original_quantity": 1,
                "merchant_id": 1007,
                "name": "MODULES",
                "price": null,
                "image": "/images/product-placeholder.png",
                "way_point_id": 11070510,
                "scan_string": "1591107425",
                "pending": false,
                "note": "Other",
                "parent_task_inventory_id": null,
                "coc_type": null,
                "external_id": "14336498",
                "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": 14336498,
                    "name": "MODULES",
                    "price": null,
                    "image": "/images/product-placeholder.png",
                    "merchant_id": 1007,
                    "external_id": "14336498",
                    "scan_string": "1591107425",
                    "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
    }
}
{
    "success": false,
    "rc": 0,
    "message": "Task not found"
}
{
    "success": false,
    "rc": 0,
    "message": "general error"
}