See the Queries page for a presentation of this resource.
Create a currency
input Data of the currency
GraphQL
mutation CreateCurrency($input: CurrencyInput!) {
CreateCurrency(input: $input) {
id
label
exchange_rate
default
}
}
Variables (JSON)
{
"input": {
"label": "GBP",
"exchange_rate": 1.2,
"default": false
}
}
JSON
{
"data": {
"CreateCurrency": {
"id": 100010,
"label": "GBP",
"exchange_rate": 1.2,
"default": false
}
}
}
Update a currency
input Data of the currency
GraphQL
mutation UpdateCurrency($id: ID!, $input: CurrencyInput!) {
UpdateCurrency(id: $id, input: $input) {
id
label
exchange_rate
default
}
}
Variables (JSON)
{
"id": 100010,
"input": {
"label": "GBP",
"exchange_rate": 1.3,
"default": false
}
}
JSON
{
"data": {
"UpdateCurrency": {
"id": 100010,
"label": "GBP",
"exchange_rate": 1.3,
"default": false
}
}
}
Disable a currency
GraphQL
mutation DisableCurrency($id: ID!) {
DisableCurrency(id: $id) {
id
active
}
}
JSON
{
"data": {
"DisableCurrency": {
"id": 100010,
"active": false
}
}
}
Enable a currency
GraphQL
mutation EnableCurrency($id: ID!) {
EnableCurrency(id: $id) {
id
active
}
}
JSON
{
"data": {
"EnableCurrency": {
"id": 100010,
"active": true
}
}
}
id Unique identifier of the currency
label Currency ISO code (GBP, USD, ...)
exchange_rate Currency exchange rate against default currency (1 for the default currency)
default Set the currency as the default one if true