Billing API
Read your CargoLint plan, subscription status and document usage through the API.
For dashboard-based billing management, see Billing & Plans. Plan changes, payment methods and invoices are managed there, by the account Owner.
The endpoints below read your billing state. They accept the organization’s API key or a signed-in user’s token.
Checking Subscription Status
curl -X GET https://api.cargolint.com/api/v1/billing/subscription \
-H "X-API-Key: YOUR_API_KEY"
Returns the plan (planType: Starter, Professional, Business or Enterprise), the subscription status, whether it is trialing and when the trial ends, the current billing period, whether it is billed annually, and any plan change scheduled for the end of the period.
Retrieving Usage
curl -X GET https://api.cargolint.com/api/v1/billing/usage \
-H "X-API-Key: YOUR_API_KEY"
Returns the current billing period’s document count (documentsUsed), the plan’s allowance (documentLimit, or isUnlimited), usagePercentage, the documents and amount over the allowance (overageCount, overageAmountDue), and whether the account is past due (isPastDue).
Listing Plans
curl -X GET https://api.cargolint.com/api/v1/billing/plans
Returns the plans with their prices and allowances, each with includedDirectConnections and canBuyDirectConnections, plus directConnectionAddon with the add-on’s monthly and annual price per connected system. It needs no authentication.
Direct Connections Add-on
Direct connections to a TMS or filing system are an add-on from Professional; Enterprise includes one. The subscription carries directConnections (bought), includedDirectConnections and directConnectionsInUse. Pass directConnections on POST /api/v1/billing/subscribe or POST /api/v1/billing/preview-proration to buy them with a plan, or change them alone on the current plan:
curl -X POST https://api.cargolint.com/api/v1/billing/direct-connections \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"quantity": 2}'
POST /api/v1/billing/direct-connections/preview with the same body returns the prorated charge or credit before you commit. Both need an Owner, signed in. Fewer slots than active direct connections locks the newest ones; nothing is deleted.