---
title: "Archive locations"
method: POST
path: "/locations:archive"
tags: ["locations"]
---

# Archive locations

`POST /locations:archive`

## Request

- Base URL: `https://{tenant_name}.benchling.com/api/v2`
- URL: `https://{tenant_name}.benchling.com/api/v2/locations:archive`
- Auth: HTTP bearer

Archive locations

## Request body

- LocationsArchive
  - `locationIds` string[], required: Array of location IDs
  - `reason` 'Made in error' | 'Retired' | 'Other', required: Reason that locations are being archived.
  - `shouldRemoveBarcodes` boolean: Remove barcodes. Removing barcodes from archived inventory that contain items will also remove barcodes from the contained items.

## Response `200`

OK

- LocationsArchivalChange: IDs of all items that were archived or unarchived, grouped by resource type. This includes the IDs of locations along with any IDs of locations, boxes, plates, containers that were archived.
  - `boxIds` string[]
  - `containerIds` string[]
  - `locationIds` string[]
  - `plateIds` string[]

## Other responses

- `400`: Bad Request
- `403`: Forbidden

---

[API](https://skmtc.dev/benchling/apis/benchling-api-2.md) - [All operations](https://skmtc.dev/benchling/apis/benchling-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/benchling/apis/benchling-api-2/revisions/01d2fa8523cd?raw)
