> For the complete documentation index, see [llms.txt](https://www.boxhero.io/docs/llms.txt). Every page is available as Markdown by appending `.md` to its URL; this page is [Markdown](https://www.boxhero.io/docs/vi/developers/api/reference/locations.md).

# Locations

> Locations where inventory is stored.

A location must exist before it can be referenced by a transaction.

## Đối tượng Location

An inventory storage location. Locations are referenced by every transaction; create one before recording stock movements.

- `id` (integer, minimum 0, maximum 2147483647, bắt buộc): Location id.
- `name` (string, bắt buộc): Location display name. Unique within the team.
- `quantity` (number, bắt buộc): Total on-hand quantity at this location, summed across every item in the team.
- `memo` (string, bắt buộc): Free-text memo for this location. Empty string when not set.

Ví dụ

```json
{
  "id": 47041,
  "name": "Warehouse",
  "quantity": 9923,
  "memo": ""
}
```

## Endpoint

- [List locations](https://www.boxhero.io/docs/vi/developers/api/reference/locations/list-locations) `GET /v1/locations`
- [Create a location](https://www.boxhero.io/docs/vi/developers/api/reference/locations/create-location) `POST /v1/locations`
- [Get a location](https://www.boxhero.io/docs/vi/developers/api/reference/locations/get-location) `GET /v1/locations/{location_id}`
- [Update a location](https://www.boxhero.io/docs/vi/developers/api/reference/locations/update-location) `PUT /v1/locations/{location_id}`
- [Delete a location](https://www.boxhero.io/docs/vi/developers/api/reference/locations/delete-location) `DELETE /v1/locations/{location_id}`
