Border Agency
Authenticate and retrieve consignment documents shared with your organisation.
TWIN sends pre-notification and despatch signals to a registered ISN endpoint automatically. You can also query TWIN directly to retrieve documents for consignments shared with you.
Authenticate
Exchange your email and password for a session cookie. You'll need the x-api-key provided by your node operator.
POST /authentication/login
Content-Type: application/json
x-api-key: <your-api-key>{
"email": "you@example.com",
"password": "your-password"
}The JWT arrives via Set-Cookie. Include this cookie on every subsequent request.
See the Authentication reference for full details.
Retrieve consignment documents
The signal contains the consignment globalId. Use it to fetch only the documents for that consignment.
See the API reference for all available read endpoints.
GET /supply-chain/data-space/consignments/:id/documents
Cookie: access_token=<jwt>
x-api-key: <your-api-key>Returns a list of DocumentAttachment objects. Replace :id with the globalId from the signal.
To download a specific document:
GET /supply-chain/data-space/documents/:documentId
Cookie: access_token=<jwt>
x-api-key: <your-api-key>