API Reference

Order Created

The Order Created callback occurs when a new order is created. This callback returns detailed information describing the order, customer, way points, and order notes.

📘

Registering Your URL for the Order Created Webhook

For information describing how to register your URL for a webhook, see Bringg Webhooks.

Response

{
	"id": 8503585,
	"title": "50 cases of Best Brand Soda",
	"created_at": "2017-12-12T15:57:37.000Z",
	"updated_at": "2017-12-12T15:57:37.000Z",
	"customer_id": 4652688,
	"user_id": null,
	"status": 0,
	"scheduled_at": "2017-12-12T16:26:03.000Z",
	"merchant_id": 11271,
	"active_way_point_id": 10640287,
	"way_points": [
		{
			"id": 10640287,
			"lat": 40.442228,
			"lng": -80.003107,
			"task_id": 8503585,
			"done": false,
			"customer_id": 4652688,
			"address": "120 Fifth Ave, Pittsburgh, PA 15222, USA",
			"position": 1,
			"scheduled_at": "2017-12-12T16:26:03.411Z",
			"note": null,
			"eta": null,
			"etl": "2017-12-12T16:31:03.411Z",
			"phone": "+9724121234567",
			"etos": 300,
			"merchant_id": 11271,
			"allow_editing_inventory": true,
			"must_approve_inventory": false,
			"address_second_line": "Annex B",
			"zipcode": null,
			"no_later_than": null,
			"no_earlier_than": null,
			"borough": null,
			"city": null,
			"state": null,
			"customer_contact_ids": [
				4652688
			],
			"contacts": [
				{
					"customer_id": 4652688,
					"contact_type": "phone",
					"contact_value": "+9724121234567",
					"sharing_allowed": true
				},
				{
					"customer_id": 4652688,
					"contact_type": "email",
					"contact_value": "[email protected]",
					"sharing_allowed": true
				}
			],
			"pickup_dropoff_option": null,
			"customer": {
				"id": 4652688,
				"name": "Beverage Brothers",
				"address": "120 Fifth Ave, Pittsburgh, PA 15222, USA",
				"lat": 40.442228,
				"lng": -80.003107,
				"phone": "+9724121234567",
				"merchant_id": 11271,
				"image": "/images/avatar.png",
				"email": "[email protected]",
				"external_id": "4652688",
				"facebook_id": null,
				"extras": null,
				"address_second_line": "Annex B",
				"zipcode": null,
				"mobile_type": 0,
				"client_version": null,
				"client_name": null
			},
			"full_address": "120 Fifth Ave, Pittsburgh, PA 15222, USA"
		},
		{
			"id": 10640288,
			"lat": 40.4417274,
			"lng": -80.00273649999997,
			"task_id": 8503585,
			"done": false,
			"customer_id": 4647476,
			"address": "95 Fifth Ave, Pittsburgh, PA , USA",
			"position": 2,
			"scheduled_at": "2017-12-12T16:56:03.411Z",
			"note": null,
			"eta": null,
			"etl": "2017-12-12T17:01:03.411Z",
			"phone": null,
			"etos": 300,
			"merchant_id": 11271,
			"allow_editing_inventory": true,
			"must_approve_inventory": false,
			"address_second_line": null,
			"zipcode": "15222",
			"no_later_than": null,
			"no_earlier_than": null,
			"borough": null,
			"city": null,
			"state": null,
			"customer_contact_ids": [
				4647476
			],
			"contacts": [
				{
					"customer_id": 4647476,
					"contact_type": "email",
					"contact_value": "[email protected]",
					"sharing_allowed": true
				}
			],
			"pickup_dropoff_option": null,
			"customer": {
				"id": 4647476,
				"name": "Mike's Quickstop",
				"address": "95 Fifth Ave, Pittsburgh, PA 15222, USA",
				"lat": 40.4417274,
				"lng": -80.0027365,
				"phone": null,
				"merchant_id": 11271,
				"image": "/images/avatar.png",
				"email": "[email protected]",
				"external_id": "4647476",
				"facebook_id": null,
				"extras": null,
				"address_second_line": null,
				"zipcode": "15222",
				"mobile_type": 0,
				"client_version": null,
				"client_name": null
			},
			"full_address": "95 Fifth Ave, Pittsburgh, PA , USA, 15222"
		}
	],
	"customer": {
		"id": 4652688,
		"name": "Beverage Brothers",
		"address": "120 Fifth Ave, Pittsburgh, PA 15222, USA",
		"address_second_line": "Annex B",
		"address_type":2,	
		"lat": 40.442228,
		"lng": -80.003107,
		"phone": "+9724121234567",
		"merchant_id": 11271,
		"image": "/images/avatar.png",
		"email": "[email protected]",
		"external_id": "4652688",
		"facebook_id": null,
		"extras": null,
		"mobile_type": 0,
		"client_version": null,
		"client_name": null,
		"zipcode": 29383749
	},
	"late": false,
	"external_id": "8503585",
	"uuid": "9dd753ff-9bf4-43ab-94d7-aa5f6f77af63",
	"priority": 8503585,
	"dispatcher_id": null,
	"team_ids": [],
	"ready_to_execute": true,
	"tip_driver_enabled": false,
	"tag_id": 8613,
	"automatically_assigned": false,
	"task_inventories": null,
	"task_notes": [
		{
			"id": 9495595,
			"note": "30 cases, drop at dock #4",
			"user_id": 59172,
			"task_id": 8503585,
			"created_at": "2017-12-12T15:57:37.141Z",
			"updated_at": "2017-12-12T15:57:37.267Z",
			"url": null,
			"way_point_id": 10640287,
			"customer_id": null,
			"pending_upload": false,
			"lat": 32.1068165,
			"lng": 34.8348318,
			"type": "TaskNote"
		},
		{
			"id": 9495596,
			"note": "20 cases, ask for Tom or Mike.",
			"user_id": 59172,
			"task_id": 8503585,
			"created_at": "2017-12-12T15:57:37.213Z",
			"updated_at": "2017-12-12T15:57:37.270Z",
			"url": null,
			"way_point_id": 10640288,
			"customer_id": null,
			"pending_upload": false,
			"lat": 32.1068165,
			"lng": 34.8348318,
			"type": "TaskNote"
		}
	],
	"fleet_id": null
}

Output Params

id

Int32

The unique Id of this order.

active_way_point_id

Int32

The Id of the way point in this order that is the user's (driver's) next destination.

automatically_assigned

boolean

Indicates whether this order was automatically assigned. The values are:

  • false or 0 - this order was not automatically assigned
  • true or 1 - this order was automatically assigned.

created_at

datetime

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

customer

JSON

A JSON which may contain the following fields from the customer object associated with this order. Inclusion of fields may be subject to specific merchant configuration:

  • id
  • name
  • address
  • address_second_line
  • zipcode
  • lat
  • lng
  • phone
  • address_type
  • merchant_id
  • image
  • email
  • facebook_id
  • extras
  • external_id
  • mobile_type
  • client_version
  • client_name
  • See Customer Object.

    customer_id

    Int32

    The Id of the customer associated with this order.

    external_id

    string

    The order's external Id.

    fleet_id

    Int32

    If this order is assigned to an external fleet, this is the Id of that external fleet.

    late

    Int32

    Indicates whether the user (driver) has not arrived at way points in this order on or before the scheduled times. The values are:

    • false or 0 - the user (driver) is not late
    • true or 1 - the user (driver) is late

    The default value is false.

    merchant_id

    Int32

    The Id of the company. The merchant_id may be null, if the developer works with only one company.

    priority

    Int32

    The priority of this order.

    ready_to_execute

    Int32

    Indicates whether this order is in planning and not visible to users (drivers). The values are:

    • false or 0 - is not in planning and is visible to users (drivers)
    • true or 1 - is in planning and is not visible to users (drivers)

    status

    Int32

    This order's status. The values are:

    • 0 - created
    • 1 - assigned
    • 2 - on_the_way
    • 3 - checked_in
    • 4 - done
    • 5 - this status is not in use
    • 6 - accepted
    • 8 - rejected
    • 9 - unacknowledged

    The Order Created callback returns the value 0 (created).

    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".

    tag_id

    Int32

    If a tag exists, this is the Bringg tab Id.

    task_inventories

    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, see Task Notes.

    team_ids

    Array of Int32

    An array of Int32 containing the Ids of all teams assigned to this order.

    tip_driver_enabled

    Int32

    Indicates whether the user (driver) is allowed to be tipped. The values are:

    • false or 0 - the user (driver) cannot be tipped
    • true or 1 - the user (driver can be tipped.

    title

    string

    This order's title. The maximum length is 255 characters.

    updated_at

    datetime

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

    user_id

    Int32

    The Id of the user (driver). The default value is null, if no user (driver) is assigned.

    uuid

    Int32

    The universal unique Id of this order.

    way_points

    Array of JSONs

    An array of JSONs which may contain the following way-point information. Inclusion of fields may be subject to specific merchant configuration:

  • id
  • scheduled_at
  • task_id
  • customer_id
  • customer
  • eta
  • etl
  • name
  • address
  • address_second_line
  • done
  • address_type
  • location_name
  • no_earlier_than
  • no_later_than
  • lat
  • lng
  • phone
  • note
  • allow_editing_inventory
  • must_approve_inventory
  • zipcode
  • borough
  • city
  • state
  • pickup_dropoff_option
  • etos
  • position
  • See Way-Point Object.