Endpoints relating to PurchaseOrder objects. The Purchase Order endpoints need special permission to access. Please contact your Flexport Sales representative if you are interested in using these endpoints.
Returns a list of purchase orders
Success
{- "_object": "/api/response",
- "version": 3,
- "data": {
- "_object": "/api/collections/paginated",
- "next": null,
- "data": [
- {
- "_object": "/purchase_order",
- "metadata": {
- "size": [
- "M"
]
}, - "id": 109771,
- "name": "PO 123",
- "incoterm": "FOB",
- "transportation_mode": "ocean",
- "cargo_ready_date": "2019-06-30",
- "must_arrive_date": "2019-07-31",
- "origin_port": {
- "_object": "/place",
- "name": "Fairburn",
- "address": {
- "_object": "/address",
- "street_address": null,
- "street_address2": null,
- "city": "Fairburn",
- "state": "GA",
- "country": "United States",
- "country_code": "US",
- "zip": null,
- "unlocode": "USFBN",
- "timezone": "America/New_York",
- "ref": "id-313120"
}, - "details": [
- {
- "_object": "/ocean/railport",
- "port_code": null
}, - {
- "_object": "/trucking/port",
- "port_code": null
}, - {
- "_object": "/ocean/port",
- "port_code": null
}
]
}, - "origin_address": {
- "_object": "/address",
- "street_address": "No 1, 123 St",
- "street_address2": null,
- "city": "Shenzhen",
- "state": "Beijing",
- "country": "China",
- "country_code": "CN",
- "zip": null,
- "unlocode": null,
- "timezone": "Asia/Shanghai",
- "ref": "id-274346"
}, - "destination_port": {
- "_object": "/place",
- "name": "Fairburn",
- "address": {
- "_object": "/address",
- "street_address": null,
- "street_address2": null,
- "city": "Fairburn",
- "state": "GA",
- "country": "United States",
- "country_code": "US",
- "zip": null,
- "unlocode": "USFBN",
- "timezone": "America/New_York",
- "ref": "id-313120"
}, - "details": [
- {
- "_object": "/ocean/railport",
- "port_code": null
}, - {
- "_object": "/trucking/port",
- "port_code": null
}, - {
- "_object": "/ocean/port",
- "port_code": null
}
]
}, - "destination_addresses": [
- {
- "_object": "/address",
- "street_address": "Vandelay street 1",
- "street_address2": null,
- "city": "Duisburg",
- "state": "North Rhine Westphalia",
- "country": "Germany",
- "country_code": "DE",
- "zip": "56776",
- "unlocode": null,
- "timezone": "Europe/Berlin",
- "ref": "id-318238"
}
], - "line_items": {
- "_object": "/api/refs/collection",
- "ref_type": "/purchase_orders/line_item",
}, - "parties": [
- {
- "_object": "purchase_orders/party",
- "role": "buyer",
- "company_entity": {
- "_object": "/company_entity",
- "id": 754619,
- "name": "test",
- "mailing_address": {
- "_object": "/address",
- "street_address": "test",
- "street_address2": null,
- "city": "shanghai",
- "state": "Shanghai",
- "country": "China",
- "country_code": "CN",
- "zip": null,
- "unlocode": null,
- "timezone": "Asia/Shanghai",
- "ref": null
}, - "ref": "id-754619",
- "vat_numbers": [ ]
}, - "location_address": null,
- "contacts": [ ]
}, - {
- "_object": "purchase_orders/party",
- "role": "seller",
- "company_entity": {
- "_object": "/company_entity",
- "id": 677939,
- "name": "75 Aero Camino Suite 203 Goleta",
- "mailing_address": null,
- "ref": "id-677939",
- "vat_numbers": [ ]
}, - "location_address": {
- "_object": "/address",
- "street_address": "Vandelay street 1",
- "street_address2": null,
- "city": "Duisburg",
- "state": "North Rhine Westphalia",
- "country": "Germany",
- "country_code": "DE",
- "zip": "56776",
- "unlocode": null,
- "timezone": "Europe/Berlin",
- "ref": "id-318238"
}, - "contacts": [
- {
- "_object": "purchase_orders/contact",
- "name": "cds",
- "phone": "123456789",
- "email": "abc@173.com",
- "fax": "123456789",
- "department": "a department"
}
]
}, - {
- "_object": "purchase_orders/party",
- "role": "owner",
- "company_entity": {
- "_object": "/company_entity",
- "id": 754619,
- "name": "test",
- "mailing_address": {
- "_object": "/address",
- "street_address": "test",
- "street_address2": null,
- "city": "shanghai",
- "state": "Shanghai",
- "country": "China",
- "country_code": "CN",
- "zip": null,
- "unlocode": null,
- "timezone": "Asia/Shanghai",
- "ref": null
}, - "ref": "id-754619",
- "vat_numbers": [ ]
}, - "location_address": null,
- "contacts": [
- {
- "_object": "purchase_orders/contact",
- "name": "abc",
- "phone": "123456789",
- "email": "abc@173.com",
- "fax": "123456789",
- "department": "a department"
}
]
}
], - "memo": "memo",
- "status": "open",
- "archived_at": null,
- "created_at": "2020-07-31T19:52:58.140Z",
- "updated_at": "2020-07-31T19:52:58.161Z",
- "priority": "standard",
- "order_type": "Apparel",
- "issue_date": "2019-06-30",
- "freight_payment_terms": "freight_collect"
}
]
}
}Create and return a purchase order. If the purchase order already exists, update action is performed.
When a request fails validation, the API returns a 400 with an error object. error.code is invalid_param for malformed/invalid input or bad_request for business-rule violations, and error.message describes the specific problem. The table below lists the errors you may encounter, their cause, and how to resolve them.
| Error message | Code | Cause | Suggested fix |
|---|---|---|---|
company entity ref <ref> does not exist |
invalid_param |
A party (buyer/seller) references a company entity ref that is not in your network. | Use a party company entity ref that exists in your Network. |
Cannot update a line item to request fewer units than have already been booked (line item <key>) |
bad_request |
The request reduces a line item's units below the quantity already booked against it. | Do not reduce a line item's units below what has already been booked. |
Missing property <field> (e.g. name) |
invalid_param |
A required field is absent from the request body. | Include all required fields in the request. |
Invalid enum value provided for: incoterm |
invalid_param |
The incoterm is not one of the accepted values. |
Use a valid incoterm (EXW, FOB, FAS, FCA, CPT, CFR, CIF, CIP, DAT, DAP, DDP, DPU). |
Cannot remove line items that have been booked, missing item key: <key> |
bad_request |
The request omits a line item that already has bookings against it. | Keep booked line items in the request; they cannot be removed. |
<location> Location ref <ref> does not exist |
invalid_param |
An origin/destination location ref is not a valid location in your network. | Use a location ref that exists in your Network. |
Must arrive date <date> must be after Cargo Ready Date <date> on line item <key> |
bad_request |
A line item's must-arrive date is earlier than its cargo-ready date. | Set must_arrive_date later than cargo_ready_date. |
The created purchase order
| id | integer A unique identifier for the purchase order | ||||||||
| _object | string Type of the object | ||||||||
| name | string The name of the purchase order | ||||||||
| status | string Default: "open" The status of the purchase order. Open POs denote POs that are ready to be booked. Closed POs are ones that you'd like to mark as done (typically because they've finished shipping), while Cancelled POs denote POs that were mistakenly uploaded or that should not be used. | ||||||||
| incoterm | string Enum: "EXW" "FOB" "FAS" "FCA" "CPT" "CFR" "CIF" "CIP" "DAT" "DAP" "DDP" "DPU" | ||||||||
| order_type | string Type of purchase order, which is used for rules, searching, and reporting | ||||||||
| order_class | string Class of the purchase order. | ||||||||
| issue_date | string <date> the date that the order was issued | ||||||||
| freight_paymnet_terms | string Enum: "freight_collect" "freight_prepaid" | ||||||||
| priority | string Enum: "standard" "high" | ||||||||
| transportation_mode | string (TransportationMode) Enum: "ocean" "air" "barge" "truck" "rail" "unknown_transportation" "ocean_air" "truck_intl" "warehouse_storage" | ||||||||
| cargo_ready_date | string <date> | ||||||||
| must_arrive_date | string <date> | ||||||||
object or null (Place) | |||||||||
object (Address) | |||||||||
object or null (Place) | |||||||||
Array of objects (Address) | |||||||||
Array of objects (Parties) A list of the parties in this purchase order. Buyer, Seller and Owner parties will always be returned. | |||||||||
Array
| |||||||||
| memo | string | ||||||||
| archived_at | string <date_time> | ||||||||
| created_at | string <date_time> | ||||||||
| updated_at | string <date_time> | ||||||||
object (PurchaseOrderLineItemCollectionRef) | |||||||||
| 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
{- "name": "PO 123",
- "memo": "memo",
- "status": "open",
- "order_type": "Apparel",
- "order_class": "purchase_order",
- "parties": [
- {
- "role": "buyer",
- "external_ref": "id-1232",
- "contacts": [
- {
- "name": "abc",
- "phone": "123456789",
- "email": "abc@173.com",
- "fax": "123456789",
- "department": "a department"
}
], - "location_ref": "id-1232"
}, - {
- "role": "seller",
- "external_ref": "id-321",
- "contacts": [
- {
- "name": "cds",
- "phone": "123456789",
- "email": "abc@173.com",
- "fax": "123456789",
- "department": "a department"
}
], - "location_ref": "id-432"
}
], - "currency_code": "USD",
- "origin_port": {
- "code": "USFBN",
- "code_type": "unlocode"
}, - "destination_port": {
- "code": "USFBN",
- "code_type": "unlocode"
}, - "cargo_ready_date": "2019-06-30",
- "issue_date": "2019-06-30",
- "freight_payment_terms": "freight_collect",
- "must_arrive_date": "2019-07-31",
- "priority": "standard",
- "transportation_mode": "ocean",
- "incoterm": "FOB",
- "origin_location_ref": "id-123456",
- "destination_location_refs": [
- "id-654321",
- "id-654322"
], - "line_items": [
- {
- "item_key": "item_key_1",
- "line_item_number": 1,
- "assigned_party_ref": "id-12355",
- "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"
}, - "origin_port": {
- "code": "USFBN",
- "code_type": "unlocode"
}, - "destination_port": {
- "code": "USFBN",
- "code_type": "unlocode"
}, - "cargo_ready_date": "2019-06-30",
- "must_arrive_date": "2019-07-31",
- "transportation_mode": "ocean",
- "incoterm": "FOB",
- "origin_location_ref": "id-123456",
- "destination_locations": [
- {
- "location_ref": "id-654321",
- "units": 1
}
], - "measurements": [
- {
- "measure_type": "length",
- "unit_of_measure": "EA",
- "value": "1.0"
}
], - "units": 10,
- "unit_cost": {
- "amount": "100.01",
- "currency_code": "USD"
}, - "hs_codes": [
- {
- "code": "6204.62.80.11",
- "country_code": "US"
}
], - "metadata": {
- "size": [
- "M"
]
}
}
]
}{- "_object": "/api/response",
- "version": 3,
- "data": {
- "metadata": {
- "size": [
- "M"
]
}, - "_object": "/purchase_order",
- "id": 109771,
- "name": "PO 123",
- "incoterm": "FOB",
- "transportation_mode": "ocean",
- "cargo_ready_date": "2019-06-30",
- "must_arrive_date": "2019-07-31",
- "origin_port": {
- "_object": "/place",
- "name": "Fairburn",
- "address": {
- "_object": "/address",
- "street_address": null,
- "street_address2": null,
- "city": "Fairburn",
- "state": "GA",
- "country": "United States",
- "country_code": "US",
- "zip": null,
- "unlocode": "USFBN",
- "timezone": "America/New_York",
- "ref": "id-313120"
}, - "details": [
- {
- "_object": "/ocean/railport",
- "port_code": null
}, - {
- "_object": "/trucking/port",
- "port_code": null
}, - {
- "_object": "/ocean/port",
- "port_code": null
}
]
}, - "origin_address": {
- "_object": "/address",
- "street_address": "No 1, 123 St",
- "street_address2": null,
- "city": "Shenzhen",
- "state": "Beijing",
- "country": "China",
- "country_code": "CN",
- "zip": null,
- "unlocode": null,
- "timezone": "Asia/Shanghai",
- "ref": "id-274346"
}, - "destination_port": {
- "_object": "/place",
- "name": "Fairburn",
- "address": {
- "_object": "/address",
- "street_address": null,
- "street_address2": null,
- "city": "Fairburn",
- "state": "GA",
- "country": "United States",
- "country_code": "US",
- "zip": null,
- "unlocode": "USFBN",
- "timezone": "America/New_York",
- "ref": "id-313120"
}, - "details": [
- {
- "_object": "/ocean/railport",
- "port_code": null
}, - {
- "_object": "/trucking/port",
- "port_code": null
}, - {
- "_object": "/ocean/port",
- "port_code": null
}
]
}, - "destination_addresses": [
- {
- "_object": "/address",
- "street_address": "Vandelay street 1",
- "street_address2": null,
- "city": "Duisburg",
- "state": "North Rhine Westphalia",
- "country": "Germany",
- "country_code": "DE",
- "zip": "56776",
- "unlocode": null,
- "timezone": "Europe/Berlin",
- "ref": "id-318238"
}
], - "line_items": {
- "_object": "/api/refs/collection",
- "ref_type": "/purchase_orders/line_item",
}, - "parties": [
- {
- "_object": "purchase_orders/party",
- "role": "buyer",
- "company_entity": {
- "_object": "/company_entity",
- "id": 754619,
- "name": "test",
- "mailing_address": {
- "_object": "/address",
- "street_address": "test",
- "street_address2": null,
- "city": "shanghai",
- "state": "Shanghai",
- "country": "China",
- "country_code": "CN",
- "zip": null,
- "unlocode": null,
- "timezone": "Asia/Shanghai",
- "ref": null
}, - "ref": "id-754619",
- "vat_numbers": [ ]
}, - "location_address": null,
- "contacts": [ ]
}, - {
- "_object": "purchase_orders/party",
- "role": "seller",
- "company_entity": {
- "_object": "/company_entity",
- "id": 677939,
- "name": "75 Aero Camino Suite 203 Goleta",
- "mailing_address": null,
- "ref": "id-677939",
- "vat_numbers": [ ]
}, - "location_address": {
- "_object": "/address",
- "street_address": "Vandelay street 1",
- "street_address2": null,
- "city": "Duisburg",
- "state": "North Rhine Westphalia",
- "country": "Germany",
- "country_code": "DE",
- "zip": "56776",
- "unlocode": null,
- "timezone": "Europe/Berlin",
- "ref": "id-318238"
}, - "contacts": [
- {
- "_object": "purchase_orders/contact",
- "name": "cds",
- "phone": "123456789",
- "email": "abc@173.com",
- "fax": "123456789",
- "department": "a department"
}
]
}, - {
- "_object": "purchase_orders/party",
- "role": "owner",
- "company_entity": {
- "_object": "/company_entity",
- "id": 754619,
- "name": "test",
- "mailing_address": {
- "_object": "/address",
- "street_address": "test",
- "street_address2": null,
- "city": "shanghai",
- "state": "Shanghai",
- "country": "China",
- "country_code": "CN",
- "zip": null,
- "unlocode": null,
- "timezone": "Asia/Shanghai",
- "ref": null
}, - "ref": "id-754619",
- "vat_numbers": [ ]
}, - "location_address": null,
- "contacts": [
- {
- "_object": "purchase_orders/contact",
- "name": "abc",
- "phone": "123456789",
- "email": "abc@173.com",
- "fax": "123456789",
- "department": "a department"
}
]
}
], - "memo": "memo",
- "status": "open",
- "archived_at": null,
- "created_at": "2020-07-31T19:52:58.140Z",
- "updated_at": "2020-07-31T19:52:58.161Z",
- "priority": "standard",
- "order_type": "Apparel",
- "issue_date": "2019-06-30",
- "freight_payment_terms": "freight_collect"
}, - "error": null
}Retrieves the details of a single purchase order.
Success
| _object | string | ||||||||||||||||||||||||||||||||||||||||||||||||
| self | string | ||||||||||||||||||||||||||||||||||||||||||||||||
| version | integer | ||||||||||||||||||||||||||||||||||||||||||||||||
object (PurchaseOrder) | |||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||
error
Success
{- "_object": "/purchase_order",
- "id": 109771,
- "name": "PO 123",
- "incoterm": "FOB",
- "transportation_mode": "ocean",
- "cargo_ready_date": "2019-06-30",
- "must_arrive_date": "2019-07-31",
- "origin_port": {
- "_object": "/place",
- "name": "Fairburn",
- "address": {
- "_object": "/address",
- "street_address": null,
- "street_address2": null,
- "city": "Fairburn",
- "state": "GA",
- "country": "United States",
- "country_code": "US",
- "zip": null,
- "unlocode": "USFBN",
- "timezone": "America/New_York",
- "ref": "id-313120"
}, - "details": [
- {
- "_object": "/ocean/railport",
- "port_code": null
}, - {
- "_object": "/trucking/port",
- "port_code": null
}, - {
- "_object": "/ocean/port",
- "port_code": null
}
]
}, - "origin_address": {
- "_object": "/address",
- "street_address": "No 1, 123 St",
- "street_address2": null,
- "city": "Shenzhen",
- "state": "Beijing",
- "country": "China",
- "country_code": "CN",
- "zip": null,
- "unlocode": null,
- "timezone": "Asia/Shanghai",
- "ref": "id-274346"
}, - "destination_port": {
- "_object": "/place",
- "name": "Fairburn",
- "address": {
- "_object": "/address",
- "street_address": null,
- "street_address2": null,
- "city": "Fairburn",
- "state": "GA",
- "country": "United States",
- "country_code": "US",
- "zip": null,
- "unlocode": "USFBN",
- "timezone": "America/New_York",
- "ref": "id-313120"
}, - "details": [
- {
- "_object": "/ocean/railport",
- "port_code": null
}, - {
- "_object": "/trucking/port",
- "port_code": null
}, - {
- "_object": "/ocean/port",
- "port_code": null
}
]
}, - "destination_addresses": [
- {
- "_object": "/address",
- "street_address": "Vandelay street 1",
- "street_address2": null,
- "city": "Duisburg",
- "state": "North Rhine Westphalia",
- "country": "Germany",
- "country_code": "DE",
- "zip": "56776",
- "unlocode": null,
- "timezone": "Europe/Berlin",
- "ref": "id-318238"
}
], - "line_items": {
- "_object": "/api/refs/collection",
- "ref_type": "/purchase_orders/line_item",
}, - "parties": [
- {
- "_object": "purchase_orders/party",
- "role": "buyer",
- "company_entity": {
- "_object": "/company_entity",
- "id": 754619,
- "name": "test",
- "mailing_address": {
- "_object": "/address",
- "street_address": "test",
- "street_address2": null,
- "city": "shanghai",
- "state": "Shanghai",
- "country": "China",
- "country_code": "CN",
- "zip": null,
- "unlocode": null,
- "timezone": "Asia/Shanghai",
- "ref": null
}, - "ref": "id-754619",
- "vat_numbers": [ ]
}, - "location_address": null,
- "contacts": [ ]
}, - {
- "_object": "purchase_orders/party",
- "role": "seller",
- "company_entity": {
- "_object": "/company_entity",
- "id": 677939,
- "name": "75 Aero Camino Suite 203 Goleta",
- "mailing_address": null,
- "ref": "id-677939",
- "vat_numbers": [ ]
}, - "location_address": {
- "_object": "/address",
- "street_address": "Vandelay street 1",
- "street_address2": null,
- "city": "Duisburg",
- "state": "North Rhine Westphalia",
- "country": "Germany",
- "country_code": "DE",
- "zip": "56776",
- "unlocode": null,
- "timezone": "Europe/Berlin",
- "ref": "id-318238"
}, - "contacts": [
- {
- "_object": "purchase_orders/contact",
- "name": "cds",
- "phone": "123456789",
- "email": "abc@173.com",
- "fax": "123456789",
- "department": "a department"
}
]
}, - {
- "_object": "purchase_orders/party",
- "role": "owner",
- "company_entity": {
- "_object": "/company_entity",
- "id": 754619,
- "name": "test",
- "mailing_address": {
- "_object": "/address",
- "street_address": "test",
- "street_address2": null,
- "city": "shanghai",
- "state": "Shanghai",
- "country": "China",
- "country_code": "CN",
- "zip": null,
- "unlocode": null,
- "timezone": "Asia/Shanghai",
- "ref": null
}, - "ref": "id-754619",
- "vat_numbers": [ ]
}, - "location_address": null,
- "contacts": [
- {
- "_object": "purchase_orders/contact",
- "name": "abc",
- "phone": "123456789",
- "email": "abc@173.com",
- "fax": "123456789",
- "department": "a department"
}
]
}
], - "memo": "memo",
- "status": "open",
- "archived_at": null,
- "created_at": "2020-07-31T19:52:58.140Z",
- "updated_at": "2020-07-31T19:52:58.161Z",
- "priority": "standard",
- "order_type": "Apparel",
- "issue_date": "2019-06-30",
- "freight_payment_terms": "freight_collect",
- "metadata": {
- "size": [
- "M"
]
}
}Update and return a purchase order.
When a request fails validation, the API returns a 400 with an error object. error.code is invalid_param for malformed/invalid input or bad_request for business-rule violations, and error.message describes the specific problem. The table below lists the errors you may encounter, their cause, and how to resolve them.
| Error message | Code | Cause | Suggested fix |
|---|---|---|---|
Cannot update a line item to request fewer units than have already been booked (line item <key>) |
bad_request |
The request reduces a line item's units below the quantity already booked against it. | Do not reduce a line item's units below what has already been booked. |
Missing property <field> (e.g. name) |
invalid_param |
A required field is absent from the request body. | Include all required fields in the request. |
Cannot update name and involved parties of purchase orders |
bad_request |
The request attempts to change the name or involved parties of an existing purchase order. |
Name and involved parties cannot be changed on an existing PO; omit those changes. |
Must arrive date <date> must be after Cargo Ready Date <date> on line item <key> |
bad_request |
A line item's must-arrive date is earlier than its cargo-ready date. | Set must_arrive_date later than cargo_ready_date. |
Cannot remove line items that have been booked, missing item key: <key> |
bad_request |
The request omits a line item that already has bookings against it. | Keep booked line items in the request; they cannot be removed. |
| name required | string Always required. Name of the purchase order. | ||||||||||||||||||||||||||||||||||||||||
| memo | string Your notes or instructions on this purchase order. | ||||||||||||||||||||||||||||||||||||||||
| user_email | string Email of the user that the purchase order should be attributed to as creator/updater. The user must belong to your company. If omitted, it defaults to your company's admin. | ||||||||||||||||||||||||||||||||||||||||
| status | string Default: "open" The status of the purchase order. Open POs denote POs that are ready to be booked. Closed POs are ones that you'd like to mark as done (typically because they've finished shipping), while Cancelled POs denote POs that were mistakenly uploaded or that should not be used | ||||||||||||||||||||||||||||||||||||||||
| external_system_unique_id | string A stable identifier for this purchase order from your external system (e.g. ERP or TMS). Recommended format: "{system_name}|{account_id}|{external_po_id}", for example "MYERP|12345|PO-67890". Required when using | ||||||||||||||||||||||||||||||||||||||||
object Free-form buyer identity to use when no buyer party is provided in the | |||||||||||||||||||||||||||||||||||||||||
object Free-form seller identity to use when no seller party is provided in the | |||||||||||||||||||||||||||||||||||||||||
Array of objects Free-form destination addresses to use when destination location refs are not available. When provided, Flexport will attempt to match each address to a known location. Processed only after both buyer and seller are resolved. If either party is pending async resolution (via | |||||||||||||||||||||||||||||||||||||||||
required | Array of objects (CreateParty) A list of the parties in this purchase order. Seller is required unless | ||||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||||
| currency_code | string Required if there is no currency_code in each line item. The currency code being used in this purchase order. | ||||||||||||||||||||||||||||||||||||||||
object (CreatePurchaseOrderPort) The origin port | |||||||||||||||||||||||||||||||||||||||||
object (CreatePurchaseOrderPort) The destination port | |||||||||||||||||||||||||||||||||||||||||
| must_arrive_date | string <date> The must arrive date for this purchase order. | ||||||||||||||||||||||||||||||||||||||||
| issue_date | string <date> The issue date for this purchase order. | ||||||||||||||||||||||||||||||||||||||||
| freight_payment_terms | string The freight payment term for the purchase order | ||||||||||||||||||||||||||||||||||||||||
| cargo_ready_date | string <date> Date when cargo is ready for pickup at the origin location. | ||||||||||||||||||||||||||||||||||||||||
| transportation_mode | string Enum: "air" "ocean" "truck" "rail" | ||||||||||||||||||||||||||||||||||||||||
| incoterm | string The incoterm of your purchase order. | ||||||||||||||||||||||||||||||||||||||||
| origin_location_ref | string Customizable reference ID of the network location that is the origin location. | ||||||||||||||||||||||||||||||||||||||||
| destination_location_refs | Array of strings Reference ID of the network locations that are the destination locations. Multiple values are allowed, which would signify that this order is going to be shipped to multiple locations. | ||||||||||||||||||||||||||||||||||||||||
| priority | string Default: "standard" priority of the purchase order. | ||||||||||||||||||||||||||||||||||||||||
| order_class | string Default: "purchase_order" Class of the purchase order. | ||||||||||||||||||||||||||||||||||||||||
| order_type | string Type of purchase order, which is used for rules, searching, and reporting | ||||||||||||||||||||||||||||||||||||||||
required | Array of objects (CreateLineItem) A list of the line items in this purchase order | ||||||||||||||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||||||||||||||
object or Array of objects (MetadataCreate) | |||||||||||||||||||||||||||||||||||||||||
The update purchase order
| id | integer A unique identifier for the purchase order | ||||||||
| _object | string Type of the object | ||||||||
| name | string The name of the purchase order | ||||||||
| status | string Default: "open" The status of the purchase order. Open POs denote POs that are ready to be booked. Closed POs are ones that you'd like to mark as done (typically because they've finished shipping), while Cancelled POs denote POs that were mistakenly uploaded or that should not be used. | ||||||||
| incoterm | string Enum: "EXW" "FOB" "FAS" "FCA" "CPT" "CFR" "CIF" "CIP" "DAT" "DAP" "DDP" "DPU" | ||||||||
| order_type | string Type of purchase order, which is used for rules, searching, and reporting | ||||||||
| order_class | string Class of the purchase order. | ||||||||
| issue_date | string <date> the date that the order was issued | ||||||||
| freight_paymnet_terms | string Enum: "freight_collect" "freight_prepaid" | ||||||||
| priority | string Enum: "standard" "high" | ||||||||
| transportation_mode | string (TransportationMode) Enum: "ocean" "air" "barge" "truck" "rail" "unknown_transportation" "ocean_air" "truck_intl" "warehouse_storage" | ||||||||
| cargo_ready_date | string <date> | ||||||||
| must_arrive_date | string <date> | ||||||||
object or null (Place) | |||||||||
object (Address) | |||||||||
object or null (Place) | |||||||||
Array of objects (Address) | |||||||||
Array of objects (Parties) A list of the parties in this purchase order. Buyer, Seller and Owner parties will always be returned. | |||||||||
Array
| |||||||||
| memo | string | ||||||||
| archived_at | string <date_time> | ||||||||
| created_at | string <date_time> | ||||||||
| updated_at | string <date_time> | ||||||||
object (PurchaseOrderLineItemCollectionRef) | |||||||||
| 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
{- "name": "PO 123",
- "memo": "memo",
- "status": "open",
- "order_type": "Apparel",
- "order_class": "purchase_order",
- "parties": [
- {
- "role": "buyer",
- "external_ref": "id-1232",
- "contact": [
- {
- "name": "abc",
- "phone": 123456789,
- "email": "abc@173.com",
- "fax": 123456789,
- "department": "a department"
}
], - "location_ref": "id-1232"
}, - {
- "role": "seller",
- "external_ref": "id-321",
- "contact": [
- {
- "name": "cds",
- "phone": 123456789,
- "email": "abc@173.com",
- "fax": 123456789,
- "department": "a department"
}
], - "location_ref": "id-432"
}
], - "currency_code": "USD",
- "origin_port": {
- "code": "USLA",
- "code_type": "unlocode"
}, - "destination_port": {
- "code": "CNSHA",
- "code_type": "unlocode"
}, - "cargo_ready_date": "2019-06-30",
- "issue_date": "2019-06-30",
- "freight_payment_terms": "freight_collect",
- "must_arrive_date": "2019-07-31",
- "priority": "standard",
- "transportation_mode": "ocean",
- "incoterm": "FOB",
- "origin_location_ref": "id-123456",
- "destination_location_refs": [
- "id-654321",
- "id-654322"
], - "line_items": {
- "item_key": "item_key_1",
- "line_item_number": 1,
- "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
}, - "origin_port": {
- "code": "USLGB",
- "code_type": "unlocode"
}, - "destination_port": {
- "code": "USFBN",
- "code_type": "unlocode"
}, - "cargo_ready_date": "2019-06-30",
- "must_arrive_date": "2019-07-31",
- "transportation_mode": "ocean",
- "incoterm": "FOB",
- "origin_location_ref": "id-123456",
- "destination_locations": [
- {
- "address_ref": "id-654321",
- "destination_units": 1
}
], - "measurements": [
- {
- "measure_type": "length",
- "unit_of_measure": "EA",
- "value": 1
}
], - "units": 10,
- "unit_cost": {
- "amount": "100.01",
- "currency_code": "USD"
}, - "hs_codes": [
- {
- "code": "6204.62.80.11",
- "country_code": "US"
}
], - "metadata": {
- "size": [
- "M"
]
}
}
}{- "_object": "/api/response",
- "version": 3,
- "data": {
- "metadata": {
- "size": [
- "M"
]
}, - "_object": "/purchase_order",
- "id": 109771,
- "name": "PO 123",
- "incoterm": "FOB",
- "transportation_mode": "ocean",
- "cargo_ready_date": "2019-06-30",
- "must_arrive_date": "2019-07-31",
- "origin_port": {
- "_object": "/place",
- "name": "Fairburn",
- "address": {
- "_object": "/address",
- "street_address": null,
- "street_address2": null,
- "city": "Fairburn",
- "state": "GA",
- "country": "United States",
- "country_code": "US",
- "zip": null,
- "unlocode": "USFBN",
- "timezone": "America/New_York",
- "ref": "id-313120"
}, - "details": [
- {
- "_object": "/ocean/railport",
- "port_code": null
}, - {
- "_object": "/trucking/port",
- "port_code": null
}, - {
- "_object": "/ocean/port",
- "port_code": null
}
]
}, - "origin_address": {
- "_object": "/address",
- "street_address": "No 1, 123 St",
- "street_address2": null,
- "city": "Shenzhen",
- "state": "Beijing",
- "country": "China",
- "country_code": "CN",
- "zip": null,
- "unlocode": null,
- "timezone": "Asia/Shanghai",
- "ref": "id-274346"
}, - "destination_port": {
- "_object": "/place",
- "name": "Fairburn",
- "address": {
- "_object": "/address",
- "street_address": null,
- "street_address2": null,
- "city": "Fairburn",
- "state": "GA",
- "country": "United States",
- "country_code": "US",
- "zip": null,
- "unlocode": "USFBN",
- "timezone": "America/New_York",
- "ref": "id-313120"
}, - "details": [
- {
- "_object": "/ocean/railport",
- "port_code": null
}, - {
- "_object": "/trucking/port",
- "port_code": null
}, - {
- "_object": "/ocean/port",
- "port_code": null
}
]
}, - "destination_addresses": [
- {
- "_object": "/address",
- "street_address": "Vandelay street 1",
- "street_address2": null,
- "city": "Duisburg",
- "state": "North Rhine Westphalia",
- "country": "Germany",
- "country_code": "DE",
- "zip": "56776",
- "unlocode": null,
- "timezone": "Europe/Berlin",
- "ref": "id-318238"
}
], - "line_items": {
- "_object": "/api/refs/collection",
- "ref_type": "/purchase_orders/line_item",
}, - "parties": [
- {
- "_object": "purchase_orders/party",
- "role": "buyer",
- "company_entity": {
- "_object": "/company_entity",
- "id": 754619,
- "name": "test",
- "mailing_address": {
- "_object": "/address",
- "street_address": "test",
- "street_address2": null,
- "city": "shanghai",
- "state": "Shanghai",
- "country": "China",
- "country_code": "CN",
- "zip": null,
- "unlocode": null,
- "timezone": "Asia/Shanghai",
- "ref": null
}, - "ref": "id-754619",
- "vat_numbers": [ ]
}, - "location_address": null,
- "contacts": [ ]
}, - {
- "_object": "purchase_orders/party",
- "role": "seller",
- "company_entity": {
- "_object": "/company_entity",
- "id": 677939,
- "name": "75 Aero Camino Suite 203 Goleta",
- "mailing_address": null,
- "ref": "id-677939",
- "vat_numbers": [ ]
}, - "location_address": {
- "_object": "/address",
- "street_address": "Vandelay street 1",
- "street_address2": null,
- "city": "Duisburg",
- "state": "North Rhine Westphalia",
- "country": "Germany",
- "country_code": "DE",
- "zip": "56776",
- "unlocode": null,
- "timezone": "Europe/Berlin",
- "ref": "id-318238"
}, - "contacts": [
- {
- "_object": "purchase_orders/contact",
- "name": "cds",
- "phone": "123456789",
- "email": "abc@173.com",
- "fax": "123456789",
- "department": "a department"
}
]
}, - {
- "_object": "purchase_orders/party",
- "role": "owner",
- "company_entity": {
- "_object": "/company_entity",
- "id": 754619,
- "name": "test",
- "mailing_address": {
- "_object": "/address",
- "street_address": "test",
- "street_address2": null,
- "city": "shanghai",
- "state": "Shanghai",
- "country": "China",
- "country_code": "CN",
- "zip": null,
- "unlocode": null,
- "timezone": "Asia/Shanghai",
- "ref": null
}, - "ref": "id-754619",
- "vat_numbers": [ ]
}, - "location_address": null,
- "contacts": [
- {
- "_object": "purchase_orders/contact",
- "name": "abc",
- "phone": "123456789",
- "email": "abc@173.com",
- "fax": "123456789",
- "department": "a department"
}
]
}
], - "memo": "memo",
- "status": "open",
- "archived_at": null,
- "created_at": "2020-07-31T19:52:58.140Z",
- "updated_at": "2020-07-31T19:52:58.161Z",
- "priority": "standard",
- "order_type": "Apparel",
- "issue_date": "2019-06-30",
- "freight_payment_terms": "freight_collect"
}, - "error": null
}