Edit in GitHubLog an issue

currency query

Use the currency query to return information about the store's currency configuration.

Syntax

{currency {Currency}}

Reference

The currency reference provides detailed information about the types and fields defined in this query.

Example usage

The following query returns currency information for an instance of the application that is configured for multiple currencies, USD and EUR. The default (base) currency for the store is US Dollar (USD). The response includes a list of currencies in the available_currency_codes attribute as well as a set of exchange rates.

Request:

Copied to your clipboard
query {
currency {
base_currency_code
base_currency_symbol
default_display_currency_code
default_display_currency_symbol
available_currency_codes
exchange_rates {
currency_to
rate
}
}
}

Response:

Copied to your clipboard
{
"data": {
"currency": {
"base_currency_code": "USD",
"base_currency_symbol": "$",
"default_display_currency_code": "USD",
"default_display_currency_symbol": "$",
"available_currency_codes": [
"EUR",
"USD"
],
"exchange_rates": [
{
"currency_to": "EUR",
"rate": 0.7067
},
{
"currency_to": "USD",
"rate": 1
}
]
}
}
}
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.