Returns a list of commercial invoices
Success
{- "_object": "/api/response",
- "version": 3,
- "data": {
- "_object": "/api/collections/paginated",
- "next": null,
- "data": [
- {
- "_object": "/commercial_invoice",
- "id": "abc123-456-def",
- "invoice_number": "INV-2024-8472",
- "digitization_status": "complete",
- "currency": "USD",
- "invoice_date": "2024-03-15",
- "order_number": "PO-2024-0042",
- "incoterm": "FOB",
- "is_related_parties": false,
- "manifest_quantity": 250,
- "manifest_quantity_unit_type": "CARTON",
- "manufacturer_addresses": [
- {
- "_object": "/address",
- "street_address": "88 Huayuan Industrial Road",
- "city": "Shenzhen",
- "state": "Guangdong",
- "country": "China",
- "country_code": "CN",
- "zip": "518000",
- "unlocode": "CN SZX",
- "ref": "id-3333"
}
], - "total_value": {
- "_object": "/money",
- "amount": "28750.00",
- "currency_code": "USD"
}, - "total_unit_count": "750",
- "total_weight": {
- "_object": "/quantity/weight",
- "value": 625,
- "unit": "kg"
}, - "total_volume": {
- "_object": "/quantity/volume",
- "value": 18.5,
- "unit": "cbm"
}, - "charge_adjustments": [
- {
- "code": "transport_handling_insurance",
- "amount": 450,
- "currency_code": "USD",
- "applied_as": "flat_rate",
- "applied_to": "value"
}, - {
- "code": "commissions_and_brokerage",
- "amount": 2.5,
- "applied_as": "percentage",
- "applied_to": "value"
}
], - "involved_parties": [
- {
- "_object": "/customs/involved_party",
- "type": "seller",
- "name": "Global Electronics Trading Ltd",
- "address": {
- "_object": "/address",
- "street_address": "123 Nathan Road",
- "street_address2": "Suite 1501",
- "city": "Kowloon",
- "country": "Hong Kong",
- "country_code": "HK",
- "zip": "00000",
- "unlocode": "HK HKG",
- "ref": "id-44444"
}, - "company_entity": {
- "_object": "/api/refs/object",
- "ref_type": "/company_entity",
- "id": 54321
}
}, - {
- "_object": "/customs/involved_party",
- "type": "buyer",
- "name": "TechImport USA Inc",
- "address": {
- "_object": "/address",
- "street_address": "1641 Settlers Lane",
- "street_address2": "STE 2918",
- "city": "Albany",
- "state": "MN",
- "country": "United States of America",
- "country_code": "US",
- "zip": "56307",
- "unlocode": "US MSP",
- "ref": "id-55555"
}, - "company_entity": {
- "_object": "/api/refs/object",
- "ref_type": "/company_entity",
- "id": 54322
}
}, - {
- "_object": "/customs/involved_party",
- "type": "manufacturer",
- "name": "Premium Electronics Factory",
- "address": {
- "_object": "/address",
- "street_address": "88 Huayuan Industrial Road",
- "city": "Shenzhen",
- "state": "Guangdong",
- "country": "China",
- "country_code": "CN",
- "zip": "518000",
- "unlocode": "CN SZX",
- "ref": "id-3333"
}, - "mid_code": "CNSZX456MFG",
- "company_entity": {
- "_object": "/api/refs/object",
- "ref_type": "/company_entity",
- "id": 54323
}
}
], - "line_items": [
- {
- "_object": "/commercial_invoice_line_item",
- "id": 78901,
- "document_line_number": 1,
- "price_per_unit": {
- "_object": "/money",
- "amount": "45.00",
- "currency_code": "USD"
}, - "first_sale_value": {
- "_object": "/money",
- "amount": "38.00",
- "currency_code": "USD"
}, - "value": {
- "_object": "/money",
- "amount": "13500.00",
- "currency_code": "USD"
}, - "net_value": {
- "_object": "/money",
- "amount": "12825.00",
- "currency_code": "USD"
}, - "total_units": 300,
- "quantity": {
- "_object": "/commercial_invoice_line_item/quantity",
- "value": "300",
- "unit": "pcs"
}, - "container_number": {
- "id": 5001,
- "container_number": "MSCU8765432",
- "commercial_invoice_line_item_id": 78901,
- "deleted_at": null,
- "created_at": "2024-03-10T10:15:30.000Z",
- "updated_at": "2024-03-10T10:15:30.000Z"
}, - "purchase_order_number": "PO-2024-0042",
- "po_line_item_number": "1",
- "weight": {
- "_object": "/quantity/weight",
- "value": 300,
- "unit": "kg"
}, - "net_weight": {
- "_object": "/quantity/weight",
- "value": 285,
- "unit": "kg"
}, - "volume": {
- "_object": "/quantity/volume",
- "value": 9,
- "unit": "cbm"
}, - "product": {
- "_object": "/api/refs/object",
- "ref_type": "/product",
- "id": 87654
}, - "charge_adjustments": [
- {
- "code": "commissions_and_brokerage",
- "amount": 675,
- "currency_code": "USD",
- "applied_as": "flat_rate",
- "applied_to": "value"
}
], - "special_program_indicator": {
- "code": "B"
}
}, - {
- "_object": "/commercial_invoice_line_item",
- "id": 78902,
- "document_line_number": 2,
- "price_per_unit": {
- "_object": "/money",
- "amount": "34.00",
- "currency_code": "USD"
}, - "value": {
- "_object": "/money",
- "amount": "15300.00",
- "currency_code": "USD"
}, - "total_units": 450,
- "quantity": {
- "_object": "/commercial_invoice_line_item/quantity",
- "value": "450",
- "unit": "pcs"
}, - "container_number": {
- "id": 5002,
- "container_number": "MSCU8765432",
- "commercial_invoice_line_item_id": 78902,
- "deleted_at": null,
- "created_at": "2024-03-10T10:15:30.000Z",
- "updated_at": "2024-03-10T10:15:30.000Z"
}, - "purchase_order_number": "PO-2024-0042",
- "po_line_item_number": "2",
- "weight": {
- "_object": "/quantity/weight",
- "value": 325,
- "unit": "kg"
}, - "volume": {
- "_object": "/quantity/volume",
- "value": 9.5,
- "unit": "cbm"
}, - "product": {
- "_object": "/api/refs/object",
- "ref_type": "/product",
- "id": 87655
}
}
], - "updated_at": "2024-03-15T14:22:18.500Z",
- "shipment": {
- "_object": "/api/refs/object",
- "ref_type": "/shipment",
- "id": 123456
}
}
]
}
}Creates a commercial invoice if it does not exist yet, otherwise updates an existing entry. This is an asynchronous operation. Successful response means only that submission is accepted, and the actual result of this operation is reported via webhook.
| invoice_number required | string Invoice number on the commercial invoice, typically used for display purposes. | ||||||||||
required | Array of objects (CreateCommercialInvoiceLineItem) List of line items on the commercial invoice. | ||||||||||
Array | |||||||||||
required | Array of objects (CreateCustomsInvolvedParty) List of parties involved in the commercial transaction. | ||||||||||
Array
| |||||||||||
| incoterm | string Incoterm of the shipment to which this commercial invoice belongs. | ||||||||||
| is_related_parties | boolean Whether there was a related parties transaction as defined by CBP. Only applicable for the US entries. | ||||||||||
object or Array of objects Set of custom key-values specific to the object. The keys are strings and values are arrays of strings. The set of valid keys is always the consignee's list of keys, even if call was made by a different party. Please contact Flexport representative before sending any attributes in this field. | |||||||||||
| currency required | string Currency code for the commercial invoice. | ||||||||||
| invoice_date | string or null <date> Represents date of the invoice. This can be null. | ||||||||||
Array of objects (CreateCommercialInvoiceChargeAdjustment) List of charge adjustments. | |||||||||||
Array | |||||||||||
| manifest_quantity | integer The total manifest quantity (packaging) for the commercial invoice. | ||||||||||
| manifest_quantity_unit_type | string The unit type for the manifest quantity. If nothing is specified, defaults to CARTON | ||||||||||
Bad Request
Minimal example referencing existing products by SKU only and involved parties by company_entity_ref. Manufacturer is specified at invoice level.
{- "invoice_number": "INV-2024-001",
- "currency": "USD",
- "invoice_date": "2024-01-15",
- "is_related_parties": false,
- "manifest_quantity": 100,
- "manifest_quantity_unit_type": "CARTON",
- "charge_adjustments": [
- {
- "code": "transport_handling_insurance",
- "amount": 150,
- "currency_code": "USD",
- "applied_as": "flat_rate",
- "applied_to": "value"
}, - {
- "code": "deductions_discounts_rebates",
- "amount": 5,
- "applied_as": "percentage",
- "applied_to": "value"
}
], - "involved_parties": [
- {
- "type": "seller",
- "company_entity_ref": "my-seller-ref-1"
}, - {
- "type": "buyer",
- "company_entity_ref": "my-buyer-ref-1"
}, - {
- "type": "manufacturer",
- "company_entity_ref": "my-manufacturer-ref-1"
}
], - "line_items": [
- {
- "document_line_number": 1,
- "price_per_unit": {
- "amount": "25.50",
- "currency_code": "USD"
}, - "value": {
- "amount": "255.00",
- "currency_code": "USD"
}, - "quantity": {
- "value": "10",
- "unit": "pcs"
}, - "purchase_order_number": "PO-9876-ABC",
- "po_line_item_number": "1",
- "weight": {
- "value": 50,
- "unit": "kg"
}, - "volume": {
- "value": 2.5,
- "unit": "cbm"
}, - "product": {
- "sku": "AC-12V-ADPT-8472"
}
}, - {
- "document_line_number": 2,
- "price_per_unit": {
- "amount": "15.00",
- "currency_code": "USD"
}, - "value": {
- "amount": "300.00",
- "currency_code": "USD"
}, - "quantity": {
- "value": "20",
- "unit": "pcs"
}, - "purchase_order_number": "PO-9876-ABC",
- "po_line_item_number": "2",
- "weight": {
- "value": 30,
- "unit": "kg"
}, - "volume": {
- "value": 1.5,
- "unit": "cbm"
}, - "product": {
- "sku": "USB-C-2M-BLK-9183"
}
}
]
}Accepted
{- "_object": "/api/response",
- "version": "3",
- "data": {
- "_object": "/request",
- "request_uuid": "abcd-1234",
- "request_status": "acknowledged"
}
}Retrieves the details of a single commercial invoice.
Success
error
Success
{- "_object": "/api/response",
- "version": 3,
- "data": [
- {
- "_object": "/commercial_invoice",
- "id": "abc123-456-def",
- "invoice_number": "INV-2024-8472",
- "digitization_status": "complete",
- "currency": "USD",
- "invoice_date": "2024-03-15",
- "order_number": "PO-2024-0042",
- "incoterm": "FOB",
- "is_related_parties": false,
- "manifest_quantity": 250,
- "manifest_quantity_unit_type": "CARTON",
- "manufacturer_addresses": [
- {
- "_object": "/address",
- "street_address": "88 Huayuan Industrial Road",
- "city": "Shenzhen",
- "state": "Guangdong",
- "country": "China",
- "country_code": "CN",
- "zip": "518000",
- "unlocode": "CN SZX",
- "ref": "id-3333"
}
], - "total_value": {
- "_object": "/money",
- "amount": "28750.00",
- "currency_code": "USD"
}, - "total_unit_count": "750",
- "total_weight": {
- "_object": "/quantity/weight",
- "value": 625,
- "unit": "kg"
}, - "total_volume": {
- "_object": "/quantity/volume",
- "value": 18.5,
- "unit": "cbm"
}, - "charge_adjustments": [
- {
- "code": "transport_handling_insurance",
- "amount": 450,
- "currency_code": "USD",
- "applied_as": "flat_rate",
- "applied_to": "value"
}, - {
- "code": "commissions_and_brokerage",
- "amount": 2.5,
- "applied_as": "percentage",
- "applied_to": "value"
}
], - "involved_parties": [
- {
- "_object": "/customs/involved_party",
- "type": "seller",
- "name": "Global Electronics Trading Ltd",
- "address": {
- "_object": "/address",
- "street_address": "123 Nathan Road",
- "street_address2": "Suite 1501",
- "city": "Kowloon",
- "country": "Hong Kong",
- "country_code": "HK",
- "zip": "00000",
- "unlocode": "HK HKG",
- "ref": "id-44444"
}, - "company_entity": {
- "_object": "/api/refs/object",
- "ref_type": "/company_entity",
- "id": 54321
}
}, - {
- "_object": "/customs/involved_party",
- "type": "buyer",
- "name": "TechImport USA Inc",
- "address": {
- "_object": "/address",
- "street_address": "1641 Settlers Lane",
- "street_address2": "STE 2918",
- "city": "Albany",
- "state": "MN",
- "country": "United States of America",
- "country_code": "US",
- "zip": "56307",
- "unlocode": "US MSP",
- "ref": "id-55555"
}, - "company_entity": {
- "_object": "/api/refs/object",
- "ref_type": "/company_entity",
- "id": 54322
}
}, - {
- "_object": "/customs/involved_party",
- "type": "manufacturer",
- "name": "Premium Electronics Factory",
- "address": {
- "_object": "/address",
- "street_address": "88 Huayuan Industrial Road",
- "city": "Shenzhen",
- "state": "Guangdong",
- "country": "China",
- "country_code": "CN",
- "zip": "518000",
- "unlocode": "CN SZX",
- "ref": "id-3333"
}, - "mid_code": "CNSZX456MFG",
- "company_entity": {
- "_object": "/api/refs/object",
- "ref_type": "/company_entity",
- "id": 54323
}
}
], - "line_items": [
- {
- "_object": "/commercial_invoice_line_item",
- "id": 78901,
- "document_line_number": 1,
- "price_per_unit": {
- "_object": "/money",
- "amount": "45.00",
- "currency_code": "USD"
}, - "first_sale_value": {
- "_object": "/money",
- "amount": "38.00",
- "currency_code": "USD"
}, - "value": {
- "_object": "/money",
- "amount": "13500.00",
- "currency_code": "USD"
}, - "net_value": {
- "_object": "/money",
- "amount": "12825.00",
- "currency_code": "USD"
}, - "total_units": 300,
- "quantity": {
- "_object": "/commercial_invoice_line_item/quantity",
- "value": "300",
- "unit": "pcs"
}, - "container_number": {
- "id": 5001,
- "container_number": "MSCU8765432",
- "commercial_invoice_line_item_id": 78901,
- "deleted_at": null,
- "created_at": "2024-03-10T10:15:30.000Z",
- "updated_at": "2024-03-10T10:15:30.000Z"
}, - "purchase_order_number": "PO-2024-0042",
- "po_line_item_number": "1",
- "weight": {
- "_object": "/quantity/weight",
- "value": 300,
- "unit": "kg"
}, - "net_weight": {
- "_object": "/quantity/weight",
- "value": 285,
- "unit": "kg"
}, - "volume": {
- "_object": "/quantity/volume",
- "value": 9,
- "unit": "cbm"
}, - "product": {
- "_object": "/api/refs/object",
- "ref_type": "/product",
- "id": 87654
}, - "charge_adjustments": [
- {
- "code": "commissions_and_brokerage",
- "amount": 675,
- "currency_code": "USD",
- "applied_as": "flat_rate",
- "applied_to": "value"
}
], - "special_program_indicator": {
- "code": "B"
}
}, - {
- "_object": "/commercial_invoice_line_item",
- "id": 78902,
- "document_line_number": 2,
- "price_per_unit": {
- "_object": "/money",
- "amount": "34.00",
- "currency_code": "USD"
}, - "value": {
- "_object": "/money",
- "amount": "15300.00",
- "currency_code": "USD"
}, - "total_units": 450,
- "quantity": {
- "_object": "/commercial_invoice_line_item/quantity",
- "value": "450",
- "unit": "pcs"
}, - "container_number": {
- "id": 5002,
- "container_number": "MSCU8765432",
- "commercial_invoice_line_item_id": 78902,
- "deleted_at": null,
- "created_at": "2024-03-10T10:15:30.000Z",
- "updated_at": "2024-03-10T10:15:30.000Z"
}, - "purchase_order_number": "PO-2024-0042",
- "po_line_item_number": "2",
- "weight": {
- "_object": "/quantity/weight",
- "value": 325,
- "unit": "kg"
}, - "volume": {
- "_object": "/quantity/volume",
- "value": 9.5,
- "unit": "cbm"
}, - "product": {
- "_object": "/api/refs/object",
- "ref_type": "/product",
- "id": 87655
}
}
], - "updated_at": "2024-03-15T14:22:18.500Z",
- "shipment": {
- "_object": "/api/refs/object",
- "ref_type": "/shipment",
- "id": 123456
}
}
]
}This webhook is sent when the asynchronous processing of a commercial invoice create/update operation completes.
A notification about operation completion.
object | |||||||||||||
| |||||||||||||
| _object | string Type of the object, always | ||||||||||||
| id | integer A unique ID of a webhook notification | ||||||||||||
| version | integer | ||||||||||||
| created_at | string | ||||||||||||
| occurred_at | string | ||||||||||||
| type | string Webhook event type, containing information about the operation it refers to | ||||||||||||
Return a 200 response to indicate that webhook has been received successfully.
Commercial invoice was successfully created or updated.
{- "_object": "/event",
- "id": 987654,
- "type": "/async_api/commercial_invoice#post",
- "created_at": "2025-01-02T12:34:56.123Z",
- "occurred_at": "2025-01-02T12:34:56.321Z",
- "version": 3,
- "data": {
- "_object": "/async_api/commercial_invoice",
- "request_id": "11210440-d15f-4699-bda2-46d3b8d3e044",
- "status": "PROCESSING_STATUS_SUCCESSFUL",
- "commercial_invoice_number": "ABCDEFGHIJKLMNOP",
- "commercial_invoice_fid": "flx::core:commercial_invoice:dbid/12345"
}
}