AR Records: Third Party → Tai

Four ways to push AR data from your accounting system into Tai — create customer invoices against a shipment, post variances for review, correct shipment-charge pricing before accounting locks, or fall back to activity logs.

What this is for

Some brokerages generate customer invoices from an ERP, a factoring platform, or a purpose-built billing engine rather than from Tai. When that engine emits an invoice, you push it into Tai so the shipment's financial cycle closes on both sides — Tai's aging matches your GL, operators see "Invoiced" instead of "Ready to Invoice," and any downstream Tai reporting stays consistent.

Mirror of the AP → Tai flow: create when the invoice reconciles cleanly, variance when it doesn't, update charges when sell-side pricing needs correction before invoicing, and activity log as the fallback.

1. Create Invoice

Generate a customer invoice against a Tai shipment. Invoice totals are derived from the shipment's sell-side pricing at the time of creation — so make sure any pricing corrections (below) happen first.

POST  /PublicApi/Accounting/v2/Invoices

View in API Reference →

Request payload

{
  "shipmentId": 131382699,
  "invoiceDate": "2026-09-04T00:00:00Z",
  "markAsPrinted": true
}
FieldRequiredNotes
shipmentIdYesTai's shipment ID this invoice attaches to.
invoiceDateYesAccounting date for the invoice.
markAsPrintedNoIf true, the invoice is stamped as printed at creation — useful when the third party has already generated and sent the customer copy.

Response (200) — returns the full PublicAPIInvoice in the shape shown on AR Records: Tai → Third Party, including the newly-assigned invoiceId. Save this for the sync status update.

2. Post a variance (route for review)

When the invoice can't be generated cleanly — sell-side pricing disputed, missing accessorial approval, customer-specific billing rule needing human judgment — route the shipment's invoice into Tai's variance queue for a Tai user to resolve in the UI.

POST  /PublicApi/Accounting/v2/Invoices/Variance?shipmentId={id}

View in API Reference →

Query parameter only, no request body. Whole-invoice scope (unlike Bill Variance, which is per transit leg + vendor).

POST /PublicApi/Accounting/v2/Invoices/Variance?shipmentId=131382699

Common error — attempting variance on a shipment whose invoice charges are locked:

["Shipment contains chargelines in status not allowed for variance."]

3. Update Shipment Charges (sell-side pricing)

Correct the sell-side pricing on the shipment before the invoice is cut. Use when your billing engine or an audit process catches that the customer was quoted the wrong rate, an accessorial needs adding, or a customer-specific adjustment applies.

PUT  /PublicApi/Shipping/v2/ShipmentCharges

View in API Reference →

Request payload

{
  "referenceNumbers": [
    { "referenceType": "ShipmentId", "value": "131382699" }
  ],
  "transitType": "Linehaul",
  "charges": [
    {
      "chargeType": "Linehaul",
      "price": 2175.00,
      "calculationType": "Flat"
    },
    {
      "chargeType": "Fuel",
      "price": 256.75,
      "calculationType": "PercentageOfLinehaul"
    }
  ],
  "accessorialCharges": [
    {
      "accessorialCode": "DETENTION",
      "price": 150.00,
      "calculationType": "Flat"
    }
  ]
}
FieldRequiredNotes
referenceNumbers[].referenceType + valueYesIdentifies the shipment. Common referenceType: ShipmentId, BrokerReference, CustomerReference, BillOfLading, PurchaseOrder.
transitTypeYesWhich leg: Linehaul, PickupLocal, DeliveryLocal, Ocean, Air, etc.
charges[].chargeTypeYesEnum: Linehaul, Fuel, Pickup, Delivery, Insurance, Handling, Detention, Lumper, Warehouse, AirFreight, OceanFreight, CustomsEntry, MiscCharges, OtherCharges, and many more.
charges[].priceYesDollar amount for the line.
charges[].calculationTypeYesFlat, CWT, CubicFoot, Density, DimensionalWeight, External, Mileage, MinCharge, Pallet, PercentageOfLinehaul, Pieces, Pound, Ton, PerQuantity, Call.
accessorialCharges[].accessorialCodeYesBroker-defined accessorial code (e.g. DETENTION, LFTD, APTD).
🚧

Accounting Lock

This endpoint is not available once accounting has occurred for the leg. Once an Invoice has been created against the specified transit leg, its charges are locked and this call will be rejected. Use Post a variance (above) instead to flag a Tai user for manual reconciliation.

4. When nothing above fits — Activity Log fallback

Customer not on file, billing address missing, rate needs manager approval — post the details as an activity log on the shipment so a Tai user can act on it.

POST  /PublicApi/Shipping/v2/ShipmentActivityLogs

View in API Reference →

See Shipment Activity Logs for the payload shape and how to write actionable error messages.

Close the loop

After you've created (or variance-flagged) the invoice in Tai, close the loop with sync status so Tai carries your target system's transactionId on the Tai record for future cross-referencing.

PUT  /PublicApi/Accounting/v2/Invoices/Sync

View in API Reference →

Full details: Sync Status Updates.


Did this page help you?