Use when the user has the text of a B/L or AWB draft from the forwarder or carrier and the order data, before the original is issued. Compare the text of a bill of lading or air waybill draft from the forwarder or carrier with the order data (same fields as create_trade_documents): shipper, consignee (to-order drafts noted), notify party, ports, vessel and voyage, number of packages, gross weight, measurement (CBM), freight prepaid or collect against the Incoterms rule, shipping marks, goods description, container and seal numbers (shipment.containers) and the L/C number. Returns each field as ok, warning, mismatch or info with a short reason. Nothing is stored.
View input schema
{
"type": "object",
"properties": {
"language": {
"type": "string",
"enum": [
"en",
"zh",
"ar",
"fr",
"es",
"pt",
"ru",
"tr",
"hi",
"ur",
"bn",
"id",
"vi",
"ja",
"ko"
],
"description": "Language of the generator page the link opens (documents are in English)",
"default": "en"
},
"imperial_units": {
"type": "boolean",
"description": "Also show weights in pounds and volume in cubic feet on the packing list and shipping instruction (for US buyers)",
"default": false
},
"hs_totals": {
"type": "boolean",
"description": "Also print totals by HS code (quantity, value, cartons, weights) on the invoice and packing list, for the customs broker's entry lines",
"default": false
},
"destination_country": {
"type": "string",
"description": "ISO 3166-1 alpha-2 code of the importing country (optional; otherwise taken from the port of discharge): adds that country's invoice rules to the checks"
},
"open_form": {
"type": "string",
"enum": [
"vgm_declaration",
"isf_data",
"usmca_certification",
"packing_declaration_australia",
"bill_of_exchange",
"beneficiary_certificate",
"credit_note",
"shipping_advice",
"return_invoice"
],
"description": "Also open one of the generator's extra forms with this data: VGM declaration (SOLAS, needs shipment.containers), ISF (10+2) data for a US buyer, USMCA/CUSMA certification of origin, packing declaration for sea containers to Australia, draft (bill of exchange), beneficiary's certificate, credit/debit note, shipping advice e-mail, or a return/repair invoice made from this invoice (the original invoice number, date and waybill as reference; the buyer as shipper when goods come back). Each has 3 free uses (the shipping advice has no limit)."
},
"open_document": {
"type": "string",
"enum": [
"pi",
"ci",
"pl",
"si",
"po",
"sc",
"co"
],
"description": "pi proforma invoice, ci commercial invoice, pl packing list, si shipping instruction, sc sales contract (seller and buyer sign; the remarks become its other terms), co certificate of origin (non-preferential: the exporter's declaration, with space for a chamber of commerce to certify it), po purchase order (the buyer's order to the supplier: buyer = issuer, seller = supplier)",
"default": "ci"
},
"document": {
"type": "object",
"properties": {
"number": {
"type": "string",
"description": "Invoice number"
},
"date": {
"type": "string",
"description": "YYYY-MM-DD"
},
"po": {
"type": "string",
"description": "Buyer's PO / contract number"
},
"valid_days": {
"type": "number",
"description": "Proforma validity in days"
}
}
},
"seller": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"address": {
"type": "string",
"description": "Full address, lines separated by \\n"
},
"tel": {
"type": "string"
},
"email": {
"type": "string"
},
"tax_id": {
"type": "string",
"description": "Tax / VAT / business registration number"
}
},
"required": [
"name"
],
"description": "Seller / shipper / exporter"
},
"buyer": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"address": {
"type": "string",
"description": "Full address, lines separated by \\n"
},
"tel": {
"type": "string"
},
"email": {
"type": "string"
},
"tax_id": {
"type": "string",
"description": "Tax / VAT / business registration number"
}
},
"required": [
"name"
],
"description": "Buyer / consignee / importer"
},
"manufacturer": {
"type": "object",
"description": "Who made the goods, printed on the commercial invoice with its MID code (US shipments: carriers and CBP ask for it; textile and apparel entries must show it). The generator suggests the MID from 19 CFR Part 102 if mid is empty",
"properties": {
"same_as_seller": {
"type": "boolean"
},
"name": {
"type": "string"
},
"street": {
"type": "string",
"description": "Street address line with the building number"
},
"city": {
"type": "string"
},
"country_code": {
"type": "string",
"description": "ISO 3166-1 alpha-2"
},
"province": {
"type": "string",
"description": "Canada only, e.g. ON"
},
"mid": {
"type": "string"
}
}
},
"sold_to": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"address": {
"type": "string",
"description": "Full address, lines separated by \\n"
},
"tel": {
"type": "string"
},
"email": {
"type": "string"
},
"tax_id": {
"type": "string",
"description": "Tax / VAT / business registration number"
}
},
"required": [
"name"
],
"description": "Only if the buyer (sold to) is a different company from the consignee in 'buyer', e.g. a trading company buying for a factory: printed as BUYER (SOLD TO) on the invoice, the buyer on the proforma and sales contract"
},
"notify": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"address": {
"type": "string"
}
},
"description": "Notify party, if different from the buyer"
},
"terms": {
"type": "object",
"properties": {
"incoterm": {
"type": "string",
"enum": [
"EXW",
"FCA",
"FAS",
"FOB",
"CFR",
"CIF",
"CPT",
"CIP",
"DAP",
"DPU",
"DDP"
]
},
"place": {
"type": "string",
"description": "Named place, e.g. 'Busan' for FOB Busan"
},
"payment": {
"type": "string",
"description": "e.g. 'T/T 30% deposit, 70% before shipment'"
},
"currency": {
"type": "string",
"enum": [
"USD",
"EUR",
"GBP",
"JPY",
"CNY",
"KRW",
"VND",
"AUD",
"CAD",
"CHF",
"HKD",
"SGD",
"INR",
"PKR",
"BDT",
"IDR",
"THB",
"MYR",
"PHP",
"AED",
"SAR",
"TRY",
"BRL",
"MXN",
"ZAR",
"NGN",
"KES",
"EGP"
]
}
}
},
"shipment": {
"type": "object",
"properties": {
"port_of_loading": {
"type": "string"
},
"port_of_discharge": {
"type": "string"
},
"vessel_or_flight": {
"type": "string"
},
"etd": {
"type": "string",
"description": "YYYY-MM-DD"
},
"country_of_origin": {
"type": "string"
},
"reason_for_export": {
"type": "string",
"enum": [
"sale",
"sample",
"gift",
"repair_and_return",
"returned_goods",
"temporary_export"
],
"description": "Printed on courier invoices (box 10)"
},
"waybill_number": {
"type": "string",
"description": "Air waybill or courier tracking number, printed in box 6"
},
"export_declaration_number": {
"type": "string",
"description": "Export declaration, shipping bill or AES ITN number, printed in the remarks box"
},
"original_invoice_number": {
"type": "string",
"description": "Goods going back (reason_for_export repair_and_return, returned_goods or temporary_export): the original shipment's invoice number, printed as ORIGINAL SHIPMENT"
},
"original_invoice_date": {
"type": "string",
"description": "YYYY-MM-DD"
},
"original_waybill_number": {
"type": "string",
"description": "The original shipment's AWB or B/L number"
},
"containers": {
"type": "array",
"maxItems": 40,
"description": "Sea containers (FCL): printed as CONTAINER / SEAL NO. on the invoice, packing list and shipping instruction; the numbers are checked against their ISO 6346 check digit. In the generator, More > VGM declaration (3 free uses) makes the SOLAS VGM form from them",
"items": {
"type": "object",
"properties": {
"number": {
"type": "string",
"description": "e.g. MSKU1234565"
},
"seal": {
"type": "string"
},
"size_type": {
"type": "string",
"description": "e.g. 20GP, 40HC, 45G1"
},
"tare_kg": {
"type": "number"
},
"carton_numbers": {
"type": "string",
"description": "Cartons in this container, e.g. '1-500': the packing list then shows each container's cartons, weights and CBM"
}
}
}
},
"duties_paid_by": {
"type": "string",
"enum": [
"receiver",
"sender",
"third_party"
],
"description": "Courier invoices: who pays the import duties and taxes (DDP: sender)"
},
"pallets": {
"type": "object",
"description": "If the cartons are palletized: the documents then show e.g. 4 PLTS (101 CTNS), gross weight with the empty pallets and the loaded pallets' volume",
"properties": {
"count": {
"type": "number"
},
"length_cm": {
"type": "number"
},
"width_cm": {
"type": "number"
},
"height_cm": {
"type": "number",
"description": "Loaded height"
},
"empty_pallet_weight_kg": {
"type": "number"
}
}
}
}
},
"charges": {
"type": "object",
"properties": {
"freight": {
"type": "number"
},
"insurance": {
"type": "number"
},
"discount": {
"type": "number"
}
}
},
"items": {
"type": "array",
"maxItems": 100,
"items": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"hs_code": {
"type": "string"
},
"quantity": {
"type": "number"
},
"unit": {
"type": "string",
"enum": [
"PCS",
"SETS",
"BOXES",
"PAIRS",
"DOZ",
"KG",
"MT",
"M",
"SQM",
"CBM",
"L",
"ROLLS",
"BAGS"
]
},
"unit_price": {
"type": "number"
},
"pieces_per_carton": {
"type": "number"
},
"net_weight_per_carton_kg": {
"type": "number"
},
"gross_weight_per_carton_kg": {
"type": "number"
},
"carton_length_cm": {
"type": "number"
},
"carton_width_cm": {
"type": "number"
},
"carton_height_cm": {
"type": "number"
},
"country_of_origin": {
"type": "string",
"description": "Only if this item's origin differs from shipment.country_of_origin; the documents then show the origin per item"
},
"free_of_charge": {
"type": "boolean",
"description": "Sent free (samples, gifts): the value stays on the documents for customs and is taken off the amount payable"
},
"not_originating": {
"type": "boolean",
"description": "With origin_statement: this item does not qualify and is marked as not covered by the statement"
},
"sku": {
"type": "string",
"description": "Seller's product code, printed under the description (EU import declarations for distance sales need it from 1 November 2026)"
},
"manufacturer_product_code": {
"type": "string",
"description": "Manufacturer's own product code (part number)"
},
"gtin": {
"type": "string",
"description": "GTIN / EAN / UPC barcode number, if the product has one"
},
"section_232_metal_origin": {
"type": "string",
"description": "US shipments of steel or aluminium articles: the countries where the steel was melted and poured or the aluminium smelted and cast, e.g. 'STEEL MELT AND POUR: KR'; printed under the description"
},
"packed_with_previous": {
"type": "boolean",
"description": "Assorted cartons: packed in the same cartons as the item before it, whose carton weights include this item; leave its carton fields empty"
}
},
"required": [
"description",
"quantity"
]
}
},
"shipping_marks": {
"type": "string",
"description": "Optional; generated from buyer, destination and carton count if empty"
},
"remarks": {
"type": "string",
"description": "Optional remarks printed on the documents, e.g. 'SAMPLES OF NO COMMERCIAL VALUE, NOT FOR RESALE. VALUE FOR CUSTOMS PURPOSES ONLY.'"
},
"bank": {
"type": "object",
"properties": {
"bank_name": {
"type": "string"
},
"swift": {
"type": "string"
},
"account": {
"type": "string"
},
"beneficiary": {
"type": "string"
},
"bank_address": {
"type": "string"
}
}
},
"signer": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"title": {
"type": "string"
}
}
},
"letter_of_credit": {
"type": "object",
"description": "Terms of the letter of credit (from MT700: 20, 31C, 32B, 39A, 44C, 31D, 48, 43P, 45A); the generator checks the documents against them (not among the free features)",
"properties": {
"number": {
"type": "string"
},
"issue_date": {
"type": "string",
"description": "YYYY-MM-DD"
},
"amount": {
"type": "number"
},
"tolerance_percent": {
"type": "number"
},
"latest_shipment_date": {
"type": "string",
"description": "YYYY-MM-DD"
},
"expiry_date": {
"type": "string",
"description": "YYYY-MM-DD"
},
"presentation_days": {
"type": "number"
},
"partial_shipments": {
"type": "string",
"enum": [
"allowed",
"not_allowed"
]
},
"goods_description": {
"type": "string"
},
"show_on_documents": {
"type": "boolean",
"description": "Print the L/C number and date on the documents"
}
},
"required": [
"number"
]
},
"origin_statement": {
"type": "object",
"description": "Preferential origin statement printed on the commercial invoice in the agreement's exact wording (3 free uses). Only for goods that meet the agreement's rules of origin.",
"properties": {
"agreement": {
"type": "string",
"enum": [
"eu_korea",
"uk_korea",
"eu_vietnam",
"eu_singapore",
"eu_japan",
"uk_japan",
"eu_uk",
"eu_canada",
"korea_efta",
"eu_gsp",
"uk_dcts"
]
},
"number": {
"type": "string",
"description": "Approved exporter's authorisation number (EU-Korea, UK-Korea, EU-Vietnam; may be empty up to EUR 6,000 per consignment), REX number (EU GSP, EU-Canada, EU-Singapore; EU exporters), UEN (Singapore exporters, EU-Singapore), Exporter Reference No. (EU-Japan, UK-Japan, EU-UK: REX or GB EORI), Business Number (Canadian exporters) or customs identification number (UK DCTS)"
},
"origin": {
"type": "string",
"description": "Origin as written in the statement, e.g. Korea, EU, Japan, European Union"
},
"place": {
"type": "string",
"description": "Place printed with the date, e.g. Seoul (default: the port of loading's city)"
},
"period_from": {
"type": "string",
"description": "YYYY-MM-DD; EU-Japan, UK-Japan, EU-UK, CETA: one statement for several shipments of identical products (12 months at most)"
},
"period_to": {
"type": "string",
"description": "YYYY-MM-DD"
},
"origin_criterion": {
"type": "string",
"description": "EU-Japan and UK-Japan: A, B, C1-C4, D or E. EU GSP and UK DCTS: P, or W followed by the HS heading (e.g. W 9618). Not used by the other agreements"
}
},
"required": [
"agreement"
]
},
"draft_text": {
"type": "string",
"description": "Text of the bill of lading or air waybill draft from the forwarder or carrier (copied from its PDF or e-mail), up to 20,000 characters"
},
"lc_number": {
"type": "string",
"description": "Optional letter of credit number that should appear on the draft"
}
},
"required": [
"draft_text"
]
}