Line items

Line items represent a single line on an order. At a minimum, they contain a single product ID and a quantity. A line item may also include spec values, a cost center, shipping details, date needed, and other custom information.

List line item across orders

Request

Security
OAuth2(Required scopes: FullAccessOrderAdminOrderReader)
Path
directionstring(OrderDirection)required

Direction of the order, from the current user's perspective.

Enum:"Incoming""Outgoing""All"
Query
buyerIDstring

ID of the buyer.

supplierIDstring

ID of the supplier.

fromstring

Lower bound of date range that the order was created.

tostring

Upper bound of date range that the order was created.

searchstring

Word or phrase to search for.

searchOnArray of strings

Comma-delimited list of fields to search on.

Items Enum:"ID""ProductID"
searchTypestring(SearchType)

Type of search to perform.

Default:"AnyTerm"
Enum:"AnyTerm""AllTermsAnyField""AllTermsSameField""ExactPhrase""ExactPhrasePrefix"
sortByArray of strings

Comma-delimited list of fields to sort by.

Items Enum:"DateAdded""ID""ProductID""!DateAdded""!ID""!ProductID"
pageinteger

Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

Default:1
pageSizeinteger, <= 100

Number of results to return per page.

Default:20
filtersobject

An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???'

curl -i -X GET \
  'https://api.ordercloud.io/v1/lineitems/{direction}?buyerID=string&supplierID=string&from=string&to=string&search=string&searchOn=ID&searchType=AnyTerm&sortBy=DateAdded&page=1&pageSize=20&filters=' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Bodyapplication/json
ItemsArray of objects(ExtendedLineItem)
Example:
[ { "OrderID": "", "Order": { … }, "ID": "", "ProductID": "", "Quantity": 0, "BundleItemID": "", "IsBundle": false, "DateAdded": "2018-01-01T00:00:00-06:00", "QuantityShipped": 0, "UnitPrice": 0, "PromotionDiscount": 0, "BaseDiscount": 0, "DiscountID": "", "LineTotal": 0, "LineSubtotal": 0, "CostCenter": "", "DateNeeded": "2018-01-01T00:00:00-06:00", "ShippingAccount": "", "ShippingAddressID": "", "ShipFromAddressID": "", "Product": { … }, "Variant": { … }, "ShippingAddress": { … }, "ShipFromAddress": { … }, "SupplierID": "", "InventoryRecordID": "", "PriceScheduleID": "", "IsOnSale": false, "PriceOverridden": false, "Specs": [ … ], "IncomingOrderID": "", "OutgoingOrderID": "", "xp": {} } ]
Metaobject(Meta)
Response
{ "Items": [ { … } ], "Meta": { "Page": 0, "PageSize": 0, "TotalCount": 0, "TotalPages": 0, "ItemRange": [ … ], "NextPageKey": "string" } }