Get Currencies in Graphql
This query returns a list of currencies.
GraphQL Query
query GetCurrencyList {
currency(
pagination: {
limit: 20
offset: 0
}
) {
id
user_code
name,
country {
id,
name,
user_code
}
}
}
Python Example
import requests
url = "https://<domain_name>/<realm_code>/<space_code>/graphql/"
headers = {
"Authorization": "Bearer <access_token>",
"Content-Type": "application/json"
}
payload = {
"query": """
query GetCurrencyList {
currency(
pagination: {
limit: 20
offset: 0
}
) {
id
user_code
name
country {
id,
name,
user_code
}
}
}
"""
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
What This Query Does
- Fetches a paginated list of currencies
- Returns standard currency fields
- One request, no extra endpoints
