Freight & Customs API Documentation

Read supplied invoices, packing lists, and bills of lading, cross-check quantities, weights, values, and parties, and suggest HS code candidates from the public UK Trade Tariff. No declaration is submitted. Payment is the exact USDC price on Base with x402.

POSThttps://brainiac.software/api/v1/freight-customs/shipping-document-extract$0.05 USDC

Extract a shipping document

Read parties, addresses, goods lines, weights, values, and references from supplied shipment text or a text-based PDF. Fields that are not printed are left empty.

Body

FieldRequiredNotes
textNostring
fileNoobject; Object
shipmentNoobject; Object

Request exampleJSON

{
  "text": "Commercial Invoice\nInvoice number: CI-1001\nSeller: Harbor Ink LLC\nSeller address: 12 Dock Street, Felixstowe\nBuyer: Northwind Paper Ltd\nCurrency: GBP\nIncoterm: FOB Felixstowe\nShipment reference: SHP-1001\nLine: Cotton t-shirts | 100 | pcs | 12.00 | 1200.00 | 40 | 46 | 6109100010\nTotal: 1200.00\n"
}

Response exampleJSON

{
  "checkedAt": "2026-11-02T19:00:00.000Z",
  "declarationSubmitted": false,
  "shipmentBooked": false,
  "documentType": "commercial_invoice",
  "reference": "SHP-1001",
  "invoiceNumber": "CI-1001",
  "invoiceDate": "",
  "billOfLadingNumber": "",
  "containerNumber": "",
  "vessel": "",
  "voyage": "",
  "currency": "GBP",
  "incoterm": "FOB",
  "namedPlace": "Felixstowe",
  "incotermYear": "",
  "originCountry": "",
  "destinationCountry": "",
  "portOfLoading": "",
  "portOfDischarge": "",
  "parties": [
    {
      "role": "seller",
      "name": "Harbor Ink LLC",
      "address": "12 Dock Street, Felixstowe"
    },
    {
      "role": "buyer",
      "name": "Northwind Paper Ltd",
      "address": ""
    }
  ],
  "lines": [
    {
      "description": "Cotton t-shirts",
      "quantity": 100,
      "unit": "pcs",
      "unitPrice": 12,
      "amount": 1200,
      "netWeightKg": 40,
      "grossWeightKg": 46,
      "packages": null,
      "volumeM3": null,
      "hsCode": "6109100010"
    }
  ],
  "totalAmount": 1200,
  "totalNetWeightKg": null,
  "totalGrossWeightKg": null,
  "totalVolumeM3": null,
  "totalPackages": null,
  "findings": [],
  "limitations": [
    "No customs declaration was submitted and no shipment was booked.",
    "Duty rates, restrictions, sanctions status, and country-specific requirements are not invented.",
    "An HS code candidate is not a customs classification.",
    "Only the documents and shipment fields in this request are compared."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/freight-customs/shipping-document-extract" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "text": "Commercial Invoice\nInvoice number: CI-1001\nSeller: Harbor Ink LLC\nSeller address: 12 Dock Street, Felixstowe\nBuyer: Northwind Paper Ltd\nCurrency: GBP\nIncoterm: FOB Felixstowe\nShipment reference: SHP-1001\nLine: Cotton t-shirts | 100 | pcs | 12.00 | 1200.00 | 40 | 46 | 6109100010\nTotal: 1200.00\n"
}
JSON
POSThttps://brainiac.software/api/v1/freight-customs/commercial-invoice-validate$0.05 USDC

Validate a commercial invoice

Check that supplied invoice lines, quantities, and amounts agree, and that the seller, buyer, currency, and total are present. No duty is calculated.

Body

FieldRequiredNotes
textNostring
fileNoobject; Object
shipmentNoobject; Object

Request exampleJSON

{
  "text": "Commercial Invoice\nInvoice number: CI-1001\nSeller: Harbor Ink LLC\nBuyer: Northwind Paper Ltd\nCurrency: GBP\nLine: Cotton t-shirts | 100 | pcs | 12.00 | 1200.00 | 40 | 46 | 6109100010\nTotal: 1200.00\n"
}

Response exampleJSON

{
  "checkedAt": "2026-11-02T19:00:00.000Z",
  "declarationSubmitted": false,
  "shipmentBooked": false,
  "status": "consistent",
  "documentType": "commercial_invoice",
  "reference": "",
  "invoiceNumber": "CI-1001",
  "invoiceDate": "",
  "billOfLadingNumber": "",
  "containerNumber": "",
  "vessel": "",
  "voyage": "",
  "currency": "GBP",
  "incoterm": "",
  "namedPlace": "",
  "incotermYear": "",
  "originCountry": "",
  "destinationCountry": "",
  "portOfLoading": "",
  "portOfDischarge": "",
  "parties": [
    {
      "role": "seller",
      "name": "Harbor Ink LLC",
      "address": ""
    },
    {
      "role": "buyer",
      "name": "Northwind Paper Ltd",
      "address": ""
    }
  ],
  "lines": [
    {
      "description": "Cotton t-shirts",
      "quantity": 100,
      "unit": "pcs",
      "unitPrice": 12,
      "amount": 1200,
      "netWeightKg": 40,
      "grossWeightKg": 46,
      "packages": null,
      "volumeM3": null,
      "hsCode": "6109100010"
    }
  ],
  "totalAmount": 1200,
  "totalNetWeightKg": null,
  "totalGrossWeightKg": null,
  "totalVolumeM3": null,
  "totalPackages": null,
  "calculatedAmount": 1200,
  "findings": [],
  "limitations": [
    "No customs declaration was submitted and no shipment was booked.",
    "Duty rates, restrictions, sanctions status, and country-specific requirements are not invented.",
    "An HS code candidate is not a customs classification.",
    "Only the documents and shipment fields in this request are compared."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/freight-customs/commercial-invoice-validate" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "text": "Commercial Invoice\nInvoice number: CI-1001\nSeller: Harbor Ink LLC\nBuyer: Northwind Paper Ltd\nCurrency: GBP\nLine: Cotton t-shirts | 100 | pcs | 12.00 | 1200.00 | 40 | 46 | 6109100010\nTotal: 1200.00\n"
}
JSON
POSThttps://brainiac.software/api/v1/freight-customs/packing-list-validate$0.04 USDC

Validate a packing list

Check package counts and net and gross weights on a supplied packing list. A missing weight is not treated as zero.

Body

FieldRequiredNotes
textNostring
fileNoobject; Object
shipmentNoobject; Object

Request exampleJSON

{
  "text": "Packing List\nShipment reference: SHP-1001\nLine: Cotton t-shirts | 100 | pcs | 0 | 0 | 40 | 46 |\nTotal net weight kg: 40\nTotal gross weight kg: 46\n"
}

Response exampleJSON

{
  "checkedAt": "2026-11-02T19:00:00.000Z",
  "declarationSubmitted": false,
  "shipmentBooked": false,
  "status": "consistent",
  "documentType": "packing_list",
  "reference": "SHP-1001",
  "invoiceNumber": "",
  "invoiceDate": "",
  "billOfLadingNumber": "",
  "containerNumber": "",
  "vessel": "",
  "voyage": "",
  "currency": "",
  "incoterm": "",
  "namedPlace": "",
  "incotermYear": "",
  "originCountry": "",
  "destinationCountry": "",
  "portOfLoading": "",
  "portOfDischarge": "",
  "parties": [],
  "lines": [
    {
      "description": "Cotton t-shirts",
      "quantity": 100,
      "unit": "pcs",
      "unitPrice": 0,
      "amount": 0,
      "netWeightKg": 40,
      "grossWeightKg": 46,
      "packages": null,
      "volumeM3": null,
      "hsCode": ""
    }
  ],
  "totalAmount": null,
  "totalNetWeightKg": 40,
  "totalGrossWeightKg": 46,
  "totalVolumeM3": null,
  "totalPackages": null,
  "findings": [],
  "limitations": [
    "No customs declaration was submitted and no shipment was booked.",
    "Duty rates, restrictions, sanctions status, and country-specific requirements are not invented.",
    "An HS code candidate is not a customs classification.",
    "Only the documents and shipment fields in this request are compared."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/freight-customs/packing-list-validate" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "text": "Packing List\nShipment reference: SHP-1001\nLine: Cotton t-shirts | 100 | pcs | 0 | 0 | 40 | 46 |\nTotal net weight kg: 40\nTotal gross weight kg: 46\n"
}
JSON
POSThttps://brainiac.software/api/v1/freight-customs/bill-of-lading-extract$0.05 USDC

Extract a bill of lading

Read the bill of lading number, shipper, consignee, container, and weight from supplied text. No shipment is booked.

Body

FieldRequiredNotes
textNostring
fileNoobject; Object
shipmentNoobject; Object

Request exampleJSON

{
  "text": "Bill of lading\nB/L number: BL-1001\nShipper: Harbor Ink LLC\nConsignee: Northwind Paper Ltd\nContainer: MSCU1234567\nGross weight kg: 46\nGoods: Cotton t-shirts | qty 100 pcs | gross 46 kg\n"
}

Response exampleJSON

{
  "checkedAt": "2026-11-02T19:00:00.000Z",
  "declarationSubmitted": false,
  "shipmentBooked": false,
  "status": "consistent",
  "documentType": "bill_of_lading",
  "reference": "",
  "invoiceNumber": "",
  "invoiceDate": "",
  "billOfLadingNumber": "BL-1001",
  "containerNumber": "MSCU1234567",
  "vessel": "",
  "voyage": "",
  "currency": "",
  "incoterm": "",
  "namedPlace": "",
  "incotermYear": "",
  "originCountry": "",
  "destinationCountry": "",
  "portOfLoading": "",
  "portOfDischarge": "",
  "parties": [
    {
      "role": "shipper",
      "name": "Harbor Ink LLC",
      "address": ""
    },
    {
      "role": "consignee",
      "name": "Northwind Paper Ltd",
      "address": ""
    }
  ],
  "lines": [
    {
      "description": "Cotton t-shirts",
      "quantity": 100,
      "unit": "pcs",
      "unitPrice": null,
      "amount": null,
      "netWeightKg": null,
      "grossWeightKg": 46,
      "packages": null,
      "volumeM3": null,
      "hsCode": ""
    }
  ],
  "totalAmount": null,
  "totalNetWeightKg": null,
  "totalGrossWeightKg": 46,
  "totalVolumeM3": null,
  "totalPackages": null,
  "findings": [],
  "limitations": [
    "No customs declaration was submitted and no shipment was booked.",
    "Duty rates, restrictions, sanctions status, and country-specific requirements are not invented.",
    "An HS code candidate is not a customs classification.",
    "Only the documents and shipment fields in this request are compared."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/freight-customs/bill-of-lading-extract" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "text": "Bill of lading\nB/L number: BL-1001\nShipper: Harbor Ink LLC\nConsignee: Northwind Paper Ltd\nContainer: MSCU1234567\nGross weight kg: 46\nGoods: Cotton t-shirts | qty 100 pcs | gross 46 kg\n"
}
JSON
POSThttps://brainiac.software/api/v1/freight-customs/shipment-document-consistency$0.06 USDC

Cross-check shipment documents

Compare references, parties, quantities, and weights across at least two supplied documents. A field that appears on only one document is reported separately from a conflict.

Body

FieldRequiredNotes
commercialInvoiceNoobject; Object
packingListNoobject; Object
billOfLadingNoobject; Object

Request exampleJSON

{
  "commercialInvoice": {
    "text": "Commercial Invoice\nShipment reference: SHP-1001\nSeller: Harbor Ink LLC\nLine: Cotton t-shirts | 100 | pcs | 12.00 | 1200.00 | 40 | 46 |\nTotal gross weight kg: 46\n"
  },
  "packingList": {
    "text": "Packing List\nShipment reference: SHP-1001\nSeller: Harbor Ink LLC\nLine: Cotton t-shirts | 100 | pcs | 0 | 0 | 40 | 46 |\nTotal gross weight kg: 46\n"
  }
}

Response exampleJSON

{
  "checkedAt": "2026-11-02T19:00:00.000Z",
  "declarationSubmitted": false,
  "shipmentBooked": false,
  "status": "consistent",
  "comparisons": [
    {
      "field": "reference",
      "commercialInvoice": "SHP-1001",
      "packingList": "SHP-1001",
      "billOfLading": "",
      "status": "match"
    },
    {
      "field": "totalGrossWeightKg",
      "commercialInvoice": "46",
      "packingList": "46",
      "billOfLading": "",
      "status": "match"
    },
    {
      "field": "party:seller",
      "commercialInvoice": "Harbor Ink LLC",
      "packingList": "Harbor Ink LLC",
      "billOfLading": "",
      "status": "match"
    },
    {
      "field": "quantity:cotton t-shirts",
      "commercialInvoice": "100",
      "packingList": "100",
      "billOfLading": "",
      "status": "match"
    }
  ],
  "findings": [],
  "limitations": [
    "No customs declaration was submitted and no shipment was booked.",
    "Duty rates, restrictions, sanctions status, and country-specific requirements are not invented.",
    "An HS code candidate is not a customs classification.",
    "Only the documents and shipment fields in this request are compared."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/freight-customs/shipment-document-consistency" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "commercialInvoice": {
    "text": "Commercial Invoice\nShipment reference: SHP-1001\nSeller: Harbor Ink LLC\nLine: Cotton t-shirts | 100 | pcs | 12.00 | 1200.00 | 40 | 46 |\nTotal gross weight kg: 46\n"
  },
  "packingList": {
    "text": "Packing List\nShipment reference: SHP-1001\nSeller: Harbor Ink LLC\nLine: Cotton t-shirts | 100 | pcs | 0 | 0 | 40 | 46 |\nTotal gross weight kg: 46\n"
  }
}
JSON
POSThttps://brainiac.software/api/v1/freight-customs/hs-code-candidate-suggest$0.06 USDC

Suggest HS code candidates

Search the public UK Trade Tariff for commodity candidates matching a goods description. The result is not a customs classification and does not state a duty.

Body

FieldRequiredNotes
descriptionYesstring
hsCodeNostring

Request exampleJSON

{
  "description": "cotton t-shirts",
  "hsCode": "6109100010"
}

Response exampleJSON

{
  "checkedAt": "2026-11-02T19:00:00.000Z",
  "declarationSubmitted": false,
  "shipmentBooked": false,
  "description": "cotton t-shirts",
  "definitiveClassification": false,
  "duty": "unavailable",
  "restrictions": "unavailable",
  "sanctions": "unavailable",
  "countryRequirements": "unavailable",
  "status": "candidates",
  "source": "UK Trade Tariff",
  "candidates": [
    {
      "code": "6109100010",
      "description": "T-shirts",
      "source": "UK Trade Tariff"
    },
    {
      "code": "6109100090",
      "description": "Other",
      "source": "UK Trade Tariff"
    },
    {
      "code": "6109100000",
      "description": "Of cotton",
      "source": "UK Trade Tariff"
    }
  ],
  "findings": [
    {
      "kind": "extracted",
      "code": "candidates_returned",
      "detail": "These are search candidates from the UK Trade Tariff. They are not a customs classification."
    },
    {
      "kind": "extracted",
      "code": "supplied_code_in_candidates",
      "detail": "The supplied code matches a returned candidate by prefix. This is not a classification."
    }
  ],
  "limitations": [
    "No customs declaration was submitted and no shipment was booked.",
    "Duty rates, restrictions, sanctions status, and country-specific requirements are not invented.",
    "An HS code candidate is not a customs classification.",
    "Only the documents and shipment fields in this request are compared.",
    "Candidates come from the public UK Trade Tariff search. A match is not a classification and does not state a duty."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/freight-customs/hs-code-candidate-suggest" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "description": "cotton t-shirts",
  "hsCode": "6109100010"
}
JSON
POSThttps://brainiac.software/api/v1/freight-customs/customs-data-completeness$0.04 USDC

Check customs data completeness

List shipment fields that are present or missing in the supplied documents. Duty, restrictions, sanctions, and country-specific requirements stay unverified.

Body

FieldRequiredNotes
textNostring
fileNoobject; Object
shipmentNoobject; Object

Request exampleJSON

{
  "text": "Commercial Invoice\nInvoice number: CI-1001\nSeller: Harbor Ink LLC\nBuyer: Northwind Paper Ltd\nCurrency: GBP\nCountry of origin: United Kingdom\nCountry of destination: United States\nLine: Cotton t-shirts | 100 | pcs | 12.00 | 1200.00 | 40 | 46 | 6109100010\nTotal: 1200.00\nTotal gross weight kg: 46\n"
}

Response exampleJSON

{
  "checkedAt": "2026-11-02T19:00:00.000Z",
  "declarationSubmitted": false,
  "shipmentBooked": false,
  "status": "complete",
  "items": [
    {
      "field": "exporter",
      "status": "present",
      "detail": "The field is present in the supplied documents."
    },
    {
      "field": "consignee",
      "status": "present",
      "detail": "The field is present in the supplied documents."
    },
    {
      "field": "description",
      "status": "present",
      "detail": "The field is present in the supplied documents."
    },
    {
      "field": "quantity",
      "status": "present",
      "detail": "The field is present in the supplied documents."
    },
    {
      "field": "value",
      "status": "present",
      "detail": "The field is present in the supplied documents."
    },
    {
      "field": "currency",
      "status": "present",
      "detail": "The field is present in the supplied documents."
    },
    {
      "field": "grossWeight",
      "status": "present",
      "detail": "The field is present in the supplied documents."
    },
    {
      "field": "origin",
      "status": "present",
      "detail": "The field is present in the supplied documents."
    },
    {
      "field": "destination",
      "status": "present",
      "detail": "The field is present in the supplied documents."
    },
    {
      "field": "reference",
      "status": "present",
      "detail": "The field is present in the supplied documents."
    },
    {
      "field": "hsCode",
      "status": "present",
      "detail": "A commodity code was supplied. It was not classified by this check."
    }
  ],
  "findings": [
    {
      "kind": "unavailable",
      "code": "official_verification_unavailable",
      "detail": "Duty, restrictions, sanctions status, and country-specific filing requirements were not verified."
    }
  ],
  "limitations": [
    "No customs declaration was submitted and no shipment was booked.",
    "Duty rates, restrictions, sanctions status, and country-specific requirements are not invented.",
    "An HS code candidate is not a customs classification.",
    "Only the documents and shipment fields in this request are compared."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/freight-customs/customs-data-completeness" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "text": "Commercial Invoice\nInvoice number: CI-1001\nSeller: Harbor Ink LLC\nBuyer: Northwind Paper Ltd\nCurrency: GBP\nCountry of origin: United Kingdom\nCountry of destination: United States\nLine: Cotton t-shirts | 100 | pcs | 12.00 | 1200.00 | 40 | 46 | 6109100010\nTotal: 1200.00\nTotal gross weight kg: 46\n"
}
JSON
POSThttps://brainiac.software/api/v1/freight-customs/shipment-weight-volume-calculate$0.03 USDC

Calculate shipment weight and volume

Sum supplied package weights and calculate volume from centimetre dimensions. Volumetric weight is calculated only when the request includes a divisor.

Body

FieldRequiredNotes
packagesYesarray; Array
statedNetWeightKgNonumber
statedGrossWeightKgNonumber
statedVolumeM3Nonumber
volumetricDivisorNonumber

Request exampleJSON

{
  "packages": [
    {
      "description": "Carton",
      "count": 2,
      "lengthCm": 40,
      "widthCm": 30,
      "heightCm": 20,
      "netWeightKg": 8,
      "grossWeightKg": 10
    }
  ],
  "volumetricDivisor": 167
}

Response exampleJSON

{
  "checkedAt": "2026-11-02T19:00:00.000Z",
  "declarationSubmitted": false,
  "shipmentBooked": false,
  "status": "consistent",
  "packages": [
    {
      "description": "Carton",
      "count": 2,
      "volumeM3": 0.048,
      "netWeightKg": 16,
      "grossWeightKg": 20
    }
  ],
  "totalNetWeightKg": 16,
  "totalGrossWeightKg": 20,
  "totalVolumeM3": 0.048,
  "volumetricWeightKg": 8.016,
  "chargeableWeightKg": 20,
  "findings": [],
  "limitations": [
    "No customs declaration was submitted and no shipment was booked.",
    "Duty rates, restrictions, sanctions status, and country-specific requirements are not invented.",
    "An HS code candidate is not a customs classification.",
    "Only the documents and shipment fields in this request are compared.",
    "Volume is calculated from supplied centimetre dimensions. Volumetric weight uses only a divisor supplied in the request."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/freight-customs/shipment-weight-volume-calculate" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "packages": [
    {
      "description": "Carton",
      "count": 2,
      "lengthCm": 40,
      "widthCm": 30,
      "heightCm": 20,
      "netWeightKg": 8,
      "grossWeightKg": 10
    }
  ],
  "volumetricDivisor": 167
}
JSON
POSThttps://brainiac.software/api/v1/freight-customs/incoterms-obligation-extract$0.04 USDC

Extract Incoterms obligations

Read a named Incoterms rule and its named place from the request. The obligation text is that named rule. No duty amount is calculated.

Body

FieldRequiredNotes
textNostring
fileNoobject; Object
incotermNostring
namedPlaceNostring

Request exampleJSON

{
  "incoterm": "FOB Felixstowe"
}

Response exampleJSON

{
  "checkedAt": "2026-11-02T19:00:00.000Z",
  "declarationSubmitted": false,
  "shipmentBooked": false,
  "status": "incomplete",
  "incoterm": "FOB",
  "namedPlace": "Felixstowe",
  "incotermYear": "",
  "seller": "Delivers the goods on board the vessel at the named port.",
  "buyer": "Handles the main carriage and import after loading.",
  "risk": "Passes when the goods are on board the vessel.",
  "duty": "unavailable",
  "findings": [
    {
      "kind": "extracted",
      "code": "incoterm_named",
      "detail": "FOB was read as a named Incoterms rule. This is not a customs ruling."
    },
    {
      "kind": "missing",
      "code": "incoterm_year_missing",
      "detail": "No Incoterms year was printed. 2010 and 2020 were not assumed."
    }
  ],
  "limitations": [
    "No customs declaration was submitted and no shipment was booked.",
    "Duty rates, restrictions, sanctions status, and country-specific requirements are not invented.",
    "An HS code candidate is not a customs classification.",
    "Only the documents and shipment fields in this request are compared.",
    "The obligation text is the named Incoterms rule. It is not a filing instruction or a duty calculation."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/freight-customs/incoterms-obligation-extract" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "incoterm": "FOB Felixstowe"
}
JSON
POSThttps://brainiac.software/api/v1/freight-customs/customs-preparation-report$0.12 USDC

Prepare a customs evidence report

Combine document checks, weight evidence, the named Incoterm, and UK Trade Tariff candidates. No declaration is submitted and no shipment is booked.

Body

FieldRequiredNotes
commercialInvoiceNoobject; Object
packingListNoobject; Object
billOfLadingNoobject; Object
shipmentNoobject; Object
packagesNoarray; Array
volumetricDivisorNonumber

Request exampleJSON

{
  "commercialInvoice": {
    "text": "Commercial Invoice\nInvoice number: CI-1001\nSeller: Harbor Ink LLC\nBuyer: Northwind Paper Ltd\nCurrency: GBP\nIncoterm: FOB Felixstowe\nCountry of origin: United Kingdom\nCountry of destination: United States\nShipment reference: SHP-1001\nLine: Cotton t-shirts | 100 | pcs | 12.00 | 1200.00 | 40 | 46 | 6109100010\nTotal: 1200.00\nTotal gross weight kg: 46\n"
  },
  "packingList": {
    "text": "Packing List\nShipment reference: SHP-1001\nSeller: Harbor Ink LLC\nBuyer: Northwind Paper Ltd\nLine: Cotton t-shirts | 100 | pcs | 0 | 0 | 40 | 46 |\nTotal gross weight kg: 46\n"
  }
}

Response exampleJSON

{
  "checkedAt": "2026-11-02T19:00:00.000Z",
  "declarationSubmitted": false,
  "shipmentBooked": false,
  "assessment": "incomplete",
  "summary": "Required shipment evidence is missing. No declaration was submitted and no shipment was booked.",
  "sections": [
    {
      "name": "commercialInvoice",
      "status": "consistent"
    },
    {
      "name": "packingList",
      "status": "consistent"
    },
    {
      "name": "billOfLading",
      "status": "not_supplied"
    },
    {
      "name": "consistency",
      "status": "consistent"
    },
    {
      "name": "weightVolume",
      "status": "not_supplied"
    },
    {
      "name": "incoterms",
      "status": "incomplete"
    },
    {
      "name": "completeness",
      "status": "complete"
    },
    {
      "name": "hsCandidates",
      "status": "candidates"
    }
  ],
  "counts": {
    "conflict": 0,
    "missing": 1,
    "unavailable": 1
  },
  "candidates": [
    {
      "code": "6109100010",
      "description": "T-shirts",
      "source": "UK Trade Tariff"
    },
    {
      "code": "6109100090",
      "description": "Other",
      "source": "UK Trade Tariff"
    },
    {
      "code": "6109100000",
      "description": "Of cotton",
      "source": "UK Trade Tariff"
    }
  ],
  "duty": "unavailable",
  "restrictions": "unavailable",
  "sanctions": "unavailable",
  "findings": [
    {
      "kind": "unavailable",
      "code": "official_verification_unavailable",
      "detail": "Duty, restrictions, sanctions status, and country-specific filing requirements were not verified."
    },
    {
      "kind": "missing",
      "code": "incoterm_year_missing",
      "detail": "No Incoterms year was printed. 2010 and 2020 were not assumed."
    },
    {
      "kind": "extracted",
      "code": "supplied_code_in_candidates",
      "detail": "The supplied code matches a returned candidate by prefix. This is not a classification."
    }
  ],
  "limitations": [
    "No customs declaration was submitted and no shipment was booked.",
    "Duty rates, restrictions, sanctions status, and country-specific requirements are not invented.",
    "An HS code candidate is not a customs classification.",
    "Only the documents and shipment fields in this request are compared."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/freight-customs/customs-preparation-report" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "commercialInvoice": {
    "text": "Commercial Invoice\nInvoice number: CI-1001\nSeller: Harbor Ink LLC\nBuyer: Northwind Paper Ltd\nCurrency: GBP\nIncoterm: FOB Felixstowe\nCountry of origin: United Kingdom\nCountry of destination: United States\nShipment reference: SHP-1001\nLine: Cotton t-shirts | 100 | pcs | 12.00 | 1200.00 | 40 | 46 | 6109100010\nTotal: 1200.00\nTotal gross weight kg: 46\n"
  },
  "packingList": {
    "text": "Packing List\nShipment reference: SHP-1001\nSeller: Harbor Ink LLC\nBuyer: Northwind Paper Ltd\nLine: Cotton t-shirts | 100 | pcs | 0 | 0 | 40 | 46 |\nTotal gross weight kg: 46\n"
  }
}
JSON