Przejdź do głównej zawartości

paint

Dla: Programista

ZapytanieBetaQuery.paint

One paint by its identifier; null when there is no such paint.

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

Argumenty

NazwaTypOpis
idwymaganeID!

Identifier of the paint.

Zwraca

Paint

Przykład

Zapytanie
query Paint($id: ID!) {
paint(id: $id) {
id
code
name
group
quantityGrams
pricePerKg
currency
colorHex
}
}
Zmienne
{
"id": "3f6b2a1c-8d4e-4f5a-9b6c-1d2e3f4a5b02"
}
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 Paint($id: ID!) {\n paint(id: $id) {\n id\n code\n name\n group\n quantityGrams\n pricePerKg\n currency\n colorHex\n }\n}",
"variables": {
"id": "3f6b2a1c-8d4e-4f5a-9b6c-1d2e3f4a5b02"
}
}
JSON
Odpowiedź
{
"data": {
"paint": {
"id": "3f6b2a1c-8d4e-4f5a-9b6c-1d2e3f4a5b02",
"code": "F-1208",
"name": "Pantone 1935 C",
"group": "Brancher",
"quantityGrams": 2349.5,
"pricePerKg": 180,
"currency": "PLN",
"colorHex": "#E6007E"
}
}
}