Skip to main content

Drivers Enquiries Image Service API v1.0.0

An enquiry service for external consumers of DVLA Driver Data

Click here to see this OpenAPI specification in JSON format.

Base URLs

Authentication

  • HTTP Authentication, scheme: bearer Valid JWT token issued as a result of authentication against the API Gateway

  • API Key (apiKeyAuth)

    • Parameter Name: X-API-Key, in: header. API key used to access the service

Image Enquiries

post__v1_images_retrieve

POST /v1/images/retrieve

Retrieve photo and signatures information, for a given Driving Licence Number.


Parameters

Name In Type Required Restrictions Description
X-Correlation-ID header uuid false none Correlation ID to track the request from the API gateway through the Enquiries stack
body body imageRequest true none The full Driving Licence Number including the check digits.

Example Request

curl -X POST  -d '{
  "drivingLicenceNumber": "AAAPY602123BH9PF",
  "requiredImage": "photograph"
}' https://driver-vehicle-licensing.api.gov.uk/driver-image/v1/images/retrieve \
 -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'X-Correlation-ID: dbcf549a-43db-4b95-aea8-1e6b792397bb' -H 'Authorization: Bearer {access-token}'

Responses

Status Meaning Description Schema
200 OK Success. Returns the requested images for the given driving licence number. imageResponse
400 Bad Request Bad Request. The server could not understand the request due to invalid syntax. errorResponse
401 Unauthorized Unauthorised. gatewayErrorResponse
403 Forbidden Forbidden. No access to the requested resource. Inline
404 Not Found Record for supplied driving licence number cannot be found. errorResponse
429 Too Many Requests Too many requests in a given amount of time. Inline
500 Internal Server Error The service encountered an unspecified error. Inline

Additional common error responses are listed in the Common Error Responses page.

Example Response

200 Response

{
  "photograph": {
    "image": "string",
    "imageFormat": "image/jpeg"
  },
  "signature": {
    "image": "string",
    "imageFormat": "image/jpeg"
  },
  "driverRedirect": true
}

Response Schema

Schemas

imageRequest

{
  "drivingLicenceNumber": "AAAPY602123BH9PF",
  "requiredImage": "photograph"
}

Properties

Name Type Required Restrictions Description
drivingLicenceNumber drivingLicenceNumber true none A UK driving licence number (usually 16 digits in length)
requiredImage string false Enum: photograph,signature
none

Enumerated Values

Property Value
requiredImage photograph
requiredImage signature

imageResponse

{
  "photograph": {
    "image": "string",
    "imageFormat": "image/jpeg"
  },
  "signature": {
    "image": "string",
    "imageFormat": "image/jpeg"
  },
  "driverRedirect": true
}

Properties

Name Type Required Restrictions Description
photograph imageType false none returned image type, (signature or photograph)
signature imageType false none returned image type, (signature or photograph)
driverRedirect driverRedirect false none Indicates if record was redirected from cross reference record.

imageType

{
  "image": "string",
  "imageFormat": "image/jpeg"
}

returned image type, (signature or photograph)

Properties

Name Type Required Restrictions Description
image string true none image as a base 64 string
imageFormat string true Enum: image/jpeg,image/png
image format

Enumerated Values

Property Value
imageFormat image/jpeg
imageFormat image/png

gatewayForbiddenErrorResponse

{
  "status": "string",
  "title": "Forbidden",
  "message": "Access Denied"
}

Object containing a gateway error response.

Properties

Name Type Required Restrictions Description
status string false none HTTP status code.
title string false none The error response title.
message string false none The error response message.

gatewayErrorResponse

{
  "status": "string",
  "title": "Unauthorized",
  "detail": "string"
}

Object containing a gateway error response.

Properties

Name Type Required Restrictions Description
status string false none HTTP status code.
title string false none The error response title.
detail string false none The error response detail.

errorResponse

{
  "errors": [
    {
      "status": "string",
      "code": "string",
      "detail": "string"
    }
  ]
}

Object containing a list of error responses.

Properties

Name Type Required Restrictions Description
errors [error] false none none

error

{
  "status": "string",
  "code": "string",
  "detail": "string"
}

Properties

Name Type Required Restrictions Description
status string false none HTTP status code
code string false none DVLA reference code
detail string false none A meaningful description of the error which has occurred

drivingLicenceNumber

"AAAPY602123BH9PF"

A UK driving licence number (usually 16 digits in length)

Properties

Name Type Required Restrictions Description
anonymous string false Pattern: ^[a-zA-Z0-9]*$
Min length: 5
Max length: 16
A UK driving licence number (usually 16 digits in length)

driverRedirect

true

Indicates if record was redirected from cross reference record.

Properties

Name Type Required Restrictions Description
anonymous boolean false none Indicates if record was redirected from cross reference record.

uuid

"dbcf549a-43db-4b95-aea8-1e6b792397bb"

Properties

Name Type Required Restrictions Description
anonymous string(uuid) false none none