CoverPort API and SDK are in beta. Endpoints and the embed may change without notice, and sales should be reconciled in the developer portal. Report problems to support@coverport.io.
CargoLabs Docs

Purchases and certificates

Confirm a sale, find a buyer's policies, and fetch the certificate of insurance PDFs.

After a buyer pays, CoverPort issues one certificate of insurance per covered unit (a day or a trip): the PDF a driver shows to prove they are insured. These endpoints find purchases sold through your agent and return those PDFs.

Find purchases

GET /api/purchases?quoteId=cs_live_a1B2c3D4
GET /api/purchases?paymentIntentId=pi_3Q7abcDEF
GET /api/purchases?email=dispatch@acme-freight.com
GET /api/purchases?from=2026-11-01&to=2026-11-30&limit=50

Filter by exactly one of:

FilterUse it to
quoteIdConfirm one sale. It is id from POST /quotes (cs_…), which you have before the buyer pays.
paymentIntentIdConfirm one sale by its Stripe payment (pi_…), for example sale.purchaseId from the SDK's onComplete.
emailList a buyer's policies.
from and toReconcile a period. Both dates are included, as YYYY-MM-DD.

Results are newest first, 25 per page by default (limit up to 100, page from 0). Add testMode=true to any of these to search test-mode purchases instead; see Test purchases.

{
  "data": [
    {
      "id": 48213,
      "testMode": false,
      "buyer": { "email": "dispatch@acme-freight.com", "firstName": "Dana", "lastName": "Reyes" },
      "product": { "name": "Physical Damage - Temporary Substitute", "insurer": "Incline P&C Group", "claimsPhone": "5550516140" },
      "units": 3,
      "amountPaidCents": 4458,
      "perUnit": { "premiumCents": 1200, "taxesCents": 86, "feesCents": 200 },
      "currency": "usd",
      "coverageStart": "2026-12-01T06:00:00.000Z",
      "coverageEnd": "2026-12-04T05:59:59.999Z",
      "certificatesZipUrl": "https://…/certificates.zip",
      "certificates": [
        { "ordinal": 1, "coverageStart": "2026-12-01T06:00:00.000Z", "coverageEnd": "2026-12-02T05:59:59.999Z", "url": "https://…/certificate-1.pdf" }
      ]
    }
  ],
  "page": 0, "limit": 25, "total": 1, "hasMore": false
}
  • No match is an empty list, not an error.
  • A purchase appears once its first certificate is issued, usually within seconds of payment. If a sale you expect is not there yet, retry with backoff for up to two minutes.

Test purchases

Purchases of test products (paid with Stripe's test card) are kept apart from live ones, so they never show up in a reconciliation by accident:

  • Without testMode, or with testMode=false, only live purchases are listed.
  • With testMode=true, only test purchases are listed. Use it to check your integration end to end.

Every purchase carries testMode, so code that stores purchases can tell them apart too.

GET /api/purchases?quoteId=cs_test_a1B2c3D4&testMode=true

Get a purchase's certificates

GET /api/purchases/{purchaseId}/certificates

The current PDFs for one purchase, in order:

{
  "data": [
    { "id": 91022, "ordinal": 1, "url": "https://…/certificate-91022.pdf", "issuedAt": "2026-12-01T15:21:09.000Z", "reissued": false }
  ],
  "page": 0, "limit": 1, "total": 1, "hasMore": false
}

When a certificate has been corrected after purchase (a misspelled name, a new certificate holder), reissued is true and url is the corrected PDF. Always link to url rather than caching an older copy.

Email proof of coverage

Shippers and brokers often ask a driver for proof of coverage. Download the PDF from url and attach it to your own email, or send the buyer the link.

On this page