Skip to main content

Purchase Order Status Payload

Response payload for the Purchase Order Status resource of the OrderSync API

D
Written by Derek Kohn
Updated today

Purchase Order Status Payload

The overall response from any of the Order Status endpoints in the OrderSync API have the following shape (see Responses):

{
"data": [ /* Purchase Order Status record */]
"meta": {
...
}
}

An array of Purchase Order Status records are always returned in the 'data' field of the response. This array may be empty or contain only one record, depending on the availability of the data and the request that was made. The Purchase Order Status records have the following fields:

Key

Type

Description

po_number

string

Purchase order number. In this system, there is only ever one Purchase Order record with a given PO Number. Each record may contain one or more "items" which represent the order lines (products) within the Purchase Order as a whole.

order_date

ISO 8601 string

Order creation date.

request_date

ISO 8601 string

Order request date. This date may be set in the future for orders that placed but are not meant to be fulfilled until a future time.

status

One of the order status values:

'pending', 'review', 'internal review', 'cancelled', 'invalid', 'submitted', 'confirmed', 'processing', 'shipped', 'in transit', 'complete', 'delivered' 

customer_name

string

Customer name.

customer_email

string (optional)

Customer email if one was provided in or synced from the original order.

shipping_address

string

The complete address to which the order was (or will be) shipped

suppliers

string array

Supplier/OEM/Vendor name(s) where the order was placed. Since a given PO Number can contain order line items through multiple suppliers, this is an array of one or more values.

total

number

Total cost of the order and all its lines. Note: this number may not take shipping/freight and taxes into account.

quantity

number

Total quantity of all the items in this Purchase Order across all order lines.

drop_ship

boolean

True, if the order is being shipped to a customer address. False, if the order is being shipped to a store location.

items

Purchase Order Line Status array

An array of Purchase Order Line Status items (see below), one for each item within the Purchase Order as a whole.

fulfilled_items

Fulfillment Line array (optional)

Only applicable for Purchase Orders that were fulfilled by OrderSync (see below). These items correspond to the original raw sale items that were fulfilled.

conditions

string array

"Conditions" are strings attached to a Purchase Order depanding on different factors. Possible values are:

'multiple_statuses', 'multiple_suppliers', 'no_carrier_events', 'drop_ship', 'delayed' 

invoices

Invoice array (optional)

An array of Invoice items for the Purchase Order (see below).

Purchase Order Line Status Payload

The Purchase Order Status record will contain one or more Purchase Order Line Status items in its "items" array. These represent all the products/items that are contained under the PO number that was requested in the API call.

Key

Type

Description

supplier_order_id

string

Supplier/OEM order identifier.

product_name

string

Name of the product in this order line as it appears in the supplier's portal.

product_details

JSON object

Product details synced from the supplier's portal. This is a raw JSON object and may take a different shape depending on which portal it was synced from. May contain customization specs and more.

status

One of the order status values:

'pending', 'review', 'internal review', 'cancelled', 'invalid', 'submitted', 'confirmed', 'processing', 'shipped', 'in transit', 'complete', 'delivered' 

supplier_name

string

Supplier/OEM/Vendor name.

total

number

Total cost of the order line's product(s).

quantity

number

Total quantity of all the items in this order line.

estimated_delivery_date

ISO 8601 string

Order's estimated delivery date.

tracking

Tracking Data (optional)

For order lines that have been shipped, this is an object containing tracking details about the line (see below).

Tracking Data

Key

Type

Description

tracking_number

string

Tracking number for the shipment containing the item in the order line.

tracking_url

string

Shipping carrier URL for the tracking number/details.

carrier

string

Slug representing the shipping carrier for this shipment, e.g. 'fedex'.

actual_delivery_date

ISO 8601 string (optional)

For items that have already been delivered, the date that the item was delivered.

shipped_date

ISO 8601 string

Date that the item was shipped.

latest_checkpoint

JSON

An object containing information about the last checkpoint in the shipping journey. Possible properties in this object include:

{
"message": string,
"location": string,
"timestamp": string (ISO)
}

Fulfillment Line

For order lines fulfilled by OrderSync, the product name of the raw sale item may appear differently than its fulfilled and synced version pulled from the supplier portal. For this reason, these Fulfillment Line items are included to show a record of what the items in this Purchase Order were originally called when they were fulfilled.

Key

Type

Description

product_name

string

Name of the product as it appeared in the raw sale line.

supplier_name

string

Supplier/OEM/Vendor name.

Invoice

An Invoice contains information about any invoices that have been obtained for the Purchase Order.

Key

Type

Description

invoice_number

string

Invoice identifier.

supplier_order_id

string

Supplier/OEM order identifier.

supplier_name

string

Supplier/OEM/Vendor name.

invoice_date

ISO 8601 string

Invoice creation date.

due_date

ISO 8601 string

Due date for the Invoice.

payment_terms

string

Payment terms of the Invoice, e.g. 'Net 60 Days'.

terms_days

number (optional)

Number of days in the Invoice term.

subtotal_amount

number

Subtotal amount of the invoice.

tax_amount

number

Tax amount of the invoice.

shipping_amount

number

Shipping amount of the Invoice.

total_amount

number

Total of the Invoice.

currency

string

A string representing the currency used in the Invoice, e.g. 'USD'.

status

string

Status of the Invoice, e.g. 'paid'.

download_url

string

A presigned URL that can be used to download the full PDF invoice. Note: this URL expires within 1 hour of generation and should not be shared with anyone as it is a pre-authenticated URL.

updated_at

ISO 8601 string

Last date this invoice's status was updated.

Did this answer your question?