Generate Invoice

Generate a PayCargo invoice payload for a container.

Always uses the DatabaseStrategy. Branching by charge_type:

  • DEMURRAGE: charges filtered by demurrage_end_dt (defaults to POD-local today,
    capped at today + 14 days). Total reflects accrued demurrage through that date.
  • DETENTION: requires detention_end_dt (= container's empty_returned_dt for the
    listener path, or today for the daily-cron path). Container must have out-gated
    and live at a detention-enabled (carrier + terminal) pair per cpp_config.
    For credit consignees the invoice total is gnosis_estimated_detention_amount
    with guaranteedType="Blanket Authorization" (informational; outstanding nets
    to zero); for non-credit consignees the total is outstanding_detention_amount
    with haulage-based guaranteedType (PayCargo bills the payer).

Returns:
Invoice data plus details — chargesAvailableThroughDate / demurrageOutstandingAmount
for DEMURRAGE, detentionOutstandingAmount for DETENTION, plus shared fields
(uuid, outGateDt, shipmentNumber).

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string
required

The container number

string
required

The MBL number

string
required

The PayCargo user ID

string
required

The PayCargo vendor ID

Calculate demurrage charges through this date (max 14 days from today). Format: YYYY-MM-DD. Defaults to today at POD timezone if not provided. Ignored when charge_type=DETENTION.

Required when charge_type=DETENTION — the container's empty_returned_dt (anchors the detention billing period). Format: YYYY-MM-DD. Must not be in the future.

string
enum
Defaults to DEMURRAGE

DEMURRAGE (default) or DETENTION. DETENTION builds a single-line invoice — credit consignees use the gnosis-estimated detention amount with Blanket Authorization; non-credit consignees use outstanding_detention_amount with haulage-based guaranteedType.

Allowed:
Responses

Language
Credentials
OAuth2
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json