API Reference

Order Assigned to Carrier

📘

This webhook is triggered when Bringg assigns (or re-assigns) the order to a specific carrier (before the order is sent to the carrier, but the sequence of the webhooks cannot be guaranteed because of their async nature).

📘

Register Your URL for this Webhook

To start receiving webhooks from Bringg, you must first register a URL. Detailed guidance on setting up and managing Bringg webhooks is available in the following resources:


🚧

Note

This webhook is only triggered if carrier was changed. If the fleet_id value comes with the original order creation request, the webhook is not be triggered.

EXAMPLE PAYLOAD

{
  "id": 2859,
  "title": "ADEO - Mission",
  "created_at": "2022-11-29T12:15:11.205Z",
  "updated_at": "2022-11-29T12:15:16.007Z",
  "customer_id": 10170,
  "user_id": null,
  "status": "Assigned to Delivery Provider",
  "scheduled_at": "2022-11-29T13:15:10.980Z",
  "merchant_id": 62779,
  "active_way_point_id": 5653,
  "extras": null,
  "webhooks": null,
  "fleet_id": 2899,
  "fleet_delivery_external_id": null,
  "preparation_status": 0,
  "preparation_external_id": null,
  "task_type_id": 5,
  "user_external_id": null,
  "preparation_ready_for_pickup_time_planned": "2022-11-29T12:45:10.980Z",
  "automatically_ended": 0,
  "automatically_cancelled": 0,
  "failed_delivery_attempts": 0,
  "small_cart_fee": null,
  "service_fee": null,
  "fleet_name": "GLS",
  "webhook_type": "task_assigned_to_dp"
  "way_points": [
    {
      "id": 5653,
      "lat": 44.4023416,
      "lng": 8.9538962,
      "task_id": 2859,
      "done": false,
      "created_at": "2022-11-29T12:15:11.212Z",
      "updated_at": "2022-11-29T12:15:11.212Z",
      "customer_id": 10171,
      "address": "Corso Torino, 18/20/22R, 16129 Genova GE, Italy",
      "position": 1,
      "scheduled_at": "2022-11-29T13:15:10.980Z",
      "checkin_time": null,
      "checkout_time": null,
      "note": null,
      "find_me": null,
      "asap": false,
      "late": false,
      "eta": null,
      "etl": "2022-11-29T13:20:10.980Z",
      "silent": false,
      "phone": "+12346666777",
      "email": null,
      "delete_at": null,
      "checkin_lat": null,
      "checkin_lng": null,
      "checkout_lat": null,
      "checkout_lng": null,
      "etos": 300,
      "distance_traveled_client": null,
      "distance_traveled_server": null,
      "automatically_checked_in": 0,
      "automatically_checked_out": 0,
      "merchant_id": 62779,
      "start_lat": null,
      "start_lng": null,
      "start_time": null,
      "estimated_distance": null,
      "estimated_time": null,
      "allow_editing_inventory": true,
      "must_approve_inventory": false,
      "address_second_line": null,
      "zipcode": "10002",
      "allow_scanning_inventory": null,
      "allow_editing_payment": null,
      "late_reason": null,
      "no_later_than": null,
      "no_earlier_than": "2022-11-29T13:15:11.025Z",
      "masked_phone_number": null,
      "twilio_number_id": null,
      "marked_late_at": null,
      "borough": null,
      "city": "New York",
      "distance_traveled": null,
      "state": "GA",
      "delivery_confirmation_scan": null,
      "delivery_confirmation_note": null,
      "delivery_confirmation_photo": null,
      "delivery_confirmation_signature": null,
      "delivery_confirmation_form": null,
      "delivery_confirmation_ocr": null,
      "company_name": null,
      "customer_contact_ids": [
        10171
      ],
      "contacts": [
        {
          "customer_id": 10171,
          "contact_type": "phone",
          "contact_value": "+12346666777",
          "sharing_allowed": false,
          "opted_by_customer": false
        }
      ],
      "allow_editing_original_quantity": null,
      "pickup_dropoff_option": 0,
      "delivery_confirmation_cash": null,
      "district": null,
      "house_number": null,
      "street": null,
      "pending_geocode": null,
      "original_eta": null,
      "allow_automatic_set_coordinates": true,
      "has_to_leave_by": null,
      "extras": null,
      "automatically_geocoded": true,
      "original_etl": null,
      "hidden": null,
      "address_type": null,
      "location_name": null,
      "location_id": null,
      "name": "GLS lover# 548",
      "ui_data": null,
      "first_attempt_promise_no_earlier_than": null,
      "first_attempt_promise_no_later_than": null,
      "driver_preparation_time": null,
      "parking_spot_id": null,
      "checkin_origin": null,
      "checkout_origin": null,
      "predicted_etos": null,
      "delivery_method": null,
      "base_etos": 300,
      "customer": {
        "id": 10171,
        "name": "GLS lover# 548",
        "address": null,
        "lat": null,
        "lng": null,
        "created_at": "2022-11-29T12:15:11.126Z",
        "updated_at": "2022-11-29T12:15:11.126Z",
        "phone": "+12346666777",
        "merchant_id": 62779,
        "image": null,
        "access_token": "5118cb88-68bb-4378-8c46-864470f1ead3",
        "confirmation_code": "2555",
        "salt": null,
        "approved": false,
        "push_token": null,
        "uuid": "d506370c-44a3-4419-b6e2-e49e17d6bd24",
        "email": null,
        "external_id": "10171",
        "delete_at": 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": "+12346666777",
        "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,
        "has_parking_area": null,
        "driver_preparation_time": null
      },
      "answers": [],
      "full_address": "Corso Torino, 18/20/22R, 16129 Genova GE, Italy, New York, GA, 10002"
    },
    {
      "id": 5654,
      "lat": 43.767042,
      "lng": 11.2181254,
      "task_id": 2859,
      "done": false,
      "created_at": "2022-11-29T12:15:11.220Z",
      "updated_at": "2022-11-29T12:15:11.220Z",
      "customer_id": 10172,
      "address": "Via Duccio di Buoninsegna, 20, 50143 Firenze FI, Italy",
      "position": 2,
      "scheduled_at": "2022-11-29T13:15:10.980Z",
      "checkin_time": null,
      "checkout_time": null,
      "note": null,
      "find_me": null,
      "asap": false,
      "late": false,
      "eta": null,
      "etl": "2022-11-29T13:20:10.980Z",
      "silent": false,
      "phone": "+12346666666",
      "email": null,
      "delete_at": null,
      "checkin_lat": null,
      "checkin_lng": null,
      "checkout_lat": null,
      "checkout_lng": null,
      "etos": 300,
      "distance_traveled_client": null,
      "distance_traveled_server": null,
      "automatically_checked_in": 0,
      "automatically_checked_out": 0,
      "merchant_id": 62779,
      "start_lat": null,
      "start_lng": null,
      "start_time": null,
      "estimated_distance": null,
      "estimated_time": null,
      "allow_editing_inventory": true,
      "must_approve_inventory": false,
      "address_second_line": null,
      "zipcode": "10002",
      "allow_scanning_inventory": true,
      "allow_editing_payment": null,
      "late_reason": null,
      "no_later_than": "2022-11-29T14:30:11.023Z",
      "no_earlier_than": "2022-11-29T13:15:11.025Z",
      "masked_phone_number": null,
      "twilio_number_id": null,
      "marked_late_at": null,
      "borough": null,
      "city": "New York",
      "distance_traveled": null,
      "state": "GA",
      "delivery_confirmation_scan": null,
      "delivery_confirmation_note": null,
      "delivery_confirmation_photo": null,
      "delivery_confirmation_signature": null,
      "delivery_confirmation_form": null,
      "delivery_confirmation_ocr": null,
      "company_name": null,
      "customer_contact_ids": [
        10172
      ],
      "contacts": [
        {
          "customer_id": 10172,
          "contact_type": "phone",
          "contact_value": "+12346666666",
          "sharing_allowed": false,
          "opted_by_customer": false
        }
      ],
      "allow_editing_original_quantity": null,
      "pickup_dropoff_option": 1,
      "delivery_confirmation_cash": null,
      "district": null,
      "house_number": null,
      "street": null,
      "pending_geocode": null,
      "original_eta": null,
      "allow_automatic_set_coordinates": true,
      "has_to_leave_by": null,
      "extras": null,
      "automatically_geocoded": true,
      "original_etl": null,
      "hidden": null,
      "address_type": null,
      "location_name": null,
      "location_id": null,
      "name": "GLS lover# 858",
      "ui_data": null,
      "first_attempt_promise_no_earlier_than": null,
      "first_attempt_promise_no_later_than": null,
      "driver_preparation_time": null,
      "parking_spot_id": null,
      "checkin_origin": null,
      "checkout_origin": null,
      "predicted_etos": null,
      "delivery_method": "home_delivery",
      "base_etos": 300,
      "customer": {
        "id": 10172,
        "name": "GLS lover# 858",
        "address": null,
        "lat": null,
        "lng": null,
        "created_at": "2022-11-29T12:15:11.161Z",
        "updated_at": "2022-11-29T12:15:11.161Z",
        "phone": "+12346666666",
        "merchant_id": 62779,
        "image": null,
        "access_token": "79aaef18-2851-4acb-9242-0602882dbb2a",
        "confirmation_code": "9551",
        "salt": null,
        "approved": false,
        "push_token": null,
        "uuid": "a590cda4-0441-4142-8724-70f9033d4c2f",
        "email": null,
        "external_id": "10172",
        "delete_at": 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": "+12346666666",
        "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,
        "has_parking_area": null,
        "driver_preparation_time": null
      },
      "answers": [],
      "full_address": "Via Duccio di Buoninsegna, 20, 50143 Firenze FI, Italy, New York, GA, 10002"
    }
  ],
  "scans": [],
  "customer": {
    "id": 10170,
    "name": "Automation Customer 3555478327",
    "address": null,
    "lat": null,
    "lng": null,
    "created_at": "2022-11-29T12:15:11.085Z",
    "updated_at": "2022-11-29T12:15:11.296Z",
    "phone": "+393123485889",
    "merchant_id": 62779,
    "image": null,
    "access_token": "2f5f6b53-0bd5-4765-8b6f-f458e63deb19",
    "confirmation_code": "3903",
    "salt": null,
    "approved": false,
    "push_token": null,
    "uuid": "8fa7aaa9-986d-4c89-917b-1ff420c023c8",
    "email": "[email protected]",
    "external_id": "10170",
    "delete_at": 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": "+393123485889",
    "last_open_at": null,
    "last_order_at": "2022-11-29T12:15:11.205Z",
    "uploaded_profile_image": {
      "url": "/images/avatar.png"
    },
    "original_lat": null,
    "original_lng": null,
    "consecutive_checkins_out_of_geofence": 0,
    "allow_sending_email": false,
    "allow_sending_sms": false,
    "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,
    "has_parking_area": null,
    "driver_preparation_time": null
  },
  "late": false,
  "external_id": "GLS test automation order",
  "uuid": "4ac23c53-6512-4032-8b9a-e31360b34731",
  "priority": 2859,
  "total_price": null,
  "price_before_tax": null,
  "delivery_price": null,
  "delivery_cost": null,
  "tip": null,
  "left_to_be_paid": null,
  "dispatcher_id": null,
  "team_ids": [
    157390
  ],
  "ready_to_execute": false,
  "start_lat": null,
  "start_lng": null,
  "distance_traveled": null,
  "origin_id": 1,
  "tax_price": null,
  "cancellation_lat": null,
  "cancellation_lng": null,
  "discount": null,
  "tip_driver_enabled": false,
  "tag_id": 2132,
  "pre_delivery_tip": null,
  "post_delivery_tip_cash": null,
  "post_delivery_tip_credit": null,
  "group_leader_id": null,
  "automatically_assigned": true,
  "virtual_task": false,
  "planning_done": false,
  "run_uuid": null,
  "scheduled_to_be_ready": "2022-11-29T12:45:10.980Z",
  "task_inventories": [
    {
      "id": 5500,
      "task_id": 2859,
      "quantity": 1,
      "original_quantity": 1,
      "merchant_id": 62779,
      "price": 10.9,
      "way_point_id": 5654,
      "scan_string": "JRfvjvXaFz",
      "pending": null,
      "note": null,
      "parent_task_inventory_id": null,
      "coc_type": 0,
      "external_id": "fd46ec60-cfa6-479a-a7ee-aaf00d6f4a55",
      "source_task_id": null,
      "rejected_quantity": 0,
      "actions_configuration_id": null,
      "reason_to_change_inventory_id": null,
      "age_restricted": null,
      "extras": null,
      "picked_up_quantity": 1,
      "scanned": false,
      "updated_at": "2022-11-29T12:15:11.235Z",
      "handling_units": {},
      "inventory_id": 4196,
      "sku": null,
      "assigned_serial": null,
      "name": "Beff Sandwich",
      "size": null,
      "weight": 0.6,
      "length": 3.7,
      "height": 2.5,
      "width": 1.2,
      "image": "/images/product-placeholder.png",
      "services": [],
      "scheduled_arrival": null,
      "inventory": {
        "id": 4196,
        "name": "Beff Sandwich",
        "price": 10.9,
        "merchant_id": 62779,
        "external_id": "fd46ec60-cfa6-479a-a7ee-aaf00d6f4a55",
        "sku": null,
        "scan_string": "JRfvjvXaFz",
        "commodity": null,
        "notes": null,
        "weight": 0.6,
        "size": null,
        "extras": null,
        "delivery_cost": null,
        "completed": null,
        "width": 1.2,
        "height": 2.5,
        "length": 3.7,
        "shipper_external_id": null,
        "volume": null,
        "handling_units": {},
        "image": "/images/product-placeholder.png"
      }
    }
  ],
  "group_uuid": null,
  "parent_task_id": null,
  "payment_type_name": null,
  "task_notes": [
    {
      "id": 2619,
      "note": "Drop off Box in Bin by Front Desk, please.",
      "user_id": 10023,
      "task_id": 2859,
      "created_at": "2022-11-29T12:15:11.222Z",
      "updated_at": "2022-11-29T12:15:11.222Z",
      "url": null,
      "way_point_id": 5654,
      "customer_id": null,
      "pending_upload": false,
      "lat": null,
      "lng": null,
      "form_group_uuid": null,
      "action_id": null,
      "task_inventory_id": null,
      "flow_uuid": null,
      "happened_at": null,
      "form_field_key": null,
      "external_id": "2619",
      "share_with_customer": false,
      "merchant_id": 62779,
      "type": "TaskNote",
      "author_name": "Director for 62779"
    }
  ]
}

BODY PARAMS

id

Int32

Bringg's unique ID for this order

fleet_id

Int32

Delivery Provider unique ID

fleet_name

string

Delivery Provider's Fleet name

status

string

The webhook status: "Assigned to Delivery Provider"

webhook_type

string

The webhook type: "task_assigned_to_dp"

external_id

string

The merchant client's Order ID

title

string

Title of the order

priority

Int32

Sequence number of the order in a route

task_type_id

Int32

Type of task. The options are

  • 3: pickup - this order needs to be picked up
  • 4: pickup_and_delivery Both a pickup and a dropoff need to take place at the same destination/stop (Very seldom used)
  • 5: delivery - this order needs to be delivered

extras

Array of JSONs

Custom param-value pairs. This is very specific to a particular merchant. It is not commonly used.

way_points

Array of JSONs

An array of 2 JSONs containing the following waypoint information:

  • id
  • position
  • pickup_dropoff_option
  • scheduled_at
  • asap
  • customer
  • name
  • address
  • address_second_line
  • done
  • address_type
  • location_name
  • no_earlier_than
  • no_later_than
  • lat
  • lng
  • phone
  • note
  • zipcode
  • borough
  • city
  • state
  • customer

    JSON

    A JSON containing the following fields from the Customer object associated with this order:

  • id
  • name
  • phone
  • email
  • external_id
  • scheduled_at

    datetime

    The date and time this order was scheduled. This is in UTC and is in the format is " %Y-%m-%dT%H:%M:%S%z".

    inventory

    Array of JSONs

    An array of JSONs containing this order's inventory, see Task Inventories.

    task_notes

    Array of JSONs

    An array of JSONs containing notes added to this order. Each note contains an id, external_id and text of the note (string). Most likely, you only need to save down the text of the note.
    Please note: There is no limit to the character length of the note, nor is there a limit to how many notes could be in the array.
    However, it is unlikely that there will be more than one or 2 notes in the array.

    team_ids

    Array of Int32

    An Array which contains team ids associated with this order (a Team is usually a Store or Warehouse or Restaurant).