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
Environment API base URL API docs Web app (for your API key)
Production https://public.cudacartagetms.com /docs https://app.cudacartagetms.com
Test https://public-test.cudacartagetms.com /docs https://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.

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
Endpoint Returns
GET /shipment/status The 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}/history Every 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>" } ] }
}'

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

LIMITS AND CONVENTIONS
Status Meaning
400 Invalid input
401 Missing or unknown key
403 The key isn't allowed to do this
404 Not found, or outside your scope
409 Conflict: the shipment changed since you read it, or it's already invoiced
422 The request is valid but can't be applied

#Getting help

Contact your CUDA rep for:

When reporting a problem, include:

Never send your API key.