Order Search
Orders submitted to Spectrum can be queried for their details and status.
Note about Partners
If you work with Partners and need this functionality to limit what a client sees when calling either of the methods below, then you need to be sure that each of your Partners are issued a unique API Key and that API Key is associated with their Partner registration in the Spectrum System. Your Spectrum customer representitive will be able to help you get this set up.
Single Purchase Order
To query for a single purchase order within Spectrum, use the following API:
The available {SpectrumEnvironment}
base URLs are listed in the Environments page.
See example response below.
Multiple Purchase Orders
To query for multiple purchase orders within Spectrum, use the following API to search for orders with line items of a defined status. By default, only 31 days of orders are able to be search at one time. This can be overridden by the ignoreDateRetriction parameter, but should only be used when the client will wait for a response beyond normal timeout ranges.
Multiple Order Search
POST
https://{SpectrumEnvironment}/api/orders/search
Search for orders within a time range with defined statuses. Note: a Spectrum API Key must be sent via the header to enable this API call.
Headers
Request Body
Required
lastModificationStartDate
(ISO 8601 date string)workflowStatuses
(array of Workflow Status strings)
Optional
lastModificationEndDate
(ISO 8601 date string default: current DateTime)ignoreDateRestriction
(Boolean, default: false): set to true when searching over 1 month of orders. Note: API response may take more than 30 seconds to return.
Workflow Statuses
not-started
in-progress
completed
revision
on-hold
approved
delivered
cancelled
Example request body
The call below will return all orders that have line items with a workflow status of "in-progress" or "completed" within the defined dates.
See example response below.
Order Search Response Example
For a single purchase order search, up to one order is returned. For multiple purchase order search, an array of matching orders would be returned.
Last updated