## Delete currency localizations

`DELETE /v1/currencies/:id/localizations`

Deletes the currency display settings for the specified languages. If needed, create them again with the localizations write method.

Scope: `crm`.

## Parameters

| Parameter | Type | Required | Default | Description |
|----------|-----|:-----:|-----------|----------|
| `id` (path) | string | yes | — | Currency code from the [currency list](/docs/entities/currencies/list). Leading and trailing spaces are stripped, letters are uppercased |
| `langs` (query) | string | yes | — | Language codes from the [currency localizations](/docs/entities/currencies/localizations/get), comma-separated. Pass the parameter exactly once, for example `langs=en,ru` |

No request body is passed. Other query parameters are not accepted.

## Examples

### curl — personal key

```bash
curl -X DELETE "https://vibecode.bitrix24.com/v1/currencies/QVC/localizations?langs=en,ru" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl -X DELETE "https://vibecode.bitrix24.com/v1/currencies/QVC/localizations?langs=en,ru" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"
```

### JavaScript — personal key

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/currencies/QVC/localizations?langs=en,ru', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})
const { success, data } = await res.json()
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/currencies/QVC/localizations?langs=en,ru', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})
const { success, data } = await res.json()
```

## Response fields

| Field | Type | Description |
|------|-----|----------|
| `success` | boolean | Always `true` on success |
| `data` | boolean | Always `true`. The result is confirmed by a second read of the localizations |

## Response example

HTTP `200 OK`:

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

## Error response example

422 — all the specified languages are already absent:

```json
{
  "success": false,
  "error": {
    "code": "BITRIX_ERROR",
    "message": "Bitrix24 did not apply the requested currency localizations"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|----------|
| 400 | `MISSING_REQUIRED_FIELDS` | `langs` is missing, empty, repeated, or contains an empty language code. It is also returned if any other query parameter or a request body is passed |
| 400 | `INVALID_ID` | The currency code is empty after spaces are stripped |
| 404 | `ENTITY_NOT_FOUND` | A currency with the specified code is not found |
| 422 | `BITRIX_ERROR` | All the specified languages are already absent, Bitrix24 rejected the deletion, reported a failure, or the second read still found some of the languages |
| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key works in `READONLY` mode |
| 403 | `BITRIX_ACCESS_DENIED` | The user has no rights to perform the operation in Bitrix24 |
| 403 | `SCOPE_DENIED` | The API key does not have the `crm` scope |
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |
| 401 | `TOKEN_MISSING` | The API key has no configured Bitrix24 tokens |
| 502 | `BITRIX_RESPONSE_INVALID` | A response of an unexpected structure was received |
| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 is unavailable |

Full list of common API errors — [Errors](/docs/errors).

## Known specifics

The deletion is not transactional: on an error some of the languages may already be deleted. Before retrying, call [Get currency localizations](/docs/entities/currencies/localizations/get) and pass only the remaining languages.

## See also

- [Get currency localizations](/docs/entities/currencies/localizations/get)
- [Set currency localizations](/docs/entities/currencies/localizations/set)
- [Currency localization fields](/docs/entities/currencies/localizations/fields)
