Retrieve Zahara’s currency reference list using a tenancy API key. Use CurrencyId values when other documented methods require a currency reference; do not substitute a display symbol or infer IDs from their order in the list.
Request
GET https://api.myzahara.net/api/{tenancyApiKey}/Currencies
Send Accept: application/json. No request body appears in the supplied API definition.
This request uses a tenancy key, unlike the business-unit budget and cost-code methods in this batch. No request body or additional parameters appear in the supplied definition.
Authentication and scope
| Parameter | Location | Meaning |
|---|---|---|
| tenancyApiKey | URL path | Tenancy API key; never a numeric ID. |
Keep credentials in an environment variable or secret store. The API key appears in the request path, so redact URLs in logs, proxy traces and error reporting. Do not give real keys to a coding agent in a prompt or documentation URL. Use the correct key scope; do not assume a tenancy key works in a business-unit method.
Working examples
All three clients were executed successfully against the production API on 25 November 2026. Their JSON root shape and, where applicable, item counts matched the direct request.
| Environment variable | Purpose |
|---|---|
| ZAHARA_TENANCY_API_KEY | Required API key; store privately. |
cURL
Requires cURL 7.76.0+ for --fail-with-body. It prints the complete response, including error JSON on an HTTP failure. Use a secure development terminal.
# cURL 7.76.0+. Set the environment variables documented below.
# Treat response data as confidential. Keep keys out of logs.
curl --fail-with-body --silent --show-error --max-time 30 \
--request GET \
--header 'Accept: application/json' \
"https://api.myzahara.net/api/${ZAHARA_TENANCY_API_KEY:?Set ZAHARA_TENANCY_API_KEY}/Currencies"
JavaScript (Node.js 22+)
Uses built-in fetch and a 30-second timeout; no extra packages are needed. Check the HTTP status and inspect the parsed result before accessing fields.
// Node.js 22+. Standard library only.
function required(name) {
const value = process.env[name];
if (!value) throw new Error('Set ' + name);
return value;
}
const key = required('ZAHARA_TENANCY_API_KEY');
const base = 'https://api.myzahara.net';
let path = "Currencies";
const url = new URL(base + '/api/' + encodeURIComponent(key) + '/' + path);
let response;
try {
response = await fetch(url, {
method: 'GET', headers: { Accept: 'application/json' },
signal: AbortSignal.timeout(30000), redirect: 'error'
});
} catch { throw new Error('Zahara request failed or timed out; URL omitted to protect the key'); }
if (!response.ok) throw new Error('Zahara returned HTTP ' + response.status);
const text = await response.text();
// Some methods may return an empty successful body. Do not assume a JSON shape.
const result = text.trim() ? JSON.parse(text) : null;
// Use a secure console; response fields may include financial or business data.
console.log(JSON.stringify(result, null, 2));
Python 3 (standard library)
Rejects redirects and reports HTTP errors without including the credential-bearing URL.
# Python 3. Standard library only.
import json
import os
from urllib.parse import quote, urlencode
from urllib.request import Request, build_opener, HTTPRedirectHandler
from urllib.error import HTTPError, URLError
class NoRedirect(HTTPRedirectHandler):
def redirect_request(self, req, fp, code, msg, headers, newurl):
return None
def required(name):
value = os.environ.get(name)
if not value:
raise SystemExit('Set ' + name)
return value
key = required('ZAHARA_TENANCY_API_KEY')
base = 'https://api.myzahara.net'
path = "Currencies"
url = base + '/api/' + quote(key, safe='') + '/' + path
request = Request(url, method='GET',
headers={'Accept': 'application/json'})
try:
with build_opener(NoRedirect).open(request, timeout=30) as response:
text = response.read().decode('utf-8')
except HTTPError as error:
raise SystemExit('Zahara returned HTTP ' + str(error.code)) from None
except URLError:
raise SystemExit('Zahara request failed; URL omitted to protect the key') from None
result = json.loads(text) if text.strip() else None
# Use a secure console: the result may contain confidential data.
print(json.dumps(result, indent=2))
Successful response
The tested request returned HTTP 200 with a top-level JSON array. It returned 164 currency records at the time of verification; the count is an observation, not a fixed API limit.
Representative response example
This is a shortened example with fictional business identifiers, text and dates. The currency names and symbols, where shown, are reference labels. Array length is illustrative; omitted data is not a promise that it will be absent.
[
{
"CurrencyId": 1,
"Name": "Pound Sterling",
"ShortName": "GBP",
"Symbol": "£",
"IsActive": true,
"LastUpdated": "2026-01-01T12:00:00Z",
"BusinessSettings": [],
"Documents": [],
"Suppliers": []
}
]
Currency field reference
| Field | Observed type | Meaning / integration use |
|---|---|---|
| CurrencyId | number | Currency reference used by Zahara methods. Do not hardcode a complete ID list from this example. |
| Name | string | Currency display name. |
| ShortName | string | Short currency code, for example GBP. Validate against the returned list. |
| Symbol | string | Display symbol. Symbols can be shared by currencies and are not identifiers. |
| IsActive | boolean | Activity flag. Check it when presenting usable currency choices. |
| LastUpdated | string | Observed UTC date-time string. No refresh/consistency guarantee is implied. |
| BusinessSettings / Documents / Suppliers | array | Relationship arrays were empty in the sampled records; populated shapes are unverified. |
The example contains a representative currency with an invented timestamp. Treat the returned reference list as the source for IDs rather than maintaining an unreviewed static copy.
Handling failures
The deliberately invalid-key test returned HTTP 200 and a reference array, not an authentication error. This endpoint did not establish key validity; do not use it to validate credentials.
Check the HTTP status before using the response. Handle timeouts, unexpected content types and unknown result shapes. Do not convert a failed request into an empty successful result. The supplied clients make a single request and do not automatically retry it.
Integration notes
This method does not return exchange rates or perform currency conversion.
A deliberately invalid key in the path also returned HTTP 200 and the same-sized reference list. Do not use this endpoint as an authentication test or infer that other tenancy endpoints permit invalid keys.
The API collection supplies a tenancy-key path; validation of that key was not established by the successful currency response.
The previous article omitted IsActive from its example; it was present in the verified result.
If caching the list, choose a refresh policy for your integration; no cache TTL or immutability guarantee was verified.
Response ordering, rate limits and changes to the reference list remain unverified.
These observations apply to the tested configuration, not every version or tenant. Do not infer undocumented response fields, permission rules or limits.
Verification
Verified on 25 November 2026 against the production API with an authorised tenancy key. Direct request: HTTP 200. cURL, Node.js and Python each completed successfully.