Order Inventories Object

The Order (Task) Inventories object is included in some webhook callbacks.

About the Order Inventories Object

The task_inventories object can be sent to Bringg as part of the Create Order (Task) and can be included in any flexible webhook so you can stay updated on the inventory associated with your orders.

Best Practices

  • Before sending inventory details to Bringg, be sure to set up a unique inventory ID. This lets Bringg know that you are referring to a specific instance of an item when sending updates to Bringg.
    1. In Bringg, go to Settings > Merchant Configuration.
    2. Select a parameter from the drop-down field next to Unique Inventory ID.
    3. Select Update to save your changes.
  • Send distinct products with quantities to indicate multiple items, rather than including multiple line items with the same ID.
  • Determine which level of your inventory hierarchy the driver needs to be able to scan and act on. You can add multiple levels of inventory (we recommend up to three) by embedding another inventory object within the first, including the scan_string at the top level. For example, you can include a top-level item such as a crate with a barcode for the driver to scan. Then, if an issue arises with an item within the crate, such as a missing bag of chips, the driver can interact on that inventory level to reject the specific item.

Order Inventories Details

Below is a list of all parameters that you can send to Bringg for this object. If there are attributes that you want to include but are not listed here, you can create custom attributes that can be displayed and used throughout Bringg.

For more details about how different parameter types such as datetime are formatted and used in Bringg, read our Data Formatting article.

FieldDescription
actions_configuration_id
integer
The ID of the driver action required for this inventory item.
age_restricted
boolean
Indicates whether the driver must check the customer's ID before completing the delivery, for example, when the order includes alcohol.
Possible values:
0 or false- The inventory is not age-restricted
1 or true- The inventory is age-restricted
external_id
string
The ID of this item in your external systems.
extras
array
This field can be used to send custom attributes to Bringg using the JSON format of field and value.
For example:
{"field":"value"}
external_image_url
string
The URL of an externally-hosted image of this item.
handling_units
array
The handling units value can be sent as an integer or double.
For example:
"handling_units": { "pallets": 2 },
height
double
The height of this item.
image
string
The URL of an image of this item.
inventory_change_details
object
An object detailing changes made to the inventory, including the change type, result, and reasons. Learn more about the Inventory Change Details Object.
length
double
The length of this item.
name
string
The name of the item.
note
string
A note added to this inventory item.
pending
boolean
Indicates whether the item is intended for pickup or dropoff.
false or 0 - the item is intended for dropoff
true or 1 - the item is intended for pickup
price
double
The item price.
original_quantity
integer
The original item quantity included in the the order.
scan_string
text
If a scan code is associated with this item, this is that scan code.
services
array
An array of services associated with this item, as configured with your Bringg representative, using Bringg's IDs.
services_external_ids
array of strings
An array of services associated with this item, as configured with your Bringg representative, using your external system's IDs.
For example: installation or fragile.
weight
double
The weight of this item.
width
double
The width of this item.

Response and Webhook Data

Below is a list of the data returned in webhooks and responses to your API requests. The inclusion of specific parameters may depend on your use case, your API request, and the webhook fields you have subscribed to.


ParameterDescription
created_at
datetime
The date and time this item was created.
deleted_at
datetime
The date and time this item was deleted.
id
integer
Bringg's ID for this item.
inventory_change_details
object
This object details the changes when an inventory item is rejected. When there are no rejections to report, the object is returned as an empty array.

Included parameters:
before (integer): The number of rejected items before the change occurred.
after (integer): The number of rejected items after the change occurred.
change_type (integer): The change_type value is always 2 and indicates an inventory rejection.
inventory_change (object): An object detailing the inventory rejection reason and rejection reason ID.
inventory_id
Int32
The ID of this item in Bringg.
merchant_id
Int32
The ID of the company. The merchant_id may be null, if the developer works with only one company.
original_quantity
integer
The original item quantity included in the the order.
parent_task_inventory_id
Int32
When there is a hierarchical relationship between inventory items, this is the ID of the parent item to which this item belongs.
picked_up_quantity
integer
The number of items picked up by the driver.
quantity
integer
The resulting item quantity delivered or collected after rejections.
rejected_quantity
integer
The number of items rejected by the customer or driver.
scanned
boolean
If a scan code is associated with this item, this indicates whether the item was scanned.
Possible values:
false or 0 - the item was not scanned
true or 1 - the item was scanned
source_task_id
Int32
If the task inventory item originated from another order, this is the ID of that other order.
task_id
Int32
Bringg's ID for the associated order.
updated_at
datetime
The date and time when this item was last updated.

Examples

"task_inventories": [
  {
    "id": 334343988,
    "quantity": 1,
    "scanned": false,
    "original_quantity": 5,
    "rejected_quantity": 4,
    "external_id": "2145",
    "name": "Icebox Fridge 32'",
    "inventory_change_details": [
      {
        "change_type": 2,
        "before": "0",
        "after": "4",
        "inventory_change": {
          "reason_to_change_inventory_id": 421,
          "reason_to_change_inventory": {
            "reason": "Item is damaged"
          }
        }
      }
    ]
  }
]
"task_inventories": [
  {
    "id": 334343988,
    "quantity": 5,
    "scanned": false,
    "original_quantity": 5,
    "rejected_quantity": 0,
    "external_id": "2145",
    "name": "Icebox Fridge 32'",
    "inventory_change_details": []
  }
]