Create Order (Task)

Send the details of a new order to Bringg from your Order Management System (OMS).

The Create Order endpoint allows you to create an order (also known as a task) in Bringg. This API service supports various use cases and workflows.

The Order (Task) Object can include a wide variety of attributes, including the following components:

  • Customer: the recipient of the goods or services provided by this order. The customer's address is often the second waypoint in the order. Visit the Customer Object to learn more.
  • User: the driver associated with the order. The driver can be assigned when creating an order but is often assigned automatically or manually once the order is created in Bringg. Read more about the User Object.
  • Waypoints: One or two waypoints, each of which can be a pickup, drop-off, or visit. Each waypoint can include specific customer and inventory details as well as requirements such as the handoff policies. For information about the waypoint object, see Way Point Object.

NOTE: Some order details are associated with the entire order, while other details are associated with individual waypoints or customers at individual waypoints. For example, the payment method is associated with the order and is an attribute of the Create Order service. On the other hand, the notes options are associated with individual waypoints and are attributes of waypoint objects within the order.

Potential Errors
  <th>
    Error Message
  </th>

  <th>
    Resolution
  </th>
</tr>
  <td>
    `Quote expired`
  </td>

  <td>
    The `quote_id` has expired. Obtain a new quote ID and try again.
  </td>
</tr>

<tr>
  <td>
    `200`
  </td>

  <td>
    `One of the parameters is incorrect: [Time '+92022-02-01T00:00:00Z' is out of range '10 years' for 'no_earlier_than']`
  </td>

  <td>
    Make sure that date and time values fall within a 10-year range.
  </td>
</tr>

<tr>
  <td>
    `200`
  </td>

  <td>
    `Task with external id [ID] exists already`
  </td>

  <td>
    There is already an order with this external ID. Send [Update Task](ref:update-task) or check the external ID and try again.
  </td>
</tr>

<tr>
  <td>
    `400`
  </td>

  <td>
    `An order can not include more than 2 way points. Please remove additional destinations.`
  </td>

  <td>
    Remove extra waypoints and try again.
  </td>
</tr>

<tr>
  <td>
    `200`
  </td>

  <td>
    `No service_plan with id <ID> found`
  </td>

  <td>
    Check the service plan ID in the **Settings > Service Plans** and try again.
  </td>
</tr>

<tr>
  <td>
    `200`
  </td>

  <td>
    `reserved_until cannot be in the past`
  </td>

  <td>
    Update the `reserved_until` timestamp and try again. Check your external systems to understand why this timestamp was sent.
  </td>
</tr>

<tr>
  <td>
    `200`
  </td>

  <td>
    `Task with uuid [id] exists already.`
  </td>

  <td>
    There is already an order with this Bringg ID. Send [Update Task](ref:update-task)  to update the order instead.
  </td>
</tr>

<tr>
  <td>
    `200`
  </td>

  <td>
    `The max allowed inventory per task is passed the limit. Reach your account manger for more information.`
  </td>

  <td>
    Reach out to your account manager for more information.
  </td>
</tr>

<tr>
  <td>
    `200`
  </td>

  <td>
    Teams [team IDs] not found.
  </td>

  <td>
    Check the team IDs:  

    * Go to **Resources > Teams**, *or*
    * Send the [Show All Teams](ref:team_index) API request.
  </td>
</tr>

<tr>
  <td>
    `200`
  </td>

  <td>
    `Customer [customer_id] does not exist.`
  </td>

  <td>
    Check the customer ID in **Customers** or create a new customer by including the `customer` object.
  </td>
</tr>

<tr>
  <td>
    `200`
  </td>

  <td>
    `Customer [customer_id] is out of range.`
  </td>

  <td>

  </td>
</tr>

<tr>
  <td>
    `200`
  </td>

  <td>
    `Driver with external_id [user_external_id] was not found` or `Driver with id [user_id] was not found`
  </td>

  <td>
    Check the driver's ID:  

    * Go to **Resources > Drivers**, *or*
    * Send the  [Get Users](ref:get_users)  API request.
  </td>
</tr>

<tr>
  <td>
    `200`
  </td>

  <td>
    `Driver can't access to the team id [team_id]`
  </td>

  <td>
    Check which team the driver is assigned to:  

    * Go to **Resources > Drivers** and select the driver's name, *or*
    * Send the [Get User](ref:get_user) API request.
  </td>
</tr>
Error Code
`200`

Response (Output) Params

This list of output parameters includes all of the fields that Bringg adds to an order once it is received. For more details, including a table of body params, see the Order (Task) Object.


Language