Skip to main content

Syncing foundation entities

Before carrier invoices can match or customer invoices can bill, Upwell needs the data they reference: customers, carriers, shipments, and (for AP) bills. This page covers how to push those records from your TMS.
If you haven’t read it yet, start with Core concepts & data model — it defines every object mentioned here and how they connect. For patterns that apply to every endpoint (integer-cents money, the input wrapper, the presigned upload), see Integration patterns.

Sync order

Entities reference each other, so push them in dependency order:
1

Customers and carriers

These two are independent — sync them in any order (or in parallel). Everything downstream needs at least one of them.
2

Shipments

A shipment references a customer and a carrier by their Upwell IDs (customerId, carrierId). Sync those first, store the returned IDs, then sync shipments.
3

Bills (AP only)

A bill references a shipment and a carrier. Optional for AR-only integrations.
4

Invoices, carrier invoices, payments

These are the transactional records — each guide has its own page: Customer invoices (AR), Carrier invoice submission (AP), Customer payments.

Customers

POST /api/rest/customers creates a customer (shipper). Store the returned id — you’ll need it on shipments and invoices.
FieldRequiredNotes
nameYesCustomer display name.
sourceSystemRecommendedYour TMS identifier constant — enables upsert-by-source-system-id.
sourceSystemIdRecommendedYour TMS’s primary key for this customer. Together with sourceSystem, this is the unique external handle.
emailAddressRecommendedUsed for invoice delivery if sending invoices from Upwell.
paymentDiscountTermsNoPayment terms string (e.g. "Net 30"). Drives AR aging and reminder timing.
To update an existing customer, use PUT /api/rest/customers/{id} (by Upwell ID) or PUT /api/rest/customers with sourceSystem + sourceSystemId in the body to update by your external key.
POST is not idempotent for customers — re-posting a (sourceSystem, sourceSystemId) pair that already exists returns a 400 Uniqueness violation. Use POST for first sync, PUT for updates. See Integration patterns.

Carriers

POST /api/rest/carriers creates a carrier. Same pattern as customers.
FieldRequiredNotes
nameYesCarrier display name.
sourceSystem / sourceSystemIdRecommendedExternal key pair — same pattern as customers.
mcNumberNoMotor carrier number.
dotNumberNoDOT number.
scacNumberNoStandard carrier alpha code. Helps Upwell match carrier invoices that reference a SCAC instead of a name.
email, phoneNoContact info.
Updates: PUT /api/rest/carriers/{id} (by Upwell ID) or PUT /api/rest/carriers (by sourceSystem + sourceSystemId in the request body).

Shipments

POST /api/rest/shipments creates a shipment (load). A shipment ties together a customer and a carrier and is the hub that invoices, bills, and documents hang off.
FieldRequiredNotes
shipmentIdYesA unique string identifier — NOT NULL, no server default. Generate from your own key, e.g. "YOUR_TMS-SH-50012".
sourceSystem / sourceSystemIdRecommendedExternal key pair.
customerIdRecommendedUpwell customer ID (cus_…). Links the shipment to AR.
carrierIdRecommendedUpwell carrier ID (car_…). Links the shipment to AP.
customerTotalRateRecommendedWhat you charge the customer, in integer cents. $4,500.00450000.
carrierTotalRateRecommendedWhat you owe the carrier, in integer cents.
carrierProNumberRecommendedCarrier PRO number — the strongest match key Upwell uses to match inbound carrier invoices to shipments.
customerPoNumberNoCustomer purchase order number.
billOfLadingNumberNoBill of lading number.
referenceNumbersNoComma-separated additional references.
pickupAt, deliveredAtNoISO 8601 timestamps.
statusNoShipment status string (e.g. DELIVERED, IN_TRANSIT).
modeNoFreight mode (TL, LTL, INTERMODAL, etc.).
shipmentId is required and has no server default — omitting it returns a 400 constraint-violation. This is different from the id Upwell assigns (like shi_abc123); shipmentId is your own human-readable identifier.
Updates: PUT /api/rest/shipments/{id}.

Bills (AP only)

A bill is the expected payable — what your TMS says you should owe a carrier for a shipment. When a carrier invoice arrives, Upwell audits it against the bill and flags mismatches as exceptions. POST /api/rest/bills creates a bill:
FieldRequiredNotes
sourceSystem / sourceSystemIdRecommendedExternal key pair.
carrierIdRecommendedLinks the bill to a carrier.
proNumberRecommendedThe shipment/load identifier — must match the target shipment’s shipmentId value so Upwell can link the bill to the shipment for audit comparison. This is not the carrier’s PRO number (that goes on the shipment as carrierProNumber).
referenceNumberNoYour internal reference number for this bill.
totalAmountRecommendedExpected payable in integer cents. This is the amount Upwell compares against the carrier invoice during audit.
issueDateNoBill issue date (YYYY-MM-DD).
dueDateNoPayment due date (YYYY-MM-DD).
currencyNoDefaults to USD.
statusNoBill status.
Updates: PUT /api/rest/bills/{id}.
Bills are optional for carrier-invoice processing — Upwell can still receive and classify carrier invoices without a matching bill. But without a bill, the exception audit can’t compare expected vs. actual amounts, so you won’t get amount-mismatch exceptions. If your TMS tracks expected carrier costs, push them as bills.

Keeping records in sync

Most TMS integrations run a two-phase sync:
  1. Initial load — push all active customers, carriers, and shipments via POST. Store the returned Upwell IDs in your system.
  2. Ongoing sync — when a record changes in your TMS, push the update via PUT. You can update by Upwell ID (PUT /api/rest/<resource>/{id}) or by source-system key (PUT /api/rest/<resource> with sourceSystem + sourceSystemId in the body).
Your TMS fires a webhook on every create/update, and your integration pushes the change to Upwell immediately. This is the lowest-latency option — records are usually in Upwell within seconds. Best for TMS platforms with outbound webhook support.
A cron job queries your TMS for records changed since the last run and pushes them to Upwell in bulk. Simpler to build; latency depends on your schedule (typically 5–15 minutes). Best for TMS platforms with a “changed since” query API.
Upwell calls your TMS’s API on a schedule to pull new/changed records. Requires your TMS to expose a query API. Contact Upwell to set this up.

What’s next

Once foundation entities are in Upwell, you can build on top of them:

Customer invoices (AR)

Create customer invoices tied to shipments.

Carrier invoice submission (AP)

Submit carrier invoices for audit and matching.

Shipment documents

Attach BOLs, PODs, and other documents to shipments.

Customer payments

Record remittances from customers.