Przejdź do głównej zawartości

currencies

Dla: Programista

ZapytanieBetaQuery.currencies

Currencies the print shop sells in, in its display order: what Order.currencyId, Client.defaultCurrencyId and ProductInvoice.currencyId point at. A small list that rarely changes: read it whole with includeInactive: true and keep it — older orders still point at currencies the print shop no longer offers.

Wymagany zakresreference:read
Dostępne odPrynt 0.28.0
StabilnośćBeta (co to znaczy)

Argumenty

NazwaTypOpis
includeInactiveBoolean!

True: also the currencies the print shop no longer offers (isActive false). Default false: only the currencies offered now — use true for a copy that resolves the ids of older records.

Domyślnie: false

Zwraca

[Currency!]!

Przykład

Zapytanie
query Currencies {
currencies(includeInactive: true) {
id
code
symbol
name
isDefault
isActive
}
}
Wywołanie (curl)
curl -sS https://twoja-drukarnia.prynt.pl/api/v1/graphql \
-H "Authorization: Bearer $PRYNT_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"query": "query Currencies {\n currencies(includeInactive: true) {\n id\n code\n symbol\n name\n isDefault\n isActive\n }\n}"
}
JSON
Odpowiedź
{
"data": {
"currencies": [
{
"id": "1b2c3d4e-5f6a-4b7c-8d9e-0f1a2b3c4d01",
"code": "PLN",
"symbol": "zł",
"name": "Złoty polski",
"isDefault": true,
"isActive": true
},
{
"id": "1b2c3d4e-5f6a-4b7c-8d9e-0f1a2b3c4d02",
"code": "EUR",
"symbol": "€",
"name": "Euro",
"isDefault": false,
"isActive": true
}
]
}
}