Commercial Invoices

Endpoints relating to Commercial Invoice objects

Retrieve a commercial invoice

Retrieve an existing commercial invoice by invoice number

Request
path Parameters
invoice_number
required
string

The unique number for the commercial invoice to be retrieved

Responses
200

Success

Response Schema: application/json
_object
string
self
string
version
string
object (CommercialInvoice)

The commercial invoice data

invoice_number
string

Invoice number on the commercial invoice, typically used for display purposes. Uniqueness is based on the supplier Involved Party. There can be multiple commercial invoices with the same invoice_number only if they have different suppliers.

Array of objects (InvolvedParty)

List of involved parties. Note that manufacturer at the invoice level will apply to all line items within the CI.

mid_code
string

Correctly formatted MID (Manufacturer ID) codes.

is_related_parties
boolean

Whether there was a related parties transaction as defined by CBP.

currency_code
string

The currency being used on the commercial invoice.

terms_of_sale
string
Array of objects (LineItem)

List of line items. Note that only full replacement of the list is allowed.

shipment_ref
string

External reference to a Flexport shipment. Only optional if client is enrolled in the shipmentless commercial invoice feature.

shipment_id
integer

Flexport's unique identifier for shipment. Only optional if client is enrolled in the shipmentless commercial invoice feature.

invoice_date
string

date of invoice, in the format of yyyy-MM-dd.

object (Money)

Money Object

metadata
object (Metadata)

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.

error
object
400

Bad Request

401

Bad token

404

Not Found

500

Unknown error

get/commercial_invoices/{invoice_number}
Response samples
application/json

Success

{
  • "_object": "/api/response",
  • "version": "2023-05-18",
  • "data": {
    • "invoice_number": "ABCD1234",
    • "involved_parties": [
      • {
        }
      ],
    • "mid_code": "mid_code",
    • "is_related_parties": true,
    • "currency_code": "USD",
    • "terms_of_sale": "terms_of_sale",
    • "line_items": [
      • {
        }
      ],
    • "shipment_ref": "shipment_ref",
    • "shipment_id": 123456,
    • "invoice_date": "2000-04-30",
    • "proration_amount": {
      • "amount": 1.23,
      • "currency_code": "USD"
      },
    • "metadata": "{color: [\"red\", \"blue\"], size: [\"large\", \"medium\", \"small\"]}"
    },
  • "error": null
}