# Bringg

> Create and track delivery orders, and manage drivers, teams and customers in Bringg.

App · 26 actions. Web page: https://docs.lodol.com/docs/integrations/bringg

## Actions

### Add a note to an order

Add a text note to one of an order's destinations.

**Inputs**

- Order (`order_id`, number, required): Bringg's ID for the order.
- Destination ID (`way_point_id`, number, required): Bringg's ID for the destination, such as the order's active_way_point_id.
- Note (`note`, text, required): The note's text.

**Outputs**

- `data` (object): The response from Bringg.

**Example output**

```json
{
  "data": {
    "success": true,
    "task": {
      "author_name": "example",
      "created_at": "example",
      "id": 1,
      "note": "example",
      "task_id": 1,
      "type": "example",
      "user_id": 1,
      "way_point_id": 1
    }
  }
}
```

### Cancel an order

Cancel an open order.

**Inputs**

- Order (`order_id`, number): Bringg's ID for the order to cancel. Give this or the external ID.
- External ID (`external_id`, text): Your own system's ID for the order to cancel, when it has one.
- Reason ID (`reason_id`, number): Bringg's ID for one of your cancellation reasons.
- Reason (`reason`, text): The reason, in words, when the reason is Other.

**Outputs**

- `data` (object): The response from Bringg.

**Example output**

```json
{
  "data": {
    "success": true,
    "task": {
      "active_way_point_id": 1,
      "cancelled_at": "example",
      "created_at": "example",
      "customer_id": 1,
      "delivery_price": 1,
      "ended_time": "example",
      "external_id": "example",
      "extras": {},
      "id": 1,
      "late": true,
      "priority": 1,
      "ready_to_execute": true,
      "scheduled_at": "example",
      "started_time": "example",
      "status": 1,
      "tag_id": 1,
      "team_ids": [
        1
      ],
      "title": "example",
      "total_price": 1,
      "user_id": 1,
      "uuid": "example",
      "way_points": [
        {
          "address": "example",
          "address_second_line": "example",
          "checkin_time": "example",
          "checkout_time": "example",
          "city": "example",
          "done": true,
          "id": 1,
          "lat": 1,
          "late": true,
          "lng": 1,
          "no_earlier_than": "example",
          "no_later_than": "example",
          "position": 1,
          "scheduled_at": "example",
          "zipcode": "example"
        }
      ]
    }
  }
}
```

### Check in at a destination

Record that the driver arrived at the order's current destination.

**Inputs**

- Order (`order_id`, number): Bringg's ID for the order. Give this or the external ID.
- External ID (`external_id`, text): Your own system's ID for the order, when it has one.
- Arrived at (`time_at`, date and time): When the driver arrived. Left empty, now.
- Lat (`lat`, number): Where it happened: the latitude.
- Lng (`lng`, number): Where it happened: the longitude.

**Outputs**

- `data` (object): The response from Bringg.

**Example output**

```json
{
  "data": {
    "success": true,
    "task": {
      "active_way_point_id": 1,
      "cancelled_at": "example",
      "created_at": "example",
      "customer_id": 1,
      "delivery_price": 1,
      "ended_time": "example",
      "external_id": "example",
      "extras": {},
      "id": 1,
      "late": true,
      "priority": 1,
      "ready_to_execute": true,
      "scheduled_at": "example",
      "started_time": "example",
      "status": 1,
      "tag_id": 1,
      "team_ids": [
        1
      ],
      "title": "example",
      "total_price": 1,
      "user_id": 1,
      "uuid": "example",
      "way_points": [
        {
          "address": "example",
          "address_second_line": "example",
          "checkin_time": "example",
          "checkout_time": "example",
          "city": "example",
          "done": true,
          "id": 1,
          "lat": 1,
          "late": true,
          "lng": 1,
          "no_earlier_than": "example",
          "no_later_than": "example",
          "position": 1,
          "scheduled_at": "example",
          "zipcode": "example"
        }
      ]
    }
  }
}
```

### Check out of a destination

Record that the driver left the order's current destination. Leaving the last one completes the order.

**Inputs**

- Order (`order_id`, number): Bringg's ID for the order. Give this or the external ID.
- External ID (`external_id`, text): Your own system's ID for the order, when it has one.
- Left at (`time_at`, date and time): When the driver left. Left empty, now.
- Lat (`lat`, number): Where it happened: the latitude.
- Lng (`lng`, number): Where it happened: the longitude.

**Outputs**

- `data` (object): The response from Bringg.

**Example output**

```json
{
  "data": {
    "success": true,
    "task": {
      "active_way_point_id": 1,
      "cancelled_at": "example",
      "created_at": "example",
      "customer_id": 1,
      "delivery_price": 1,
      "ended_time": "example",
      "external_id": "example",
      "extras": {},
      "id": 1,
      "late": true,
      "priority": 1,
      "ready_to_execute": true,
      "scheduled_at": "example",
      "started_time": "example",
      "status": 1,
      "tag_id": 1,
      "team_ids": [
        1
      ],
      "title": "example",
      "total_price": 1,
      "user_id": 1,
      "uuid": "example",
      "way_points": [
        {
          "address": "example",
          "address_second_line": "example",
          "checkin_time": "example",
          "checkout_time": "example",
          "city": "example",
          "done": true,
          "id": 1,
          "lat": 1,
          "late": true,
          "lng": 1,
          "no_earlier_than": "example",
          "no_later_than": "example",
          "position": 1,
          "scheduled_at": "example",
          "zipcode": "example"
        }
      ]
    }
  }
}
```

### Complete an order

Mark an order as done.

**Inputs**

- Order (`order_id`, number): Bringg's ID for the order to complete. Give this or the external ID.
- External ID (`external_id`, text): Your own system's ID for the order to complete, when it has one.

**Outputs**

- `data` (object): The response from Bringg.

**Example output**

```json
{
  "data": {
    "success": true,
    "task": {
      "active_way_point_id": 1,
      "cancelled_at": "example",
      "created_at": "example",
      "customer_id": 1,
      "delivery_price": 1,
      "ended_time": "example",
      "external_id": "example",
      "extras": {},
      "id": 1,
      "late": true,
      "priority": 1,
      "ready_to_execute": true,
      "scheduled_at": "example",
      "started_time": "example",
      "status": 1,
      "tag_id": 1,
      "team_ids": [
        1
      ],
      "title": "example",
      "total_price": 1,
      "user_id": 1,
      "uuid": "example",
      "way_points": [
        {
          "address": "example",
          "address_second_line": "example",
          "checkin_time": "example",
          "checkout_time": "example",
          "city": "example",
          "done": true,
          "id": 1,
          "lat": 1,
          "late": true,
          "lng": 1,
          "no_earlier_than": "example",
          "no_later_than": "example",
          "position": 1,
          "scheduled_at": "example",
          "zipcode": "example"
        }
      ]
    }
  }
}
```

### Create a customer

Create a customer that orders can be delivered to.

**Inputs**

- External ID (`external_id`, text): Your own system's ID for the customer.
- Name (`name`, text): The customer's name.
- Email (`email`, text): The customer's email address.
- Phone (`phone`, text): The customer's phone number.
- Address (`address`, text): The customer's street address.
- Address line 2 (`address_second_line`, text): The apartment or suite.
- City (`city`, text): The city.
- State (`state`, text): The state.
- ZIP code (`zipcode`, text): The ZIP code.
- Send texts (`allow_sending_sms`, true/false): Whether Bringg may text the customer updates.
- Send emails (`allow_sending_email`, true/false): Whether Bringg may email the customer updates.

**Outputs**

- `data` (object): The response from Bringg.

**Example output**

```json
{
  "data": {
    "customer": {
      "address": "example",
      "address_second_line": "example",
      "allow_sending_email": true,
      "allow_sending_sms": true,
      "city": "example",
      "email": "example",
      "external_id": "example",
      "id": 1,
      "lat": 1,
      "lng": 1,
      "name": "example",
      "phone": "example",
      "state": "example",
      "team_ids": [
        1
      ],
      "zipcode": "example"
    },
    "success": true
  }
}
```

### Create a team

Create a team, such as a store or a depot.

**Inputs**

- Name (`name`, text, required): The team's name.
- External ID (`external_id`, text): Your own system's ID for the team.
- Description (`description`, text): A description of the team.
- Address (`address`, text): The team's address.
- Address line 2 (`address_second_line`, text): The second line of the address.
- City (`city`, text): The city.
- State (`state`, text): The state.
- ZIP code (`zipcode`, text): The ZIP code.
- Country code (`country_code`, text): The two-letter country code, such as US.
- Time zone (`time_zone`, text): The team's time zone, such as America/New_York.
- Phone (`contact_phone`, text): The team's phone number.

**Outputs**

- `data` (object): The response from Bringg.

**Example output**

```json
{
  "data": {
    "success": true,
    "team": {
      "address": "example",
      "address_second_line": "example",
      "contact_phone": "example",
      "country_code": "example",
      "description": "example",
      "external_id": "example",
      "id": 1,
      "lat": 1,
      "lng": 1,
      "name": "example",
      "parent_team_id": 1,
      "service_cities": [
        "example"
      ],
      "service_zipcodes": [
        "example"
      ],
      "time_zone": "example",
      "zipcode": "example"
    }
  }
}
```

### Create a user

Create a driver or dispatcher.

**Inputs**

- External ID (`external_id`, text): Your own system's ID for the user.
- Name (`name`, text): The user's full name.
- Email (`email`, text): The user's email address.
- Phone (`phone`, text): The user's phone number.
- Driver (`driver`, true/false): Whether the user is a driver.
- Dispatcher (`dispatcher`, true/false): Whether the user is a dispatcher.
- Teams (`team_ids`, list): The teams the user belongs to.
- Skills (`skills`, list): The user's skills, such as fridge installation.
- Language (`language`, text): The language of the user's app, as a two-letter code such as en.

**Outputs**

- `data` (object): The response from Bringg.

**Example output**

```json
{
  "data": {
    "success": true,
    "user": {
      "active_shift_id": 1,
      "admin": true,
      "created_at": "example",
      "dispatcher": true,
      "driver": true,
      "email": "example",
      "external_id": "example",
      "id": 1,
      "job_description": "example",
      "lat": 1,
      "lng": 1,
      "name": "example",
      "phone": "example",
      "status": "example",
      "team_ids": [
        1
      ]
    }
  }
}
```

### Create an order

Create an order (a task in Bringg) with one destination.

**Inputs**

- External ID (`external_id`, text): Your own system's ID for the order.
- Order type (`order_type`, text): What the driver does at the destination. One of: `dropoff`, `pickup`, `return`, `pickup_and_dropoff` (Pickup and dropoff).
- Title (`title`, text): The order's title.
- Driver ID (`driver_id`, number): Bringg's ID for the driver to assign.
- Priority (`priority`, number): The order's place in its route: 1 is the first stop. At least 1.
- Ready to dispatch (`ready_to_execute`, true/false): On to send the order to drivers now; off to keep it in planning.
- Total price (`total_price`, number): The order's total price. At least 0.
- Delivery fee (`delivery_price`, number): The delivery fee the customer pays. At least 0.
- Tag ID (`tag_id`, number): Bringg's ID for the tag that sets the order's branding and flow.
- Team external ID (`team_external_id`, text): Your own system's ID for the team to give the order to. Left empty, Bringg assigns it.
- Customer ID (`customer_id`, number): Bringg's ID for an existing customer, such as one Create a customer returned.
- New customer's name (`customer_name`, text): The name of a new customer to create with the order.
- New customer's phone (`customer_phone`, text): The new customer's phone number.
- New customer's email (`customer_email`, text): The new customer's email address.
- Address (`address`, text): The destination's street address.
- Address line 2 (`address_second_line`, text): The apartment, suite or floor.
- City (`city`, text): The city.
- State (`state`, text): The state.
- ZIP code (`zipcode`, text): The ZIP or postal code.
- Country code (`country_code`, text): The two-letter country code, such as US.
- Latitude (`lat`, number): The destination's latitude. From -90 to 90.
- Longitude (`lng`, number): The destination's longitude. From -180 to 180.
- Scheduled for (`scheduled_at`, date and time): When the order is due at the destination.
- Window starts (`no_earlier_than`, date and time): The start of the delivery window.
- Window ends (`no_later_than`, date and time): The end of the delivery window.

**Outputs**

- `data` (object): The response from Bringg.

**Example output**

```json
{
  "data": {
    "success": true,
    "task": {
      "active_way_point_id": 1,
      "cancelled_at": "example",
      "created_at": "example",
      "customer_id": 1,
      "delivery_price": 1,
      "ended_time": "example",
      "external_id": "example",
      "extras": {},
      "id": 1,
      "late": true,
      "priority": 1,
      "ready_to_execute": true,
      "scheduled_at": "example",
      "started_time": "example",
      "status": 1,
      "tag_id": 1,
      "team_ids": [
        1
      ],
      "title": "example",
      "total_price": 1,
      "user_id": 1,
      "uuid": "example",
      "way_points": [
        {
          "address": "example",
          "address_second_line": "example",
          "checkin_time": "example",
          "checkout_time": "example",
          "city": "example",
          "done": true,
          "id": 1,
          "lat": 1,
          "late": true,
          "lng": 1,
          "no_earlier_than": "example",
          "no_later_than": "example",
          "position": 1,
          "scheduled_at": "example",
          "zipcode": "example"
        }
      ]
    }
  }
}
```

### Delete a team

Delete a team.

**Inputs**

- Team (`bringg_team_id`, number, required): The team to delete.

**Outputs**

- `data` (object): The response from Bringg.

**Example output**

```json
{
  "data": {
    "message": "example",
    "success": true
  }
}
```

### Delete a user

Delete a driver, dispatcher or admin.

**Inputs**

- User ID (`bringg_user_id`, number, required): Bringg's ID for the user. Give this or the external ID.

**Outputs**

- `data` (object): The response from Bringg.

**Example output**

```json
{
  "data": {
    "rc": 1,
    "success": true
  }
}
```

### End a driver's shift

End a driver's shift.

**Inputs**

- Driver ID (`driver_id`, number): Bringg's ID for the driver. Give this or the external ID.
- Driver external ID (`driver_external_id`, text): Your own system's ID for the driver.

**Outputs**

- `data` (object): The response from Bringg.

**Example output**

```json
{
  "data": {
    "shift": {
      "active_team_id": 1,
      "end_shift": "example",
      "id": 1,
      "start_shift": "example"
    },
    "success": true
  }
}
```

### Get a team

Get a team's details.

**Inputs**

- Team (`bringg_team_id`, number, required): The team.

**Outputs**

- `data` (object): The response from Bringg.

**Example output**

```json
{
  "data": {
    "success": true,
    "team": {
      "address": "example",
      "address_second_line": "example",
      "contact_phone": "example",
      "country_code": "example",
      "description": "example",
      "external_id": "example",
      "id": 1,
      "lat": 1,
      "lng": 1,
      "name": "example",
      "parent_team_id": 1,
      "service_cities": [
        "example"
      ],
      "service_zipcodes": [
        "example"
      ],
      "time_zone": "example",
      "zipcode": "example"
    }
  }
}
```

### Get a user

Get a driver, dispatcher or admin by Bringg's ID or your own.

**Inputs**

- User ID (`bringg_user_id`, number): Bringg's ID for the user. Give this or the external ID.
- External ID (`external_id`, text): Your own system's ID for the user.

**Outputs**

- `data` (object): The response from Bringg.

**Example output**

```json
{
  "data": {
    "active_shift_id": 1,
    "admin": true,
    "created_at": "example",
    "dispatcher": true,
    "driver": true,
    "email": "example",
    "external_id": "example",
    "id": 1,
    "job_description": "example",
    "lat": 1,
    "lng": 1,
    "name": "example",
    "phone": "example",
    "status": "example",
    "team_ids": [
      1
    ]
  }
}
```

### Get a vehicle

Get a vehicle or trailer by Bringg's ID or your own.

**Inputs**

- Vehicle ID (`vehicle_id`, number): Bringg's ID for the vehicle. Give this or the external ID.
- External ID (`external_id`, text): Your own system's ID for the vehicle.

**Outputs**

- `data` (object): The response from Bringg.

**Example output**

```json
{
  "data": {
    "success": true,
    "vehicle": {
      "available": true,
      "color": "example",
      "external_id": "example",
      "id": 1,
      "is_trailer": true,
      "license_plate": "example",
      "model": "example",
      "name": "example",
      "skills": [
        "example"
      ],
      "team_id": 1,
      "user_id": 1,
      "vehicle_type_id": 1
    }
  }
}
```

### Get an order

Get an order with its destinations and status, by Bringg's ID or your own.

**Inputs**

- Order (`order_id`, number): Bringg's ID for the order. Give this or the external ID.
- External ID (`external_id`, text): Your own system's ID for the order, when it has one.

**Outputs**

- `data` (object): The response from Bringg.

**Example output**

```json
{
  "data": {
    "success": true,
    "task": {
      "active_way_point_id": 1,
      "cancelled_at": "example",
      "created_at": "example",
      "customer_id": 1,
      "delivery_price": 1,
      "ended_time": "example",
      "external_id": "example",
      "extras": {},
      "id": 1,
      "late": true,
      "priority": 1,
      "ready_to_execute": true,
      "scheduled_at": "example",
      "started_time": "example",
      "status": 1,
      "tag_id": 1,
      "team_ids": [
        1
      ],
      "title": "example",
      "total_price": 1,
      "user_id": 1,
      "uuid": "example",
      "way_points": [
        {
          "address": "example",
          "address_second_line": "example",
          "checkin_time": "example",
          "checkout_time": "example",
          "city": "example",
          "done": true,
          "id": 1,
          "lat": 1,
          "late": true,
          "lng": 1,
          "no_earlier_than": "example",
          "no_later_than": "example",
          "position": 1,
          "scheduled_at": "example",
          "zipcode": "example"
        }
      ]
    }
  }
}
```

### Get driver availability

List the drivers available now in the chosen teams, with where they are.

**Inputs**

- Teams (`team_ids`, list, required): The teams to look in.

**Outputs**

- `data` (object): The response from Bringg.

**Example output**

```json
{
  "data": {
    "drivers": [
      {
        "id": 1,
        "lat": 1,
        "lng": 1,
        "name": "example",
        "team_ids": [
          1
        ]
      }
    ],
    "success": true
  }
}
```

### List open orders

List the orders that aren't done or cancelled yet.

**Inputs**: None.

**Outputs**

- `data` (list): The response from Bringg.

**Example output**

```json
{
  "data": [
    {
      "active_way_point_id": 1,
      "cancelled_at": "example",
      "created_at": "example",
      "customer_id": 1,
      "delivery_price": 1,
      "ended_time": "example",
      "external_id": "example",
      "extras": {},
      "id": 1,
      "late": true,
      "priority": 1,
      "ready_to_execute": true,
      "scheduled_at": "example",
      "started_time": "example",
      "status": 1,
      "tag_id": 1,
      "team_ids": [
        1
      ],
      "title": "example",
      "total_price": 1,
      "user_id": 1,
      "uuid": "example",
      "way_points": [
        {
          "address": "example",
          "address_second_line": "example",
          "checkin_time": "example",
          "checkout_time": "example",
          "city": "example",
          "done": true,
          "id": 1,
          "lat": 1,
          "late": true,
          "lng": 1,
          "no_earlier_than": "example",
          "no_later_than": "example",
          "position": 1,
          "scheduled_at": "example",
          "zipcode": "example"
        }
      ]
    }
  ]
}
```

### List teams

List all of the account's teams.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Bringg.

**Example output**

```json
{
  "data": {
    "success": true,
    "teams": [
      {
        "address": "example",
        "address_second_line": "example",
        "contact_phone": "example",
        "country_code": "example",
        "description": "example",
        "external_id": "example",
        "id": 1,
        "lat": 1,
        "lng": 1,
        "name": "example",
        "parent_team_id": 1,
        "service_cities": [
          "example"
        ],
        "service_zipcodes": [
          "example"
        ],
        "time_zone": "example",
        "zipcode": "example"
      }
    ]
  }
}
```

### List vehicles

List the account's vehicles and trailers, a page at a time.

**Inputs**

- Page size (`limit`, number): How many to return on the page. From 1 to 100.
- Page cursor (`cursor`, number): Where the page starts: the next_page_cursor from an earlier page.

**Outputs**

- `data` (object): The response from Bringg.

**Example output**

```json
{
  "data": {
    "next_page_cursor": 1,
    "success": true,
    "vehicles": [
      {
        "available": true,
        "color": "example",
        "external_id": "example",
        "id": 1,
        "is_trailer": true,
        "license_plate": "example",
        "model": "example",
        "name": "example",
        "skills": [
          "example"
        ],
        "team_id": 1,
        "user_id": 1,
        "vehicle_type_id": 1
      }
    ]
  }
}
```

### Start a driver's shift

Start a driver's shift.

**Inputs**

- Driver ID (`driver_id`, number): Bringg's ID for the driver. Give this or the external ID.
- Driver external ID (`driver_external_id`, text): Your own system's ID for the driver.

**Outputs**

- `data` (object): The response from Bringg.

**Example output**

```json
{
  "data": {
    "shift": {
      "active_team_id": 1,
      "end_shift": "example",
      "id": 1,
      "start_shift": "example"
    },
    "success": true
  }
}
```

### Start an order

Mark an assigned order as started, as when its driver sets off.

**Inputs**

- Order (`order_id`, number): Bringg's ID for the order to start. Give this or the external ID.
- External ID (`external_id`, text): Your own system's ID for the order to start, when it has one.

**Outputs**

- `data` (object): The response from Bringg.

**Example output**

```json
{
  "data": {
    "success": true,
    "task": {
      "active_way_point_id": 1,
      "cancelled_at": "example",
      "created_at": "example",
      "customer_id": 1,
      "delivery_price": 1,
      "ended_time": "example",
      "external_id": "example",
      "extras": {},
      "id": 1,
      "late": true,
      "priority": 1,
      "ready_to_execute": true,
      "scheduled_at": "example",
      "started_time": "example",
      "status": 1,
      "tag_id": 1,
      "team_ids": [
        1
      ],
      "title": "example",
      "total_price": 1,
      "user_id": 1,
      "uuid": "example",
      "way_points": [
        {
          "address": "example",
          "address_second_line": "example",
          "checkin_time": "example",
          "checkout_time": "example",
          "city": "example",
          "done": true,
          "id": 1,
          "lat": 1,
          "late": true,
          "lng": 1,
          "no_earlier_than": "example",
          "no_later_than": "example",
          "position": 1,
          "scheduled_at": "example",
          "zipcode": "example"
        }
      ]
    }
  }
}
```

### Update a customer

Change a customer's details. Fields left empty stay as they are.

**Inputs**

- Customer ID (`customer_id`, number): Bringg's ID for the customer. Give this or the external ID.
- External ID (`external_id`, text): Your own system's ID for the customer.
- Name (`name`, text): The customer's name.
- Email (`email`, text): The customer's email address.
- Phone (`phone`, text): The customer's phone number.
- Address (`address`, text): The customer's street address.
- Address line 2 (`address_second_line`, text): The apartment or suite.
- City (`city`, text): The city.
- State (`state`, text): The state.
- ZIP code (`zipcode`, text): The ZIP code.
- Send texts (`allow_sending_sms`, true/false): Whether Bringg may text the customer updates.
- Send emails (`allow_sending_email`, true/false): Whether Bringg may email the customer updates.

**Outputs**

- `data` (object): The response from Bringg.

**Example output**

```json
{
  "data": {
    "customer": {
      "address": "example",
      "address_second_line": "example",
      "allow_sending_email": true,
      "allow_sending_sms": true,
      "city": "example",
      "email": "example",
      "external_id": "example",
      "id": 1,
      "lat": 1,
      "lng": 1,
      "name": "example",
      "phone": "example",
      "state": "example",
      "team_ids": [
        1
      ],
      "zipcode": "example"
    },
    "success": true
  }
}
```

### Update a team

Change a team's details. Fields left empty stay as they are.

**Inputs**

- Team (`bringg_team_id`, number): The team. Give this or the external ID.
- External ID (`external_id`, text): Your own system's ID for the team.
- Name (`name`, text): The team's new name.
- Description (`description`, text): A description of the team.
- Address (`address`, text): The team's address.
- Address line 2 (`address_second_line`, text): The second line of the address.
- City (`city`, text): The city.
- State (`state`, text): The state.
- ZIP code (`zipcode`, text): The ZIP code.
- Country code (`country_code`, text): The two-letter country code, such as US.
- Time zone (`time_zone`, text): The team's time zone, such as America/New_York.
- Phone (`contact_phone`, text): The team's phone number.

**Outputs**

- `data` (object): The response from Bringg.

**Example output**

```json
{
  "data": {
    "success": true,
    "team": {
      "address": "example",
      "address_second_line": "example",
      "contact_phone": "example",
      "country_code": "example",
      "description": "example",
      "external_id": "example",
      "id": 1,
      "lat": 1,
      "lng": 1,
      "name": "example",
      "parent_team_id": 1,
      "service_cities": [
        "example"
      ],
      "service_zipcodes": [
        "example"
      ],
      "time_zone": "example",
      "zipcode": "example"
    }
  }
}
```

### Update a user

Change a driver's or dispatcher's details. Fields left empty stay as they are.

**Inputs**

- User ID (`bringg_user_id`, number, required): Bringg's ID for the user. Give this or the external ID.
- Job title (`job_description`, text): The user's job title.
- Name (`name`, text): The user's full name.
- Email (`email`, text): The user's email address.
- Phone (`phone`, text): The user's phone number.
- Driver (`driver`, true/false): Whether the user is a driver.
- Dispatcher (`dispatcher`, true/false): Whether the user is a dispatcher.
- Teams (`team_ids`, list): The teams the user belongs to.
- Skills (`skills`, list): The user's skills, such as fridge installation.
- Language (`language`, text): The language of the user's app, as a two-letter code such as en.

**Outputs**

- `data` (object): The response from Bringg.

**Example output**

```json
{
  "data": {
    "success": true,
    "user": {
      "active_shift_id": 1,
      "admin": true,
      "created_at": "example",
      "dispatcher": true,
      "driver": true,
      "email": "example",
      "external_id": "example",
      "id": 1,
      "job_description": "example",
      "lat": 1,
      "lng": 1,
      "name": "example",
      "phone": "example",
      "status": "example",
      "team_ids": [
        1
      ]
    }
  }
}
```

### Update an order

Change an order's details or one of its destinations. Fields left empty stay as they are.

**Inputs**

- Order (`order_id`, number): Bringg's ID for the order. Give this or the external ID.
- External ID (`external_id`, text): Your own system's ID for the order, when it has one.
- Title (`title`, text): The order's title.
- Driver ID (`driver_id`, number): Bringg's ID for the driver to assign.
- Priority (`priority`, number): The order's place in its route: 1 is the first stop. At least 1.
- Ready to dispatch (`ready_to_execute`, true/false): On to send the order to drivers now; off to keep it in planning.
- Total price (`total_price`, number): The order's total price. At least 0.
- Delivery fee (`delivery_price`, number): The delivery fee the customer pays. At least 0.
- Tag ID (`tag_id`, number): Bringg's ID for the tag that sets the order's branding and flow.
- Address (`address`, text): The destination's street address.
- Address line 2 (`address_second_line`, text): The apartment, suite or floor.
- City (`city`, text): The city.
- State (`state`, text): The state.
- ZIP code (`zipcode`, text): The ZIP or postal code.
- Country code (`country_code`, text): The two-letter country code, such as US.
- Latitude (`lat`, number): The destination's latitude. From -90 to 90.
- Longitude (`lng`, number): The destination's longitude. From -180 to 180.
- Scheduled for (`scheduled_at`, date and time): When the order is due at the destination.
- Window starts (`no_earlier_than`, date and time): The start of the delivery window.
- Window ends (`no_later_than`, date and time): The end of the delivery window.
- Destination (`way_point_position`, number): Which destination to change: 1 for the first, 2 for the second. Needed when changing a destination. From 1 to 2.

**Outputs**

- `data` (object): The response from Bringg.

**Example output**

```json
{
  "data": {
    "success": true,
    "task": {
      "active_way_point_id": 1,
      "cancelled_at": "example",
      "created_at": "example",
      "customer_id": 1,
      "delivery_price": 1,
      "ended_time": "example",
      "external_id": "example",
      "extras": {},
      "id": 1,
      "late": true,
      "priority": 1,
      "ready_to_execute": true,
      "scheduled_at": "example",
      "started_time": "example",
      "status": 1,
      "tag_id": 1,
      "team_ids": [
        1
      ],
      "title": "example",
      "total_price": 1,
      "user_id": 1,
      "uuid": "example",
      "way_points": [
        {
          "address": "example",
          "address_second_line": "example",
          "checkin_time": "example",
          "checkout_time": "example",
          "city": "example",
          "done": true,
          "id": 1,
          "lat": 1,
          "late": true,
          "lng": 1,
          "no_earlier_than": "example",
          "no_later_than": "example",
          "position": 1,
          "scheduled_at": "example",
          "zipcode": "example"
        }
      ]
    }
  }
}
```
