Currencies
Currencies available for multi-currency sales/purchase documents.
GET
/api/v1/currenciesList currencies
Scope:
currencies.readParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | number | Optional | 1-based page number. |
limit | query | number | Optional | Page size, max 200. |
Example request
curl "https://pre-invoice.avscorp.in/api/v1/currencies" \
-H "Authorization: Bearer YOUR_API_KEY"Example response
JSON
{
"id": "clx8cur000000000000000001",
"organizationId": "clx0org000000000000000001",
"code": "USD",
"name": "US Dollar",
"symbol": "$",
"exchangeRate": 83.245,
"isBase": false,
"isActive": true,
"createdAt": "2026-02-10T06:00:00.000Z",
"updatedAt": "2026-09-01T06:00:00.000Z"
}Possible errors: unauthorized, insufficient_scope, forbidden
POST
/api/v1/currenciesCreate a currency
Scope:
currencies.createRequest body
| Field | Type | Required | Constraints |
|---|---|---|---|
code | string | Required | min length 3; max length 3 |
name | string | Required | min length 1; max length 50 |
symbol | string | Required | min length 1; max length 10 |
exchangeRate | number | Required | — |
isBase | boolean | Optional | default false |
isActive | boolean | Optional | default true |
Example request
curl -X POST "https://pre-invoice.avscorp.in/api/v1/currencies" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"code": "USD",
"name": "US Dollar",
"symbol": "$",
"exchangeRate": 83.245
}'Example response
JSON
{
"id": "clx8cur000000000000000001",
"organizationId": "clx0org000000000000000001",
"code": "USD",
"name": "US Dollar",
"symbol": "$",
"exchangeRate": 83.245,
"isBase": false,
"isActive": true,
"createdAt": "2026-02-10T06:00:00.000Z",
"updatedAt": "2026-09-01T06:00:00.000Z"
}Possible errors: unauthorized, insufficient_scope, forbidden, validation_error
GET
/api/v1/currencies/{id}Get a currency
Scope:
currencies.readParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Required | Currency ID. |
Example request
curl "https://pre-invoice.avscorp.in/api/v1/currencies/clx8cur000000000000000001" \
-H "Authorization: Bearer YOUR_API_KEY"Example response
JSON
{
"id": "clx8cur000000000000000001",
"organizationId": "clx0org000000000000000001",
"code": "USD",
"name": "US Dollar",
"symbol": "$",
"exchangeRate": 83.245,
"isBase": false,
"isActive": true,
"createdAt": "2026-02-10T06:00:00.000Z",
"updatedAt": "2026-09-01T06:00:00.000Z"
}Possible errors: unauthorized, insufficient_scope, forbidden, not_found
PATCH
/api/v1/currencies/{id}Update a currency
Scope:
currencies.updatePATCH validates against the full currency schema (same as create) — code, name, symbol, and exchangeRate are all required in every update.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Required | Currency ID. |
Request body
| Field | Type | Required | Constraints |
|---|---|---|---|
code | string | Required | min length 3; max length 3 |
name | string | Required | min length 1; max length 50 |
symbol | string | Required | min length 1; max length 10 |
exchangeRate | number | Required | — |
isBase | boolean | Optional | default false |
isActive | boolean | Optional | default true |
Example request
curl -X PATCH "https://pre-invoice.avscorp.in/api/v1/currencies/clx8cur000000000000000001" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"code": "USD",
"name": "US Dollar",
"symbol": "$",
"exchangeRate": 84.1
}'Example response
JSON
{
"id": "clx8cur000000000000000001",
"organizationId": "clx0org000000000000000001",
"code": "USD",
"name": "US Dollar",
"symbol": "$",
"exchangeRate": 83.245,
"isBase": false,
"isActive": true,
"createdAt": "2026-02-10T06:00:00.000Z",
"updatedAt": "2026-09-01T06:00:00.000Z"
}Possible errors: unauthorized, insufficient_scope, forbidden, not_found, validation_error
DELETE
/api/v1/currencies/{id}Delete a currency
Scope:
currencies.deleteParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Required | Currency ID. |
Example request
curl -X DELETE "https://pre-invoice.avscorp.in/api/v1/currencies/clx8cur000000000000000001" \
-H "Authorization: Bearer YOUR_API_KEY"Example response
JSON
{
"deleted": true
}Possible errors: unauthorized, insufficient_scope, forbidden, not_found