Skip to main content
Version: v1

Dock2Dock API

The Dock2Dock API is organised around REST. It has predictable resource-oriented URLs, accepts JSON request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Every request is authenticated with an API key in the x-api-key header.

Errors. A request the API refuses comes back with a 4xx status and an ErrorResponse body whose code says why: 400 for a request that is invalid as sent (VALIDATION, BAD_REQUEST, ALREADY_EXISTS, ... - the message names the field or record), 404 (NOT_FOUND - something the request names does not exist), 401 (UNAUTHORISED - missing or unknown API key), 409 (CONFLICT - try again), 422 (UNPROCESSABLE_CONTENT). A 5xx is a server error - retry later.

Lists. List endpoints take query options ($filter, $orderby, $top, $skip, $count, $select, and $expand where the endpoint lists it). $top is at most 50: page through a list with $top and $skip, and ask for the total with $count=true. Without $top, the first 25 are returned. A related record or list (an address, a sales order's labels, ...) comes back only when it is named in $expand, and an expanded list is returned in full - $top pages the records, not what they include.

Ids and Nos. Where a request names another record it usually takes either its ...Id or its ...No; given both, they must name the same record.

Authentication​

Your Dock2Dock API key.

Security Scheme Type:

apiKey

Header parameter name:

x-api-key