Endpoints
Base URL
All of our API endpoints are accessed through the base url: https://api.clear-port.com/v1/
The format of data sent to and received from all endpoints is JSON.
CDS Exports
Create
- Endpoint:
cds/exports
- Method: POST
- Request body schema: CreateExportDataSchema
- Returns
- 202 Accepted. CreateExportResponseSchema
- 400 Bad Request. There was a problem with the data you provided. An explanation will be provided in the response body.
- 401 Unauthorised. You did not provide a valid API key.
Get
- Endpoint:
cds/exports/:correlationId
- Method: GET
- Parameters:
- correlationId - the value returned by the Create method
- Response body schema: GetExportDataSchema
- Returns
- 200 Ok. GetExportDataSchema
- 401 Unauthorised. You did not provide a valid API key.
- 404 Not found. The declaration could not be found.
Download PDF
- Endpoint:
cds/exports/:correlationId/pdf
- Method: GET
- Parameters:
- correlationId - the value returned by the Create method
- Response: file
- Returns
- 200 Ok.
- 401 Unauthorised. You did not provide a valid API key.
- 404 Not found. The declaration could not be found.
CDS Imports
Create
- Endpoint:
cds/imports
- Method: POST
- Schema: CreateImportDataSchema
- Returns
- 202 Accepted. CreateImportResponseSchema
- 400 Bad Request. There was a problem with the data you provided. An explanation will be provided in the response body.
- 401 Unauthorised. You did not provide a valid API key.
Get
- Endpoint:
cds/imports/:correlationId
- Method: GET
- Parameters:
- correlationId - the value returned by the Create method
- Response body schema: GetImportDataSchema
- Returns
- 200 Ok.
- 401 Unauthorised. You did not provide a valid API key.
- 404 Not found. The declaration could not be found.
Download PDF
- Endpoint:
cds/imports/:correlationId/pdf
- Method: GET
- Parameters:
- correlationId - the value returned by the Create method
- Response: file
- Returns
- 200 Ok.
- 401 Unauthorised. You did not provide a valid API key.
- 404 Not found. The declaration could not be found.
NCTS Departures
Create
- Endpoint:
ncts/v5/departures
- Method: POST
Download TAD
- Endpoint:
ncts/v5/departures/:id/tad
- Method: GET
Vehicles
Create
- Endpoint:
vehicles
- Method: POST
List
- Endpoint:
vehicles
- Method: GET
Get Vehicle
- Endpoint:
vehicles/:id
- Method: GET
Update
- Endpoint:
vehicles/:id
- Method: PUT
Safety and Security Declarations
Create
- Endpoint:
ens/declarations
- Method: POST
- Schema: CreateENSDataSchema
- Returns
- 202 Accepted. CreateENSResponseSchema
- 400 Bad Request. There was a problem with the data you provided. An explanation will be provided in the response body.
- 401 Unauthorised. You did not provide a valid API key.
Get
- Endpoint:
ens/declarations/:correlationId
- Method: GET
- Parameters:
- correlationId - the value passed to the Create method
- Response body schema: GetENSDataSchema
- Returns
- 200 Ok. GetENSDataSchema
- 401 Unauthorised. You did not provide a valid API key.
- 404 Not found. The declaration could not be found.