{"openapi":"3.1.0","info":{"title":"Freight & Customs API","version":"1.0.0","description":"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. Paid with x402 exact USDC on Base. No account is required.","contact":{"email":"support@brainiac.software"},"x-guidance":"BRAINIAC.software is a pay-per-call API for software agents. No account or API key is required.\nPayment uses the x402 protocol with exact USDC on Base (chain id 8453). Each POST operation has a fixed USD price.\nHow to call an operation:\n1. POST a JSON body matching the operation's requestBody schema to the operation path. Include an Idempotency-Key header (64 hex characters, 32 random bytes).\n2. If you have not paid, the server responds 402 with payment requirements in the body. Pay the exact amount to the payTo address on Base.\n3. Retry the identical request with the same Idempotency-Key and add a payment-signature header containing the x402 payment payload. On success (200) the operation result is returned.\n4. Reuse the same Idempotency-Key only for retries of the same operation and request body; it will not be charged twice.\nAll outputs are compliance prechecks, drafts, or data lookups for human review. They are not official determinations, legal advice, identity confirmation, or certified filings. Verify time-sensitive or official data with the cited source before acting."},"servers":[{"url":"https://www.brainiac.software"}],"paths":{"/api/v1/freight-customs/shipping-document-extract":{"post":{"operationId":"extract_a_shipping_document","summary":"Extract a shipping document","description":"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.","tags":["freight-customs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["application/pdf","text/plain"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"shipment":{"type":"object","properties":{"reference":{"type":"string","minLength":1,"maxLength":80},"invoiceNumber":{"type":"string","minLength":1,"maxLength":80},"invoiceDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"billOfLadingNumber":{"type":"string","minLength":1,"maxLength":80},"containerNumber":{"type":"string","minLength":1,"maxLength":20},"vessel":{"type":"string","minLength":1,"maxLength":120},"voyage":{"type":"string","minLength":1,"maxLength":40},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"incoterm":{"type":"string","minLength":3,"maxLength":80},"namedPlace":{"type":"string","minLength":1,"maxLength":160},"originCountry":{"type":"string","minLength":2,"maxLength":80},"destinationCountry":{"type":"string","minLength":2,"maxLength":80},"portOfLoading":{"type":"string","minLength":1,"maxLength":120},"portOfDischarge":{"type":"string","minLength":1,"maxLength":120},"totalAmount":{"type":"number","minimum":0,"maximum":1000000000000},"totalNetWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"totalGrossWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"totalVolumeM3":{"type":"number","minimum":0,"maximum":1000000},"totalPackages":{"type":"integer","minimum":0,"maximum":1000000},"parties":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["seller","exporter","buyer","importer","consignee","shipper","notify"]},"name":{"type":"string","minLength":1,"maxLength":200},"address":{"type":"string","minLength":1,"maxLength":400}},"required":["role","name"],"additionalProperties":false}},"lines":{"maxItems":80,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":300},"quantity":{"type":"number","exclusiveMinimum":0,"maximum":1000000000},"unit":{"type":"string","minLength":1,"maxLength":20},"unitPrice":{"type":"number","minimum":0,"maximum":1000000000000},"amount":{"type":"number","minimum":0,"maximum":1000000000000},"netWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"grossWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"packages":{"type":"integer","minimum":0,"maximum":1000000},"volumeM3":{"type":"number","minimum":0,"maximum":1000000},"hsCode":{"type":"string","minLength":4,"maxLength":14}},"required":["description"],"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"example":{"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"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"declarationSubmitted":{"type":"boolean"},"shipmentBooked":{"type":"boolean"},"documentType":{"type":"string"},"reference":{"type":"string"},"invoiceNumber":{"type":"string"},"invoiceDate":{"type":"string"},"billOfLadingNumber":{"type":"string"},"containerNumber":{"type":"string"},"vessel":{"type":"string"},"voyage":{"type":"string"},"currency":{"type":"string"},"incoterm":{"type":"string"},"namedPlace":{"type":"string"},"incotermYear":{"type":"string"},"originCountry":{"type":"string"},"destinationCountry":{"type":"string"},"portOfLoading":{"type":"string"},"portOfDischarge":{"type":"string"},"parties":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"}},"additionalProperties":true}},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"quantity":{"type":"number"},"unit":{"type":"string"},"unitPrice":{"type":"number"},"amount":{"type":"number"},"netWeightKg":{"type":"number"},"grossWeightKg":{"type":"number"},"packages":{"type":"null"},"volumeM3":{"type":"null"},"hsCode":{"type":"string"}},"additionalProperties":true}},"totalAmount":{"type":"number"},"totalNetWeightKg":{"type":"null"},"totalGrossWeightKg":{"type":"null"},"totalVolumeM3":{"type":"null"},"totalPackages":{"type":"null"},"findings":{"type":"array","items":{}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"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."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.05"},"protocols":[{"x402":{}}]}}},"/api/v1/freight-customs/commercial-invoice-validate":{"post":{"operationId":"validate_a_commercial_invoice","summary":"Validate a commercial invoice","description":"Check that supplied invoice lines, quantities, and amounts agree, and that the seller, buyer, currency, and total are present. No duty is calculated.","tags":["freight-customs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["application/pdf","text/plain"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"shipment":{"type":"object","properties":{"reference":{"type":"string","minLength":1,"maxLength":80},"invoiceNumber":{"type":"string","minLength":1,"maxLength":80},"invoiceDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"billOfLadingNumber":{"type":"string","minLength":1,"maxLength":80},"containerNumber":{"type":"string","minLength":1,"maxLength":20},"vessel":{"type":"string","minLength":1,"maxLength":120},"voyage":{"type":"string","minLength":1,"maxLength":40},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"incoterm":{"type":"string","minLength":3,"maxLength":80},"namedPlace":{"type":"string","minLength":1,"maxLength":160},"originCountry":{"type":"string","minLength":2,"maxLength":80},"destinationCountry":{"type":"string","minLength":2,"maxLength":80},"portOfLoading":{"type":"string","minLength":1,"maxLength":120},"portOfDischarge":{"type":"string","minLength":1,"maxLength":120},"totalAmount":{"type":"number","minimum":0,"maximum":1000000000000},"totalNetWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"totalGrossWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"totalVolumeM3":{"type":"number","minimum":0,"maximum":1000000},"totalPackages":{"type":"integer","minimum":0,"maximum":1000000},"parties":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["seller","exporter","buyer","importer","consignee","shipper","notify"]},"name":{"type":"string","minLength":1,"maxLength":200},"address":{"type":"string","minLength":1,"maxLength":400}},"required":["role","name"],"additionalProperties":false}},"lines":{"maxItems":80,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":300},"quantity":{"type":"number","exclusiveMinimum":0,"maximum":1000000000},"unit":{"type":"string","minLength":1,"maxLength":20},"unitPrice":{"type":"number","minimum":0,"maximum":1000000000000},"amount":{"type":"number","minimum":0,"maximum":1000000000000},"netWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"grossWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"packages":{"type":"integer","minimum":0,"maximum":1000000},"volumeM3":{"type":"number","minimum":0,"maximum":1000000},"hsCode":{"type":"string","minLength":4,"maxLength":14}},"required":["description"],"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"example":{"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"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"declarationSubmitted":{"type":"boolean"},"shipmentBooked":{"type":"boolean"},"status":{"type":"string"},"documentType":{"type":"string"},"reference":{"type":"string"},"invoiceNumber":{"type":"string"},"invoiceDate":{"type":"string"},"billOfLadingNumber":{"type":"string"},"containerNumber":{"type":"string"},"vessel":{"type":"string"},"voyage":{"type":"string"},"currency":{"type":"string"},"incoterm":{"type":"string"},"namedPlace":{"type":"string"},"incotermYear":{"type":"string"},"originCountry":{"type":"string"},"destinationCountry":{"type":"string"},"portOfLoading":{"type":"string"},"portOfDischarge":{"type":"string"},"parties":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"}},"additionalProperties":true}},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"quantity":{"type":"number"},"unit":{"type":"string"},"unitPrice":{"type":"number"},"amount":{"type":"number"},"netWeightKg":{"type":"number"},"grossWeightKg":{"type":"number"},"packages":{"type":"null"},"volumeM3":{"type":"null"},"hsCode":{"type":"string"}},"additionalProperties":true}},"totalAmount":{"type":"number"},"totalNetWeightKg":{"type":"null"},"totalGrossWeightKg":{"type":"null"},"totalVolumeM3":{"type":"null"},"totalPackages":{"type":"null"},"calculatedAmount":{"type":"number"},"findings":{"type":"array","items":{}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"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."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.05"},"protocols":[{"x402":{}}]}}},"/api/v1/freight-customs/packing-list-validate":{"post":{"operationId":"validate_a_packing_list","summary":"Validate a packing list","description":"Check package counts and net and gross weights on a supplied packing list. A missing weight is not treated as zero.","tags":["freight-customs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["application/pdf","text/plain"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"shipment":{"type":"object","properties":{"reference":{"type":"string","minLength":1,"maxLength":80},"invoiceNumber":{"type":"string","minLength":1,"maxLength":80},"invoiceDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"billOfLadingNumber":{"type":"string","minLength":1,"maxLength":80},"containerNumber":{"type":"string","minLength":1,"maxLength":20},"vessel":{"type":"string","minLength":1,"maxLength":120},"voyage":{"type":"string","minLength":1,"maxLength":40},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"incoterm":{"type":"string","minLength":3,"maxLength":80},"namedPlace":{"type":"string","minLength":1,"maxLength":160},"originCountry":{"type":"string","minLength":2,"maxLength":80},"destinationCountry":{"type":"string","minLength":2,"maxLength":80},"portOfLoading":{"type":"string","minLength":1,"maxLength":120},"portOfDischarge":{"type":"string","minLength":1,"maxLength":120},"totalAmount":{"type":"number","minimum":0,"maximum":1000000000000},"totalNetWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"totalGrossWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"totalVolumeM3":{"type":"number","minimum":0,"maximum":1000000},"totalPackages":{"type":"integer","minimum":0,"maximum":1000000},"parties":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["seller","exporter","buyer","importer","consignee","shipper","notify"]},"name":{"type":"string","minLength":1,"maxLength":200},"address":{"type":"string","minLength":1,"maxLength":400}},"required":["role","name"],"additionalProperties":false}},"lines":{"maxItems":80,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":300},"quantity":{"type":"number","exclusiveMinimum":0,"maximum":1000000000},"unit":{"type":"string","minLength":1,"maxLength":20},"unitPrice":{"type":"number","minimum":0,"maximum":1000000000000},"amount":{"type":"number","minimum":0,"maximum":1000000000000},"netWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"grossWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"packages":{"type":"integer","minimum":0,"maximum":1000000},"volumeM3":{"type":"number","minimum":0,"maximum":1000000},"hsCode":{"type":"string","minLength":4,"maxLength":14}},"required":["description"],"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"example":{"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"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"declarationSubmitted":{"type":"boolean"},"shipmentBooked":{"type":"boolean"},"status":{"type":"string"},"documentType":{"type":"string"},"reference":{"type":"string"},"invoiceNumber":{"type":"string"},"invoiceDate":{"type":"string"},"billOfLadingNumber":{"type":"string"},"containerNumber":{"type":"string"},"vessel":{"type":"string"},"voyage":{"type":"string"},"currency":{"type":"string"},"incoterm":{"type":"string"},"namedPlace":{"type":"string"},"incotermYear":{"type":"string"},"originCountry":{"type":"string"},"destinationCountry":{"type":"string"},"portOfLoading":{"type":"string"},"portOfDischarge":{"type":"string"},"parties":{"type":"array","items":{}},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"quantity":{"type":"number"},"unit":{"type":"string"},"unitPrice":{"type":"number"},"amount":{"type":"number"},"netWeightKg":{"type":"number"},"grossWeightKg":{"type":"number"},"packages":{"type":"null"},"volumeM3":{"type":"null"},"hsCode":{"type":"string"}},"additionalProperties":true}},"totalAmount":{"type":"null"},"totalNetWeightKg":{"type":"number"},"totalGrossWeightKg":{"type":"number"},"totalVolumeM3":{"type":"null"},"totalPackages":{"type":"null"},"findings":{"type":"array","items":{}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"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."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.04"},"protocols":[{"x402":{}}]}}},"/api/v1/freight-customs/bill-of-lading-extract":{"post":{"operationId":"extract_a_bill_of_lading","summary":"Extract a bill of lading","description":"Read the bill of lading number, shipper, consignee, container, and weight from supplied text. No shipment is booked.","tags":["freight-customs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["application/pdf","text/plain"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"shipment":{"type":"object","properties":{"reference":{"type":"string","minLength":1,"maxLength":80},"invoiceNumber":{"type":"string","minLength":1,"maxLength":80},"invoiceDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"billOfLadingNumber":{"type":"string","minLength":1,"maxLength":80},"containerNumber":{"type":"string","minLength":1,"maxLength":20},"vessel":{"type":"string","minLength":1,"maxLength":120},"voyage":{"type":"string","minLength":1,"maxLength":40},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"incoterm":{"type":"string","minLength":3,"maxLength":80},"namedPlace":{"type":"string","minLength":1,"maxLength":160},"originCountry":{"type":"string","minLength":2,"maxLength":80},"destinationCountry":{"type":"string","minLength":2,"maxLength":80},"portOfLoading":{"type":"string","minLength":1,"maxLength":120},"portOfDischarge":{"type":"string","minLength":1,"maxLength":120},"totalAmount":{"type":"number","minimum":0,"maximum":1000000000000},"totalNetWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"totalGrossWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"totalVolumeM3":{"type":"number","minimum":0,"maximum":1000000},"totalPackages":{"type":"integer","minimum":0,"maximum":1000000},"parties":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["seller","exporter","buyer","importer","consignee","shipper","notify"]},"name":{"type":"string","minLength":1,"maxLength":200},"address":{"type":"string","minLength":1,"maxLength":400}},"required":["role","name"],"additionalProperties":false}},"lines":{"maxItems":80,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":300},"quantity":{"type":"number","exclusiveMinimum":0,"maximum":1000000000},"unit":{"type":"string","minLength":1,"maxLength":20},"unitPrice":{"type":"number","minimum":0,"maximum":1000000000000},"amount":{"type":"number","minimum":0,"maximum":1000000000000},"netWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"grossWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"packages":{"type":"integer","minimum":0,"maximum":1000000},"volumeM3":{"type":"number","minimum":0,"maximum":1000000},"hsCode":{"type":"string","minLength":4,"maxLength":14}},"required":["description"],"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"example":{"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"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"declarationSubmitted":{"type":"boolean"},"shipmentBooked":{"type":"boolean"},"status":{"type":"string"},"documentType":{"type":"string"},"reference":{"type":"string"},"invoiceNumber":{"type":"string"},"invoiceDate":{"type":"string"},"billOfLadingNumber":{"type":"string"},"containerNumber":{"type":"string"},"vessel":{"type":"string"},"voyage":{"type":"string"},"currency":{"type":"string"},"incoterm":{"type":"string"},"namedPlace":{"type":"string"},"incotermYear":{"type":"string"},"originCountry":{"type":"string"},"destinationCountry":{"type":"string"},"portOfLoading":{"type":"string"},"portOfDischarge":{"type":"string"},"parties":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"}},"additionalProperties":true}},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"quantity":{"type":"number"},"unit":{"type":"string"},"unitPrice":{"type":"null"},"amount":{"type":"null"},"netWeightKg":{"type":"null"},"grossWeightKg":{"type":"number"},"packages":{"type":"null"},"volumeM3":{"type":"null"},"hsCode":{"type":"string"}},"additionalProperties":true}},"totalAmount":{"type":"null"},"totalNetWeightKg":{"type":"null"},"totalGrossWeightKg":{"type":"number"},"totalVolumeM3":{"type":"null"},"totalPackages":{"type":"null"},"findings":{"type":"array","items":{}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"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."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.05"},"protocols":[{"x402":{}}]}}},"/api/v1/freight-customs/shipment-document-consistency":{"post":{"operationId":"cross_check_shipment_documents","summary":"Cross-check shipment documents","description":"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.","tags":["freight-customs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"commercialInvoice":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["application/pdf","text/plain"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"shipment":{"type":"object","properties":{"reference":{"type":"string","minLength":1,"maxLength":80},"invoiceNumber":{"type":"string","minLength":1,"maxLength":80},"invoiceDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"billOfLadingNumber":{"type":"string","minLength":1,"maxLength":80},"containerNumber":{"type":"string","minLength":1,"maxLength":20},"vessel":{"type":"string","minLength":1,"maxLength":120},"voyage":{"type":"string","minLength":1,"maxLength":40},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"incoterm":{"type":"string","minLength":3,"maxLength":80},"namedPlace":{"type":"string","minLength":1,"maxLength":160},"originCountry":{"type":"string","minLength":2,"maxLength":80},"destinationCountry":{"type":"string","minLength":2,"maxLength":80},"portOfLoading":{"type":"string","minLength":1,"maxLength":120},"portOfDischarge":{"type":"string","minLength":1,"maxLength":120},"totalAmount":{"type":"number","minimum":0,"maximum":1000000000000},"totalNetWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"totalGrossWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"totalVolumeM3":{"type":"number","minimum":0,"maximum":1000000},"totalPackages":{"type":"integer","minimum":0,"maximum":1000000},"parties":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["seller","exporter","buyer","importer","consignee","shipper","notify"]},"name":{"type":"string","minLength":1,"maxLength":200},"address":{"type":"string","minLength":1,"maxLength":400}},"required":["role","name"],"additionalProperties":false}},"lines":{"maxItems":80,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":300},"quantity":{"type":"number","exclusiveMinimum":0,"maximum":1000000000},"unit":{"type":"string","minLength":1,"maxLength":20},"unitPrice":{"type":"number","minimum":0,"maximum":1000000000000},"amount":{"type":"number","minimum":0,"maximum":1000000000000},"netWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"grossWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"packages":{"type":"integer","minimum":0,"maximum":1000000},"volumeM3":{"type":"number","minimum":0,"maximum":1000000},"hsCode":{"type":"string","minLength":4,"maxLength":14}},"required":["description"],"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"packingList":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["application/pdf","text/plain"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"shipment":{"type":"object","properties":{"reference":{"type":"string","minLength":1,"maxLength":80},"invoiceNumber":{"type":"string","minLength":1,"maxLength":80},"invoiceDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"billOfLadingNumber":{"type":"string","minLength":1,"maxLength":80},"containerNumber":{"type":"string","minLength":1,"maxLength":20},"vessel":{"type":"string","minLength":1,"maxLength":120},"voyage":{"type":"string","minLength":1,"maxLength":40},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"incoterm":{"type":"string","minLength":3,"maxLength":80},"namedPlace":{"type":"string","minLength":1,"maxLength":160},"originCountry":{"type":"string","minLength":2,"maxLength":80},"destinationCountry":{"type":"string","minLength":2,"maxLength":80},"portOfLoading":{"type":"string","minLength":1,"maxLength":120},"portOfDischarge":{"type":"string","minLength":1,"maxLength":120},"totalAmount":{"type":"number","minimum":0,"maximum":1000000000000},"totalNetWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"totalGrossWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"totalVolumeM3":{"type":"number","minimum":0,"maximum":1000000},"totalPackages":{"type":"integer","minimum":0,"maximum":1000000},"parties":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["seller","exporter","buyer","importer","consignee","shipper","notify"]},"name":{"type":"string","minLength":1,"maxLength":200},"address":{"type":"string","minLength":1,"maxLength":400}},"required":["role","name"],"additionalProperties":false}},"lines":{"maxItems":80,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":300},"quantity":{"type":"number","exclusiveMinimum":0,"maximum":1000000000},"unit":{"type":"string","minLength":1,"maxLength":20},"unitPrice":{"type":"number","minimum":0,"maximum":1000000000000},"amount":{"type":"number","minimum":0,"maximum":1000000000000},"netWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"grossWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"packages":{"type":"integer","minimum":0,"maximum":1000000},"volumeM3":{"type":"number","minimum":0,"maximum":1000000},"hsCode":{"type":"string","minLength":4,"maxLength":14}},"required":["description"],"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"billOfLading":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["application/pdf","text/plain"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"shipment":{"type":"object","properties":{"reference":{"type":"string","minLength":1,"maxLength":80},"invoiceNumber":{"type":"string","minLength":1,"maxLength":80},"invoiceDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"billOfLadingNumber":{"type":"string","minLength":1,"maxLength":80},"containerNumber":{"type":"string","minLength":1,"maxLength":20},"vessel":{"type":"string","minLength":1,"maxLength":120},"voyage":{"type":"string","minLength":1,"maxLength":40},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"incoterm":{"type":"string","minLength":3,"maxLength":80},"namedPlace":{"type":"string","minLength":1,"maxLength":160},"originCountry":{"type":"string","minLength":2,"maxLength":80},"destinationCountry":{"type":"string","minLength":2,"maxLength":80},"portOfLoading":{"type":"string","minLength":1,"maxLength":120},"portOfDischarge":{"type":"string","minLength":1,"maxLength":120},"totalAmount":{"type":"number","minimum":0,"maximum":1000000000000},"totalNetWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"totalGrossWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"totalVolumeM3":{"type":"number","minimum":0,"maximum":1000000},"totalPackages":{"type":"integer","minimum":0,"maximum":1000000},"parties":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["seller","exporter","buyer","importer","consignee","shipper","notify"]},"name":{"type":"string","minLength":1,"maxLength":200},"address":{"type":"string","minLength":1,"maxLength":400}},"required":["role","name"],"additionalProperties":false}},"lines":{"maxItems":80,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":300},"quantity":{"type":"number","exclusiveMinimum":0,"maximum":1000000000},"unit":{"type":"string","minLength":1,"maxLength":20},"unitPrice":{"type":"number","minimum":0,"maximum":1000000000000},"amount":{"type":"number","minimum":0,"maximum":1000000000000},"netWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"grossWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"packages":{"type":"integer","minimum":0,"maximum":1000000},"volumeM3":{"type":"number","minimum":0,"maximum":1000000},"hsCode":{"type":"string","minLength":4,"maxLength":14}},"required":["description"],"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"example":{"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"}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"declarationSubmitted":{"type":"boolean"},"shipmentBooked":{"type":"boolean"},"status":{"type":"string"},"comparisons":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"commercialInvoice":{"type":"string"},"packingList":{"type":"string"},"billOfLading":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true}},"findings":{"type":"array","items":{}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"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."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.06"},"protocols":[{"x402":{}}]}}},"/api/v1/freight-customs/hs-code-candidate-suggest":{"post":{"operationId":"suggest_hs_code_candidates","summary":"Suggest HS code candidates","description":"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.","tags":["freight-customs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"description":{"type":"string","minLength":2,"maxLength":300},"hsCode":{"type":"string","minLength":4,"maxLength":14}},"required":["description"],"additionalProperties":false},"example":{"description":"cotton t-shirts","hsCode":"6109100010"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"declarationSubmitted":{"type":"boolean"},"shipmentBooked":{"type":"boolean"},"description":{"type":"string"},"definitiveClassification":{"type":"boolean"},"duty":{"type":"string"},"restrictions":{"type":"string"},"sanctions":{"type":"string"},"countryRequirements":{"type":"string"},"status":{"type":"string"},"source":{"type":"string"},"candidates":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"description":{"type":"string"},"source":{"type":"string"}},"additionalProperties":true}},"findings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"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."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.06"},"protocols":[{"x402":{}}]}}},"/api/v1/freight-customs/data-completeness":{"post":{"operationId":"check_customs_data_completeness","summary":"Check customs data completeness","description":"List shipment fields that are present or missing in the supplied documents. Duty, restrictions, sanctions, and country-specific requirements stay unverified.","tags":["freight-customs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["application/pdf","text/plain"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"shipment":{"type":"object","properties":{"reference":{"type":"string","minLength":1,"maxLength":80},"invoiceNumber":{"type":"string","minLength":1,"maxLength":80},"invoiceDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"billOfLadingNumber":{"type":"string","minLength":1,"maxLength":80},"containerNumber":{"type":"string","minLength":1,"maxLength":20},"vessel":{"type":"string","minLength":1,"maxLength":120},"voyage":{"type":"string","minLength":1,"maxLength":40},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"incoterm":{"type":"string","minLength":3,"maxLength":80},"namedPlace":{"type":"string","minLength":1,"maxLength":160},"originCountry":{"type":"string","minLength":2,"maxLength":80},"destinationCountry":{"type":"string","minLength":2,"maxLength":80},"portOfLoading":{"type":"string","minLength":1,"maxLength":120},"portOfDischarge":{"type":"string","minLength":1,"maxLength":120},"totalAmount":{"type":"number","minimum":0,"maximum":1000000000000},"totalNetWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"totalGrossWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"totalVolumeM3":{"type":"number","minimum":0,"maximum":1000000},"totalPackages":{"type":"integer","minimum":0,"maximum":1000000},"parties":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["seller","exporter","buyer","importer","consignee","shipper","notify"]},"name":{"type":"string","minLength":1,"maxLength":200},"address":{"type":"string","minLength":1,"maxLength":400}},"required":["role","name"],"additionalProperties":false}},"lines":{"maxItems":80,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":300},"quantity":{"type":"number","exclusiveMinimum":0,"maximum":1000000000},"unit":{"type":"string","minLength":1,"maxLength":20},"unitPrice":{"type":"number","minimum":0,"maximum":1000000000000},"amount":{"type":"number","minimum":0,"maximum":1000000000000},"netWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"grossWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"packages":{"type":"integer","minimum":0,"maximum":1000000},"volumeM3":{"type":"number","minimum":0,"maximum":1000000},"hsCode":{"type":"string","minLength":4,"maxLength":14}},"required":["description"],"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"example":{"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"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"declarationSubmitted":{"type":"boolean"},"shipmentBooked":{"type":"boolean"},"status":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"status":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"findings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"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."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.04"},"protocols":[{"x402":{}}]}}},"/api/v1/freight-customs/shipment-weight-volume-calculate":{"post":{"operationId":"calculate_shipment_weight_and_volume","summary":"Calculate shipment weight and volume","description":"Sum supplied package weights and calculate volume from centimetre dimensions. Volumetric weight is calculated only when the request includes a divisor.","tags":["freight-customs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"packages":{"minItems":1,"maxItems":80,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":200},"count":{"type":"integer","minimum":1,"maximum":100000},"lengthCm":{"type":"number","exclusiveMinimum":0,"maximum":100000},"widthCm":{"type":"number","exclusiveMinimum":0,"maximum":100000},"heightCm":{"type":"number","exclusiveMinimum":0,"maximum":100000},"netWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"grossWeightKg":{"type":"number","minimum":0,"maximum":1000000000}},"required":["count"],"additionalProperties":false}},"statedNetWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"statedGrossWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"statedVolumeM3":{"type":"number","minimum":0,"maximum":1000000},"volumetricDivisor":{"type":"number","exclusiveMinimum":0,"maximum":10000}},"required":["packages"],"additionalProperties":false},"example":{"packages":[{"description":"Carton","count":2,"lengthCm":40,"widthCm":30,"heightCm":20,"netWeightKg":8,"grossWeightKg":10}],"volumetricDivisor":167}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"declarationSubmitted":{"type":"boolean"},"shipmentBooked":{"type":"boolean"},"status":{"type":"string"},"packages":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"count":{"type":"number"},"volumeM3":{"type":"number"},"netWeightKg":{"type":"number"},"grossWeightKg":{"type":"number"}},"additionalProperties":true}},"totalNetWeightKg":{"type":"number"},"totalGrossWeightKg":{"type":"number"},"totalVolumeM3":{"type":"number"},"volumetricWeightKg":{"type":"number"},"chargeableWeightKg":{"type":"number"},"findings":{"type":"array","items":{}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"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."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{}}]}}},"/api/v1/freight-customs/incoterms-obligation-extract":{"post":{"operationId":"extract_incoterms_obligations","summary":"Extract Incoterms obligations","description":"Read a named Incoterms rule and its named place from the request. The obligation text is that named rule. No duty amount is calculated.","tags":["freight-customs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["application/pdf","text/plain"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"incoterm":{"type":"string","minLength":3,"maxLength":80},"namedPlace":{"type":"string","minLength":1,"maxLength":160}},"additionalProperties":false},"example":{"incoterm":"FOB Felixstowe"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"declarationSubmitted":{"type":"boolean"},"shipmentBooked":{"type":"boolean"},"status":{"type":"string"},"incoterm":{"type":"string"},"namedPlace":{"type":"string"},"incotermYear":{"type":"string"},"seller":{"type":"string"},"buyer":{"type":"string"},"risk":{"type":"string"},"duty":{"type":"string"},"findings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"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."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.04"},"protocols":[{"x402":{}}]}}},"/api/v1/freight-customs/preparation-report":{"post":{"operationId":"prepare_a_customs_evidence_report","summary":"Prepare a customs evidence report","description":"Combine document checks, weight evidence, the named Incoterm, and UK Trade Tariff candidates. No declaration is submitted and no shipment is booked.","tags":["freight-customs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"commercialInvoice":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["application/pdf","text/plain"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"shipment":{"type":"object","properties":{"reference":{"type":"string","minLength":1,"maxLength":80},"invoiceNumber":{"type":"string","minLength":1,"maxLength":80},"invoiceDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"billOfLadingNumber":{"type":"string","minLength":1,"maxLength":80},"containerNumber":{"type":"string","minLength":1,"maxLength":20},"vessel":{"type":"string","minLength":1,"maxLength":120},"voyage":{"type":"string","minLength":1,"maxLength":40},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"incoterm":{"type":"string","minLength":3,"maxLength":80},"namedPlace":{"type":"string","minLength":1,"maxLength":160},"originCountry":{"type":"string","minLength":2,"maxLength":80},"destinationCountry":{"type":"string","minLength":2,"maxLength":80},"portOfLoading":{"type":"string","minLength":1,"maxLength":120},"portOfDischarge":{"type":"string","minLength":1,"maxLength":120},"totalAmount":{"type":"number","minimum":0,"maximum":1000000000000},"totalNetWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"totalGrossWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"totalVolumeM3":{"type":"number","minimum":0,"maximum":1000000},"totalPackages":{"type":"integer","minimum":0,"maximum":1000000},"parties":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["seller","exporter","buyer","importer","consignee","shipper","notify"]},"name":{"type":"string","minLength":1,"maxLength":200},"address":{"type":"string","minLength":1,"maxLength":400}},"required":["role","name"],"additionalProperties":false}},"lines":{"maxItems":80,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":300},"quantity":{"type":"number","exclusiveMinimum":0,"maximum":1000000000},"unit":{"type":"string","minLength":1,"maxLength":20},"unitPrice":{"type":"number","minimum":0,"maximum":1000000000000},"amount":{"type":"number","minimum":0,"maximum":1000000000000},"netWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"grossWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"packages":{"type":"integer","minimum":0,"maximum":1000000},"volumeM3":{"type":"number","minimum":0,"maximum":1000000},"hsCode":{"type":"string","minLength":4,"maxLength":14}},"required":["description"],"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"packingList":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["application/pdf","text/plain"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"shipment":{"type":"object","properties":{"reference":{"type":"string","minLength":1,"maxLength":80},"invoiceNumber":{"type":"string","minLength":1,"maxLength":80},"invoiceDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"billOfLadingNumber":{"type":"string","minLength":1,"maxLength":80},"containerNumber":{"type":"string","minLength":1,"maxLength":20},"vessel":{"type":"string","minLength":1,"maxLength":120},"voyage":{"type":"string","minLength":1,"maxLength":40},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"incoterm":{"type":"string","minLength":3,"maxLength":80},"namedPlace":{"type":"string","minLength":1,"maxLength":160},"originCountry":{"type":"string","minLength":2,"maxLength":80},"destinationCountry":{"type":"string","minLength":2,"maxLength":80},"portOfLoading":{"type":"string","minLength":1,"maxLength":120},"portOfDischarge":{"type":"string","minLength":1,"maxLength":120},"totalAmount":{"type":"number","minimum":0,"maximum":1000000000000},"totalNetWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"totalGrossWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"totalVolumeM3":{"type":"number","minimum":0,"maximum":1000000},"totalPackages":{"type":"integer","minimum":0,"maximum":1000000},"parties":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["seller","exporter","buyer","importer","consignee","shipper","notify"]},"name":{"type":"string","minLength":1,"maxLength":200},"address":{"type":"string","minLength":1,"maxLength":400}},"required":["role","name"],"additionalProperties":false}},"lines":{"maxItems":80,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":300},"quantity":{"type":"number","exclusiveMinimum":0,"maximum":1000000000},"unit":{"type":"string","minLength":1,"maxLength":20},"unitPrice":{"type":"number","minimum":0,"maximum":1000000000000},"amount":{"type":"number","minimum":0,"maximum":1000000000000},"netWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"grossWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"packages":{"type":"integer","minimum":0,"maximum":1000000},"volumeM3":{"type":"number","minimum":0,"maximum":1000000},"hsCode":{"type":"string","minLength":4,"maxLength":14}},"required":["description"],"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"billOfLading":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["application/pdf","text/plain"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"shipment":{"type":"object","properties":{"reference":{"type":"string","minLength":1,"maxLength":80},"invoiceNumber":{"type":"string","minLength":1,"maxLength":80},"invoiceDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"billOfLadingNumber":{"type":"string","minLength":1,"maxLength":80},"containerNumber":{"type":"string","minLength":1,"maxLength":20},"vessel":{"type":"string","minLength":1,"maxLength":120},"voyage":{"type":"string","minLength":1,"maxLength":40},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"incoterm":{"type":"string","minLength":3,"maxLength":80},"namedPlace":{"type":"string","minLength":1,"maxLength":160},"originCountry":{"type":"string","minLength":2,"maxLength":80},"destinationCountry":{"type":"string","minLength":2,"maxLength":80},"portOfLoading":{"type":"string","minLength":1,"maxLength":120},"portOfDischarge":{"type":"string","minLength":1,"maxLength":120},"totalAmount":{"type":"number","minimum":0,"maximum":1000000000000},"totalNetWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"totalGrossWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"totalVolumeM3":{"type":"number","minimum":0,"maximum":1000000},"totalPackages":{"type":"integer","minimum":0,"maximum":1000000},"parties":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["seller","exporter","buyer","importer","consignee","shipper","notify"]},"name":{"type":"string","minLength":1,"maxLength":200},"address":{"type":"string","minLength":1,"maxLength":400}},"required":["role","name"],"additionalProperties":false}},"lines":{"maxItems":80,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":300},"quantity":{"type":"number","exclusiveMinimum":0,"maximum":1000000000},"unit":{"type":"string","minLength":1,"maxLength":20},"unitPrice":{"type":"number","minimum":0,"maximum":1000000000000},"amount":{"type":"number","minimum":0,"maximum":1000000000000},"netWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"grossWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"packages":{"type":"integer","minimum":0,"maximum":1000000},"volumeM3":{"type":"number","minimum":0,"maximum":1000000},"hsCode":{"type":"string","minLength":4,"maxLength":14}},"required":["description"],"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"shipment":{"type":"object","properties":{"reference":{"type":"string","minLength":1,"maxLength":80},"invoiceNumber":{"type":"string","minLength":1,"maxLength":80},"invoiceDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"billOfLadingNumber":{"type":"string","minLength":1,"maxLength":80},"containerNumber":{"type":"string","minLength":1,"maxLength":20},"vessel":{"type":"string","minLength":1,"maxLength":120},"voyage":{"type":"string","minLength":1,"maxLength":40},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"incoterm":{"type":"string","minLength":3,"maxLength":80},"namedPlace":{"type":"string","minLength":1,"maxLength":160},"originCountry":{"type":"string","minLength":2,"maxLength":80},"destinationCountry":{"type":"string","minLength":2,"maxLength":80},"portOfLoading":{"type":"string","minLength":1,"maxLength":120},"portOfDischarge":{"type":"string","minLength":1,"maxLength":120},"totalAmount":{"type":"number","minimum":0,"maximum":1000000000000},"totalNetWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"totalGrossWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"totalVolumeM3":{"type":"number","minimum":0,"maximum":1000000},"totalPackages":{"type":"integer","minimum":0,"maximum":1000000},"parties":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["seller","exporter","buyer","importer","consignee","shipper","notify"]},"name":{"type":"string","minLength":1,"maxLength":200},"address":{"type":"string","minLength":1,"maxLength":400}},"required":["role","name"],"additionalProperties":false}},"lines":{"maxItems":80,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":300},"quantity":{"type":"number","exclusiveMinimum":0,"maximum":1000000000},"unit":{"type":"string","minLength":1,"maxLength":20},"unitPrice":{"type":"number","minimum":0,"maximum":1000000000000},"amount":{"type":"number","minimum":0,"maximum":1000000000000},"netWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"grossWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"packages":{"type":"integer","minimum":0,"maximum":1000000},"volumeM3":{"type":"number","minimum":0,"maximum":1000000},"hsCode":{"type":"string","minLength":4,"maxLength":14}},"required":["description"],"additionalProperties":false}}},"additionalProperties":false},"packages":{"maxItems":80,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":200},"count":{"type":"integer","minimum":1,"maximum":100000},"lengthCm":{"type":"number","exclusiveMinimum":0,"maximum":100000},"widthCm":{"type":"number","exclusiveMinimum":0,"maximum":100000},"heightCm":{"type":"number","exclusiveMinimum":0,"maximum":100000},"netWeightKg":{"type":"number","minimum":0,"maximum":1000000000},"grossWeightKg":{"type":"number","minimum":0,"maximum":1000000000}},"required":["count"],"additionalProperties":false}},"volumetricDivisor":{"type":"number","exclusiveMinimum":0,"maximum":10000}},"additionalProperties":false},"example":{"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"}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"checkedAt":{"type":"string"},"declarationSubmitted":{"type":"boolean"},"shipmentBooked":{"type":"boolean"},"assessment":{"type":"string"},"summary":{"type":"string"},"sections":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true}},"counts":{"type":"object","properties":{"conflict":{"type":"number"},"missing":{"type":"number"},"unavailable":{"type":"number"}},"additionalProperties":true},"candidates":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"description":{"type":"string"},"source":{"type":"string"}},"additionalProperties":true}},"duty":{"type":"string"},"restrictions":{"type":"string"},"sanctions":{"type":"string"},"findings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"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."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.12"},"protocols":[{"x402":{}}]}}}},"components":{"schemas":{"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}}}}}}}}