---
title: "Bulk location actions"
method: POST
path: "/api/v1/locations/bulk"
tags: ["locations"]
---

# Bulk location actions

`POST /api/v1/locations/bulk`

## Request

- Base URL: `https://demo.invoiceninja.com`
- URL: `https://demo.invoiceninja.com/api/v1/locations/bulk`
- Auth: none declared. Required headers: `X-API-TOKEN`, `X-Requested-With`
- TypeScript: <https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference/docs/api/v1/locations/bulk/post.ts> (a function with typed inputs; its response is checked against the schema)

##  POST /api/v1/locations/bulk

Bulk actions allow to make changes to multiple locations in a single request. The following actions are supported:

- archive
- restore
- delete

All of these actions require an array of location ids to perform the requested action on ie.

"ids":['id1','id2']

## Query parameters

- `index` string

## Headers

- `X-API-TOKEN` string, required
- `X-Requested-With` string, required

## Request body

- GenericBulkAction
  - `action` string: The action to perform ie. archive / restore / delete
  - `ids` string[]

## Response `200`

The Location list Response of the updated locations that were bulk updated

- Location
  - `id` string: The location hashed id
  - `name` string: The location name
  - `address1` string: The first line of the address
  - `address2` string: The second line of the address
  - `city` string: The city name
  - `state` string: The state or region
  - `postal_code` string: The postal or zip code
  - `country_id` string: The ID of the associated country
  - `custom_value1` string, nullable: Custom field value 1
  - `custom_value2` string, nullable: Custom field value 2
  - `custom_value3` string, nullable: Custom field value 3
  - `custom_value4` string, nullable: Custom field value 4
  - `is_deleted` boolean: Indicates if the location has been deleted
  - `is_shipping_location` boolean: Indicates if this is a shipping location
  - `user_id` string: The user hashed id
  - `assigned_user_id` string: The assigned user hashed id
  - `client_id` string: The client hashed id
  - `vendor_id` string: The vendor hashed id
  - `created_at` integer: Timestamp of when the location was created
  - `updated_at` integer: Timestamp of when the location was last updated

## Other responses

- `401`: Authentication error
- `403`: Authorization error
- `422`: Validation error
- `429`: Rate Limit Exceeded
- `default`: Unexpected Error

## Changes

- **2026-04-20** `69a36036d334`: 1 info
  - the response optional property `id` became read-only for the status `200`
- **2025-05-24** `93bb427f804b`: 2 warning, 20 info
  - removed the optional property `data` from the response with the `200` status
  - removed the optional property `meta` from the response with the `200` status
  - added the optional property `address1` to the response with the `200` status
  - added the optional property `address2` to the response with the `200` status
  - …18 more
- **2025-05-23** `783f03909c3a`: 20 warning, 2 info
  - removed the optional property `address1` from the response with the `200` status
  - removed the optional property `address2` from the response with the `200` status
  - removed the optional property `assigned_user_id` from the response with the `200` status
  - removed the optional property `city` from the response with the `200` status
  - …18 more
- **2025-02-27** `50bf3f8e5d03`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference/changes/api/v1/locations/bulk/post.md)

---

[API](https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference.md) - [All operations](https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference/revisions/bcda1f823746?raw)
