π§ͺ UAT / test environment
Base URLβ
https://uat.dockflow.com/v3
UAT mirrors the production API surface.
The only difference is authentication and the optional mockβtracking features described below.
| Environment | Host | Required key prefix |
|---|---|---|
| Production | api.dockflow.com | prod_β¦ |
| UAT (sandbox) | uat.dockflow.com | uat_β¦ |
Production keys are rejected on UAT, and vice versa (
403 Token environment β¦ does not match host β¦).
UAT data lives in a separate UAT organisation that Dockflow creates for you the first time an API key is created. A uat_ key reads and writes only that organisation, so nothing you send in UAT reaches your production account. Create UAT keys in the API Console by choosing the UAT environment.
What UAT isβ
UAT is a separate organisation, not a separate platform. The first token created for your
organisation (production or UAT) automatically creates a companion organisation named <Your organisation> (UAT), and
everything a uat_β¦ token writes lands there instead of in your live organisation. Your live
organisation is granted access to it, so the same login can open it from the organisation switcher
in the Dockflow app and in the API Console.
That design has two consequences worth planning for:
- You can see your test data in the product. Switch to the
(UAT)organisation and the tradeflows you posted appear exactly as production tradeflows do, with the same screens and exports β see Working in the UAT organisation. - It runs on live infrastructure. Container tracking, carrier lookups and terminal integrations behave as they do for any organisation: post a real container number and Dockflow will really go and track it. Notifications and upstream delivery for the UAT organisation are live too β anything you subscribe a user to there will actually be sent.
Use mock tracking when you want a predictable journey instead of whatever a real container happens to be doing.
Differences from productionβ
| Behaviour | Production | UAT |
|---|---|---|
| Token prefix / host | prod_β¦ on api.dockflow.com | uat_β¦ on uat.dockflow.com |
mock_tracking | Ignored | Generates a synthetic journey |
customer_name and partners[] | Create organisations and tradeflow links | Ignored β no organisation is created or linked |
Bulk delete DELETE /downstream/tradeflows/* | Requires ?confirm=PRODUCTION | Allowed without confirmation |
Everything else β validation, response shapes, upstream payloads, documents β is the same code path as production.
Working in the UAT organisationβ
Find the right organisationβ
The sandbox is the organisation whose name ends in (UAT). A live organisation may itself be
named after a test environment, so the suffix rather than the word is what separates them:
Acme UAT is a live organisation, Acme UAT (UAT) is its sandbox. Anything posted with a uat_β¦
token lands in the (UAT) one and is visible nowhere else.
To open it, go to Settings βΈ Partners in the Dockflow app, pick the organisation ending in
(UAT), and log in to it. If it is missing from the list or the login is greyed out, mail
[email protected] β access is granted per user.
After a 202β
POST /downstream/tradeflows answers {"status": "queued"} and finishes the work afterwards, so a
tradeflow shows up in the app a moment later rather than instantly. queued means accepted.
If nothing has appeared after a minute, check which organisation you are looking at before
re-sending β a payload that was accepted but is "missing" is almost always being looked for in the
live organisation instead of the (UAT) one.
Build against a real messageβ
Once a tradeflow exists in the UAT organisation, open it and use Download βΈ Download V3 API on the tradeflow header. The file is produced by the same renderer as the Upstream API, so you can replay it into your own consumer β from Postman or a test β and build your processing without waiting for Dockflow to push anything.
One difference to allow for: the download always contains all five blocks, including vessels,
while a webhook message carries only events, locations, containers and shipment. Do not
make vessels a required field on the strength of the downloaded sample.
Mock trackingβ
When posting a tradeflow to /downstream/tradeflows in UAT, include the field mock_tracking
and Dockflow generates events that simulate realβworld progress.
Basic formatβ
{
"tradeflow_reference": "PO4564268",
"port_of_loading": "BEANR",
"port_of_discharge": "USLAX",
"mock_tracking": {
"scenario": "ocean_basic"
}
}
| Property | Type | Default | Description |
|---|---|---|---|
scenario | string | β | Selects the event template (table below). |
An unknown scenario name is ignored: the tradeflow is created, but no mock events are added.
Inputs it usesβ
| Field | If you omit it |
|---|---|
port_of_loading / port_of_discharge (5βchar UN/LOCODE) | The events for that side of the journey are not generated |
container_reference | A random existing container is picked, so events still appear |
actual_time_of_departure / estimated_time_of_departure | Departure is set to yesterday |
estimated_time_of_arrival / actual_time_of_arrival | Arrival is set to 30 days from now |
Predefined scenariosβ
| Code | Events that will be generated |
|---|---|
ocean_basic | Actual, at the port of loading: gate out empty (departure β 3d), gate in full (β 2d), loaded on vessel (β 1d). Predicted, at the port of discharge: vessel arrival (arrival), unloaded from vessel (+ 1d), gate out full (+ 2d), empty equipment returned (+ 7d). |
Additional scenarios may be added in future versions.
To see what this scenario looks like on the wire before importing anything, use Send test on a webhook destination: it sends an ocean_basic record straight to your endpoint (see Upstream βΊ Webhook delivery).
Custom eventsβ
For full control, send your own events array (see Tradeflows API).
If both events and mock_tracking.scenario are present, your own events are kept and the mock
sequence is appended after them.
Usage exampleβ
curl -X POST https://uat.dockflow.com/v3/downstream/tradeflows \
-H "Authorization: uat_acme-logistics_Zk3n1c0Q2m9..." \
-H "Content-Type: application/json" \
-d '{
"tradeflow_reference": "PO4564268",
"port_of_loading": "BEANR",
"port_of_discharge": "USLAX",
"mock_tracking": { "scenario": "ocean_basic" }
}'
Response (202 Accepted):
{
"status": "queued",
"tradeflows": [{ "tradeflow_reference": "PO4564268", "warnings": [] }]
}
Posting is asynchronous: the tradeflow and its events are processed after the 202, so poll
GET /v3/upstream?since=β¦ (or open the (UAT) organisation in the app) to see the result.
Cleaning upβ
There is no automatic wipe β UAT data stays until you remove it. To start from a clean sheet:
DELETE https://uat.dockflow.com/v3/downstream/tradeflows/*
That deactivates every tradeflow in your UAT organisation; add ?hard=true to delete them
permanently. Unlike production, no confirm parameter is needed.
UAT webhooks: configure a destination on your UAT organisation in the API Console to receive UAT updates (see Upstream βΊ Webhook delivery).
Use UAT to validate integrations safely before switching to production. For questions about tokens or mock scenarios, contact Dockflow support.