Digital Traffic Regulation Orders (3.4.1)

Download OpenAPI specification:

Department for Transport: d-tro@dft.gov.uk License: Crown copyright Terms of Service

This page provides the API documentation for the Digital Traffic Regulation Orders (D-TRO) service.

Auth

Get auth token

Exchange client ID and secret using HTTP basic authentication. This returns an access token to use in all subsequent requests.

Request Body schema: application/x-www-form-urlencoded
required

Token grant request parameters

grant_type
required
string
Default: "client_credentials"
Value: "client_credentials"

Responses

Response samples

Content type
application/json
{
  • "refresh_token_expires_in": "0",
  • "api_product_list": "[int-publisher]",
  • "api_product_list_json": [
    ],
  • "organization_name": "dft-dtro-int",
  • "developer.email": "user@example.com",
  • "token_type": "BearerToken",
  • "issued_at": "1751369026823",
  • "client_id": "GXvLpQeYzWmKjRuTnAoXcVbNqLzHdFgTyUiOpAsDfGhJkLzXcVbNmQwErTyUiOpAs",
  • "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
  • "application_name": "c646ba58-a094-4b33-bfb5-41494dd749ec",
  • "scope": "dsp",
  • "expires_in": "1799",
  • "refresh_count": "0",
  • "status": "approved"
}

D-TROs

Create D-TRO from body

Create a D-TRO record by submitting a JSON payload in the request body.

Authorizations:
oAuth
Request Body schema: application/json
required

Object containing D-TRO details

schemaVersion
required
string (SchemaVersion)

Version of the schema to submit the D-TRO payload against

object (DTROData)

Object describing the D-TRO content

Responses

Request samples

Content type
application/json
{
  • "schemaVersion": "3.4.0",
  • "data": {
    }
}

Response samples

Content type
application/json
{
  • "id": "0bead96d-1c15-4cab-91f3-d25e243601b5"
}

Create D-TRO from file

Create a D-TRO record by uploading a JSON file containing the D-TRO content.

Authorizations:
oAuth
Request Body schema: multipart/form-data
required
file
required
string <binary>

JSON file contaning the D-TRO content

Responses

Response samples

Content type
application/json
{
  • "id": "0bead96d-1c15-4cab-91f3-d25e243601b5"
}

Update D-TRO from body

Update an existing D-TRO by submitting a JSON payload in the request body.

Authorizations:
oAuth
path Parameters
dtroId
required
string <uuid>

ID of the D-TRO to update

Request Body schema: application/json

Object describing the D-TRO

schemaVersion
required
string (SchemaVersion)

Version of the schema to submit the D-TRO payload against

object (DTROData)

Object describing the D-TRO content

Responses

Request samples

Content type
application/json
{
  • "schemaVersion": "3.4.0",
  • "data": {
    }
}

Response samples

Content type
application/json
{
  • "id": "0bead96d-1c15-4cab-91f3-d25e243601b5"
}

Update D-TRO from file

Authorizations:
oAuth
path Parameters
dtroId
required
string <uuid>

ID of the D-TRO to update

Request Body schema: multipart/form-data
required
file
required
string <binary>

JSON file contaning the D-TRO content

Responses

Response samples

Content type
application/json
{
  • "id": "0bead96d-1c15-4cab-91f3-d25e243601b5"
}

Get D-TRO by ID

Retrieves a published D-TRO by its ID.

Authorizations:
oAuth
path Parameters
id
required
string <uuid>

ID of the D-TRO to retrieve

Responses

Response samples

Content type
application/json
{
  • "id": "77be1c43-cf55-4aa8-b0e7-5af77f2dcc71",
  • "schemaVersion": "3.4.0",
  • "data": {
    },
  • "traName": "Some TRA"
}

Get all D-TROs

Generate a signed URL to download a data extract of all published D-TROs.

Authorizations:
oAuth

Responses

Delete D-TRO

Deletes a D-TRO from the service. Note this is a soft-delete, and marks the D-TRO as deleted rather than physically removing the record.

Authorizations:
oAuth
path Parameters
dtroId
required
string <uuid>

ID of the D-TRO to delete

Responses

Events

Retrieve D-TRO event history

Retrieve a list of D-TRO events (e.g. creations, updates, deletes) that match a given search criteria.

Authorizations:
oAuth
Request Body schema: application/json

A search query object

pageSize
required
integer

Number of D-TROs to retrieve per page

page
required
integer

Page number to retrieve

since
required
string <date-time>

Return events where D-TRO creation is is on or after this datetime

to
required
string <date-time>

Return events where D-TRO creation time is up to and including this datetime

deletionTime
string <date-time>
Deprecated

Datetime the D-TRO was deleted. Deprecated - use deletedFrom and deletedTo

deletedFrom
string <date-time>

Datetime the D-TRO was deleted on, or after

deletedTo
string <date-time>

Datetime the D-TRO was deleted on, or before

modificationTime
string <date-time>
Deprecated

Datetime the D-TRO was modified. Deprectaed - use modifiedFrom and modifiedTo

modifiedFrom
string <date-time>

Datetime the D-TRO was last modified on, or after

modifiedTo
string <date-time>

Datetime the D-TRO was last modified on, or before

traCreator
integer

D-TRO TRA creator

currentTraOwner
integer

D-TRO current TRA owner

troName
string

Name of the TRO

regulationType
string

The D-TRO regulation type

regulatedPlaceType
string

The D-TRO regulated place type

vehicleType
string

The D-TRO vehicle type

orderReportingPoint
string

The D-TRO order reporting point

regulationStart
string <date-time>

Return events where D-TRO regulation date is on or after this datetime

regulationEnd
string <date-time>

Return events where D-TRO regulation date is up to and including this datetime

eventType
string
Enum: "create" "update" "delete"

The D-TRO event type

Responses

Request samples

Content type
application/json
{
  • "pageSize": 5,
  • "page": 1,
  • "since": "2025-01-01T09:00:00",
  • "to": "2025-01-01T09:00:00",
  • "deletionTime": "2025-01-01T09:00:00",
  • "deletedFrom": "2025-01-01T09:00:00",
  • "deletedTo": "2025-01-01T09:00:00",
  • "modificationTime": "2025-01-01T09:00:00",
  • "modifiedFrom": "2025-01-01T09:00:00",
  • "modifiedTo": "2025-01-01T09:00:00",
  • "traCreator": 1,
  • "currentTraOwner": 1,
  • "troName": "Example",
  • "regulationType": "string",
  • "regulatedPlaceType": "regulationLocation",
  • "vehicleType": "car",
  • "orderReportingPoint": "permanentNoticeOfMaking",
  • "regulationStart": "2025-01-01T09:00:00",
  • "regulationEnd": "2025-01-01T09:00:00",
  • "eventType": "start"
}

Response samples

Content type
application/json
{
  • "events": [
    ],
  • "page": 0,
  • "pageSize": 0,
  • "totalCount": 0
}

Schemas

Get all schema versions

Retrieve all schema versions known to the D-TRO system

Authorizations:
oAuth

Responses

Get schema templates.

Authorizations:
oAuth

Responses

Get schema template by its schema version

Authorizations:
oAuth
path Parameters
version
required
string

Schema version by which schema template to retrieve.

Responses

Search

Finds existing D-TROs that match the required criteria.

Authorizations:
oAuth
Request Body schema: application/json

A D-TRO object search criteria.

Array of objects or null (DfT.DTRO.Models.Filtering.SearchQuery) non-empty
page
required
integer <int32> [ 1 .. 2147483647 ]
pageSize
required
integer <int32> [ 1 .. 50 ]

Responses

Request samples

Content type
application/json
{
  • "queries": [
    ],
  • "page": 1,
  • "pageSize": 1
}

Response samples

Content type
application/json
{
  • "results": [
    ],
  • "page": 0,
  • "pageSize": 0,
  • "totalCount": 0
}