API Reference
Energy Connect Public API v1 — RESTful JSON over HTTPS
Download the current OpenAPI contract · Explorer · Integration guide
Last updated
Quickstart
Base URL: https://api.energyconnecter.ai/v1/public
The API covers 158 endpoints across 18 resource groups: Orders (53), Pricing (14), Connections & Freight Rates (12), Invoices (12), Capacity Exchange (11), Companies (9), Webhooks (8), Locations (7), Supplier Terminals (5), Tax Rates (5), API Keys (4), Allocations (3), Load Board (3), Payments (2), and one each for Customers, Suppliers, Product Taxonomy and Reference Data. Every operation is listed below; the same inventory is also available as plain text, one line per operation, at /llms-full.txt.
Authentication
Pass your API key either as an X-API-Key header or as an Authorization: Bearer token — both are accepted. Keys start with ec_live_ (production) or ec_test_ (sandbox: isolated test company). A test key never reads or changes live data, sends no email or SMS, is not billed and has its own monthly cap; once authenticated, its responses carry X-EC-Sandbox: true.
curl -H "X-API-Key: ec_live_your_key_here" \ https://api.energyconnecter.ai/v1/public/orders # equivalently, as a Bearer token: curl -H "Authorization: Bearer ec_live_your_key_here" \ https://api.energyconnecter.ai/v1/public/orders
Idempotency
Every write (POST, PUT, PATCH, DELETE) requires an Idempotency-Key header — 16–200 characters of A-Za-z0-9_-. A UUID works. Omit it and the call returns 400 IDEMPOTENCY_KEY_REQUIRED. The only exception is POST /pricing/freight-calculate, which computes and writes nothing.
Use a fresh key for every distinct request. Retrying with the same key and the same body replays the original response — marked Idempotency-Replayed: true — without re-running side effects such as dispatch SMS or email. Records are kept for 24 hours. Reusing a key with a different body returns 409 IDEMPOTENCY_KEY_CONFLICT; a key whose original request is still in flight returns 409 IDEMPOTENCY_IN_FLIGHT with Retry-After. A key whose request ended in a 5xx returns 409 IDEMPOTENCY_OUTCOME_UNKNOWN: the write may have completed, so check the resource rather than resubmitting. After a 504 REQUEST_TIMEOUT the key is held for the full 24 hours; after any other 5xx, for 60 seconds (Retry-After gives the time left), and then a retry runs. After a 4xx the key is free at once, so you can fix the request and retry it.
curl -X POST https://api.energyconnecter.ai/v1/public/delivery-tickets \
-H "X-API-Key: ec_live_your_key_here" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"bolNumbers":["1234567"]}'
Rate Limits
600 requests/min burst50,000 billable requests/month
RateLimit-* headers on every response; Retry-After on 429
Response Format
Success: { success: true, data: ... }
List: { success: true, data: [...], meta: { total, page, pageSize, totalPages, hasMore } }
Error: { success: false, error: { code, message } }
Pagination
Use ?page=1&pageSize=20 query params.
Max pageSize is 100 (500 for connections).
To sync only what changed, GET /orders, /invoices and /delivery-tickets take ?updatedSince=: walk with meta.nextCursor passed back as cursor until hasMore is false.
Errors
400 VALIDATION_ERROR • 401 INVALID_API_KEY403 INSUFFICIENT_SCOPE • 404 NOT_FOUND429 RATE_LIMIT_EXCEEDED (error.kind: burst = retry soon, quota = monthly cap, wait for resetAt)
Versioning & deprecation
Within /v1 the contract only grows. An integration built against it keeps working, unchanged, for the life of /v1.
What v1 guarantees
- No endpoint, field or enum value is ever removed or renamed in place. A renamed concept keeps its old key as a permanent alias (
gallons/unitbesidequantity/unitCode). - We may add endpoints, optional request fields, response fields and enum values. Ignore fields you don't recognise and tolerate unknown enum values.
- Also treated as breaking, so they do not happen in v1: changing a field's type or meaning, tightening validation of existing input, changing a default (sort, page size, filter), changing the status code for an existing situation, making an always-present field nullable, and adding a required request field.
When a breaking change is needed
It ships as /v2/public, running beside v1. v1 stays up at least 12 months after v2 is generally available, and at least 6 months after the last active v1 caller migrates. Retirement is announced, then dual-run, then scheduled and announced brownouts (short 410 windows), then 410 Gone pointing to the migration guide. Nothing is removed silently.
Notice periods
| Change | Notice |
|---|---|
| Additive change | Changelog entry |
| Rate limits, quotas, IP policy | 30 days |
| Deprecation of v1 | 12 months before sunset |
| Brownout windows | Listed in the deprecation notice; reminders 30 and 7 days before each |
| Emergency security fix | Direct contact, before or at rollout |
Notices go to the creator of each affected active key and to the company's primary contact, name a person to reply to, and are recorded in the changelog below. A fix for behavior that contradicted this documentation can ship within v1 and is listed there too.
Changelog
- —
POST /v1/public/ordersandPUT /v1/public/orders/:idrefuse a fuel line in a unit that is not a volume (pounds, tons, each and the like, whether sent inlines[].unitCodeor inherited from your catalog default or a tank) with400 FUEL_LINE_NEEDS_VOLUME_UNIT; it was accepted before. A fuel line in liters or another volume unit is still accepted, and its per-gallon fees are priced on its quantity converted to gallons. Usage measured 2026-11-30 (every rawapi_usagerow kept, back to 2026-09-01): one API key calledPOST /v1/public/orders36 times andPUT /v1/public/orders/:id13 times, every call succeeded, and all 190 lines on that company’s orders from 2026-10-28 to 2026-11-13 usegal, so no integration depended on the old answer and no notice is owed under §4. - —
POST /v1/public/capacity-listings/:id/bids: a second bid from a company that already has aPENDINGbid on the listing answers409with codeBID_ALREADY_PENDING(“You already have a pending bid on this listing. Edit it instead.”); it returned201and created a second bid before. Edit the pending bid withPATCH /v1/public/capacity-bids/:id. Usage measured 2026-11-30 (every rawapi_usagerow kept, back to 2026-09-01): no public capacity route was called, so no integration depended on the old answer and no notice is owed under §4. - — Order documents: a carrier key holding
haul_execution:writecan attach and delete its own BOL and POD on hauls assigned to it, and request thehaul_bol,haul_pod,order_bolandorder_poduploads. A key with onlyhaul_execution:writethat is not a party to the order gets404, not403, on attach, delete and upload. Keys withorders:writeare unchanged. - — Added:
POST /v1/public/invoice-amendments/:id/decline(payer) and.../withdraw(issuer);POST /v1/public/invoices/:id/dispute,.../dispute-responseand.../dispute-resolve.GET /v1/public/invoices/:idnow returnsdisputeReason,disputeResponse,disputeRespondedAt,disputeResolutionanddisputeResolvedAt(eachnulluntil it happens). Nothing existing changed. - — Connections: an agent whose request got an info request can see it, answer it and hear about it.
GET /v1/public/connectionsand/:idreturninfoRequest(while the status isINFO_REQUESTEDorRESUBMITTED) anddeclineReason. NewPOST /v1/public/connections/:id/resubmit(requester only, no body).connection.updatedalso fires withINFO_REQUESTEDandRESUBMITTED; a consumer that switches onstatusshould handle both. The spec also listsDISCONNECTED(already returned) and dropsmessage(never returned). Additive. - — Docs: error codes corrected on my-bids, the owner’s bid list, bid submit, accept, decline and reconfirm; each lists the codes it returns, and the withdraw, re-counter and decline notes say when each returns
409. No behaviour change. - — A public path id that is not a UUID, on an endpoint that answered
503for it, now answers400 VALIDATION_ERROR. The company profile, retired supplier-ordering and terminal price routes are unchanged. A malformed second id (bidId,docId,fileId) now answers400even when the parent is not yours (it was404), and the400body is thedetails.errors.paramsform. - —
PUT /v1/public/orders/:id/bids/:bidId/withdraw: an owner withdrawing a bid it placed itself (a self-bid on an internal bid) now gets200while the bid isPENDINGorPENDING_CONNECTION, and400once it is closed, like the carrier. Both were409since 2026-11-25. The owner’s withdraw on another company’s bid is unchanged. - — Bids: withdrawing a bid on a load you neither posted nor bid on returns
404, like an unknown bid, not403. A key withoutorder_bids:writestill gets403. - —
POST /v1/public/orders/:id/assignee-cancelanswers409while a reported failed delivery attempt is open on a CONFIRMED or IN_TRANSIT load; it returned200and cancelled the load before. The poster reschedules or converts the load to a dry run, and cancel works again after that. A contract decline from ASSIGNED is not affected. Usage measured 2026-11-28 (every rawapi_usagerow kept, back to 2026-08-30):POST /v1/public/orders/:id/assignee-cancelwas never called, so no integration depended on the old answer and no notice is owed under §4. - —
POST /pricing/imports/terminal-aliases: a404for asupplierTerminalIdthat is not yours now says “Terminal not found or not yours” (it said “SupplierTerminal not found”). The status anderror.code(NOT_FOUND) are unchanged; match on the code, not the message. - — Docs: error codes corrected on counter, re-counter, withdraw and my-bid:
404and409are listed where returned, and my-bid no longer lists400. Since 2026-11-25 the owner’s withdraw on a bid that is notCOUNTEREDreturns409. No behaviour change. - — Docs: the price-sheet import preview example shows
dataCount, and the batch read listserrorMessage. No behaviour change. - — Price-sheet imports: each
previewRowsitem now hasisMalformedRow, andGET /pricing/imports/{id}returnsfileSha256. The commit body is optional when every data row fits in the preview. - — Delivery tickets: a company that is not the ticket's issuer, supplier or receiver gets
404, like an unknown id, not403, on read, PDF, update and sign. Attaching or removing an order document on an order you are not on also gets404. A party acting outside its role still gets403. - — Docs: since 2026-11-21, a 7th decimal on
rate(bid) andcounterRate(counter) is rounded half-up to 6, not a400; a new re-counter rate with a 7th decimal is still a400. Corrects 2026-11-11. - — Connections:
GET /connectionsandGET /connections/{id}now returnshipToCodes, your own active ship-to ERP codes on the connection (the valuesPOST /orderstakes asshipToErpId). Never the other company’s. Empty when none. Additive. - — Price-sheet imports: the preview now returns
fileSha256, and committing a batch with more data rows than the 50 previewed requiresfileSha256andacknowledgeUnseenRows: truein the body. Without them the commit returns400and writes nothing. Dale, DTN and Venture sheets with no effective date now preview as malformed instead of being dated now. - — Docs: the supplier-terminal update body is partial, and location create lists its contacts, schedules and assets. No behaviour change.
- — Docs: order create and update list
terminalErpId,creditHoldAcknowledgedandfees;customerReferenceis not accepted;loadingNumbertakes 50 characters; any catalog unit code is valid. No behaviour change. - — Docs: the order bid body is required and must carry a price, and
poNumberis required on the PO update. No behaviour change. - — Docs: the webhook update body lists the accepted event names, and the uploads context names the CSV import scope. No behaviour change.
- — Docs: bulk rack prices note at most 6 decimal places, and the freight calculator lists
destinationCityanddestinationState. No behaviour change. - — Docs: connection freight rates: the update body applies no defaults and lists its accepted fields, fee
basisis documented,connectionIdcomes from the path on create, andeffectiveAtdefaults to now. No behaviour change. - — Bids:
rateonPOST /orders/{id}/bidsandPUT /orders/{id}/bids/{bidId}/re-counter, andcounterRateonPUT /orders/{id}/bids/{bidId}/counter, allow at most 6 decimal places; more is a400. A re-counter at exactly the countered rate is always accepted. - — Deliveries:
phaseadds the valueloadedfor a confirmed load that has been loaded and not yet departed. Such a load readscheduledbefore. - — Orders you create or update with
shipToErpIdnow return that value asshipToErpIdon your own reads, on the order and on each stop. It was null before. - — Order lines add
supplierErpIdandterminalErpId: your own back-office ids for the line's supplier and terminal, the same ids you can send onPOST /orders. Null when you hold no id for it, or more than one. - — Orders:
productErpIdon order lines also matches your own product's exact name (case-insensitive) when no id or code matched. A name shared by two of your products returns409 ERP_ID_AMBIGUOUS. - — Orders: create and update by your own
customerErpId/shipToErpId. An unsupported<name>ErpIdfield (e.g.productErpId) is now a400, not silently ignored. - — Invoice amendments: changing the lines now recomputes the tax. Omit
total, or include the new tax in it. - — Freight: a connection freight rate with no base price (none at all, or only a fuel surcharge, which is a percent of a zero base) no longer quotes $0 freight.
POST /pricing/freight-calculateand freight ranking skip it and fall through to the next rate or the default calculation. No request or response shape changes. - — Orders: supplier ordering is withdrawn. Suppliers are assigned on order lines and never receive orders.
POST /orders/{id}/send-to-supplier,/supplier-acceptand/supplier-declinenow return410 Gone;role=supplierlists nothing;pendingPriceRequestandsupplierCompanyIdare null. - — Orders: suppliers take orders from customers.
role=supplierlists the orders a customer sent you; newPOST /orders/{id}/send-to-supplier,/supplier-acceptand/supplier-decline; orders carrysupplierCompanyId(null on carrier and broker reads). - — Orders:
pendingPriceRequestshows a price change (new rate, higher quantity, added or dropped line) you filed on an order a supplier accepted, until the supplier answers or the load goes in transit; null otherwise and on carrier and broker reads. - — Order lines add
productCode(product master id, e.g. DSL-ULSD-2) andterminalCode(IRS terminal control number, as onGET /master-terminals). Exact matches only: null when uncertain, so fall back to the name. - — Allocations: rows add
brand("" = unbranded) andsupplierId(granting supplier; null on your own row), so rows sharing terminal, product and period differ. - — Idempotency: a write that ends in a
5xxno longer releases itsIdempotency-Key. A retry with the same key gets the new409 IDEMPOTENCY_OUTCOME_UNKNOWN: for 24 hours after a504 REQUEST_TIMEOUT, which can still complete, and for 60 seconds after any other5xx, then the retry runs. A retry used to run a timed-out write a second time. A4xxstill frees the key at once. - — Invoices, invoice amendments and payments: a company that is neither the issuer nor the payer gets
404, the same as an unknown id, instead of403. A payer reading an unissued draft by id also gets404. A party acting outside its role still gets403. - — Price imports: committing a batch creates new supplier terminals for unmapped terminal codes only when the key also holds
supplier_terminals:write. Withpricing:writealone, those rows are skipped and their codes are listed in the newunresolvedTerminalCodesresponse field. Map them with/pricing/imports/terminal-aliasesand import again. - — Locations: a schedule day marked open must carry both
openTimeandcloseTime. A closed day needs neither. - — Locations: an empty
contacts,schedulesorcompartmentsarray returns400instead of deleting every row. Omit the field to leave it unchanged; setisActive: falseto stand a site down. - —
PUTon orders, locations, companies and supplier terminals is genuinely partial: fields you don't send are left unchanged. Schema defaults used to overwrite them. - — Order lines accept any unit in the units-of-measure catalog and fractional quantities.
gallons/unitremain permanent aliases.
Browse endpoints
Orders
List orders (paginated, filterable) orders:read
Note: lines[].id is the order line's id — the id productPricing.lines[].lineId (POST /orders/{id}/bids) targets. lines[].quantity/unitCode are additive aliases of gallons/unit (same value). gallons/unit are the permanent public contract — they are never removed. On a split load, every list row carries lines[].allocations (how much goes to which stop). An ORIGINATOR list row returns deliveryStops [] and deliveryProgress null — the drop addresses come from GET /orders/{id}. A role=carrier list row carries the stops of hauls assigned to you, with the same masking the detail read applies (site name and street/zip/lat/lng withheld until you accept the offer), and deliveryProgress alongside them. role=carrier rows also carry shipToErpId (see GET /orders/{id}). creditApprovalRequired/creditApprovedAt: true/unset while a customer on your company's credit hold is unapproved — publish then returns 409 CREDIT_APPROVAL_REQUIRED. false on every other order. pendingPriceRequest: on an order a supplier has accepted, a price change your company filed that the supplier has not answered yet, as { id, createdAt, lines: [{ change, sortOrder, product, fromRate, toRate, fromQuantity, toQuantity }] } — change is price (a new rate), quantity (a higher quantity; fromQuantity and toQuantity set, the rates null), added (a line not on the order until approved; sortOrder and fromRate null) or removed (a line that stays on the order until approved; toRate null). fromQuantity and toQuantity are null on every change but quantity. Rates are per unit, up to 6 decimals. It expires to null when the load goes in transit; from then on the agreed price is final. null when there is none, and always null on role=carrier and role=broker reads.
Parameters
| Name | Type | Description |
|---|---|---|
| role | string | originator = orders your company posted; carrier = hauls assigned to your company. Carriers that never post orders must pass role=carrier to see their loads. Carrier rows are masked for disintermediation until the haul is ACCEPTED — acceptance is the only gate, unless the poster has flagged your company as a trusted partner on your connection, in which case destinationName and the full address arrive at every status, including unaccepted offers. A trusted partner also receives shipToContact — the ship-to's on-site contact (name, title, email, phone), order level and per stop; the key is absent, never null, when you are not trusted. role=originator receives it whenever the ship-to resolves one; no trust flag is involved on your own orders. Otherwise, while a load is still an unaccepted offer you receive the destination city and state only: street, ZIP, lat/lng, destinationName and location.name are all null. Once the carrier accepts, the full record is released on the next poll — address, destinationName, location.name, location.companyId, location.contacts[], unscrubbed notes and un-redacted document filenames. seriesId is always null on carrier rows, and product/sortBy/sortOrder are ignored. Petition orders (isPetition: true — a load your company requested from a partner carrier for a managed site) can appear with status PETITIONED (awaiting the partner’s approval) or PETITION_DECLINED, and are exempt from the end-customer mask because the petitioner authored the customer details. Originator rows carry seriesId (the recurring-series id, null for one-off orders) so ERPs can dedupe recurring occurrences. broker = loads a supplier posted directly to your company as its broker, at every status unless status narrows it, masked like the broker portal: location.name and location.companyId are always null, destinationName stays null until you accept (unless the poster marks you a trusted partner), and lines carry the freight rate but never the poster’s buy/sell prices. supplier = deprecated: supplier ordering was removed, so the list is always empty; updatedSince and cursor are refused. bucket is role=carrier only. (default: originator) |
| status | string | Filter by status; comma-separated values are accepted (status=CONFIRMED,IN_TRANSIT). role=originator: DRAFT, POSTED, BIDDING, ASSIGNED, CONFIRMED, IN_TRANSIT, DELIVERED, PENDING_VERIFICATION, INVOICED, CANCELLED. role=carrier sees a different set: ASSIGNED, CONFIRMED, IN_TRANSIT, DELIVERED, PENDING_VERIFICATION, INVOICED, PETITIONED, PETITION_DECLINED — DRAFT and POSTED are the poster's own states and never appear on a carrier read. role=originator: omit this parameter to receive every readable status, including CANCELLED. role=carrier behaves differently — an unfiltered poll returns ACCEPTED hauls only (CONFIRMED, IN_TRANSIT, DELIVERED, PENDING_VERIFICATION, INVOICED), because a load reaches your dispatch system when you accept it. Unaccepted offers (status=ASSIGNED), petitions (PETITIONED, PETITION_DECLINED) and cancellations (CANCELLED) are each opt-in by name. Note that accepting a load MOVES it off ASSIGNED: status=ASSIGNED is a feed of pending offers you have not taken yet, it is address-masked, and a load leaves it the moment you accept. Poll it to see what is offered or to de-duplicate, but use bucket=dispatch_ready for work you can actually dispatch. status=all returns every readable status including CANCELLED, which an omitted filter no longer does here. Ingesting completed hauls: pickup/delivery volume data appears once a haul reaches PENDING_VERIFICATION, but a load that a dispatcher marks delivered stops at DELIVERED and never advances — poll DELIVERED, PENDING_VERIFICATION and INVOICED together, or omit the filter, so those loads are not missed. |
| bucket | string | role=carrier only. Filters by lifecycle stage rather than raw status, for states that combine a status with dispatch progress and so cannot be expressed as a status alone. dispatch_ready = accepted, no driver sent yet: the loads you can dispatch now. assigned = the carrier portal's Assigned tab (offers plus accepted-not-dispatched). Also loading, loadcomplete, delivering, complete, invoiced, cancelled, petition, petition_declined. delivering never carries cancelled loads: a load cancelled mid-transit leaves the bucket immediately — sweep bucket=cancelled (or status=CANCELLED) to catch tombstones. A bucket replaces the status filter: sending both is a 400, as is bucket with role=originator. Offers reached via a bucket stay address-masked until accepted. |
| product | string | Filter by product name (role=originator only) |
| search | string | Free-text search |
| dateFrom | string | ISO 8601. Inclusive lower bound on the order's effective delivery date — reported delivery, else scheduled, else requested, else creation time. Both roles. |
| dateTo | string | ISO 8601. EXCLUSIVE upper bound on that same date — send the next window's first instant (e.g. the 1st of next month) to page history a month at a time. |
| sortBy | string | Sort field (createdAt, requestedDate, status, updatedAt) — role=originator only (default: createdAt) |
| sortOrder | string | Sort direction (asc, desc) — role=originator only (default: desc) |
| updatedSince | string | ISO 8601. Sync walk: only rows changed at or after this time, oldest change first (updatedAt, then id). sortBy, sortOrder and page are ignored, and meta becomes { pageSize, hasMore, nextCursor }. Pass meta.nextCursor back as cursor until hasMore is false; keep the last one to resume your next sync run. Changes from the last 60 seconds are held back until they settle. Deleted rows, and rows that leave your filter, stop appearing rather than being reported, so reconcile missing rows by id. |
| cursor | string | meta.nextCursor from the previous page of an updatedSince walk. Opaque; requires updatedSince. |
| page | integer | (default: 1) |
| pageSize | integer | Max 100 (default: 20) |
Response
{
"success": true,
"data": [
{
"id": "a1b2c3d4-...",
"status": "POSTED",
"orderType": "direct",
"urgency": "routine",
"lines": [
{ "id": "line-uuid-...", "product": "ULSD #2", "gallons": 8000, "quantity": 8000, "rate": 2.85, "terminal": "Kinder Morgan - Carteret", "allocations": [] }
],
"isSplitLoad": false,
"creditApprovalRequired": false,
"creditApprovedAt": null,
"deliveryStops": [],
"deliveryProgress": null,
"requestedDate": "2026-05-23T14:00:00Z",
"createdAt": "2026-05-21T09:15:00Z"
}
],
"meta": { "total": 47, "page": 1, "pageSize": 20, "totalPages": 3, "hasMore": true }
}Get order details with lines, bids, pickup, delivery, and per-BOL rows (bols[]) orders:read
Note: lines[].id is the order line's id — source it here to target productPricing.lines[].lineId when placing a formula bid (POST /orders/{id}/bids). isExtraction: true marks an order that pulls product OUT of a tank (posted by typing negative line quantities) rather than delivering it; the API always reports POSITIVE quantity values regardless of this flag — the sign is stripped and stored only as this boolean. destinationName is the end-customer / site name: always returned on orders your company posted, and on role=carrier reads once the haul has been ACCEPTED — or at every status when the poster has flagged your company as a trusted partner on your connection. Otherwise it is null while the load is still an unaccepted offer (ASSIGNED) or was cancelled or declined. shipToContact is the ship-to's on-site contact (name, title, email, phone), returned order level and per stop whenever the ship-to resolves one: on the orders your own key posted (no trust flag involved), and on a role=carrier read only when the poster has flagged you a TRUSTED partner. The key is absent, not null, otherwise. shipToErpId (role=carrier): your own ERP/station code for the delivery site, as you set it with erpId on POST /orders/{id}/accept; also per stop on a split load. Accepted hauls only; null otherwise. On a SPLIT LOAD your own reads omit the ORDER-level field — that ship-to pair is one drop's — and carry the contacts on deliveryStops[] instead. isSplitLoad: true marks a split load — one pickup, several drops — and deliveryStops[] then carries the drops in route order (sequence, site name, address, status) with the planned quantity for each. For the order originator deliveryStops[] is populated on THIS endpoint only — their list rows return []. The ASSIGNED carrier gets the drops on BOTH role=carrier list and detail, MASKED while the haul is an unaccepted offer (status ASSIGNED or CANCELLED): site name null and street/zip/lat/lng withheld, leaving city and state so the offer can still be priced. Accepting reveals each stop's address AND its customer name — every drop then reads as a complete, self-contained delivery. A carrier never sees the stops of a haul it is not assigned to. lines[].allocations, by contrast, come back on every read including the list — they are quantities, so the list already tells you how much goes to how many drops and only the addresses need this call. plannedQuantity is SIGNED: a negative value marks that stop as a transfer/extraction point (product pumped OUT there), a positive one a normal drop — the sign is how you tell which stop is which on a transfer split load. Each stop allocation carries its product, net+gross actuals, and its row id — the allocationId the per-stop delivery submission below uses; assets[] on the stop lists the tanks planned to be filled at that drop. Each stop also reports its own delivery state: status (PENDING → DELIVERED or SKIPPED), deliveredAt, skipReason, and a deliveredQuantity per allocation — the driver's ACTUAL, which is never capped against plannedQuantity in either direction. deliveryProgress summarises those stops ({ total, resolved, pending, isPartiallyDelivered, allResolved }) and is the ONLY way to tell a half-dropped load from an untouched one: there is no PARTIALLY_DELIVERED order status, so a split load reports status IN_TRANSIT until every stop resolves and then moves to PENDING_VERIFICATION like any other haul. deliveryProgress rides wherever deliveryStops does, and is null on originator list rows. Ordinary orders always carry both: false and [], with deliveryProgress total 0 on detail. lines[].supplier.id is never null: an ad-hoc supplier (a name reported for a company not on the platform) carries a stable synthetic UUID derived from the name, flagged adHoc: true — its line-level supplierId stays null. creditApprovalRequired/creditApprovedAt: true/unset while the order is for a customer your company has on credit hold and nobody has approved it yet — POST /orders/{id}/publish then returns 409 CREDIT_APPROVAL_REQUIRED. false/null on every order that is not credit-gated. pendingPriceRequest: on an order a supplier has accepted, a price change your company filed that the supplier has not answered yet, as { id, createdAt, lines: [{ change, sortOrder, product, fromRate, toRate, fromQuantity, toQuantity }] } — change is price (a new rate), quantity (a higher quantity; fromQuantity and toQuantity set, the rates null), added (a line not on the order until approved; sortOrder and fromRate null) or removed (a line that stays on the order until approved; toRate null). fromQuantity and toQuantity are null on every change but quantity. Rates are per unit, up to 6 decimals. It expires to null when the load goes in transit; from then on the agreed price is final. null when there is none, and always null on role=carrier and role=broker reads. computedEta is the live ETA to the destination, recomputed from the driver's position while the load is in transit, and computedEtaAt is when it was last recomputed. Both are originator reads only: always null on role=carrier, null until first computed, and null once the order is delivered or cancelled (as in this example).
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid | |
| role | string | Defaults to the poster view, then the assigned-carrier view. originator = an order your company posted; carrier = a haul assigned to your company. With no role, an order your company posted wins; otherwise a haul assigned to your company resolves as carrier, so an id from GET /orders?role=carrier works here without the parameter. An explicit role=originator never falls back. broker = a load posted to your company as its broker (pass role=broker for ids from GET /orders?role=broker). supplier = deprecated: every id is a 404. Carrier and broker reads carry the same disintermediation masking as the list. (default: originator) |
Response
{
"success": true,
"data": {
"id": "a1b2c3d4-...",
"status": "DELIVERED",
"orderType": "direct",
"urgency": "routine",
"isExtraction": false,
"destinationName": "Acme Fuel Depot",
"isSplitLoad": false,
"creditApprovalRequired": false,
"creditApprovedAt": null,
"deliveryProgress": { "total": 0, "resolved": 0, "pending": 0, "isPartiallyDelivered": false, "allResolved": false },
"deliveryStops": [],
"carrier": { "id": "carrier-co-...", "name": "Eastern Transport LLC" },
"lines": [{ "id": "line-uuid-...", "product": "ULSD #2", "gallons": 8000, "quantity": 8000, "rate": 2.85, "unit": "gal", "unitCode": "gal", "terminal": "Kinder Morgan - Carteret", "supplierId": "supplier-co-...", "supplierIds": ["supplier-co-...", "supplier-co-backup-..."], "supplier": { "id": "supplier-co-...", "name": "Example Fuel Co" }, "lat": 40.5854, "lng": -74.2285, "loadingNumber": "588571", "allocations": [] }],
"poNumber": "PO-4417",
"destinationStreet": "123 Industrial Blvd",
"destinationCity": "Jersey City",
"destinationState": "NJ",
"destinationZip": "07302",
"destinationLat": 40.7178,
"destinationLng": -74.0431,
"fullDestinationAddress": "123 Industrial Blvd, Jersey City, NJ 07302",
"shipToErpId": null,
"location": null,
"acceptedEta": "2026-05-23T15:30:00Z",
"computedEta": null,
"computedEtaAt": null,
"hasPod": true,
"pickup": { "bolNumber": "BOL-20260523-001", "loadingTicket": "LT-7712", "sealNumbers": ["S-1101"], "gallonsLoaded": 8000, "cardInTime": "09:12", "cardOutTime": "09:58", "pickupNotes": null, "confirmedAt": "2026-05-23T14:05:00Z" },
"delivery": { "gallonsDelivered": 7995, "deliveryTicket": "DT-3301", "receiverName": "B. Manager", "receiverTitle": "Site Lead", "sealsIntact": "yes", "meterBefore": 1200.5, "meterAfter": 9195.5, "variance": -5, "submittedAt": "2026-05-23T17:40:00Z", "verifiedAt": "2026-05-24T08:00:00Z" },
"documents": [{ "id": "doc-uuid-...", "docType": "haul_bol", "fileName": "BOL-20260523-001.pdf", "fileSize": 182044, "uploadedAt": "2026-05-23T14:10:00Z", "fileUrl": "https://storage.googleapis.com/…(short-lived)", "downloadUrl": "/v1/public/orders/a1b2c3d4-.../documents/doc-uuid-.../content" }],
"bids": [{ "id": "bid-uuid-...", "status": "PENDING", "rate": 2.85, "message": "Can load tonight", "counterRate": null, "createdAt": "2026-05-21T11:00:00Z", "carrier": { "id": "carrier-co-...", "name": "Eastern Transport LLC" } }],
"requirements": { "hazmat": false, "twic": true, "tankerEndorsement": true },
"requestedDate": "2026-05-23T14:00:00Z",
"createdAt": "2026-05-21T09:15:00Z"
}
}Error Codes
Create a new order (DRAFT — send it with /orders/{id}/publish) orders:write
Note: TANK UNITS: a line built from tanks (assetFills) is in its tanks’ unit. Send no unitCode and the line takes the unit of its tanks (the Location asset’s unit, or the ship-to asset’s at deliveryConnectionId + deliveryAddressId); assetFills[].gallons is the amount for that tank in the line’s unit, whatever the key is called. The order is always saved as sent, and data.warnings ([] when there is none) names each line as { code, field, message }: LINE_UNIT_DIFFERS_FROM_TANK when the unitCode you sent is not the tanks’ unit, LINE_TANK_UNITS_DIFFER when one line’s tanks are in different units, and LINE_UNIT_DEFAULTED_FROM_TANK when an omitted unitCode took the tanks’ unit instead of the product default. YOUR OWN ERP IDS: send customerErpId and/or shipToErpId (also deliveryStops[].shipToErpId), your NetSuite internal id (preferred) or your customer/ship-to code, instead of deliveryConnectionId/deliveryAddressId and the address; they fill those fields from your saved ship-to. Only your own ids match: 404 ERP_ID_NOT_FOUND (same for an unknown id and another company’s), 409 ERP_ID_AMBIGUOUS (also send customerErpId), 400 ERP_ID_CONFLICT when an id you also sent disagrees. Same on PUT. Lines take productErpId, supplierErpId (or supplierErpIds[]) and terminalErpId, your own item, supplier and terminal ids, instead of product, supplierId(s) and terminal; same errors. A productErpId that matches no id or code is then tried as your own product's exact name (case-insensitive); a name shared by two of your products returns 409 ERP_ID_AMBIGUOUS. Strings up to 120 characters; blank = absent. Any other <name>ErpId field is a 400 (e.g. itemErpId). lines[].unitCode accepts any active unit-of-measure catalog code; off-catalog codes are rejected with 400. quantity allows up to 3 decimals where the unit supports fractions (400 otherwise). Omitted unitCode inherits your product catalog default, falling back to gal. A fuel product (one whose product family is a fuel) takes a volume unit only (gal, liter, bbl, m3, qt): a mass or count unit on its line, sent or inherited, is refused with 400 FUEL_LINE_NEEDS_VOLUME_UNIT. Per-gallon fees on a liter, barrel, cubic-meter or quart line are priced on its quantity converted to gallons. SPLIT LOAD (one pickup, several drops): set isSplitLoad: true and send deliveryStops[] — 2 to 10 drops, each carrying sequence (1..N, matching its array position, no gaps or duplicates) plus the same destination* fields an ordinary order takes. Every line then needs allocations[], entries of { deliveryStopIndex, plannedQuantity }: deliveryStopIndex is the ZERO-BASED INDEX into deliveryStops, not a stop id, because stop ids do not exist until the order is created. Per line those plannedQuantity values must NET exactly to the line quantity (deliveries minus pump-outs), every line needs at least one, and all lines must name the SAME terminal (v1 is one pickup, many drops — multi-terminal pickup is not supported). Where assetFills are used, each fill also carries deliveryStopIndex. Omit isSplitLoad and nothing about an ordinary order changes. EXTRACTION: send NEGATIVE quantities on every line and the order posts as an extraction — product pumped OUT of the destination tank; the API stores the values positive and sets isExtraction: true. Mixing negative and positive lines is rejected. TRANSFER SPLIT LOAD: on a split load the SIGN of each stop allocation says which way the hose runs — a NEGATIVE plannedQuantity marks that stop as the extraction point (pump out), a positive one a normal drop. Example: allocations [{ deliveryStopIndex: 0, plannedQuantity: -800 }, { deliveryStopIndex: 1, plannedQuantity: 800 }] extracts 800 at stop 1 and delivers the same 800 to stop 2; the line quantity is the signed net (here 0 — nothing loaded at the terminal; a mixed load that also picks up at the rack carries the positive net instead). A line's total quantity must not be negative — multi-stop pure extraction belongs on a regular extraction order. deliveryConnectionId (order level or per stop) must name an ACCEPTED connection your own company family holds; anything else is 400. BID MAXIMUMS: maxFees { fees: [{ id, unit, value }], miles? } caps each fee a bid may carry, on an order that takes bids (stored, no effect on others; ids and units in the OpenAPI spec). Over a cap: 400 BID_OVER_MAX, the cap in details; no cap: 400 BID_FEE_NOT_ALLOWED. Not returned on reads.
Request Body
{
"orderType": "direct",
"urgency": "routine",
"requestedDate": "2026-05-25T08:00:00Z",
"poNumber": "PO-4417",
"carrierCompanyId": "carrier-co-... (direct-send target)",
"destinationName": "Acme Fuel Depot",
"destinationStreet": "123 Industrial Blvd",
"destinationCity": "Jersey City",
"destinationState": "NJ",
"destinationZip": "07302",
"destinationLat": 40.7178,
"destinationLng": -74.0431,
"requirements": { "hazmat": false, "twic": true, "ftl": "yes" },
"notifyContacts": [{ "name": "Dana Dispatch", "email": "dispatch@example.com" }],
"lines": [
{
"product": "ULSD #2",
"gallons": 8000,
"rate": 2.85,
"terminal": "Kinder Morgan - Carteret",
"supplierId": "supplier-co-..."
}
]
}
// …or a split load — one pickup, two drops:
{
"orderType": "direct",
"carrierCompanyId": "carrier-co-...",
"isSplitLoad": true,
"deliveryStops": [
{ "sequence": 1, "destinationName": "Site A", "destinationStreet": "100 First St", "destinationCity": "Midland", "destinationState": "TX", "destinationZip": "79701" },
{ "sequence": 2, "destinationName": "Site B", "destinationStreet": "200 Second St", "destinationCity": "Odessa", "destinationState": "TX", "destinationZip": "79762" }
],
"lines": [
{
"product": "87 Gas",
"productCode": null,
"terminal": "Midland Terminal",
"terminalCode": "T75TX2501",
"quantity": 9000,
"unitCode": "gal",
"allocations": [
{ "deliveryStopIndex": 0, "plannedQuantity": 5000 },
{ "deliveryStopIndex": 1, "plannedQuantity": 4000 }
]
},
{
"product": "Diesel #2",
"productCode": "DSL-ULSD-2",
"terminal": "Midland Terminal",
"terminalCode": "T75TX2501",
"quantity": 3000,
"unitCode": "gal",
"allocations": [
{ "deliveryStopIndex": 1, "plannedQuantity": 3000 }
]
}
]
}Response
{
"success": true,
"data": {
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"status": "DRAFT",
"orderType": "direct",
"urgency": "routine",
"lines": [{ "product": "ULSD #2", "gallons": 8000, "quantity": 8000, "rate": 2.85 }],
"createdAt": "2026-05-22T10:00:00Z",
"warnings": []
}
}Error Codes
Publish a draft — sends a carrier-addressed order as an offer, bids an internal bid out to its invited carriers, otherwise posts it to the load board orders:write
Note: DRAFT only; the order must have at least one line. If carrierCompanyId is set, publishing makes it an offer to that carrier. An internal_bid goes to its invited carriers (status BIDDING), never to the load board, and returns 400 "An internal bid needs at least one invited carrier" when it has none. Invited carriers receive a bid-request email; publishing a draft saved in the portal also emails the invitees stored on it. Credit-hold customer: 409 CREDIT_APPROVAL_REQUIRED until an ADMIN/OWNER approves the order in the portal (see Order.creditApprovalRequired/creditApprovedAt). Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": true,
"data": {
"id": "f47ac10b-...",
"status": "POSTED"
}
}Error Codes
Update an existing order (partial update) orders:write
Note: Lines sent here get the same tank-unit rule, data.warnings and fuel volume-unit rule (400 FUEL_LINE_NEEDS_VOLUME_UNIT) as POST /orders. customerErpId and shipToErpId work as on POST /orders (your NetSuite internal id or code; 404 ERP_ID_NOT_FOUND, 409 ERP_ID_AMBIGUOUS, 400 ERP_ID_CONFLICT). A customerErpId that moves the order to another customer needs a new shipToErpId or destination in the same call, else 400 ERP_ID_CONFLICT. Once a supplier has accepted your order, a new rate on a line, a higher quantity on a line, an added line and a dropped line are not applied: they go to the supplier as one price change, the rest of the edit applies, and the response carries the change as pendingPriceRequest (see GET /orders/{id}). A lower quantity applies at once. Once the load is in transit the agreed price is final: an edit that would file such a change returns 409. maxFees works as on POST /orders; null clears it.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"urgency": "urgent",
"notes": "Customer requested rush delivery"
}Response
{
"success": true,
"data": {
"id": "a1b2c3d4-...",
"status": "DRAFT",
"urgency": "urgent",
"notes": "Customer requested rush delivery",
"warnings": []
}
}Error Codes
Cancel an order you posted (not available after delivery) orders:write
Note: reason is optional. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"reason": "Customer cancelled the drop"
}Response
{
"success": true,
"data": {
"id": "a1b2c3d4-...",
"status": "CANCELLED"
}
}Error Codes
Approve or reject a delivered order you posted orders:write
Note: Approve moves it to INVOICED; reject (notes required) returns it to the carrier. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"approved": false,
"notes": "Gallons do not match the ticket"
}Error Codes
Set or change the PO on an order you posted, even after delivery orders:write
Note: Any status except CANCELLED. poNumber is required; null clears it. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"poNumber": "PO-88123"
}Response
{
"success": true,
"data": { "id": "a1b2c3d4-...", "poNumber": "PO-88123" }
}Error Codes
An order's status changes, oldest first orders:read
Note: actorParty is poster, carrier, broker or null. A forwarded load's rows carry forward.party; its carrier is never named.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": true,
"data": [
{
"id": "log-uuid-...",
"fromStatus": "ASSIGNED",
"toStatus": "CONFIRMED",
"changedBy": null,
"notes": null,
"createdAt": "2026-05-22T12:30:00Z",
"actorParty": "carrier"
}
]
}Error Codes
Rough driver position on an order you posted orders:read
Note: Rounded to about 1 km, no driver or carrier identity. position is null with no recent fix or when the load is not moving.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": true,
"data": {
"position": { "latitude": 29.76, "longitude": -95.37, "recordedAt": "2026-10-14T15:02:11Z" },
"sharing": true
}
}Error Codes
Create a customer tracking link for an order you posted orders:write
Note: Creating a new link revokes every earlier link for the order. Not for drafts, cancelled orders or split loads. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": true,
"data": { "url": "https://energyconnecter.ai/track.html?tok=..." }
}Error Codes
List an order's notes (chronological) orders:read
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": true,
"data": [
{
"id": "note-uuid-...",
"orderId": "a1b2c3d4-...",
"content": "ETA pushed to 16:00",
"authorName": "Dana Dispatch",
"createdAt": "2026-05-22T12:30:00Z"
}
]
}Error Codes
Append a note to an order (works in any status) orders:write
Note: Append-only — works on an order in any status (unlike PUT, which only edits DRAFT/POSTED). authorName resolves to the API key's creator. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"content": "ETA pushed to 16:00"
}Response
{
"success": true,
"data": {
"id": "note-uuid-...",
"orderId": "a1b2c3d4-...",
"content": "ETA pushed to 16:00",
"authorName": "Dana Dispatch",
"createdAt": "2026-05-22T12:30:00Z"
}
}Error Codes
List an order's documents (BOL, POD, tickets) orders:read
Note: fileUrl is a short-lived signed URL re-minted on every read — do not persist it. Persist downloadUrl instead. orderBolId ties a scan to one BOL (pickup stop) on multi-BOL loads; null = order-level.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": true,
"data": [
{
"id": "doc-uuid-...",
"docType": "haul_bol",
"fileName": "BOL-20260523-001.pdf",
"fileSize": 182044,
"orderBolId": "bol-uuid-... or null",
"uploadedAt": "2026-05-23T14:10:00Z",
"fileUrl": "https://storage.googleapis.com/…",
"downloadUrl": "/v1/public/orders/{id}/documents/doc-uuid-.../content"
}
]
}Error Codes
The carrier load board — open loads you can bid on load_board:read
Note: Carrier companies only (403 otherwise). Rows are disintermediation-masked: no end-customer identity, hasBids is a boolean (never a count), destination street/zip withheld until the haul is yours. Pagination is hasMore-based — no total is computed. Filters: product, urgency, search, volume, page, pageSize.
Parameters
| Name | Type | Description |
|---|---|---|
| product | string | |
| urgency | string |
Response
{
"success": true,
"data": {
"loads": [{ "id": "order-uuid-...", "status": "POSTED", "urgency": "routine", "requestedDate": "2026-08-02T08:00:00Z", "bidDeadline": null, "hasBids": false, "destinationCity": "Jersey City", "destinationState": "NJ", "lines": [{ "product": "ULSD #2", "gallons": 8000, "unitCode": "gal" }] }],
"pagination": { "page": 1, "pageSize": 20, "hasMore": false }
}
}Error Codes
Your bids across all loads order_bids:read
Note: Filters: status (CSV), excludeStatus (CSV), search, page, pageSize.
Error Codes
All bids on your order (owner view — includes carrier names) order_bids:read
Note: Order-owner only. In the portals this view is restricted to ADMIN/OWNER users — treat an order_bids key as an ADMIN credential. Each bid's productPricing (if the carrier submitted one) is included.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Error Codes
Your most recent bid on a load (carrier view) order_bids:read
Note: productPricing (if you submitted one) is included — only your own bid, never another carrier's.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Error Codes
Bid on a load (carrier) order_bids:write
Note: Requires Idempotency-Key. Rejected after the bid deadline, on your own orders, and where load requirements disqualify your company. Send rate (freight $/gal), productPricing, or both — a bid carrying neither is a 400, except on an order with maximums in force, where a bid pricing one capped fee may omit rate. Over a cap: 400 BID_OVER_MAX; a fee with no cap: 400 BID_FEE_NOT_ALLOWED. rate allows at most 6 decimal places; a 7th is rounded half-up to 6. productPricing is optional: omit it for a freight-only bid. rate is optional when productPricing is present, because an index/terminal-priced bid bakes freight into the adder rather than quoting it separately. When present, each line's basis is one of opis/argus/platts/nycse/terminal_posted, pricingBasis is GROSS or NET, and adderCents is a signed integer (-10000..10000) added to the resolved basis price. Optional rackBasis picks the supplier row: {kind: UNBRANDED_LOW} (cheapest unbranded; the default), {kind: RACK_AVERAGE}, or {kind: SUPPLIER, supplierBrand, brand?}.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"rate": 2.85,
"message": "Can load tonight",
"estimatedLoadTime": "18:00",
"productPricing": {
"lines": [
{ "lineId": "line-uuid-...", "basis": "opis", "pricingBasis": "GROSS", "adderCents": 150 }
]
}
}Error Codes
Counter a bid (order owner) order_bids:write
Note: Requires Idempotency-Key. Counter ↔ re-counter may repeat until accept/decline/withdraw. A bid with no rate (index/terminal-priced) cannot be countered — countering negotiates the freight rate, which such a bid does not carry — so it returns 400; accept or decline it instead. counterRate allows at most 6 decimal places; a 7th is rounded half-up to 6.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | string | |
| bidId path required | string |
Request Body
{ "counterRate": 2.75, "counterMessage": "Meet in the middle?" }Error Codes
Accept a bid (order owner) — order becomes CONFIRMED, other bids LOST order_bids:write
Note: Requires Idempotency-Key. Body optional; a bid from an unconnected carrier 400s unless establishConnection is true. Owner-only: a CARRIER accepting a counter-offer instead sends re-counter at the countered rate. On an order with maximums in force, a bid that no longer fits them, or awaits re-confirmation, is 409 BID_NEEDS_RECONFIRM. 403 also when the bid's carrier is no longer on the carrier list of the store the order is for.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | string | |
| bidId path required | string |
Request Body
{ "establishConnection": true }Error Codes
Decline a bid (order owner) order_bids:write
Note: Requires Idempotency-Key. 409 when the bid changed while you declined it (for example the carrier re-countered): read it again.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | string | |
| bidId path required | string |
Request Body
{ "reason": "Covered elsewhere" }Error Codes
Respond to a counter with a new rate (carrier) order_bids:write
Note: Requires Idempotency-Key. To ACCEPT the owner's counter, re-counter at exactly the countered rate. A new rate allows at most 6 decimal places (more is a 400); the exact countered rate is always accepted for that rule. With maximums in force it also skips the per-gallon cap, even when awarded; the bid's other fees are still checked. Any other rate over the cap is 400 BID_OVER_MAX, or BID_FEE_NOT_ALLOWED with no cap. A re-counter at the countered rate after the owner has changed the counter is 409: read the bid again and answer the new counter.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | string | |
| bidId path required | string |
Request Body
{ "rate": 2.80 }Error Codes
Withdraw your bid (carrier) or your counter (owner) order_bids:write
Note: Requires Idempotency-Key. The bid's carrier can withdraw it while it is PENDING, PENDING_CONNECTION or COUNTERED; any other status is 400. The order owner, unless it placed the bid itself, can withdraw only a live counter: a bid that is not COUNTERED, or that changed during the call, is 409.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | string | |
| bidId path required | string |
Error Codes
Reconfirm a haul after the poster edited material terms (carrier) order_bids:write
Note: On an order with maximums in force, a not-yet-awarded bid over a cap is refused: 400 BID_OVER_MAX or BID_FEE_NOT_ALLOWED.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | string |
Error Codes
Stable document download link orders:read
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid | |
| docId path required | uuid |
Response
302 redirect to the file content — follow it immediately; the target URL expires.
Error Codes
Request a signed upload URL (step 1 of attaching a document) orders:write
Note: Step 1 of 2: PUT the raw file bytes to uploadUrl (no auth header — the signature IS the auth), then register the file on the order with POST /orders/{id}/documents. Contexts: order_doc, order_bol, order_pod, haul_bol, haul_pod (orders:write, or haul_execution:write for the four BOL and POD contexts), invoice_doc (invoices:write) and import_csv (pricing:write, price sheets) — the required scope follows the context. Requires Idempotency-Key.
Request Body
{
"fileName": "BOL-20260523-001.pdf",
"mimeType": "application/pdf",
"fileSize": 182044,
"context": "order_bol"
}Response
{
"success": true,
"data": {
"id": "upload-uuid-... (fileUploadId)",
"uploadUrl": "https://storage.googleapis.com/…signed PUT URL…",
"expiresIn": 900
}
}Error Codes
Attach an uploaded document to an order (step 2) orders:write
Note: Works for the originator or the assigned carrier. Documents on delivered orders are editable for 36h after completion. orderBolId (ids from the order detail bols[]) ties the file to one pickup stop — 400 if the BOL is not this order. Re-registering the same file with a BOL id refines the existing row. A carrier key holding haul_execution:write can also attach and delete its own BOL and POD (docType bol, pod, haul_bol, haul_pod, order_bol or order_pod) on hauls assigned to it; a key without orders:write that is not on the order gets 404. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"docType": "order_bol",
"fileUploadId": "upload-uuid-...",
"orderBolId": "bol-uuid-... (optional)"
}Response
{
"success": true,
"data": {
"id": "doc-uuid-...",
"docType": "order_bol",
"fileName": "BOL-20260523-001.pdf",
"orderBolId": "bol-uuid-... or null",
"downloadUrl": "/v1/public/orders/{id}/documents/doc-uuid-.../content"
}
}Error Codes
Delete a document (soft delete) orders:write
Note: Works for the originator or the assigned carrier (e.g. removing a mistaken BOL/POD upload). Same 36h post-completion window as editing — after it closes the record is frozen (403). A carrier key holding haul_execution:write can also delete its own BOL and POD on hauls assigned to it; a key without orders:write that is not on the order gets 404. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid | |
| docId path required | uuid |
Response
{
"success": true,
"data": { "ok": true }
}Error Codes
Accept an offered order (assigned carrier) — order becomes CONFIRMED haul_execution:write
Note: eta is optional unless the poster requires an ETA at acceptance (400 tells you). erpId (your ERP code for the ship-to) is stored for the delivery site whenever you send it, replacing any code held for it; it is required only when your connection with the poster requires one for every new ship-to and you have none for this site yet (400 ERP_ID_REQUIRED). Broadcast offers race — the first accept wins, later accepts get 409. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{ "eta": "2026-08-02T14:00:00Z" }Response
{
"success": true,
"data": { "id": "order-uuid-...", "status": "CONFIRMED", "acceptedEta": "2026-08-02T14:00:00Z" }
}Error Codes
Decline an offered order — waterfall advances or the board reopens haul_execution:write
Note: reason is optional. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{ "reason": "No truck available" }Response
{
"success": true,
"data": { "id": "order-uuid-...", "status": "POSTED", "carrierCompanyId": null }
}Error Codes
Broker accepts a load posted to it — ASSIGNED becomes CONFIRMED haul_execution:write
Note: For loads read with role=broker. A load your company does not hold is a 404; one already accepted or declined is a 409. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": true,
"data": { "id": "order-uuid-...", "status": "CONFIRMED" }
}Error Codes
Broker declines a load posted to it — the order goes back to the poster as a DRAFT haul_execution:write
Note: reason is optional (max 1000 characters) and is recorded on the assignment log. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{ "reason": "No capacity this week" }Response
{
"success": true,
"data": { "id": "order-uuid-...", "status": "DRAFT" }
}Error Codes
Broker forwards an accepted load to one of its connected carriers as a child order haul_execution:write
Note: The load must be CONFIRMED (broker-accept it first). Creates a child order your company owns, offered to the carrier; the parent stays CONFIRMED and a child cannot itself be forwarded. Optional terminal, supplierId or supplierName (never both), loadingNumber and freightRate override the child's lines. Responds 201 with the child, readable with the default role=originator. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"carrierCompanyId": "carrier-company-uuid-...",
"freightRate": 0.12,
"loadingNumber": "LN-4471"
}Response
{
"success": true,
"data": { "id": "child-order-uuid-...", "status": "ASSIGNED", "...": "full child order (originator view)" }
}Error Codes
Deprecated: sent a DRAFT order to a supplier. Always 410 Gone orders:write
Note: Deprecated: supplier ordering was removed. Suppliers are assigned on order lines and never receive orders, so this always returns 410 GONE. Kept mounted under the additive-only contract. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": false,
"error": { "code": "GONE", "message": "Sending orders to a supplier is no longer supported. Suppliers are assigned on order lines." }
}Error Codes
Deprecated: a supplier accepted an order sent to it. Always 410 Gone haul_execution:write
Note: Deprecated: supplier ordering was removed. Suppliers are assigned on order lines and never receive orders, so this always returns 410 GONE. Kept mounted under the additive-only contract. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": false,
"error": { "code": "GONE", "message": "Sending orders to a supplier is no longer supported. Suppliers are assigned on order lines." }
}Error Codes
Deprecated: a supplier declined an order sent to it. Always 410 Gone haul_execution:write
Note: Deprecated: supplier ordering was removed. Suppliers are assigned on order lines and never receive orders, so this always returns 410 GONE. Kept mounted under the additive-only contract. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": false,
"error": { "code": "GONE", "message": "Sending orders to a supplier is no longer supported. Suppliers are assigned on order lines." }
}Error Codes
Dispatch a driver by SMS/email, or self-dispatch haul_execution:write
Note: Sends a REAL text/email to the driver on each new Idempotency-Key — a replay with the same key returns the cached response without re-sending. selfDispatch: true dispatches the key creator (creatorless keys get 400). Allowed from ASSIGNED, CONFIRMED or IN_TRANSIT (driver swap = redispatch). Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"driverName": "Sam Driver",
"driverPhone": "+12015550123",
"driverEmail": "sam@example.com",
"channels": ["sms", "email"]
}Response
{
"success": true,
"data": { "ok": true, "orderId": "order-uuid-...", "driverFlowState": "DISPATCHED", "smsSent": true, "emailQueued": true, "redispatch": false }
}Error Codes
Fill blank pickup terminal/supplier per line (assigned carrier) haul_execution:write
Note: Only blank or carrier-set attributes are written — anything the poster set is silently left untouched. Supplier: send supplierId for a company on the platform, or supplierName as free text for one that isn't (sending both is a 400). An ad-hoc supplier has no connection for us to resolve a loading number from, so send loadingNumber too — both are fill-empty-only. Values you send here are recorded as supplierSetBy=DISPATCHER and surfaced as supplier { id, name, adHoc: true } — the id is a STABLE synthetic UUID derived from the name (same text always maps to the same id; it is not a company id and is never accepted back), and line supplierId stays null. No company or connection is created. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"lines": [
{
"lineId": "line-uuid-...",
"terminal": "Kinder Morgan - Carteret",
"supplierName": "Roadside Rack Co",
"loadingNumber": "LN-4471"
}
]
}Response
{
"success": true,
"data": { "ok": true, "orderId": "order-uuid-..." }
}Error Codes
Confirm pickup — multi-BOL payload with per-line loaded actuals haul_execution:write
Note: Gallons are driver-entered ACTUALS (decimals OK, 0.001 grain) — net greater than gross is legal (cold-fuel correction), never validated against the ordered quantity. lines is matched by orderLineIndex, never by product name — one entry per ordered line; set loadedProduct to the name you loaded when it differs from the ordered one (stored as a substitution, shown on the order). addedLines is for product beyond the order. Cannot map the ordered lines at all? Send lines: [] with the whole load in addedLines — ordered lines record as not loaded, added lines carry the actuals unpriced (office prices them). Multiple BOLs: each line sets linkedBolIndex. notLoaded: true zeroes a line. Per line, report the loaded-from supplier as supplierId (directory UUID) OR supplierName (plain text for a supplier not on the platform) — never both. An empty body {} just advances state when the driver already submitted the BOL by SMS. On this API the order auto-advances to IN_TRANSIT once the pickup lands — a loaded transport truck is delivering; you may still call start-transit afterwards (idempotent success). Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"bols": [{ "number": "BOL-20260802-01", "cardInTime": "13:05", "cardOutTime": "13:40" }],
"lines": [
{
"orderLineIndex": 0,
"netGallons": 7950,
"grossGallons": 8010,
"loadingNumber": "LN-4417",
"pricePerGallon": 2.19,
"supplierName": "Musket Fuels",
"loadedProduct": "ULSD Diesel"
}
],
"sealNumbers": ["S-100234"]
}Response
{
"success": true,
"data": { "ok": true, "orderId": "order-uuid-...", "status": "IN_TRANSIT", "driverFlowState": "IN_TRANSIT", "loadingNumbers": [{ "orderLineIndex": 0, "resolved": "LN-4417", "effective": "LN-4417", "mismatch": false }] }
}Error Codes
Load complete — truck departs the terminal (optional: delivery implies it) haul_execution:write
Note: Requires pickup confirmed first — a freshly accepted order cannot skip to transit (409). Optional: confirm-pickup on this API already auto-advances to IN_TRANSIT, and calling this on an already-in-transit order returns 200 with alreadyInTransit: true rather than 409. POST /delivery on a load-complete order also performs the transition itself. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": true,
"data": { "ok": true, "orderId": "order-uuid-...", "status": "IN_TRANSIT", "driverFlowState": "IN_TRANSIT" }
}Error Codes
Submit delivery — order-level totals plus per-asset rows haul_execution:write
Note: From IN_TRANSIT, or directly from a load-complete order (pickup confirmed) — the transit hop then happens implicitly, so an explicit start-transit call is optional. Once the order is PENDING_VERIFICATION this returns 400 'Order must be in transit to submit delivery'; use the PATCH below to correct a delivery already submitted. Send BOTH volumes: gallonsDelivered (net) and grossDelivered (gross, order-level). Gross may also be sent per-asset in assetDeliveries, in which case the order-level gross is their sum. Delivered gallons are ACTUALS — net may legally exceed gross (cold-fuel correction) and nothing is cross-validated. arrivedAt and completedAt are accepted here too (ISO timestamps). sealsIntact is optional: "yes", "broken" or "missing" (case-insensitive; true/"intact"/"sealed" normalize to "yes"; omit when the load carries no seals). Per-ASSET rows, not per line — pickup and delivery are asymmetric by design. A per-PRODUCT row may instead carry lineId (from lines[].id) plus notDelivered: true — the customer refused that product at the door. The line is forced to 0 delivered and drops off the customer invoice rather than billing its ordered quantity (the haul charge still counts it — you hauled it). Send a real boolean, not a string, and only on a row that names a lineId; sending 0 gallons WITHOUT the flag records an actual of zero and still bills the ordered quantity. Returns the full order in the carrier view. SPLIT LOAD: deliver per stop — send deliveryStopId plus allocations[] of { allocationId, deliveredQuantity, deliveredGrossQuantity? } (ids from the detail read's deliveryStops[].allocations[]), or skipped: true with skipReason. A line added at the rack (lines[].addedAtDelivery: true) has NO allocation row and so no allocationId — report it in addedLines[] of { lineId, product, unitCode, deliveredQuantity, deliveredGrossQuantity? }, lineId being that line's lines[].id; omitting lineId creates a SECOND added line instead of recording this one's delivery. Note the quantity keys differ from confirm-pickup's addedLines (loadedNetGallons/loadedGrossGallons) — a delivery reports delivered actuals. addedLines[] alone may resolve a stop. deliveredQuantity 0 (allocations or addedLines) rejects (400): omit the row, or skip the stop. Call once per stop; the order stays IN_TRANSIT and the response reports deliveryProgress until the last stop resolves it to PENDING_VERIFICATION. A whole-order body on a split load is rejected (400). Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"gallonsDelivered": 7950,
"sealsIntact": "yes",
"receiverName": "Pat Receiver",
"arrivedAt": "15:20",
"completedAt": "16:05",
"assetDeliveries": [
{ "name": "Tank 1", "stickIn": "34.5", "stickOut": "61.0", "netDelivered": "7950", "grossDelivered": "8010" }
]
}Response
{
"success": true,
"data": { "id": "order-uuid-...", "status": "PENDING_VERIFICATION", "...": "full order (carrier view)" }
}Error Codes
Edit a submitted delivery within the 36h post-completion window haul_execution:write
Note: Same body as POST. Also accepts a pickup object to correct BOL numbers, card times, gallonsLoaded and per-line loadedLines in the same window. No status change; 403 once the 36h window closes. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": true,
"data": { "id": "order-uuid-...", "...": "full order (carrier view)" }
}Error Codes
Tell the originator the load was delivered (no status change) haul_execution:write
Note: One notification per order — a second call returns alreadyNotified: true and sends nothing. Hauling carrier only. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": true,
"data": { "ok": true }
}Error Codes
Assignee escape hatch — cancel a committed order pre-delivery haul_execution:write
Note: From CONFIRMED or IN_TRANSIT only. Refused (409) while a reported failed delivery attempt is open: the poster resolves it first. The poster is notified and can reassign from their Cancelled bucket. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"reason": "Truck breakdown"
}Response
{
"success": true,
"data": { "id": "order-uuid-...", "status": "CANCELLED" }
}Error Codes
Set or update your ETA on a confirmed order haul_execution:write
Note: Non-blocking follow-up to accept — the ETA must be a future timestamp. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"eta": "2026-08-02T14:00:00Z"
}Response
{
"success": true,
"data": { "id": "order-uuid-...", "acceptedEta": "2026-08-02T14:00:00Z" }
}Error Codes
Set or replace your ERP code (station id) for the delivery site haul_execution:write
Note: Accepted hauls only — offers and cancelled loads are 404. The code is stored on your connection with the poster for that delivery site and comes back as shipToErpId on every later role=carrier read of an order to the site. Whatever you send replaces the code held for the site: your dispatch system is the record for your stations. On a split load, pass deliveryStopId (from deliveryStops[]) to set one stop. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"erpId": "1120115532",
"deliveryStopId": null
}Response
{
"success": true,
"data": { "orderId": "order-uuid-...", "deliveryStopId": null, "shipToErpId": "1120115532" }
}Error Codes
Capacity Exchange
Browse capacity listings: surplus product offered at a fixed price capacity_listings:read
Note: Cursor-paged: pass meta.nextCursor back as cursor until hasMore is false. A key sees only listings on its own live or demo tier. pendingBidCount is 0 on your own listings unless the key holds capacity_bids:decide.
Parameters
| Name | Type | Description |
|---|---|---|
| product | string | Taxonomy id, or text matched against the product name |
| postedByRole | string | SUPPLIER, DISTRIBUTOR, CARRIER or BROKER |
| status | string | Default: OPEN and PARTIALLY_FILLED, unexpired. Or FILLED, EXPIRED, CANCELLED, ALL |
| mine | string | true = only listings your company posted |
| expiresBefore | string | ISO 8601 |
| originRadiusMiles | number | With originLat and originLng: listings within this distance |
| cursor | uuid | meta.nextCursor from the previous page |
| limit | integer | Max 100 (default: 25) |
| originLat | number | |
| originLng | number |
Response
{
"success": true,
"data": {
"listings": [
{ "id": "cl-uuid-...", "postedByCompany": { "name": "Gulf Supply", "type": "SUPPLIER" }, "postedByRole": "SUPPLIER", "productCustomName": "ULSD surplus", "remainingQuantity": 350000, "unit": "GALLON", "unitCode": "gal", "pricePerUnit": 2.413125, "expiresAt": "2026-12-01T00:00:00.000Z", "status": "PARTIALLY_FILLED", "pendingBidCount": 2 }
],
"nextCursor": "cl-uuid-..."
},
"meta": { "pageSize": 25, "hasMore": true, "nextCursor": "cl-uuid-..." }
}Error Codes
Post a listing capacity_listings:write
Note: productTaxonomyId or productCustomName is required. pricePerUnit takes up to 6 decimals; a 7th is a 400. Any company type except CUSTOMER (403); postedByRole is your company type. unitCode is any active code from the unit catalog (gal, liter, bbl, lb, ton, each, case, ...); unit stays for older clients and is LITER only when unitCode is liter. A unit that does not allow fractions needs a whole totalQuantity. Returns 201. Requires Idempotency-Key.
Request Body
{
"productCustomName": "ULSD surplus",
"totalQuantity": 500000,
"unit": "GALLON",
"unitCode": "gal",
"pricePerUnit": 2.413125,
"originAddress": "Houston, TX",
"expiresAt": "2026-12-01T00:00:00Z"
}Error Codes
Listing detail with sealed bids capacity_listings:read
Note: On another company's listing, bids holds your own bids only if the key also has capacity_bids:read. On your own listing it holds every bid, with the bidder's name, only if the key has capacity_bids:decide. Otherwise it is empty, and on your own listing bidCounts is zero too.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Error Codes
Edit an open listing you posted capacity_listings:write
Note: Fields: pricePerUnit, expiresAt, notes, originAddress, originLat, originLng. Price and origin cannot change once any bid exists (400). Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{ "expiresAt": "2026-12-15T00:00:00Z", "notes": "Rack pickup only" }Error Codes
Cancel a live listing you posted capacity_listings:write
Note: Pending bids are rejected. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{ "success": true, "data": { "cancelled": true, "autoRejectedBids": 2 } }Error Codes
Bid on a live listing capacity_bids:write
Note: Not on your own listing (403). requestedQuantity may not exceed the remaining quantity. 409 when the listing no longer takes bids, or BID_ALREADY_PENDING when your company already has a pending bid on it (edit that bid with PATCH /capacity-bids/{id}). Returns 201. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{ "requestedQuantity": 50000, "notes": "Two loads a week" }Error Codes
Your capacity bids, newest first capacity_bids:read
Note: data is { bids, nextCursor }; each bid carries its listing summary. Order bids are under /orders/my-bids.
Parameters
| Name | Type | Description |
|---|---|---|
| status | string | PENDING, CONVERTED, REJECTED or WITHDRAWN |
| cursor | uuid | meta.nextCursor from the previous page |
| limit | integer | Max 100 (default: 25) |
Error Codes
Edit your pending capacity bid capacity_bids:write
Note: Fields: requestedQuantity, notes. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{ "requestedQuantity": 40000 }Error Codes
Withdraw your pending capacity bid capacity_bids:write
Note: Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{ "success": true, "data": { "withdrawn": true } }Error Codes
Approve a bid on your listing — creates the order capacity_bids:decide
Note: The supplier must be you, the bidder, or an accepted connection of either. A broker-posted listing needs selectedCarrierId and adds childOrderId, the order forwarded to that carrier. A bid is approved once: a repeat is a 409. capacity_bids:decide is admin-equivalent; capacity_bids:write cannot approve. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{ "selectedSupplierId": "co-uuid-...", "selectedCarrierId": "co-uuid-..." }Response
{ "success": true, "data": { "approved": true, "orderId": "ord-uuid-...", "orderStatus": "CONFIRMED" } }Error Codes
Reject a pending bid on your listing capacity_bids:decide
Note: Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{ "reason": "Volume committed elsewhere" }Response
{ "success": true, "data": { "rejected": true } }Error Codes
Invoices
List invoices (filterable by status, role, order) invoices:read
Parameters
| Name | Type | Description |
|---|---|---|
| status | string | DRAFT, OUTSTANDING, PAID, OVERDUE, DISPUTED, VOID |
| role | string | View as issuer or payer (default: issuer) |
| orderId | uuid | Filter by linked order |
| search | string | Matches invoice number, notes, PO/contract number, issuer or payer company name, or line-item description/product |
| kind | string | order (invoices not tied to a pricing subscription), subscription (pricing-subscription invoices only), or all (default: order) |
| issuedFrom | string | ISO 8601. Inclusive lower bound on issuedAt (when the invoice left DRAFT). Drafts have no issuedAt, so any issued window leaves them out. |
| issuedTo | string | ISO 8601. EXCLUSIVE upper bound on issuedAt — send the next window's first instant. |
| updatedSince | string | ISO 8601. Sync walk: only rows changed at or after this time, oldest change first (updatedAt, then id). sortBy, sortOrder and page are ignored, and meta becomes { pageSize, hasMore, nextCursor }. Pass meta.nextCursor back as cursor until hasMore is false; keep the last one to resume your next sync run. Changes from the last 60 seconds are held back until they settle. Deleted rows, and rows that leave your filter, stop appearing rather than being reported, so reconcile missing rows by id. |
| cursor | string | meta.nextCursor from the previous page of an updatedSince walk. Opaque; requires updatedSince. |
| page | integer | (default: 1) |
| pageSize | integer | (default: 20) |
| dueFrom | string | Only invoices due at or after this instant |
| dueTo | string | Only invoices due before this instant (exclusive) |
| counterpartyCompanyId | string | The other party: the payer when role=issuer, the issuer when role=payer. Narrows the caller's own invoices only |
Response
{
"success": true,
"data": [
{
"id": "inv-uuid-...",
"invoiceNumber": "INV-2026-0142",
"status": "OUTSTANDING",
"subtotal": 22800.00,
"tax": 1596.00,
"total": 24396.00,
"dueDate": "2026-06-20T00:00:00Z",
"lineItems": [{ "description": "ULSD #2 delivery", "gallons": 8000, "rate": 2.85, "amount": 22800.00 }]
}
],
"meta": { "total": 12, "page": 1, "pageSize": 20, "totalPages": 1, "hasMore": false }
}Get invoice with line items and tax lines invoices:read
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": true,
"data": {
"id": "inv-uuid-...",
"invoiceNumber": "INV-2026-0142",
"status": "OUTSTANDING",
"subtotal": 22800.00,
"tax": 1596.00,
"total": 24396.00,
"dueDate": "2026-06-20T00:00:00Z",
"issuedAt": "2026-05-21T09:00:00Z",
"sentAt": "2026-05-21T09:05:00Z",
"viewedAt": null,
"lineItems": [
{ "id": "line-uuid-...", "description": "ULSD #2 — 8,000 gal @ $2.85", "gallons": 8000, "rate": 2.85, "amount": 22800.00, "bolNumber": "BOL-20260521-001" }
],
"taxLines": [
{ "id": "taxline-uuid-...", "taxType": "Federal Excise", "authority": "IRS", "productRef": "ULSD #2", "rate": 0.244, "rateDisplay": "$0.244/gal", "gallons": 8000, "amount": 1952.00 }
],
"createdAt": "2026-05-21T09:00:00Z"
}
}Error Codes
Create a new invoice invoices:write
Note: invoiceNumber is optional: omit it and we assign your next number (INV-YYYY-NNNNN). A number you send must be unique for your company (409). When a line item includes both rate and gallons, its amount must equal rate × gallons (small rounding tolerance) or the request is rejected with 400; omit amount on such lines to have it computed server-side. Header subtotal/tax/total are always recomputed from the lines.
Request Body
{
"subtotal": 22800.00,
"tax": 1596.00,
"total": 24396.00,
"dueDate": "2026-06-20T00:00:00Z",
"lineItems": [
{ "description": "ULSD #2 — 8,000 gal @ $2.85", "gallons": 8000, "rate": 2.85, "amount": 22800.00 }
]
}Response
{
"success": true,
"data": {
"id": "new-inv-uuid-...",
"invoiceNumber": "INV-2026-00143",
"status": "DRAFT",
"subtotal": 22800.00,
"total": 24396.00,
"createdAt": "2026-05-22T10:00:00Z"
}
}Error Codes
Issue a DRAFT invoice (makes it visible to the payer) invoices:write
Note: Only the issuing company may issue, and only DRAFT invoices can be issued (400 otherwise). Issuing transitions the invoice to OUTSTANDING and notifies the payer — invoices stay silent until issued. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": true,
"data": {
"id": "inv-uuid-...",
"invoiceNumber": "INV-2026-0143",
"status": "OUTSTANDING"
}
}Error Codes
Download invoice as PDF invoices:read
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
Binary PDF (Content-Type: application/pdf)
Error Codes
Mark invoice as paid invoices:write
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"paidAt": "2026-05-21T16:30:00Z",
"notes": "Wire transfer received"
}Response
{
"success": true,
"data": {
"id": "inv-uuid-...",
"invoiceNumber": "INV-2026-0142",
"status": "PAID",
"paidAt": "2026-05-21T16:30:00Z"
}
}Error Codes
List invoice amendments (as issuer or payer) invoice_amendments:read
Note: Amendments on every invoice where you are the issuer or the payer. An amendment proposes corrections to an ISSUED invoice; the payer approves or declines.
Parameters
| Name | Type | Description |
|---|---|---|
| status | string | PENDING, APPROVED, DECLINED, WITHDRAWN |
| invoiceId | uuid | Restrict to one invoice's amendment history |
| page | integer | (default: 1) |
| pageSize | integer | (default: 20) |
Response
{
"success": true,
"data": [
{
"id": "amd-uuid-...",
"invoiceId": "inv-uuid-...",
"proposedByCompanyId": "issuer-co-...",
"status": "PENDING",
"proposedChanges": { "dueDate": "2026-06-15T00:00:00Z", "notes": "Corrected terms" },
"proposeNotes": "Due date pushed per phone agreement",
"createdAt": "2026-05-22T10:00:00Z"
}
],
"meta": { "total": 1, "page": 1, "pageSize": 20, "totalPages": 1, "hasMore": false }
}Error Codes
Get an invoice amendment invoice_amendments:read
Note: priorSnapshot is set on approval — the invoice state the amendment replaced (audit trail).
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": true,
"data": {
"id": "amd-uuid-...",
"invoiceId": "inv-uuid-...",
"status": "APPROVED",
"proposedChanges": { "total": 12500.00 },
"priorSnapshot": { "subtotal": 12000.00, "tax": 250.00, "total": 12250.00 },
"respondedAt": "2026-05-23T09:12:00Z",
"responseNotes": "Agreed"
}
}Error Codes
Propose an amendment to an issued invoice (issuer only) invoice_amendments:write
Note: One PENDING amendment per invoice. DRAFT invoices are edited directly; PAID/VOID invoices cannot be amended. lineItems, when present, is a FULL replacement of the current list. So is taxLines (each taxType + amount; optional authority, productRef, rate, rateDisplay, gallons, and id): tax becomes their sum, and [] removes them. A row with the id of one of the invoice's tax lines (from GET /invoices/{id}) edits that row in place and keeps the fields it omits; a row without id is added. On an invoice that has tax lines, a tax change must come as taxLines: a tax that differs from the current invoice tax, sent without them, is refused with 400. An invoice with no tax lines still takes a plain tax; an uploaded (EXTERNAL) invoice refuses taxLines with 400. subtotal/tax/total are re-derived server-side on approval — client-supplied totals are never trusted. Optional expectedBase = the total and line ids you built the change from; if the invoice has changed since, 409 AMENDMENT_BASE_STALE and nothing is recorded. Requires Idempotency-Key.
Request Body
{
"invoiceId": "inv-uuid-...",
"proposedChanges": {
"dueDate": "2026-06-15T00:00:00Z",
"lineItems": [{ "description": "ULSD #2 delivered", "amount": 12500.00 }]
},
"proposeNotes": "Corrected gallons per signed BOL",
"expectedBase": { "total": 12250.00, "lineIds": ["line-uuid-..."] }
}Response
{
"success": true,
"data": { "id": "amd-uuid-...", "status": "PENDING", "invoiceId": "inv-uuid-..." }
}Error Codes
Approve a pending amendment (payer only) invoice_amendments:write
Note: Applies the proposed changes to the invoice atomically and snapshots the prior state onto the amendment. Fails 400 if the invoice has since been PAID/VOID, 409 if a concurrent response already claimed it. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"responseNotes": "Agreed per call"
}Response
{
"success": true,
"data": { "id": "amd-uuid-...", "status": "APPROVED", "priorSnapshot": { "total": 12250.00 } }
}Error Codes
Decline a pending amendment (payer only) invoice_amendments:write
Note: The invoice is left unchanged. 403 for the issuer, 404 for a company that is not a party, 400 if the amendment was already answered, 409 if a concurrent response claimed it. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"responseNotes": "Not what we agreed"
}Response
{
"success": true,
"data": { "id": "amd-uuid-...", "status": "DECLINED" }
}Error Codes
Withdraw a pending amendment (issuer only) invoice_amendments:write
Note: Retracts your own PENDING proposal so you can propose another. 403 for the payer, 404 for a company that is not a party, 400 if already answered. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"responseNotes": "Not what we agreed"
}Response
{
"success": true,
"data": { "id": "amd-uuid-...", "status": "WITHDRAWN" }
}Error Codes
Dispute an issued invoice (issuer or payer) invoices:write
Note: The other party gets an email, an in-app bell and the invoice.disputed webhook. 400 on a DRAFT, VOID or already-PAID invoice, 409 if it is already disputed. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"reason": "Gallons do not match the BOL"
}Response
{
"success": true,
"data": {
"id": "inv-uuid-...",
"status": "DISPUTED",
"disputeReason": "Gallons do not match the BOL"
}
}Error Codes
Answer a dispute (issuer only) invoices:write
Note: The payer is told. 403 for the payer, 404 for a stranger, 400 unless the invoice is DISPUTED. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"response": "Gallons match the signed BOL"
}Response
{
"success": true,
"data": {
"id": "inv-uuid-...",
"status": "DISPUTED",
"disputeResponse": "Gallons match the signed BOL"
}
}Error Codes
Close out a dispute (payer only) invoices:write
Note: resolution is ACCEPTED_BY_PAYER, WITHDRAWN_BY_PAYER or ESCALATED. The first two return the invoice to OUTSTANDING; ESCALATED leaves it DISPUTED. The issuer is told. 403 for the issuer. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"resolution": "ACCEPTED_BY_PAYER"
}Response
{
"success": true,
"data": {
"id": "inv-uuid-...",
"status": "OUTSTANDING",
"disputeResolution": "ACCEPTED_BY_PAYER"
}
}Error Codes
Attach supporting documents (issuer only) invoices:write
Note: Two-step flow: POST /uploads with context invoice_doc (rides invoices:write), PUT the bytes, then register here. Max 20 documents. The primary external upload set at create time is separate and not managed here. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"fileUploadIds": ["upload-uuid-..."]
}Response
{
"success": true,
"data": {
"id": "inv-uuid-...",
"documents": [
{ "id": "upload-uuid-...", "kind": "supporting", "fileName": "rate-confirmation.pdf" }
]
}
}Error Codes
Remove a supporting document (issuer only) invoices:write
Note: Only supporting documents are removable — never the primary external upload (it IS the invoice). Removal is blocked with 400 while the invoice is DISPUTED (evidence freeze). Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid | |
| fileId path required | uuid |
Response
{
"success": true,
"data": {
"id": "inv-uuid-...",
"documents": []
}
}Error Codes
Payments
List payments (as issuer or payer) payments:read
Parameters
| Name | Type | Description |
|---|---|---|
| role | string | View as issuer or payer (default: issuer) |
| invoiceId | uuid | Filter to a single invoice |
| page | integer | (default: 1) |
| pageSize | integer | Max 100 (default: 20) |
Response
{
"success": true,
"data": [
{
"id": "pay-uuid-...",
"invoiceId": "inv-uuid-...",
"amount": 24396.00,
"status": "SUCCEEDED",
"paidAt": "2026-05-21T16:30:00Z"
}
],
"meta": { "total": 5, "page": 1, "pageSize": 20, "totalPages": 1, "hasMore": false }
}Get a single payment payments:read
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": true,
"data": {
"id": "pay-uuid-...",
"invoiceId": "inv-uuid-...",
"amount": 24396.00,
"status": "SUCCEEDED",
"paidAt": "2026-05-21T16:30:00Z"
}
}Error Codes
Pricing
Get rack pricing (paginated) pricing:read
Parameters
| Name | Type | Description |
|---|---|---|
| product | string | Filter by product |
| terminalId | string | Filter by terminal |
| page | integer | (default: 1) |
| pageSize | integer | Max 500 (default: 50) |
Response
{
"success": true,
"data": [
{
"id": "price-uuid-...",
"terminalId": "KM-CARTERET",
"product": "ULSD #2",
"price": 2.4150,
"unit": "gal",
"pricingBasis": "rack",
"effectiveAt": "2026-05-21T06:00:00Z",
"expiresAt": null
}
],
"meta": { "total": 340, "page": 1, "pageSize": 50, "totalPages": 7, "hasMore": true }
}Rack prices for a specific terminal pricing:read
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | string | Terminal ID |
Response
{
"success": true,
"data": [
{
"id": "price-uuid-...",
"terminalId": "KM-CARTERET",
"product": "ULSD #2",
"price": 2.4150,
"unit": "gal",
"pricingBasis": "rack",
"effectiveAt": "2026-05-21T06:00:00Z",
"expiresAt": null,
"createdAt": "2026-05-21T06:00:00Z"
},
{
"id": "price-uuid-2...",
"terminalId": "KM-CARTERET",
"product": "87 Gasoline",
"price": 2.6100,
"unit": "gal",
"pricingBasis": "rack",
"effectiveAt": "2026-05-21T06:00:00Z",
"expiresAt": null
}
]
}Error Codes
Bulk upsert rack prices (up to 2,000) pricing:write
Note: Each line updates the latest posting for its terminal, product, brand and supplierBrand, or adds a new posting when the price changes on a later date or effectiveAt is in the future (the live price stays until then). The batch is one transaction: one bad line writes nothing. Optional per line: brand (BRANDED/UNBRANDED/UNKNOWN), supplierBrand, terms, effectiveAt (default now), expiresAt. unit is gal/liter/bbl/mt (ltr is still accepted and stored as liter); unitCode is an alias of unit. published: true posts the prices to your connected accounts; omitted, a new posting is private and an updated one keeps its current flag. created counts postings added, updated counts postings edited in place.
Request Body
{
"prices": [
{ "terminalId": "KM-CARTERET", "product": "ULSD #2", "price": 2.4250, "unit": "gal", "brand": "UNBRANDED" },
{ "terminalId": "KM-CARTERET", "product": "87 Gasoline", "price": 2.6100, "unit": "gal", "effectiveAt": "2026-10-03T06:00:00Z" }
],
"source": "argus",
"published": true
}Response
{
"success": true,
"data": { "created": 1, "updated": 1, "total": 2 }
}Error Codes
Preview a price-sheet import (OPIS/DTN/Platts/Argus and more) pricing:write
Note: Step 1: upload the sheet via POST /uploads with context import_csv, PUT the bytes, then register it here. source AUTO sniffs the vendor format server-side. An unparseable sheet, or one over 50,000 rows, returns 400 and creates NO batch (nothing to correlate — fix or split the file and retry). Email (.eml) sheets are portal-only. Requires Idempotency-Key.
Request Body
{
"fileUploadId": "upload-uuid-... (context import_csv)",
"source": "AUTO"
}Response
{
"success": true,
"data": {
"batchId": "batch-uuid-...",
"source": "OPIS_CSV",
"status": "PREVIEW",
"fileSha256": "9f2c...64 hex characters",
"parsedCount": 1043,
"dataCount": 1041,
"warnings": { "unmappedTerminals": ["GRNC"], "unmappedProducts": [] },
"previewRows": [ { "terminalSourceCode": "GRNC", "product": "ULSD #2", "price": 3.0623, "pricingBasis": "GROSS", "isSummaryRow": false, "isMalformedRow": false } ]
}
}Error Codes
Import batch status + preview rows pricing:read
Note: previewRows is capped at 50 — the full parsed set (up to 50k rows) never ships; commit works on the full set. The batch returns fileSha256, so a caller without the preview response can send both fileSha256 and acknowledgeUnseenRows: true on any batch. errorMessage is null unless a commit failed, and then names any terminals it auto-created.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Error Codes
Commit the batch into rack prices (single-shot) pricing:write
Note: When the sheet has data rows the 50 previewRows hide (dataCount minus the previewRows that are neither isSummaryRow nor isMalformedRow, above 0), the body must carry both fileSha256 (returned by the preview) and acknowledgeUnseenRows: true, or the call returns 400 and writes nothing; a fileSha256 that is not the previewed file returns 409. A sheet whose data rows are all within the preview needs no body. 409 once committed or cancelled. A failed commit sets status FAILED (errorMessage names terminals it auto-created); commit again to retry. Unmapped terminal codes auto-create terminals (master-directory matched where possible). skipped counts invalid rows AND rows already present from a prior import. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"fileSha256": "9f2c...the fileSha256 the preview returned",
"acknowledgeUnseenRows": true
}Response
{
"success": true,
"data": { "batchId": "batch-uuid-...", "imported": 214, "skipped": 12, "newTerminals": [ { "terminalCode": "RIVA-01", "sourceCode": "RIVA", "matched": true } ], "cardedEligible": false }
}Error Codes
Cancel a preview batch pricing:write
Note: Idempotent. Committed batches cannot be cancelled. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Error Codes
List terminal aliases (feed code to your terminal) pricing:read
Error Codes
Map a feed terminal code to one of your terminals pricing:write
Note: Persisted per company+source; the next commit resolves through it. Requires Idempotency-Key.
Request Body
{
"source": "OPIS_CSV",
"sourceCode": "GRNC",
"supplierTerminalId": "terminal-uuid-..."
}Error Codes
List product aliases (raw sheet label to canonical product) pricing:read
Error Codes
Map a raw sheet product label to a canonical product pricing:write
Note: Requires Idempotency-Key.
Request Body
{
"source": "OPIS_CSV",
"rawLabel": "ULS DSL #2",
"canonicalProduct": "ULSD #2"
}Error Codes
Contract (customer-specific) prices — yours issued or received pricing:read
Note: role=supplier (default) lists your own roster including future-scheduled rows; role=customer lists LIVE prices issued to you by connected suppliers. Latest row per counterparty+product. terminalId is set on rows scoped to one terminal. supplierId is whoever authored the price — it may be a subsidiary of the supplier you connected with, so group by connection rather than by supplierId.
Parameters
| Name | Type | Description |
|---|---|---|
| role | string | supplier (default) = the contract prices your company issues; customer = live prices issued TO you by connected suppliers. (default: supplier) |
| customerId | uuid | |
| supplierId | uuid |
Response
{
"success": true,
"data": [
{
"id": "cp-uuid-...",
"supplierId": "supplier-co-...",
"customerId": "customer-co-...",
"product": "ULSD #2",
"terminalId": null,
"price": 2.19,
"unit": "gal",
"effectiveAt": "2026-07-01T00:00:00Z",
"expiresAt": null
}
]
}Error Codes
Upsert contract prices for one connected customer pricing:write
Note: Requires an ACCEPTED connection with the customer (404 otherwise). Upsert-latest per product; a future effectiveAt schedules the change without touching the live price. Up to 100 rows per call. Requires Idempotency-Key.
Request Body
{
"customerId": "customer-co-...",
"prices": [
{ "product": "ULSD #2", "price": 2.19, "unit": "gal", "effectiveAt": "2026-08-01" }
]
}Response
{
"success": true,
"data": [ { "id": "cp-uuid-...", "product": "ULSD #2", "price": 2.19, "unit": "gal" } ]
}Error Codes
Calculate freight cost for a lane pricing:read
Note: quantity is an additive alias for gallons — send either; quantity wins if both are sent. gallons remains the permanent public contract.
Request Body
{
"originTerminalId": "KM-CARTERET",
"destinationZip": "07302",
"product": "ULSD #2",
"gallons": 8000,
"ratePerMile": 6.50,
"fuelSurchargePercent": 12
}Response
{
"success": true,
"data": {
"totalFreight": 478.40,
"distanceMiles": 62.3,
"ratePerMile": 6.50,
"fuelSurcharge": 48.75,
"baseCost": 404.95
}
}Error Codes
Tax Rates
List your tax-rate schedule tax_rates:read
Note: The schedule your invoice taxLines come from. Owner-only — never visible to counterparties. customerRules carry company ids only; resolve names via your connections.
Parameters
| Name | Type | Description |
|---|---|---|
| category | string | |
| activeOnly | boolean | |
| effectiveAt | date |
Response
{
"success": true,
"data": [
{
"id": "tax-uuid-...",
"name": "Federal Excise",
"category": "FEDERAL_EXCISE",
"jurisdiction": null,
"rateType": "PER_UNIT",
"rate": 0.244,
"unit": "gal",
"effectiveFrom": "2026-01-01T00:00:00Z",
"effectiveTo": null,
"isActive": true,
"productRules": [],
"customerRules": [ { "customerCompanyId": "customer-co-...", "isExempt": true, "exemptReason": "Farm use" } ]
}
]
}Error Codes
Get a tax rate tax_rates:read
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Error Codes
Create a tax rate tax_rates:write
Note: Each customerRules entry must reference an ACCEPTED connection (404 otherwise). effectiveTo must be after effectiveFrom. Requires Idempotency-Key.
Request Body
{
"name": "NJ State Excise",
"category": "STATE_EXCISE",
"jurisdiction": "NJ",
"rateType": "PER_UNIT",
"rate": 0.423,
"unit": "gal",
"effectiveFrom": "2026-08-01",
"customerRules": [ { "customerCompanyId": "customer-co-...", "isExempt": true, "exemptReason": "Exempt certificate 123" } ]
}Error Codes
Update a tax rate tax_rates:write
Note: productRules/customerRules are FULL-REPLACEMENT arrays: omit to leave unchanged, send [] to wipe. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Error Codes
Deactivate a tax rate (soft) tax_rates:write
Note: Sets isActive: false — invoice history keeps referencing the numbers; re-activate via PUT. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": true,
"data": { "ok": true }
}Error Codes
Reference Data
List IRS-seeded master terminals reference_data:read
Note: Shared reference data: the IRS terminal directory that loading-number matching and terminal search key off. IRS-seeded, active rows only — company-created terminals are NOT returned here; read and write your own under /supplier-terminals. Provenance and row timestamps are not exposed.
Parameters
| Name | Type | Description |
|---|---|---|
| search | string | Match on terminal name, code, or city |
| state | string | Two-letter state |
| page | integer | (default: 1) |
| pageSize | integer | (default: 100) |
Error Codes
List the unit-of-measure catalog reference_data:read
Note: These are the codes order-line unitCode accepts. allowsFraction:false means a fractional quantity on that unit is rejected — check it before sending decimals. Bare array (the catalog is small and platform-global, so there is nothing to page).
Parameters
| Name | Type | Description |
|---|---|---|
| includeInactive | boolean | Include retired units — they still resolve on historical order lines |
Response
{
"success": true,
"data": [
{ "code": "gal", "label": "Gallon", "labelPlural": "Gallons", "category": "VOLUME", "allowsFraction": true, "sortOrder": 0, "isActive": true }
]
}Error Codes
Connections & Freight Rates
List connections (inbound/outbound/all) connections:read
Note: shipToCodes holds your own active ship-to ERP codes on each connection, the values POST /orders takes as shipToErpId; [] when none. The other company's codes are never returned.
Parameters
| Name | Type | Description |
|---|---|---|
| direction | string | inbound, outbound, or all (default: all) |
| status | string | PENDING, INFO_REQUESTED, RESUBMITTED, ACCEPTED, DECLINED |
| search | string | Matches a connected company's name, DBA, or HQ city |
| page | integer | (default: 1) |
| pageSize | integer | Max 500 (default: 20) |
Response
{
"success": true,
"data": [
{
"id": "conn-uuid-...",
"fromCompanyId": "...",
"toCompanyId": "...",
"status": "ACCEPTED",
"paymentTerms": "Net 30",
"creditLimit": 50000,
"shipToCodes": [{ "code": "ST-100", "system": "manual", "siteKey": "a1b2c3", "label": "12 Main St, Newark, NJ" }],
"createdAt": "2026-03-15T10:00:00Z"
}
],
"meta": { "total": 24, "page": 1, "pageSize": 20, "totalPages": 2, "hasMore": true }
}Get connection detail connections:read
Note: erpId, creditLimit and paymentTerms are what your company recorded about the connected company (its code in your back office, the credit and terms you give it). The company they were recorded about reads null for all three — a partner's code for you is never returned. Same on the list. shipToCodes lists your own active ship-to ERP codes on it (yours only, [] when none). While status is INFO_REQUESTED or RESUBMITTED, infoRequest holds the ask: { items, message, requestedAt, respondedAt }; null otherwise. declineReason is set only when status is DECLINED.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": true,
"data": {
"id": "conn-uuid-...",
"fromCompanyId": "company-a-...",
"toCompanyId": "company-b-...",
"status": "ACCEPTED",
"infoRequest": null,
"declineReason": null,
"erpId": "CUST-4521",
"creditLimit": 50000,
"paymentTerms": "Net 30",
"hasContractedRate": true,
"shipToCodes": [{ "code": "ST-100", "system": "manual", "siteKey": "a1b2c3", "label": "12 Main St, Newark, NJ" }],
"createdAt": "2026-03-15T10:00:00Z",
"updatedAt": "2026-03-15T10:00:00Z"
}
}Error Codes
Send a connection request to another company connections:write
Note: Name the target with "toCompanyId" (uuid) or "connectCode" (the company's QR share token, resolved server-side, case-insensitive) — send one. A code matching no active company answers 400 "Invalid connect code". Requires Idempotency-Key.
Request Body
{
"connectCode": "ABC12345",
"message": "We haul in your lanes — let's connect."
}Response
{
"success": true,
"data": {
"id": "conn-uuid-...",
"fromCompanyId": "your-company-...",
"toCompanyId": "company-b-...",
"status": "PENDING",
"createdAt": "2026-07-20T10:00:00Z"
}
}Error Codes
Accept an incoming pending connection request connections:write
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": true,
"data": {
"id": "conn-uuid-...",
"fromCompanyId": "company-a-...",
"toCompanyId": "your-company-...",
"status": "ACCEPTED",
"updatedAt": "2026-07-20T10:05:00Z"
}
}Error Codes
Decline an incoming connection request connections:write
Note: Receiver only — the requesting side gets 403. reason is optional and is relayed to the requester. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"reason": "Not taking new carriers this quarter"
}Response
{
"success": true,
"data": { "id": "conn-uuid-...", "status": "DECLINED" }
}Error Codes
Answer an info request: resubmit your connection request connections:write
Note: Requester only — the receiving side gets 403. Valid only while status is INFO_REQUESTED (otherwise 400). Send no body. Read what was asked from infoRequest on GET /connections/{id}; the receiver can then accept. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": true,
"data": { "id": "conn-uuid-...", "status": "RESUBMITTED" }
}Error Codes
Sever an accepted connection (either party) connections:write
Note: All shared data is preserved; reconnecting goes back through the request flow. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": true,
"data": { "id": "conn-uuid-...", "status": "DISCONNECTED" }
}Error Codes
List freight rates for a connection connections:read
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": true,
"data": [
{
"id": "rate-uuid-...",
"connectionId": "conn-uuid-...",
"originCity": "Carteret",
"originState": "NJ",
"destinationZip": "07302",
"ratePerMile": 6.50,
"fuelSurchargePercent": 12,
"minCharge": 350.00,
"effectiveAt": "2026-04-01T00:00:00Z"
}
]
}Error Codes
Create a freight rate on a connection connections:write
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"connectionId": "conn-uuid-...",
"originCity": "Carteret",
"originState": "NJ",
"destinationZip": "07302",
"ratePerMile": 6.50,
"fuelSurchargePercent": 12,
"minCharge": 350.00
}Response
{
"success": true,
"data": {
"id": "new-rate-uuid-...",
"connectionId": "conn-uuid-...",
"originCity": "Carteret",
"originState": "NJ",
"destinationZip": "07302",
"ratePerMile": 6.50,
"fuelSurchargePercent": 12,
"minCharge": 350.00,
"effectiveAt": "2026-05-22T00:00:00Z",
"createdAt": "2026-05-22T10:00:00Z"
}
}Error Codes
The loading-number catalog for a connection (nightly-sync reference data) connections:read
Note: Relational by design: a number is valid only for its exact (issuing side, terminal, destination state) — never a per-supplier default. Both directions are returned; filter by supplierId. Rows with destinationState null and an empty loadingNumber are terminal markers and never match at order time.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": true,
"data": [
{
"id": "ln-uuid-...",
"supplierId": "counterparty-co-... (who ISSUED the number)",
"terminal": "Kinder Morgan - Carteret — Carteret, NJ",
"destinationState": "NJ",
"loadingNumber": "588571",
"updatedAt": "2026-07-01T09:00:00Z"
}
]
}Error Codes
Full-replace YOUR direction of the roster (numbers the counterparty issued you) connections:write
Note: The array is your COMPLETE roster for this connection — omitted rows are deleted (your direction only; the reverse direction is untouched). Each row is complete (terminal + destinationState + loadingNumber) or a terminal-only marker. Max 200 rows; ACCEPTED connections only. Terminal strings should match the master-list label used on orders. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"loadingNumbers": [
{ "terminal": "Kinder Morgan - Carteret — Carteret, NJ", "destinationState": "NJ", "loadingNumber": "588571" },
{ "terminal": "Buckeye Newark — Newark, NJ" }
]
}Response
{
"success": true,
"data": [ "...the full catalog after the replace (both directions)" ]
}Error Codes
Update a freight rate connections:write
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"ratePerMile": 7.00,
"fuelSurchargePercent": 14
}Response
{
"success": true,
"data": {
"id": "rate-uuid-...",
"connectionId": "conn-uuid-...",
"ratePerMile": 7.00,
"fuelSurchargePercent": 14,
"updatedAt": "2026-05-22T10:15:00Z"
}
}Error Codes
Delete a freight rate connections:write
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
204 No Content
Error Codes
Delivery Tickets
List delivery tickets delivery_tickets:read
Note: One ticket can cover SEVERAL BOLs — a BOL is issued per pickup stop, the ticket per delivery. bolNumbers is the full list; bolNumber is every entry comma-joined, kept for integrations written against the original single-BOL field.
Parameters
| Name | Type | Description |
|---|---|---|
| status | string | DRAFT, ISSUED, SIGNED, VOID |
| orderId | uuid | Filter by order |
| updatedSince | string | ISO 8601. Sync walk: only rows changed at or after this time, oldest change first (updatedAt, then id). sortBy, sortOrder and page are ignored, and meta becomes { pageSize, hasMore, nextCursor }. Pass meta.nextCursor back as cursor until hasMore is false; keep the last one to resume your next sync run. Changes from the last 60 seconds are held back until they settle. Deleted rows, and rows that leave your filter, stop appearing rather than being reported, so reconcile missing rows by id. |
| cursor | string | meta.nextCursor from the previous page of an updatedSince walk. Opaque; requires updatedSince. |
| page | integer | (default: 1) |
| pageSize | integer | (default: 20) |
Response
{
"success": true,
"data": [
{
"id": "dt-uuid-...",
"ticketNumber": "DT-2026-00412",
"status": "SIGNED",
"bolNumbers": ["BOL-20260521-001", "BOL-20260521-002"],
"bolNumber": "BOL-20260521-001, BOL-20260521-002",
"driverName": "Mike Johnson",
"deliveryDate": "2026-05-21T14:30:00Z",
"productLines": [
{ "product_name": "ULSD #2", "gross_gallons": 8200, "net_gallons": 8000, "temperature": 62.5 }
]
}
],
"meta": { "total": 89, "page": 1, "pageSize": 20, "totalPages": 5, "hasMore": true }
}Get delivery ticket detail delivery_tickets:read
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": true,
"data": {
"id": "dt-uuid-...",
"ticketNumber": "DT-2026-00412",
"orderId": "order-uuid-...",
"status": "SIGNED",
"bolNumbers": ["BOL-20260521-001", "BOL-20260521-002"],
"bolNumber": "BOL-20260521-001, BOL-20260521-002",
"driverName": "Mike Johnson",
"carrierCompanyName": "Eastern Transport LLC",
"loadingTerminalName": "Kinder Morgan - Carteret",
"destinationName": "Acme Fuel Depot",
"deliveryDate": "2026-05-21T14:30:00Z",
"productLines": [
{ "product_name": "ULSD #2", "spec": "S15", "gross_gallons": 8200, "net_gallons": 8000, "temperature": 62.5, "api_gravity": 35.2 }
],
"createdAt": "2026-05-21T06:00:00Z"
}
}Error Codes
Create a delivery ticket delivery_tickets:write
Note: Send bolNumbers for a multi-stop load (max 50, each up to 64 chars). The legacy single bolNumber is still accepted — sent alone it is comma-split into bolNumbers; bolNumbers wins when both are sent. PUT follows the same rule and replaces the whole list. Naming a supplier: supplierCompanyId references a company on the platform and must be you, a party on the order, or an accepted connection (403 otherwise); for a supplier we hold no company for, send supplierName as free text instead — it is not gated. The response echoes supplierSetBy (POSTER | CARRIER | DRIVER | DISPATCHER) so readers can see who reported it; writes over this API record DISPATCHER.
Request Body
{
"orderId": "order-uuid-...",
"bolNumbers": ["BOL-20260522-001", "BOL-20260522-002"],
"driverName": "Mike Johnson",
"loadingTerminalName": "Kinder Morgan - Carteret",
"productLines": [
{ "product_name": "ULSD #2", "gross_gallons": 8200, "net_gallons": 8000, "temperature": 62.5 }
]
}Response
{
"success": true,
"data": {
"id": "new-dt-uuid-...",
"ticketNumber": "DT-2026-00413",
"status": "DRAFT",
"bolNumbers": ["BOL-20260522-001", "BOL-20260522-002"],
"bolNumber": "BOL-20260522-001, BOL-20260522-002",
"createdAt": "2026-05-22T10:00:00Z"
}
}Error Codes
Update a delivery ticket delivery_tickets:write
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"driverName": "Tom Williams",
"deliveryDate": "2026-05-22T15:00:00Z"
}Response
{
"success": true,
"data": {
"id": "dt-uuid-...",
"ticketNumber": "DT-2026-00412",
"status": "DRAFT",
"driverName": "Tom Williams",
"deliveryDate": "2026-05-22T15:00:00Z",
"updatedAt": "2026-05-22T10:30:00Z"
}
}Error Codes
Download delivery ticket as PDF delivery_tickets:read
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
Binary PDF (Content-Type: application/pdf)
Error Codes
Sign a delivery ticket (driver/receiver) delivery_tickets:write
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"receiverName": "Jane Smith",
"discrepancies": "Short 50 gallons"
}Response
{
"success": true,
"data": {
"id": "dt-uuid-...",
"ticketNumber": "DT-2026-00412",
"status": "SIGNED",
"updatedAt": "2026-05-22T14:45:00Z"
}
}Error Codes
Deliveries
List the loads delivered to you (end customer) deliveries:read
Note: Loads a distributor or broker posted that deliver to your company over an accepted connection. Read-only and carrier-free: no carrier, driver, truck, rates, fees or bids. On a split load you see only your own stop (stop.sequence).
Parameters
| Name | Type | Description |
|---|---|---|
| page | integer | (default: 1) |
| pageSize | integer | (default: 50) |
Response
{
"success": true,
"data": [
{
"id": "order-uuid-...",
"ref": "LD-10482",
"status": "DELIVERED",
"phase": "delivered",
"distributor": { "name": "Example Fuel Co", "logoUrl": null },
"poNumber": "PO-4417",
"destination": { "name": "Acme Fuel Depot", "street": "123 Industrial Blvd", "city": "Jersey City", "state": "NJ", "zip": "07302" },
"stop": null,
"lines": [{ "product": "ULSD #2", "unitCode": "gal", "ordered": 8000, "loadedNet": 7990, "loadedGross": 8040, "deliveredNet": 7985, "deliveredGross": 8030 }],
"bolNumbers": ["BOL-20260523-001"],
"deliveredAt": "2026-05-23T17:40:00Z",
"receiverName": "B. Manager",
"invoice": { "id": "inv-uuid-...", "invoiceNumber": "INV-2026-0091", "status": "OUTSTANDING", "total": 21450.00, "dueDate": "2026-06-22T00:00:00Z" }
}
],
"meta": { "page": 1, "pageSize": 50, "total": 1 }
}Error Codes
Get one load delivered to you deliveries:read
Note: 404 unless the load is delivered to your company.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
Same shape as one row of the list.
Error Codes
Download the delivery receipt PDF deliveries:read
Note: The receipt the portal serves, issued by the distributor: no carrier, MC/DOT, driver, truck, rates or fees. 404 until the load (or your stop) is delivered.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid | |
| stop | integer | Poster only, split load only: the stop sequence |
Response
Binary PDF (Content-Type: application/pdf)
Error Codes
Locations
List locations with contacts and assets locations:read
Note: For a customer HQ key, rows span its descendant companies; companyId names the owner.
Parameters
| Name | Type | Description |
|---|---|---|
| search | string | |
| isActive | string | true or false |
| page | integer | (default: 1) |
| pageSize | integer | (default: 20) |
Response
{
"success": true,
"data": [
{
"id": "loc-uuid-...",
"name": "Acme Fuel Depot",
"street": "123 Industrial Blvd",
"city": "Jersey City",
"state": "NJ",
"zip": "07302",
"lat": 40.7178,
"lng": -74.0431,
"isActive": true,
"contacts": [{ "name": "Bob Manager", "phone": "+1-201-555-0101", "isPrimary": true }],
"assets": [{ "name": "Tank A", "assetType": "TANK", "product": "ULSD #2", "capacity": 20000, "currentLevel": 8500, "unit": "gal" }]
}
],
"meta": { "total": 8, "page": 1, "pageSize": 20, "totalPages": 1, "hasMore": false }
}Get location detail locations:read
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": true,
"data": {
"id": "loc-uuid-...",
"name": "Acme Fuel Depot",
"street": "123 Industrial Blvd",
"city": "Jersey City",
"state": "NJ",
"zip": "07302",
"lat": 40.7178,
"lng": -74.0431,
"gateCode": "4521#",
"monthlyBudget": 25000,
"isActive": true,
"contacts": [{ "name": "Bob Manager", "email": "bob@acme.com", "phone": "+1-201-555-0101", "isPrimary": true }],
"assets": [
{ "name": "Tank A", "assetType": "TANK", "product": "ULSD #2", "capacity": 20000, "currentLevel": 8500, "lastReadingAt": "2026-10-01T06:00:00Z", "unit": "gal" },
{ "name": "Generator 1", "assetType": "GENERATOR", "product": "ULSD #2", "capacity": 500, "currentLevel": 200, "unit": "gal" }
],
"createdAt": "2026-01-10T08:00:00Z"
}
}Error Codes
Tank level history and burn rate locations:read
Note: days is the window, 7 to 365 (default 90). Readings come from the tank monitor; outliers are flagged, never dropped. The location must belong to your company or a subsidiary, otherwise 404. Each asset on GET /locations also carries lastReadingAt, the time of its latest reading (null if never read).
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid | |
| assetId path required | uuid | |
| days | integer |
Response
{
"success": true,
"data": {
"asset": { "id": "asset-uuid-...", "name": "Tank A", "product": "ULSD #2", "unit": "gal", "capacity": 20000, "currentLevel": 8500, "reorderPct": 30, "lowLimitPct": 15 },
"readings": [{ "at": "2026-10-01T06:00:00Z", "level": 9100, "outlier": false }],
"fills": [{ "at": "2026-09-28T14:10:00Z", "gallons": 6000, "orderId": "order-uuid-..." }],
"baseline": { "galPerDay": 210.5, "method": "readings", "source": "AUTO", "samples": 42 },
"projected": { "daysToReorder": 11.9, "daysToLowLimit": 26.1 }
}
}Error Codes
Create a delivery site locations:write
Note: warnings lists any TANK sent with no capacity, as { code: "TANK_CAPACITY_MISSING", field: "assets[0].capacity", message }. The tank is saved, but its fill level and reorder point cannot be worked out until it has a capacity of at least 1. A unit that names a catalog unit (l, litres, gallons) is stored as its code, with { code: "UNIT_NORMALIZED", field: "assets[0].unit", message } in warnings; any other unit outside the catalog is saved as sent, with code "UNKNOWN_UNIT". Same contract as the portal form — contacts (max 5), 7-day schedules and assets (max 50) can ride along at create. monthlyBudget is the site's monthly spend budget in dollars (positive, 2 decimals; null or omitted = no budget); the customer's owners and admins are alerted once a month when invoiced month-to-date spend at the site reaches their alert threshold (80% by default). Sub-resource endpoints and delete remain portal-only. Requires Idempotency-Key. For a carrier or broker these are its own sites, shown in the portal as Bulk Plants: create an order to one by sending its id as locationId on POST /orders, with no customer.
Request Body
{
"companyId": "company-uuid-... (optional; a descendant company)",
"name": "Acme Fuel Depot",
"street": "123 Industrial Blvd",
"city": "Jersey City",
"state": "NJ",
"zip": "07302",
"lat": 40.7178,
"lng": -74.0431,
"gateCode": "4521#",
"monthlyBudget": 25000,
"contacts": [{ "name": "Bob Manager", "phone": "+1-201-555-0101", "isPrimary": true }],
"assets": [{ "name": "Tank A", "assetType": "TANK", "product": "ULSD #2", "capacity": 20000, "unit": "gal" }]
}Response
{
"success": true,
"data": { "id": "loc-uuid-...", "name": "Acme Fuel Depot", "isActive": true, "warnings": [] }
}Error Codes
Update a delivery site (partial) locations:write
Note: Any subset of the create fields EXCEPT assets (sending assets on PUT is a 400 — add or edit them via the two asset endpoints below; contacts and schedules replace in full when provided), plus isActive (false archives the site from listings). Send monthlyBudget as null to remove a site's budget. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"gateCode": "9917#",
"monthlyBudget": 30000,
"isActive": false
}Response
{
"success": true,
"data": { "id": "loc-uuid-...", "gateCode": "9917#", "monthlyBudget": 30000, "isActive": false }
}Error Codes
Add a tank to an existing location locations:write
Note: A tank is an asset. A TANK sent with no capacity is saved, and warnings carries { code: "TANK_CAPACITY_MISSING", field: "capacity", message }. A unit that names a catalog unit (l, litres, gallons) is stored as its code, with { code: "UNIT_NORMALIZED", field: "unit", message } in warnings; any other unit outside the catalog is saved as sent, with code "UNKNOWN_UNIT". Assets can otherwise only be sent when the location is created, so this is how you record a tank found at a site that already exists. The location is resolved under your company or its subsidiaries — an id outside that family returns 404. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"name": "Tank B",
"assetType": "TANK",
"product": "ULSD #2",
"capacity": 12000,
"currentLevel": 3000,
"unit": "gal"
}Response
{
"success": true,
"data": { "id": "asset-uuid-...", "name": "Tank B", "assetType": "TANK", "capacity": 12000, "currentLevel": 3000, "warnings": [] }
}Error Codes
Update a tank (e.g. a corrected level) locations:write
Note: Partial update. currentLevel is clamped to capacity, matching the portal. A unit that names a catalog unit (l, litres, gallons) is stored as its code, with { code: "UNIT_NORMALIZED", field: "unit", message } in warnings; any other unit outside the catalog is saved as sent, with code "UNKNOWN_UNIT". Deleting an asset stays portal-only. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid | |
| assetId path required | uuid |
Request Body
{
"currentLevel": 6200
}Response
{
"success": true,
"data": { "id": "asset-uuid-...", "name": "Tank B", "currentLevel": 6200, "warnings": [] }
}Error Codes
Allocations
List your terminal/product allocations (flat list) allocations:read
Response
{
"success": true,
"data": [
{
"id": "alloc-uuid-...",
"supplierId": null,
"terminalId": "KM-CARTERET",
"product": "ULSD #2",
"brand": "",
"period": "monthly",
"allocated": 100000,
"used": 64000,
"capacity": 120000,
"threshold": 80
}
]
}Upsert allocation state by natural key (terminal + product + period) allocations:write
Request Body
{
"terminalId": "KM-CARTERET",
"product": "ULSD #2",
"period": "monthly",
"allocated": 100000,
"capacity": 120000,
"threshold": 80
}Response
{
"success": true,
"data": {
"id": "alloc-uuid-...",
"terminalId": "KM-CARTERET",
"product": "ULSD #2",
"period": "monthly",
"allocated": 100000,
"capacity": 120000,
"threshold": 80
}
}Error Codes
Update an allocation by id (allocated/capacity/threshold only — the terminal/product/period key is immutable). A limit your supplier granted you at its terminal returns 403: only the supplier changes it allocations:write
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"allocated": 90000,
"capacity": 120000
}Response
{
"success": true,
"data": {
"id": "alloc-uuid-...",
"terminalId": "KM-CARTERET",
"product": "ULSD #2",
"period": "monthly",
"allocated": 90000,
"capacity": 120000
}
}Error Codes
Supplier Terminals
List supplier terminals supplier_terminals:read
Parameters
| Name | Type | Description |
|---|---|---|
| search | string | |
| state | string | 2-letter state code |
| page | integer | (default: 1) |
| pageSize | integer | (default: 50) |
Response
{
"success": true,
"data": [
{
"id": "term-uuid-...",
"terminalCode": "KM-CARTERET",
"name": "Kinder Morgan - Carteret",
"city": "Carteret",
"state": "NJ",
"zip": "07008",
"lat": 40.5854,
"lng": -74.2285,
"isActive": true
}
],
"meta": { "total": 42, "page": 1, "pageSize": 50, "totalPages": 1, "hasMore": false }
}Get terminal detail supplier_terminals:read
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": true,
"data": {
"id": "term-uuid-...",
"terminalCode": "KM-CARTERET",
"name": "Kinder Morgan - Carteret",
"city": "Carteret",
"state": "NJ",
"zip": "07008",
"lat": 40.5854,
"lng": -74.2285,
"operatingHours": "Mon-Sat 05:00-22:00",
"isActive": true,
"createdAt": "2025-11-01T00:00:00Z"
}
}Error Codes
Create a supplier terminal supplier_terminals:write
Note: Adhoc terminal codes are also mirrored into the global terminal directory. Requires Idempotency-Key.
Request Body
{
"terminalCode": "KM-LINDEN",
"name": "Kinder Morgan - Linden",
"city": "Linden",
"state": "NJ",
"zip": "07036",
"lat": 40.6220,
"lng": -74.2446,
"unitSystem": "gal"
}Response
{
"success": true,
"data": {
"id": "new-term-uuid-...",
"terminalCode": "KM-LINDEN",
"name": "Kinder Morgan - Linden",
"city": "Linden",
"state": "NJ",
"isActive": true,
"createdAt": "2026-05-29T10:00:00Z"
}
}Error Codes
Update a supplier terminal (partial) supplier_terminals:write
Note: Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"operatingHours": "Mon-Sat 04:00-23:00",
"isActive": true
}Response
{
"success": true,
"data": {
"id": "term-uuid-...",
"terminalCode": "KM-CARTERET",
"name": "Kinder Morgan - Carteret",
"operatingHours": "Mon-Sat 04:00-23:00",
"updatedAt": "2026-05-29T10:15:00Z"
}
}Error Codes
Archive a supplier terminal (soft) supplier_terminals:write
Note: Sets isActive: false and fires the terminal_access.updated webhook (action deactivated). The archived terminal stays resolvable via GET by id (isActive: false) so stored ids never dangle. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": true,
"data": { "ok": true }
}Error Codes
Customers
Create a customer in your network customers:write
Note: Creates a Company plus an accepted Connection from your company. Requires Idempotency-Key.
Request Body
{
"name": "Acme Fuel Depot",
"contactName": "Bob Manager",
"contactEmail": "bob@acme.com",
"contactPhone": "+1-201-555-0101",
"street": "123 Industrial Blvd",
"city": "Jersey City",
"state": "NJ",
"zip": "07302",
"externalId": "CUST-4521"
}Response
{
"success": true,
"data": {
"id": "company-uuid-...",
"name": "Acme Fuel Depot",
"type": "CUSTOMER",
"connectionId": "conn-uuid-...",
"connectionStatus": "ACCEPTED"
}
}Error Codes
Suppliers
Create a supplier in your network suppliers:write
Note: Creates a Company plus an accepted Connection from your company. Requires Idempotency-Key.
Request Body
{
"name": "Example Fuel Co",
"contactName": "Dana Sales",
"contactEmail": "contact@example.com",
"city": "Newark",
"state": "NJ",
"externalId": "SUPP-0090"
}Response
{
"success": true,
"data": {
"id": "company-uuid-...",
"name": "Example Fuel Co",
"type": "SUPPLIER",
"connectionId": "conn-uuid-...",
"connectionStatus": "ACCEPTED"
}
}Error Codes
Companies
Get company public profile (own company via tenant scope) companies:read
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": true,
"data": {
"id": "company-uuid-...",
"name": "Example Fuel Co",
"type": "SUPPLIER",
"dba": "EFC",
"phone": "+1-201-555-0100",
"website": "https://www.example.com",
"logoUrl": "https://storage.googleapis.com/.../logo.png",
"hqStreet": "500 Example Rd",
"hqCity": "Newark",
"hqState": "NJ",
"hqZip": "07102",
"hqCountry": "US",
"latitude": 40.7357,
"longitude": -74.1724,
"billStreet": "PO Box 1200",
"billCity": "Newark",
"billState": "NJ",
"billZip": "07101",
"billCountry": "US",
"entityType": "LLC",
"stateOfIncorporation": "DE",
"yearFounded": 2011,
"createdAt": "2025-08-15T00:00:00Z",
"updatedAt": "2026-05-01T00:00:00Z"
}
}Error Codes
Update your company profile companies:write
Note: Strict allowlist mirroring the GET shape: name, dba, website, phone, logoUrl, hq*, bill*, entityType, stateOfIncorporation, yearFounded. An unknown field (including type, tax ids, role configs) is a 400, never a silent drop. latitude/longitude are derived — changing hq* re-geocodes them server-side. Admin-equivalent scope: these fields appear on invoices and legal documents, which is why it is separate from company_catalog:write. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{
"phone": "+1-201-555-0199",
"hqStreet": "600 Example Rd",
"hqCity": "Newark",
"hqState": "NJ",
"hqZip": "07102"
}Error Codes
List your products catalog company_catalog:read
Note: unitPrice and the config blob are back-office-owned and never exposed. Branch keys with no rows of their own read the HQ catalog (read-only — those rows carry the parent's ids).
Response
{
"success": true,
"data": [
{ "id": "prod-uuid-...", "code": "ULSD", "name": "Ultra-Low Sulfur Diesel", "category": "Diesel", "isActive": true, "createdAt": "2026-01-05T00:00:00Z", "defaultUnitCode": "gal" }
]
}Error Codes
Add a product company_catalog:write
Note: code is the natural key (unique per company). defaultUnitCode must be a code from GET /product-taxonomy/units. Requires Idempotency-Key.
Request Body
{
"code": "B20",
"name": "B20 Biodiesel Blend",
"category": "Biodiesel",
"defaultUnitCode": "gal"
}Error Codes
Update a product company_catalog:write
Note: Same fields as create, all optional, plus isActive. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Error Codes
Delete a product (hard) company_catalog:write
Note: 204 on success. Prefer isActive:false via PUT if the code appears on historical data you still reconcile against. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Error Codes
Reconcile the FULL active product set company_catalog:write
Note: The nightly back-office sync shape: the payload IS the complete active set — rows absent from it are deactivated, and an empty array deactivates everything. Use the per-item routes for incremental changes. Requires Idempotency-Key.
Request Body
{
"products": [
{ "code": "ULSD", "name": "Ultra-Low Sulfur Diesel", "defaultUnitCode": "gal" },
{ "code": "B20", "name": "B20 Biodiesel Blend", "defaultUnitCode": "gal" }
]
}Error Codes
List your services catalog company_catalog:read
Response
{
"success": true,
"data": [
{ "id": "svc-uuid-...", "code": "TANK_CLEANING", "name": "Tank Cleaning", "category": "Field Services", "isActive": true, "createdAt": "2026-01-05T00:00:00Z" }
]
}Error Codes
Reconcile the FULL active service set company_catalog:write
Note: Same full-set semantics as the products reconcile. Services have no per-item routes — none exist internally either. Requires Idempotency-Key.
Request Body
{
"services": [
{ "code": "TANK_CLEANING", "name": "Tank Cleaning" }
]
}Error Codes
Webhooks
List webhook subscriptions webhooks:read
Note: Secrets are never readable — they appear once, in the create and rotate-secret responses only.
Response
{
"success": true,
"data": [
{ "id": "wh-uuid-...", "url": "https://example.com/ec-events", "events": ["order.updated", "bid.created"], "isActive": true, "lastSuccessAt": "2026-05-23T10:00:00Z" }
]
}Error Codes
Create a webhook subscription webhooks:write
Note: STORE THE SECRET NOW — it is shown only in this response. URL must be https on a publicly routable host. Events: order.updated, order.accepted (fires only when the carrier commits — ASSIGNED to CONFIRMED; order.updated also fires on assignment while the load is still an unaccepted, masked offer, so subscribe to order.accepted to fetch post-acceptance), bid.created, bid.accepted, bid.declined, bid.countered, bid.withdrawn, invoice.issued, invoice.paid (fires on every settle path — Invoice Fuel, reconcile, charge, manual mark-paid), delivery_ticket.signed, bol.submitted, delivery.rejected (the poster sent a submitted delivery back; read delivery.rejectedAt and delivery.rejectionReason on the order), invoice.created (issuer only), invoice.voided, invoice.disputed, connection.updated (both companies; status PENDING, ACCEPTED, DECLINED or DISCONNECTED), terminal_access.updated (a supplier created, updated or deactivated a terminal), pricing.updated (kind rack: one per terminal per save or import, to the supplier and, for published prices, connected companies that can read them; kind contract: the supplier and the named customer only; no price in the body). Payloads are thin (ids only) — fetch the entity via the API. Delivery contract: POST with headers X-EC-Event-Id / X-EC-Delivery-Id / X-EC-Timestamp (unix seconds) / X-EC-Signature: v1=hex(HMAC_SHA256(secret, timestamp-dot-rawBody)); body carries id, type, createdAt, data. Verify over the RAW body, compare constant-time, reject >5min skew, respond 2xx within 10s; at-least-once — dedup on the event id. Requires Idempotency-Key.
Request Body
{
"url": "https://example.com/ec-events",
"events": ["order.updated", "bid.created"],
"description": "TMS sync"
}Response
{
"success": true,
"data": { "id": "wh-uuid-...", "secret": "whsec_..." }
}Error Codes
Get a webhook subscription webhooks:read
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{
"success": true,
"data": { "id": "wh-uuid-...", "url": "https://example.com/ec-events", "events": ["order.updated"], "isActive": true, "lastSuccessAt": "2026-05-23T10:00:00Z", "lastFailureAt": null }
}Error Codes
Update a subscription (url, events, isActive) webhooks:write
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{ "isActive": false }Response
{ "success": true, "data": { "id": "wh-uuid-...", "isActive": false } }Error Codes
Delete a subscription webhooks:write
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{ "success": true, "data": { "ok": true } }Error Codes
Rotate the signing secret webhooks:write
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Response
{ "success": true, "data": { "id": "wh-uuid-...", "secret": "whsec_...(new — shown once)" } }Error Codes
Delivery history incl. dead-letters webhooks:read
Note: Retry schedule on non-2xx: 1m, 5m, 30m, 2h, 12h — then DEAD (visible here).
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid | |
| status | string | PENDING, SUCCEEDED, DEAD |
| page | integer | (default: 1) |
| pageSize | integer | (default: 20) |
Response
{
"success": true,
"data": [
{ "id": "dl-uuid-...", "status": "SUCCEEDED", "attempts": 1, "lastStatusCode": 200, "deliveredAt": "2026-05-23T10:00:02Z", "event": { "id": "evt-uuid-...", "type": "order.updated" } }
]
}Error Codes
Re-enqueue events since a timestamp (catch-up) webhooks:write
Note: At most 7 days back, at most 1000 events. Re-delivers the SAME stable event ids — dedup on X-EC-Event-Id. Requires Idempotency-Key.
Parameters
| Name | Type | Description |
|---|---|---|
| id path required | uuid |
Request Body
{ "since": "2026-05-22T00:00:00Z" }Response
{ "success": true, "data": { "enqueued": 42 } }Error Codes
Usage
Company, scopes and sandbox flag of the calling key platform:usage_read
Note: Non-billable. An ec_test_ key reports its sandbox company.
Response
{
"success": true,
"data": {
"company": { "id": "co-uuid", "name": "Acme", "roles": ["carrier", "supplier"] },
"credential": { "type": "api_key", "id": "key-uuid", "keyPrefix": "ec_live_AbCd", "name": "Sync", "scopes": ["orders:read", "platform:usage_read"], "sandbox": false, "expiresAt": null },
"actingUser": null
}
}Error Codes
Own quota + burst state for the calling key platform:usage_read
Note: platform:usage_read is auto-granted on every key. Non-billable: the call never counts against your monthly quota (burst limiting still applies).
Response
{
"success": true,
"data": {
"apiKeyId": "key-uuid-...",
"keyPrefix": "ec_live_AbCd",
"keyName": "Back-office sync",
"mode": "live",
"burst": { "limit": 600, "current": 12, "remaining": 588, "resetAt": "2026-07-29T18:31:00Z", "windowSec": 60 },
"quota": { "limit": 100000, "current": 1204, "remaining": 98796, "resetAt": "2026-08-01T00:00:00Z", "windowDays": 30 },
"rolling30d": { "billableCount": 8120, "requestCount": 8390, "errorCount": 14 },
"lastUsedAt": "2026-07-29T18:30:12Z"
}
}Error Codes
API Keys
Rotate the calling key platform_api_keys:manage
Note: rawKey is shown once — store it. Same scopes, IP allowlist and key type. The calling key stays valid 24h and cannot be rotated again (400). Acts only on the calling key. Requires Idempotency-Key.
Response
{
"success": true,
"data": {
"newKey": { "id": "key-uuid-...", "keyPrefix": "ec_live_WxYz", "scopes": ["orders:read"], "rawKey": "ec_live_...(shown once)" },
"oldKeyGraceExpiresAt": "2026-07-30T18:30:00Z"
}
}Error Codes
Revoke the calling key immediately platform_api_keys:manage
Note: Cannot be undone. Acts only on the calling key. Optional body { "reason": "compromised" | "no_longer_needed" | "other" }. rotatedDescendants lists the live keys rotated from the calling key; this call never revokes them, so revoke those in the portal. Requires Idempotency-Key.
Response
{ "success": true, "data": { "id": "key-uuid-...", "keyPrefix": "ec_live_AbCd", "isActive": false, "revokedAt": "2026-07-29T18:30:00Z", "rotatedDescendants": [{ "id": "key-uuid-...", "name": "Sync (rotated)", "keyPrefix": "ec_live_WxYz", "revoked": false }] } }