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: 20

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 or null
next
string or null
Array of objects (PurchaseOrderLineItem)
400

error

get/purchase_order_line_items
Response samples
application/json

Success

{
  • "_object": "/api/response",
  • "version": 2,
  • "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

object (PurchaseOrderRef)
line_item_number
integer
item_key
string

Custom identifier for the line item

object
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"
cargo_ready_date
string <date>
must_arrive_date
string <date>
object or null (Place)
object (Address)
object or null (Place)
object (Address)
Array of objects (HsCode)
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": 2,
  • "data": {
    • "_object": "/purchase_orders/line_item",
    • "id": 123456,
    • "purchase_order": {},
    • "line_item_number": 1,
    • "item_key": "item1",
    • "product": {
      • "_object": "/product",
      • "id": 54321,
      • "sku": "CHAIRS-BL-1",
      • "name": "Black chairs",
      • "product_category": "Furniture",
      • "country_of_origin": "Vietnam",
      • "product_properties": [
        ],
      • "hs_codes": [
        ]
      },
    • "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_address": {
      • "_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,
    • "destination_address": {
      • "_object": "/address",
      • "street_address": "1556 20TH ST STE 2D",
      • "street_address2": null,
      • "city": "SANTA MONICA",
      • "state": "CA",
      • "country": "United States",
      • "country_code": "US",
      • "zip": "90404-3465",
      • "unlocode": null,
      • "ref": "studiosantamonica",
      • "timezone": "America/Los Angeles"
      },
    • "hs_codes": [
      • {
        }
      ],
    • "unit_cost": {
      • "_object": "/money",
      • "amount": "121.00",
      • "currency_code": "USD"
      },
    • "booking_line_items": {}
    }
}