Currencies API
The Currencies API allows you to retrieve information about all supported currencies in the system. This is useful for building currency selection dropdowns, validating currency codes, and understanding which currencies are available for transactions.
List All Currencies
Retrieve a list of all supported currencies, including their status (active/inactive) and metadata.
Endpoint
GET /api/v1/currencies
Authentication
This endpoint requires JWT authentication. Include your access token in the Authorization header:
Authorization: Bearer <your-access-token>Success Response (200 OK)
Returns an array of currency objects:
[
{
"code": "USD",
"name": "US Dollar",
"active": true,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
},
{
"code": "NGN",
"name": "Nigerian Naira",
"active": true,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
},
{
"code": "EUR",
"name": "Euro",
"active": true,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
},
{
"code": "GBP",
"name": "British Pound",
"active": false,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:20:00Z"
}
]Response Fields
| Field | Type | Description |
|---|---|---|
code | string | Three-letter currency code (ISO 4217 standard, e.g., "USD", "EUR", "NGN") |
name | string | Full name of the currency |
active | boolean | Whether the currency is currently active and available for transactions |
created_at | string (ISO 8601) | Timestamp when the currency was added to the system |
updated_at | string (ISO 8601) | Timestamp when the currency was last updated |
Error Responses
| Status Code | Description |
|---|---|
401 | Unauthorized - Invalid or missing JWT token |
500 | Internal server error |
Example: cURL
curl -X GET /api/v1/currencies \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."Example: HTTP Request
GET /api/v1/currencies HTTP/1.1
Host: api.sznd.app
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Content-Type: application/jsonUse Cases
- Currency Selection - Populate currency dropdowns in your application
- Validation - Validate currency codes before making API requests
- Display Names - Show user-friendly currency names instead of codes
- Active Status Check - Filter out inactive currencies from user selections
- Currency Lookup - Create lookup tables for currency code to name mapping
Best Practices
- Cache Results - Currency lists don't change frequently, so cache the response
- Filter Active Only - Only show active currencies to users in selection dropdowns
- Store Currency Codes - Use ISO 4217 currency codes consistently throughout your application
- Handle Inactive Currencies - If a previously active currency becomes inactive, handle it gracefully in your UI
Supported Currency Codes
Common currency codes include:
- USD - US Dollar
- EUR - Euro
- GBP - British Pound
- NGN - Nigerian Naira
- CAD - Canadian Dollar
- KES - Kenyan Shilling
- GHS - Ghanaian Cedi
- ZAR - South African Rand
Note: The full list of supported currencies may vary. Always use the API to get the current list of available currencies.
Next Steps
- Exchange Rates - Get current exchange rates between currencies
- Wallets API - View wallet balances for different currencies
- Quotes API - Create quotes for currency conversions