Documentation Index
Fetch the complete documentation index at: https://docs.upwell.com/llms.txt
Use this file to discover all available pages before exploring further.
Integration patterns
The endpoint reference describes what each endpoint accepts. This page covers the how — patterns we’ve seen customers hit when building against Upwell. Reach for this page when you’re wiring up an integration and something the reference seems to imply doesn’t quite match what the API does at runtime.Idempotent upserts via sourceSystem + sourceSystemId
Every primary record (customers, carriers, shipments, invoices, bills) carries two fields:sourceSystem— a constant string identifying you (e.g."TMSEZ")sourceSystemId— your own primary key for the record
POST. For updates, use PUT /<resource>/{id} with the Upwell id you stored on first sync — or one of the by-source-system-id endpoints (e.g. PUT /api/rest/carriers/by-source-system-id/{id}).
All monetary fields are integer cents
Money is stored as integers in the smallest currency unit (US cents for USD). A $2,847.50 shipment rate goes over the wire as284750. This applies to customerTotalRate, carrierTotalRate, totalAmount, balance, totalTaxAmount, and similar fields.
Float values are rejected at runtime:
Required fields without server-side defaults
A few fields areNOT NULL in our schema and have no default — you need to provide them on insert.
| Endpoint | Field | What to send |
|---|---|---|
POST /api/rest/shipments | shipmentId | A unique string. Generate from your own id, e.g. "YOURSYS-SHIP-1001". |
POST /api/rest/invoices | balance | Outstanding balance in cents. For a new invoice this equals totalAmount. |
400 constraint-violation with the column name in the error message:
Document sourceSystem / sourceSystemId pair constraint
Ondocuments, the check constraint documents_source_system_pair_nullity_chk requires both fields to be set or both to be null. Setting only sourceSystem without sourceSystemId fails with:
sourceSystemId alongside sourceSystem. If you don’t have a meaningful external id for a document, generate one (e.g. a UUID, or <your-system>_doc_<timestamp>).
Document upload: two-step presigned URL
For any document larger than ~3 MB (typical for scanned PODs and BOLs), don’t use the inline-base64 endpoints. Use the two-step flow:POST /api/rest/generate-upload-presigned-urlwith{ associationType, associationId, documentType, fileName, mimeType, sourceSystem, sourceSystemId }returns{ documentId, uploadUrl }.PUTthe file bytes directly touploadUrl.
Wrapping POST payloads
For most insert endpoints, the request body shape is:{ "inputs": [...] }. If you get a bad-request: Unexpected variable <fieldName> error, your payload likely needs to be wrapped in input.
Authentication header format
Send your API key directly in theAuthorization header, with no Bearer prefix:

