API Reference

Return Delivery Created

A return task is a task that instructs the driver to take inventory back to the warehouse/home. It can be created in Bringg (with the additional configuration required on the Bringg side) for the deliveries that checked out from the pickup waypoint but haven’t been delivered. Return delivery usually has only one dropoff waypoint which is the starting point of the original delivery.

Create Return Delivery is a webhook that notifies you about return delivery being created in Bringg. Another goal of this webhook is to share the IDs of the return tasks for both sides. Actually, all parameters of the response are optional. We assume that Delivery Provider will make usual API calls for the return delivery lifecycle using the “return_task_id" value. So, we don’t necessarily need “return_delivery_id" back. It’s needed for easier identifying the task only.

📘

What we expect from you in response

  • If you are able to create a return delivery, return a success: true along with the return_delivery_id.
  • Please make sure to send a 200 Success code (not 201).
  • If you are not able to do the return delivery, then send success: false and a reason (error_message) for the rejection.

❗️

Timeout

Bringg expects a response within 30 seconds. After 30 seconds with no response, this will be considered a timeout. Bringg will retry the webhook 3 times.

{
	"success": true,
	"return_delivery_id": "ABCD1234-return"
}
{
	"success": false,
	"error_message": "Item lost"
}

🚧

Success True response

There are only 2 fields that you need to include in Success True response, but they aren't mandatory:

  • "success": true
  • "return_delivery_id" : "< YOUR RETURN DELIVERY ID >"

SUCCESS:TRUE RESPONSE PARAMS

*success

boolean

Value should be 'true'

*return_delivery_id

string

The delivery ID you assigned to the return order. It should be differnet from the original delivery ID. OPTIONAL

EXAMPLE PAYLOAD SENT IN THE RETURN DELIVERY CREATED WEBHOOK

🚧

Save the "return_task_id" value

Make sure to save down the "return_task_id" value into your system as the Bringg Order ID. You will need to use this as the "task_id" value when you send the Start Order, Checkin and Complete Order API calls to Bringg for the return order.

{
  "return_task_id": 43564311,
  "original_task_id": 43443320,
  "original_delivery_id": "ABCD1234"
}

BODY PARAMS

return_task_id

Int32

Bringg's unique ID for the Return order created after the original (parent) order was cancelled (failed to be delivered)

original_task_id

Int32

Bringg's unique ID for the original (parent) order that was cancelled (failed to be delivered)

original_delivery_id

string

The ID of the order in your system that was cancelled. This helps you identify the order in your system.