---
title: "Update an exchange rate"
method: PUT
path: "/settings/exchange-rates/{id}"
tags: ["Admin Settings: Exchange Rates"]
---

# Update an exchange rate

`PUT /settings/exchange-rates/{id}`

## Request

- Base URL: `http://localhost:8000/api/admin`
- URL: `http://localhost:8000/api/admin/settings/exchange-rates/{id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bagisto/apis/bagisto-admin-api/docs/settings/exchange-rates/:id/put.ts> (a function with typed inputs; its response is checked against the schema)

Updates target_currency and/or rate. Composite-uniqueness excludes self.

## Path parameters

- `id` integer, required

## Request body

- object
  - `target_currency` integer
  - `rate` number, float

## Response `200`

Exchange rate updated.

- AdminSettingsExchangeRate: Admin Settings → Exchange Rates endpoints (Block B Wave 1). REST: GET /api/admin/settings/exchange-rates GET /api/admin/settings/exchange-rates/{id} POST /api/admin/settings/exchange-rates PUT /api/admin/settings/exchange-rates/{id} DELETE /api/admin/settings/exchange-rates/{id} GraphQL: adminSettingsExchangeRates, adminSettingsExchangeRate, createAdminSettingsExchangeRate, updateAdminSettingsExchangeRate, deleteAdminSettingsExchangeRate Mirrors Webkul\Admin\Http\Controllers\Settings\ExchangeRateController. Notes: - Bagisto's `currency_exchange_rates` table has no `source_currency` column. The source currency is implicit (the channel's base currency); only the target_currency + rate pair is stored. Composite uniqueness is therefore enforced on `target_currency` alone. - The admin UI's "Mass Auto-Sync" action (calls an external exchange-rates helper to refresh every row in bulk) is intentionally NOT exposed in v1.
  - `id` integer, nullable
  - `targetCurrency` integer, nullable
  - `targetCurrencyCode` string, nullable
  - `targetCurrencyName` string, nullable
  - `rate` number, nullable
  - `createdAt` string, nullable
  - `updatedAt` string, nullable
  - `message` string, nullable

## Other responses

- `400`: Invalid input
- `404`: Exchange rate not found.
- `422`: Validation failure.

---

[API](https://skmtc.dev/bagisto/apis/bagisto-admin-api.md) - [All operations](https://skmtc.dev/bagisto/apis/bagisto-admin-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bagisto/apis/bagisto-admin-api/revisions/3198f11be70f?raw)
