Vignette API

This API can be used to create, update and list orders as well as download the resulting vignettes. Contact us for authentication details.

API Endpoints
https://api2.tolvignetten.nl
Version

2.0.1

Queries

order

Response

Returns an OrderResponse!

Arguments
Name Description
id - ID! The order uuid.

Example

Query
query order($id: ID!) {
  order(id: $id) {
    id
    createdAt
    orderId
    status
    user {
      ...UserResponseFragment
    }
    orderProductVariants {
      ...OrderProductVariantResponseFragment
    }
    transactions {
      ...TransactionResponseFragment
    }
    address {
      ...OrderAddressResponseFragment
    }
    vatLocation {
      ...OrderVatLocationResponseFragment
    }
    files {
      ...OrderFileResponseFragment
    }
    invoices {
      ...InvoiceResponseFragment
    }
    notifications {
      ...OrderNotificationResponseFragment
    }
    apiUser {
      ...ApiUserResponseFragment
    }
    locale
    detailUrl
    price {
      ...MoneyResponseFragment
    }
    shippingCost {
      ...MoneyResponseFragment
    }
    startDate
    endDate
  }
}
Variables
{"id": 4}
Response
{
  "data": {
    "order": {
      "id": "4",
      "createdAt": "2007-12-03T10:15:30Z",
      "orderId": 987,
      "status": "abc123",
      "user": UserResponse,
      "orderProductVariants": [
        OrderProductVariantResponse
      ],
      "transactions": [TransactionResponse],
      "address": OrderAddressResponse,
      "vatLocation": OrderVatLocationResponse,
      "files": [OrderFileResponse],
      "invoices": [InvoiceResponse],
      "notifications": [OrderNotificationResponse],
      "apiUser": ApiUserResponse,
      "locale": "abc123",
      "detailUrl": "abc123",
      "price": MoneyResponse,
      "shippingCost": MoneyResponse,
      "startDate": "2007-12-03T10:15:30Z",
      "endDate": "2007-12-03T10:15:30Z"
    }
  }
}

orderComments

Response

Returns [OrderCommentResponse!]!

Arguments
Name Description
orderId - ID!

Example

Query
query orderComments($orderId: ID!) {
  orderComments(orderId: $orderId) {
    id
    createdAt
    body
    orderProductVariant {
      ...OrderProductVariantResponseFragment
    }
    processLogPool {
      ...ProcessLogPoolMessageResponseFragment
    }
    user {
      ...ApiUserResponseFragment
    }
  }
}
Variables
{"orderId": "4"}
Response
{
  "data": {
    "orderComments": [
      {
        "id": 4,
        "createdAt": "2007-12-03T10:15:30Z",
        "body": "xyz789",
        "orderProductVariant": OrderProductVariantResponse,
        "processLogPool": [ProcessLogPoolMessageResponse],
        "user": ApiUserResponse
      }
    ]
  }
}

orders

Response

Returns an OrdersResponse!

Arguments
Name Description
input - ListOrdersInput!

Example

Query
query orders($input: ListOrdersInput!) {
  orders(input: $input) {
    paging {
      ...PagingResponseFragment
    }
    orders {
      ...OrderResponseFragment
    }
  }
}
Variables
{"input": ListOrdersInput}
Response
{
  "data": {
    "orders": {
      "paging": PagingResponse,
      "orders": [OrderResponse]
    }
  }
}

products

Response

Returns [ProductResponse!]!

Example

Query
query products {
  products {
    id
    main
    title
    countryIsoCode
    productVariants {
      ...ProductVariantResponseFragment
    }
    fields {
      ...FieldResponseFragment
    }
  }
}
Response
{
  "data": {
    "products": [
      {
        "id": "xyz789",
        "main": true,
        "title": "abc123",
        "countryIsoCode": "xyz789",
        "productVariants": [ProductVariantResponse],
        "fields": [FieldResponse]
      }
    ]
  }
}

resolveRoute

Response

Returns a RouteResponse!

Arguments
Name Description
input - RouteInput!

Example

Query
query resolveRoute($input: RouteInput!) {
  resolveRoute(input: $input) {
    routeProductVariants {
      ...RouteProductVariantResponseFragment
    }
  }
}
Variables
{"input": RouteInput}
Response
{
  "data": {
    "resolveRoute": {
      "routeProductVariants": [
        RouteProductVariantResponse
      ]
    }
  }
}

Mutations

createOrder

Response

Returns a CreateOrderResponse!

Arguments
Name Description
input - CreateOrderInput!

Example

Query
mutation createOrder($input: CreateOrderInput!) {
  createOrder(input: $input) {
    order {
      ...OrderResponseFragment
    }
    token
    paymentLink
  }
}
Variables
{"input": CreateOrderInput}
Response
{
  "data": {
    "createOrder": {
      "order": OrderResponse,
      "token": "abc123",
      "paymentLink": "xyz789"
    }
  }
}

loginOrder

Response

Returns a LoginOrderResponse!

Arguments
Name Description
input - LoginOrderInput!

Example

Query
mutation loginOrder($input: LoginOrderInput!) {
  loginOrder(input: $input) {
    token
  }
}
Variables
{"input": LoginOrderInput}
Response
{
  "data": {
    "loginOrder": {"token": "abc123"}
  }
}

updateOrder

Response

Returns an UpdateOrderResponse!

Arguments
Name Description
input - UpdateOrderInput!

Example

Query
mutation updateOrder($input: UpdateOrderInput!) {
  updateOrder(input: $input) {
    order {
      ...OrderResponseFragment
    }
    token
    paymentLink
  }
}
Variables
{"input": UpdateOrderInput}
Response
{
  "data": {
    "updateOrder": {
      "order": OrderResponse,
      "token": "xyz789",
      "paymentLink": "abc123"
    }
  }
}

Types

AddressInput

Fields
Input Field Description
street - String!
houseNumber - String!
zipcode - String!
city - String!
country - String!
Example
{
  "street": "abc123",
  "houseNumber": "abc123",
  "zipcode": "xyz789",
  "city": "abc123",
  "country": "abc123"
}

AdvertisementIdInput

Fields
Input Field Description
id - String!
program - String!
Example
{
  "id": "abc123",
  "program": "xyz789"
}

ApiUserResponse

Fields
Field Name Description
id - ID!
gender - String!
firstname - String!
lastname - String!
email - String!
Example
{
  "id": 4,
  "gender": "xyz789",
  "firstname": "abc123",
  "lastname": "xyz789",
  "email": "xyz789"
}

Boolean

Description

The Boolean scalar type represents true or false.

Example
true

CountryResponse

Fields
Field Name Description
isoCode - String!
Example
{"isoCode": "abc123"}

CreateOrderInput

Fields
Input Field Description
user - UserInput!
productVariants - [ProductVariantInput!]!
ip - String
ipCountry - String
selfDeclaredCountry - String
googleClientId - GoogleClientIdInput
advertisementId - AdvertisementIdInput
locale - String!
currency - String!
startDate - DateTime!
endDate - DateTime!
detailUrl - String!
address - AddressInput
Example
{
  "user": UserInput,
  "productVariants": [ProductVariantInput],
  "ip": "xyz789",
  "ipCountry": "abc123",
  "selfDeclaredCountry": "xyz789",
  "googleClientId": GoogleClientIdInput,
  "advertisementId": AdvertisementIdInput,
  "locale": "abc123",
  "currency": "abc123",
  "startDate": "2007-12-03T10:15:30Z",
  "endDate": "2007-12-03T10:15:30Z",
  "detailUrl": "xyz789",
  "address": AddressInput
}

CreateOrderResponse

Fields
Field Name Description
order - OrderResponse!
token - String!
paymentLink - String!
Arguments
redirectUrl - String!
Example
{
  "order": OrderResponse,
  "token": "xyz789",
  "paymentLink": "abc123"
}

DateTime

Description

A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.

Example
"2007-12-03T10:15:30Z"

FieldResponse

Fields
Field Name Description
field - String!
type - String!
Example
{
  "field": "abc123",
  "type": "xyz789"
}

Float

Description

The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.

Example
123.45

GoogleClientIdInput

Fields
Input Field Description
clientId - String!
sessionId - String
Example
{
  "clientId": "abc123",
  "sessionId": "xyz789"
}

ID

Description

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

Example
"4"

Int

Description

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

Example
123

InvoiceResponse

Fields
Field Name Description
id - String!
date - DateTime!
filename - String!
number - String!
Example
{
  "id": "xyz789",
  "date": "2007-12-03T10:15:30Z",
  "filename": "abc123",
  "number": "abc123"
}

JSON

Description

The JSON scalar type represents JSON values as specified by ECMA-404.

Example
{}

ListOrdersInput

Fields
Input Field Description
page - Int
limit - Int
status - [OrderStatus!]
search - String
Example
{
  "page": 123,
  "limit": 987,
  "status": ["draft"],
  "search": "abc123"
}

LoginOrderInput

Fields
Input Field Description
id - String!
licensePlateNumber - String!
Example
{
  "id": "abc123",
  "licensePlateNumber": "abc123"
}

LoginOrderResponse

Fields
Field Name Description
token - String!
Example
{"token": "xyz789"}

MailAttachmentResponse

Fields
Field Name Description
filename - String!
mime_type - String!
size_kb - String!
Example
{
  "filename": "abc123",
  "mime_type": "abc123",
  "size_kb": "xyz789"
}

MailResponse

Fields
Field Name Description
uuid - String!
from - String!
to - String!
cc - String
bcc - String
subject - String!
body - String!
attachments - [MailAttachmentResponse]!
createdAt - DateTime
Example
{
  "uuid": "xyz789",
  "from": "abc123",
  "to": "abc123",
  "cc": "xyz789",
  "bcc": "abc123",
  "subject": "abc123",
  "body": "xyz789",
  "attachments": [MailAttachmentResponse],
  "createdAt": "2007-12-03T10:15:30Z"
}

MoneyResponse

Fields
Field Name Description
currencyCode - String!
amount - Float!
Example
{"currencyCode": "abc123", "amount": 987.65}

OrderAddressResponse

Fields
Field Name Description
id - String!
zipCode - String!
houseNumber - String!
street - String!
city - String!
country - String!
Example
{
  "id": "xyz789",
  "zipCode": "abc123",
  "houseNumber": "abc123",
  "street": "abc123",
  "city": "abc123",
  "country": "xyz789"
}

OrderCommentResponse

Fields
Field Name Description
id - ID!
createdAt - DateTime!
body - String!
orderProductVariant - OrderProductVariantResponse
processLogPool - [ProcessLogPoolMessageResponse!]
user - ApiUserResponse!
Example
{
  "id": 4,
  "createdAt": "2007-12-03T10:15:30Z",
  "body": "abc123",
  "orderProductVariant": OrderProductVariantResponse,
  "processLogPool": [ProcessLogPoolMessageResponse],
  "user": ApiUserResponse
}

OrderDocumentResponse

Fields
Field Name Description
id - String!
originalName - String!
hashedName - String!
type - String!
confirmed - Boolean!
orderField - OrderFieldResponse!
createdAt - DateTime!
order - OrderResponse!
vehicle - VehicleResponse
Example
{
  "id": "xyz789",
  "originalName": "xyz789",
  "hashedName": "abc123",
  "type": "abc123",
  "confirmed": false,
  "orderField": OrderFieldResponse,
  "createdAt": "2007-12-03T10:15:30Z",
  "order": OrderResponse,
  "vehicle": VehicleResponse
}

OrderFieldResponse

Fields
Field Name Description
id - String!
field - String!
type - String!
Example
{
  "id": "abc123",
  "field": "xyz789",
  "type": "xyz789"
}

OrderFileResponse

Fields
Field Name Description
id - String!
originalName - String!
uri - String!
Example
{
  "id": "abc123",
  "originalName": "abc123",
  "uri": "abc123"
}

OrderNotificationResponse

Fields
Field Name Description
id - ID!
createdAt - DateTime!
type - String!
Example
{
  "id": 4,
  "createdAt": "2007-12-03T10:15:30Z",
  "type": "xyz789"
}

OrderProductVariantDataResponse

Fields
Field Name Description
type - String
start - String
roadRef - String
roadCode - String
Example
{
  "type": "xyz789",
  "start": "xyz789",
  "roadRef": "abc123",
  "roadCode": "xyz789"
}

OrderProductVariantMailResponse

Fields
Field Name Description
id - ID!
originalName - String!
hashedName - String!
subject - String!
createdAt - DateTime!
deletedAt - DateTime!
parsed - MailResponse!
Example
{
  "id": "4",
  "originalName": "xyz789",
  "hashedName": "abc123",
  "subject": "xyz789",
  "createdAt": "2007-12-03T10:15:30Z",
  "deletedAt": "2007-12-03T10:15:30Z",
  "parsed": MailResponse
}

OrderProductVariantResponse

Fields
Field Name Description
id - String!
data - OrderProductVariantDataResponse
vehicle - VehicleResponse
productVariant - ProductVariantResponse!
quantity - Int!
price - MoneyResponse!
finalPrice - MoneyResponse!
errors - [String]
processed - Boolean!
files - [OrderFileResponse!]
alternativeEmail - String
mails - [OrderProductVariantMailResponse]!
Example
{
  "id": "xyz789",
  "data": OrderProductVariantDataResponse,
  "vehicle": VehicleResponse,
  "productVariant": ProductVariantResponse,
  "quantity": 987,
  "price": MoneyResponse,
  "finalPrice": MoneyResponse,
  "errors": ["abc123"],
  "processed": true,
  "files": [OrderFileResponse],
  "alternativeEmail": "abc123",
  "mails": [OrderProductVariantMailResponse]
}

OrderResponse

Fields
Field Name Description
id - ID!
createdAt - DateTime!
orderId - Int!
status - String!
user - UserResponse!
orderProductVariants - [OrderProductVariantResponse!]!
transactions - [TransactionResponse!]
address - OrderAddressResponse
vatLocation - OrderVatLocationResponse
files - [OrderFileResponse!]
invoices - [InvoiceResponse!]
notifications - [OrderNotificationResponse]!
apiUser - ApiUserResponse
locale - String!
detailUrl - String!
price - MoneyResponse!
shippingCost - MoneyResponse!
startDate - DateTime!
endDate - DateTime!
Example
{
  "id": "4",
  "createdAt": "2007-12-03T10:15:30Z",
  "orderId": 123,
  "status": "xyz789",
  "user": UserResponse,
  "orderProductVariants": [OrderProductVariantResponse],
  "transactions": [TransactionResponse],
  "address": OrderAddressResponse,
  "vatLocation": OrderVatLocationResponse,
  "files": [OrderFileResponse],
  "invoices": [InvoiceResponse],
  "notifications": [OrderNotificationResponse],
  "apiUser": ApiUserResponse,
  "locale": "abc123",
  "detailUrl": "abc123",
  "price": MoneyResponse,
  "shippingCost": MoneyResponse,
  "startDate": "2007-12-03T10:15:30Z",
  "endDate": "2007-12-03T10:15:30Z"
}

OrderStatus

Values
Enum Value Description

draft

paid

processing

pending

error

completed

sent_issue_to_customer

cancelled

refunded

partially_processed

Example
"draft"

OrderVatLocationResponse

Fields
Field Name Description
ip - String
ipCountry - String
selfDeclaredCountry - String
Example
{
  "ip": "xyz789",
  "ipCountry": "xyz789",
  "selfDeclaredCountry": "xyz789"
}

OrdersResponse

Fields
Field Name Description
paging - PagingResponse!
orders - [OrderResponse!]!
Example
{
  "paging": PagingResponse,
  "orders": [OrderResponse]
}

PagingResponse

Fields
Field Name Description
page - Int!
limit - Int!
total - Int!
pages - Int!
Example
{"page": 987, "limit": 987, "total": 987, "pages": 123}

ProcessLogPoolMessageResponse

Fields
Field Name Description
type - String!
message - String!
Example
{
  "type": "abc123",
  "message": "xyz789"
}

ProductResponse

Fields
Field Name Description
id - String!
main - Boolean!
title - String!
Arguments
locale - String
countryIsoCode - String
productVariants - [ProductVariantResponse!]!
fields - [FieldResponse!]!
Example
{
  "id": "xyz789",
  "main": true,
  "title": "xyz789",
  "countryIsoCode": "xyz789",
  "productVariants": [ProductVariantResponse],
  "fields": [FieldResponse]
}

ProductVariantDataInput

Fields
Input Field Description
start - DateTime
type - String
Example
{
  "start": "2007-12-03T10:15:30Z",
  "type": "abc123"
}

ProductVariantDeliveryMethod

Values
Enum Value Description

digital

package

post

Example
"digital"

ProductVariantInput

Fields
Input Field Description
id - String!
quantity - Int
data - ProductVariantDataInput
vehicle - VehicleInput
price - Float
Example
{
  "id": "abc123",
  "quantity": 123,
  "data": ProductVariantDataInput,
  "vehicle": VehicleInput,
  "price": 123.45
}

ProductVariantResponse

Fields
Field Name Description
id - String!
title - String!
Arguments
locale - String
price - MoneyResponse!
available - Boolean!
vignetteDigital - Boolean!
data - JSON
product - ProductResponse!
deliveryMethod - ProductVariantDeliveryMethod
finalPrices - JSON!
fields - [FieldResponse!]!
Example
{
  "id": "xyz789",
  "title": "abc123",
  "price": MoneyResponse,
  "available": false,
  "vignetteDigital": false,
  "data": {},
  "product": ProductResponse,
  "deliveryMethod": "digital",
  "finalPrices": {},
  "fields": [FieldResponse]
}

RouteInput

Fields
Input Field Description
currency - String!
route - RoutingInput
vehicle - String!
destination - String!
countries - [String!]!
startDate - DateTime!
endDate - DateTime!
vehicleCountry - String
licensePlateNumber - String
trailer - Boolean
mainOnly - Boolean
includeTolls - Boolean
tollTrajects - [TollTrajectInput!]
shippingCountry - String
priceOverwrite - JSON
extra - JSON
locale - String
Example
{
  "currency": "abc123",
  "route": RoutingInput,
  "vehicle": "abc123",
  "destination": "abc123",
  "countries": ["xyz789"],
  "startDate": "2007-12-03T10:15:30Z",
  "endDate": "2007-12-03T10:15:30Z",
  "vehicleCountry": "abc123",
  "licensePlateNumber": "abc123",
  "trailer": false,
  "mainOnly": false,
  "includeTolls": true,
  "tollTrajects": [TollTrajectInput],
  "shippingCountry": "abc123",
  "priceOverwrite": {},
  "extra": {},
  "locale": "abc123"
}

RouteProductVariantResponse

Fields
Field Name Description
quantity - Float!
start - String
productVariant - ProductVariantResponse!
Example
{
  "quantity": 987.65,
  "start": "xyz789",
  "productVariant": ProductVariantResponse
}

RouteResponse

Fields
Field Name Description
routeProductVariants - [RouteProductVariantResponse!]!
Example
{"routeProductVariants": [RouteProductVariantResponse]}

RoutingInput

Fields
Input Field Description
start - String!
end - String!
tripType - TripType!
waypoints - [String!]
Example
{
  "start": "xyz789",
  "end": "abc123",
  "tripType": "single",
  "waypoints": ["xyz789"]
}

String

Description

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Example
"xyz789"

TollTrajectInput

Fields
Input Field Description
traject - String!
type - String!
Example
{
  "traject": "xyz789",
  "type": "xyz789"
}

TransactionResponse

Fields
Field Name Description
id - String!
createdAt - DateTime!
paymentMethod - String
status - String!
price - MoneyResponse!
refunded - MoneyResponse!
gateway - String!
gatewayTransactionId - String!
Example
{
  "id": "xyz789",
  "createdAt": "2007-12-03T10:15:30Z",
  "paymentMethod": "abc123",
  "status": "xyz789",
  "price": MoneyResponse,
  "refunded": MoneyResponse,
  "gateway": "xyz789",
  "gatewayTransactionId": "xyz789"
}

TripType

Values
Enum Value Description

single

return

Example
"single"

UpdateOrderInput

Fields
Input Field Description
user - UserInput!
productVariants - [ProductVariantInput!]!
ip - String
ipCountry - String
selfDeclaredCountry - String
googleClientId - GoogleClientIdInput
advertisementId - AdvertisementIdInput
locale - String!
currency - String!
startDate - DateTime!
endDate - DateTime!
detailUrl - String!
address - AddressInput
id - String!
Example
{
  "user": UserInput,
  "productVariants": [ProductVariantInput],
  "ip": "abc123",
  "ipCountry": "abc123",
  "selfDeclaredCountry": "xyz789",
  "googleClientId": GoogleClientIdInput,
  "advertisementId": AdvertisementIdInput,
  "locale": "xyz789",
  "currency": "abc123",
  "startDate": "2007-12-03T10:15:30Z",
  "endDate": "2007-12-03T10:15:30Z",
  "detailUrl": "xyz789",
  "address": AddressInput,
  "id": "xyz789"
}

UpdateOrderResponse

Fields
Field Name Description
order - OrderResponse!
token - String!
paymentLink - String!
Arguments
redirectUrl - String!
Example
{
  "order": OrderResponse,
  "token": "xyz789",
  "paymentLink": "xyz789"
}

UserInput

Fields
Input Field Description
name - String!
email - String!
Example
{
  "name": "xyz789",
  "email": "abc123"
}

UserResponse

Fields
Field Name Description
id - String!
name - String!
email - String!
Example
{
  "id": "xyz789",
  "name": "abc123",
  "email": "xyz789"
}

VehicleFuel

Values
Enum Value Description

electric

diesel

gasoline

natural_gas

hydrogen

gpl

lpg

e85

biomethane

Example
"electric"

VehicleInput

Fields
Input Field Description
licensePlateNumber - String!
type - VehicleType!
country - String!
vin - String
brand - String
fuel - String
registrationDate - DateTime
Example
{
  "licensePlateNumber": "xyz789",
  "type": "car",
  "country": "xyz789",
  "vin": "abc123",
  "brand": "abc123",
  "fuel": "abc123",
  "registrationDate": "2007-12-03T10:15:30Z"
}

VehicleResponse

Fields
Field Name Description
id - String!
type - VehicleType!
licensePlateNumber - String
trailerLicensePlateNumber - String
vinNumber - String
registrationDate - DateTime
brand - String
stickerColor - String
fuel - VehicleFuel
country - CountryResponse!
orderDocuments - [OrderDocumentResponse!]!
Example
{
  "id": "abc123",
  "type": "car",
  "licensePlateNumber": "abc123",
  "trailerLicensePlateNumber": "abc123",
  "vinNumber": "abc123",
  "registrationDate": "2007-12-03T10:15:30Z",
  "brand": "abc123",
  "stickerColor": "abc123",
  "fuel": "electric",
  "country": CountryResponse,
  "orderDocuments": [OrderDocumentResponse]
}

VehicleType

Values
Enum Value Description

car

motorcycle

camper

Example
"car"