PurchaseOrderLineItem

Endpoints relating to PurchaseOrderLineItem objects. The Purchase Order Line Item endpoints need special permission to access. Please contact your Flexport Sales representative if you are interested in using these endpoints.

List all purchase order line items.

Returns a list of purchase order line items

Request
query Parameters
page
integer >= 1
Default: 1

Page number of the page to retrieve

Example: page=1
per
integer [ 1 .. 100 ]
Default: 10

Count of items in each page. Should be between 1 and 100 (inclusive)

Example: per=20
direction
string
Default: "desc"

Set sort order. Allows "asc"(ascending) or "desc" (descending)

Enum: "asc" "desc"
f.purchase_order.id
integer

Filters the list based on the purchase order id

Example: f.purchase_order.id=123
f.line_item_number
string

Filters the list based on line item number

Example: f.line_item_number=1
f.item_key
string

Filters the list based on item key

Example: f.item_key=item1
f.purchase_order_version.id
integer

The id of the version of a purchase order. By default, the latest version of the purchase order is used.

Responses
200

collection of purchase order line items

Response Schema: application/json
_object
string
self
string
version
integer
object
_object
string
prev
string
next
string
Array of objects (PurchaseOrderLineItem)
400

error

get/purchase_order_line_items
Response samples
application/json

Success

{
  • "_object": "/api/response",
  • "version": 3,
  • "data": {
    • "_object": "/api/collections/paginated",
    • "next": null,
    • "data": [
      • {
        }
      ]
    }
}

Retrieve a purchase order line item

Returns the details of a purchase order line item

Request
path Parameters
id
required
integer

The unique id for the PO line item to be retrieved

Responses
200

collection of purchase order line items

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

Type of the object

id
integer

Unique identifier for the line item on the latest version of the PO

line_type
string
Default: "main_line"
Enum: "main_line" "sub_line" "component_line"
object (PurchaseOrderRef)
line_item_number
integer

Integer used to sequence the order of line items. Line items will appear in the UX in this order. Assigned automatically if not provided.

item_key
string

Value uniquely identifying a line item within a Purchase Order.

object (PurchaseOrderProduct)
units
integer
object (Money)
object (BookingLineItemCollectionRef)
incoterm
string
Enum: "EXW" "FOB" "FAS" "FCA" "CPT" "CFR" "CIF" "CIP" "DAT" "DAP" "DDP" "DPU"
transportation_mode
string (TransportationMode)
Enum: "ocean" "air" "truck" "rail" "unknown_transportation" "ocean_air" "truck_intl" "warehouse_storage"
unit_of_measure
string
Enum: "BBL" "CAR" "CGM" "CKG" "CM" "CM2" "CTN" "CYK" "DPC" "DPR" "DS" "FBM" "G" "GBQ" "GR" "GRL" "HUN" "IRG" "JWL" "K" "KG" "KM" "KM3" "KWH" "L" "LNM" "M" "M2" "M3" "MBQ" "NO" "OSG" "PCS" "PDG" "PFL" "PK" "PRS" "PTG" "PX" "RHG" "RUG" "T" "TDWB" "W" "X"
must_arrive_date
string <date>
object or null (Place)
object (Address)
object or null (Place)
Array of objects (PurchaseOrderLineItemDestinationAddress)
Array of objects (HsCode)
parent_line_key
string

The line_item_key of this line items parent

object (CompanyEntity)
Array of objects (LineItemMeasurement)

line item measurement group

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.

400

error

get/purchase_order_line_items/{id}
Response samples
application/json

Success

{
  • "_object": "/api/response",
  • "version": 3,
  • "data": {
    • "_object": "/purchase_orders/line_item",
    • "id": 123456,
    • "purchase_order": {},
    • "line_item_number": 1,
    • "product": {
      • "_object": "/purchase_order/line_item_product",
      • "sku": "SKU-123",
      • "name": "AC Adapter 12",
      • "product_category": "furniture",
      • "color": "red",
      • "country_of_origin": "US",
      • "dangerous": true,
      • "ean_ucc_13": "1234567890123",
      • "ean_ucc_8": "12345678",
      • "lot_number": "123456789",
      • "size": "m",
      • "style": "classic",
      • "upc": "123456789"
      },
    • "assigned_party": {
      • "_object": "/company_entity",
      • "id": 9281,
      • "name": "My Manufacturer",
      • "ref": "manufacturer_1",
      • "mailing_address": {
        },
      • "vat_numbers": [
        ]
      },
    • "item_key": "item1",
    • "line_type": "main_line",
    • "parent_line_key": null,
    • "measurements": [
      • {
        }
      ],
    • "units": 20,
    • "incoterm": "FOB",
    • "transportation_mode": "air",
    • "unit_of_measure": "HUN",
    • "cargo_ready_date": "2019-02-11",
    • "must_arrive_date": "2019-03-11",
    • "origin_port": null,
    • "origin_location": {
      • "_object": "/address",
      • "street_address": "10th YouSong Industrial District",
      • "street_address2": null,
      • "city": "Shenzhen",
      • "state": "44",
      • "country": "China",
      • "country_code": "CN",
      • "timezone": "China/Shenzhen",
      • "zip": null,
      • "unlocode": null,
      • "ref": "sellingcoaddress"
      },
    • "destination_port": null,
    • "metadata": {
      • "size": [
        ]
      },
    • "destination_addresses": [
      • {
        }
      ],
    • "hs_codes": [
      • {
        }
      ],
    • "unit_cost": {
      • "_object": "/money",
      • "amount": "121.00",
      • "currency_code": "USD"
      },
    • "booking_line_items": {}
    }
}