---
title: "Add, remove, or replace location IDs on the allowlist, depending on the request's operation type"
method: POST
path: "/allowlist"
tags: ["Allowlist"]
---

# Add, remove, or replace location IDs on the allowlist, depending on the request's operation type

`POST /allowlist`

## Request

- Base URL: `https://terra.tripadvisor.com/api`
- URL: `https://terra.tripadvisor.com/api/allowlist`
- Auth: API key in header `X-API-Key`

Add, remove, or replace location IDs on the allowlist, depending on the request's operation type.
 <p>
 Requests that change the same allowlist at the same time may be rejected with 409; retry them.

## Request body

- UploadAllowlistRequest: Request payload for adding, removing, or replacing location IDs on a partner config's allowlist.
  - `allowlist` integer[], required: Location IDs to add, remove, or use as the full replacement allowlist, depending on <code>operationType</code>.
  - `operation_type` 'APPEND' | 'DELETE' | 'OVERWRITE', required: How the <code>allowlist</code> location IDs in an upload request should be applied to a partner config's existing allowlist.

## Response `200`

counts of location IDs added, deleted, or left unchanged as a result of the request

- UploadAllowlistResponse: Counts of how location IDs were classified while applying an allowlist update. <p>For <code>APPEND</code> requests the sum <code>added + deleted + noChange</code> equals the number of submitted IDs. <p>For <code>DELETE</code> requests an ID that was never on the allowlist has nothing to remove and is not counted, so the sum may be <em>less</em> than the number of submitted IDs. <p>For <code>OVERWRITE</code> requests the <code>deleted</code> count reflects existing allowlist IDs that were <em>absent</em> from the request (and therefore removed), not submitted IDs. The sum may therefore <em>exceed</em> the number of submitted IDs.
  - `added` integer: Number of submitted location IDs that were not already on the allowlist and have been added.
  - `deleted` integer: Number of location IDs removed from the allowlist. For <code>OVERWRITE</code> this counts existing allowlist IDs absent from the request, not submitted IDs.
  - `no_change` integer: Number of submitted location IDs that already matched the desired allowlist state and required no change.

## Other responses

- `400`: Bad Request
- `404`: Not Found
- `409`: Conflict: the resource changed while the request was being applied; retry the request
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/tripadvisor/apis/account-api.md) - [All operations](https://skmtc.dev/tripadvisor/apis/account-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tripadvisor/apis/account-api/revisions/71b828dc252e?raw)
