For AI agents: visit https://stockpit.readme.io/llms.txt for an index of all pages formatted in Markdown and endpoints in OpenAPI.
Create a currency
| input |
|---|
| Data of the currency |
mutation CreateCurrency($input: CurrencyInput!) {
CreateCurrency(input: $input) {
id
label
exchange_rate
default
}
}
{
"input": {
"label": "GBP",
"exchange_rate": 1.2,
"default": false
}
}
{
"data": {
"CreateCurrency": {
"id": 100010,
"label": "GBP",
"exchange_rate": 1.2,
"default": false
}
}
}
Update a currency
| input |
|---|
| Data of the currency |
mutation UpdateCurrency($id: ID!, $input: CurrencyInput!) {
UpdateCurrency(id: $id, input: $input) {
id
label
exchange_rate
default
}
}
{
"id": 100010,
"input": {
"label": "GBP",
"exchange_rate": 1.3,
"default": false
}
}
{
"data": {
"UpdateCurrency": {
"id": 100010,
"label": "GBP",
"exchange_rate": 1.3,
"default": false
}
}
}
Disable a currency
mutation DisableCurrency($id: ID!) {
DisableCurrency(id: $id) {
id
active
}
}
{
"data": {
"DisableCurrency": {
"id": 100010,
"active": false
}
}
}
Enable a currency
mutation EnableCurrency($id: ID!) {
EnableCurrency(id: $id) {
id
active
}
}
{
"data": {
"EnableCurrency": {
"id": 100010,
"active": true
}
}
}
| 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 |