CUDA Cartage TMSPartner API

CUDA External API

Partner onboarding

This guide takes a new forwarder or partner from first login to receiving shipment updates. It’s also published at public.cudacartagetms.com/onboarding.

The full reference for every endpoint, with request and response schemas, is the live API documentation:

QUICK REFERENCE
EnvironmentAPI base URLAPI docsWeb app (for your API key)
Productionhttps://public.cudacartagetms.com/docshttps://app.cudacartagetms.com
Testhttps://public-test.cudacartagetms.com/docshttps://test.cudacartagetms.com

Build and test against the test environment first. Test and production are separate systems: a test key doesn’t work in production, and the data is different.

#1. Create your API key

Log in to the CUDA web app using the email credentials provided by your CUDA rep, then create your API key there.

  1. Go to the web app for the environment you want a key for (see the table above) and log in with the email and password your CUDA rep gave you.
  2. Open your user record and find the API Keys section.
  3. Click + Generate New API Key.
  4. Copy the key from the Your New API Key window and store it somewhere safe, such as a secrets manager.

The key is shown once. CUDA stores only a hash of it and can’t show it to you again. If you lose it, generate a new one and revoke the old one from the same API Keys section.

If you don’t see an API Keys section, ask your CUDA rep to enable API access for your login.

Your key sees the same organizations and forwarders as your login. A forwarder login sees only that forwarder’s shipments, and its webhooks fire only for those shipments.

#2. Make your first call

Send the key in the X-API-KEY header on every request. Production keys start with cdp_ and test keys with cdd_; send the whole value, prefix included.

TERMINAL
BASE_URL=https://public-test.cudacartagetms.com
API_KEY=cdd_your-key

# Organizations and forwarders your key can use
curl -s "$BASE_URL/shipment/organizations" -H "X-API-KEY: $API_KEY"
curl -s "$BASE_URL/shipment/forwarders"    -H "X-API-KEY: $API_KEY"

# Your most recent shipments
curl -s "$BASE_URL/shipment?limit=10" -H "X-API-KEY: $API_KEY"

A missing or unknown key returns 401. A shipment outside your key’s scope returns 404, the same as a shipment that doesn’t exist.

#3. Create shipments

POST /shipment creates a shipment. It returns 201 with the shipment’s id (UUID) and cudaId (CUDA’s shipment number); keep the id for later calls.

  • organizationId and forwarderId must be ones your key can use (step 2).
  • Each of shipper and consignee needs either a name and address, or the id of an existing contact (shipperContactId / consigneeContactId).
  • Before creating, you can check for a duplicate with GET /shipment/search?q=<your reference>. An empty results array means no match.
  • To correct a shipment after creating it, use PATCH /shipment/{id} with only the fields that changed. See the API docs for which fields are allowed and when.

The API docs have a complete example body for POST /shipment.

#4. Follow shipment status

You can poll, receive webhooks, or both.

FOLLOW SHIPMENT STATUS
EndpointReturns
GET /shipment/statusThe list of CUDA status codes (code, name, id)
GET /shipment/status/{id}A shipment’s current status. {id} can be the UUID, the cudaId or your reference number.
GET /shipment/status/{id}/historyEvery status change for that shipment, oldest first

#Webhooks

Register an HTTPS endpoint, and CUDA will POST to it when your shipments change:

TERMINAL
curl -s -X POST "$BASE_URL/webhook" -H "X-API-KEY: $API_KEY" -H 'Content-Type: application/json' -d '{
  "uri": "https://your-server.example.com/cuda-webhook",
  "events": ["SHIPMENT_ALERT", "SHIPMENT_MILESTONE"],
  "config": { "auth": [ { "Authorization": "Bearer <a secret your server checks>" } ] }
}'
  • Events: SHIPMENT_ALERT fires on every status change, and SHIPMENT_MILESTONE fires on milestones such as POD and delivery. GET /webhook/events lists them. Don’t subscribe to SHIPMENT_STATUS, which is obsolete.
  • Headers: config.auth (optional) adds headers to every delivery, so your endpoint can check that a request came from CUDA.
  • Payload: each delivery is a JSON body with the shipment’s fields, plus webhookId and timestamp.
  • Signature: when signing is on, deliveries carry an X-Webhook-Signature header. Get the public key from GET /webhook/key, or check a delivery with POST /webhook/verify.
  • Testing: GET /webhook/test/{id} sends a test delivery to your endpoint. Add ?shipmentId=<uuid> to use a real shipment’s data.
  • Managing: GET /webhook lists your webhooks; PUT /webhook/{id} and DELETE /webhook/{id} change or remove one.

Each delivery is sent once and not retried. If your endpoint is down or returns an error, that event is lost. Reconcile with GET /shipment/status/{id}/history, or poll GET /shipment for recent changes.

#5. Send your own statuses (optional)

If you move freight and want to report status back to CUDA:

  1. Map your status names to CUDA status ids with PUT /partner/status-mappings, using the ids from GET /shipment/status. Each PUT replaces your whole mapping.
  2. Post each update to POST /shipment/{id}/status with externalEventId, status (your status name) and occurredAt (ISO 8601).

A status that matches neither your mappings nor a CUDA status code or name is rejected with 422. The response names the status, so you can add a mapping.

#6. Documents

Attach files such as PODs with POST /shipment/attachments/{id}/upload (by shipment UUID) or POST /shipment/attachments/upload-by-reference (by reference number or cudaId). Both take multipart/form-data with file and attachmentType. List a shipment’s files with GET /shipment/attachments/{id}.

#Limits and conventions

  • Pagination: list endpoints take limit (default 25, maximum 100) and offset, and return total. Page until offset >= total.
  • Dates: dates and timestamps are ISO 8601.
  • Errors: errors return JSON with statusCode and message. Common statuses:
LIMITS AND CONVENTIONS
StatusMeaning
400Invalid input
401Missing or unknown key
403The key isn’t allowed to do this
404Not found, or outside your scope
409Conflict: the shipment changed since you read it, or it’s already invoiced
422The request is valid but can’t be applied
  • Polling: poll gently and use webhooks where you can. A tight loop over every shipment slows the API for everyone.

#Getting help

Contact your CUDA rep for:

  • access and API keys;
  • which organizations and forwarders your key should cover;
  • anything the API docs don’t answer.

When reporting a problem, include:

  • the environment;
  • the endpoint and time (with time zone);
  • the shipment id or cudaId;
  • the response body.

Never send your API key.

CUDA Cartage TMS

CUDA EXTERNAL API · REFERENCE /docs · THIS GUIDE /onboarding

CUDA app: checking…