Przejdź do głównej zawartości

referenceData

Dla: Programista

ZapytanieBetaQuery.referenceData

Entries of one dictionary of the print shop (operation types, color profiles, product categories…), in its display order: what the …TypeId, colorProfileId and categoryId fields of orders point at. Small lists that rarely change: read them whole with includeInactive: true and keep them — older orders still point at entries 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 entries the print shop no longer offers (isActive false). Default false: only the entries offered now — use true for a copy that resolves the ids of older records.

Domyślnie: false

typewymaganeReferenceDataType!

Which dictionary to read.

Zwraca

[ReferenceDataItem!]!

Przykład

Zapytanie
query OperationTypes {
referenceData(type: OPERATION_TYPE, includeInactive: true) {
id
code
name
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 OperationTypes {\n referenceData(type: OPERATION_TYPE, includeInactive: true) {\n id\n code\n name\n isActive\n }\n}"
}
JSON
Odpowiedź
{
"data": {
"referenceData": [
{
"id": "2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e01",
"code": "OFFSET",
"name": "Druk offsetowy",
"isActive": true
},
{
"id": "2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e02",
"code": "LAMINATION",
"name": "Foliowanie",
"isActive": true
},
{
"id": "2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e03",
"code": "UV_SPOT",
"name": "Lakier UV wybiórczy (wycofany)",
"isActive": false
}
]
}
}