Spectrum Integration
  • Introduction
  • Ecommerce
    • Front End Integration
    • Load Design
    • Add to Cart
    • Save Design
    • Generate Cart Item
    • Pricing & Availability
    • Order Acknowledgement
    • Shipment Notification
    • Update Order Status
    • Order Search
    • Integration Driver
    • Production Related File Delivery
    • Spectrum + Shopify Integration
      • Overall Flow
      • Product Set Up: "Add-ons"
      • Line Item Properties
      • Shopify Cart
      • Order Processing
  • API
    • Environments
    • Image QueryString API
      • Image Transforms
      • Image Filters
      • Image Encoding
    • Rendering
    • WebToPrint (W2P)
    • Assets
    • Rate Limiting
  • Marketing
    • Share
  • General
    • Glossary
Powered by GitBook
On this page
  • Single Purchase Order
  • Multiple Purchase Orders
  • Multiple Order Search
  • Order Search Response Example

Was this helpful?

  1. Ecommerce

Order Search

Orders submitted to Spectrum can be queried for their details and status.

PreviousUpdate Order StatusNextIntegration Driver

Last updated 1 year ago

Was this helpful?

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:

GET https://{SpectrumEnvironment}/api/order/order-number/{PurchaseOrderNumber} HTTP/1.1
SPECTRUM_API_TOKEN: {SpectrumApiToken}

The available {SpectrumEnvironment} base URLs are listed in the page.

See 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.

POST https://{SpectrumEnvironment}/api/orders/search HTTP/1.1
SPECTRUM_API_TOKEN: {SpectrumApiToken}
Content-Type: application/json

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

Name
Type
Description

SPECTRUM_API_TOKEN*

String

{SpectrumApiToken}

Content-Type*

String

application/json

Request Body

Name
Type
Description

*

JSON

JSON payload (see below example)

{
    // Response
}
{
    // Response
}
{
    // Response
}

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.

{
    "lastModificationStartDate": "2022-01-31T00:00:00.00000-00:00",
    "lastModificationEndDate": "2022-02-02T00:00:00.00000-00:00",
    "workflowStatuses": ["in-progress", "completed"]
}

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.

{
	"clientHandle": "spectrum",
	"purchaseOrderNumber": "SP-US02141505",
	"orderDateTime": "2022-01-31T13:15:05.2151663-05:00"",
	"locale": "en-US",
	"orderType": "self",
	"orderStatus": "completed",
 	"emailAddress": "john.smith@acme.com",
	"phoneNumber": "1015551212",
	"lineItems": [{
		"recipeSetId": "W7WU2TWC",
		"giftMessage": "",
		"workflowStatus": "in-progress",
		"isReorder": false,
		"lastModification": "2021-05-01T13:31:21.057",
		"shipmentTracking": "1Z9R62E60219095885",
	        "serialNumbers": ["BR7MWPKFZP76NK8U"],
		"unitPrice": 25.00,
		"skuQuantities": [{
			"sku": "T-Shirt",
			"quantity": 1
		}]
	}],
	"customerAddress": {
		"firstName": "John",
		"lastName": "Smith",
		"address1": "123 Fake Street",
		"address2": "",
		"city": "Portland",
		"state": "OR",
		"province": "",
		"postalCode": "97205",
		"country": "US"
	},
	"shippingAddress": {
		"firstName": "John",
		"lastName": "Smith",
		"address1": "123 Fake Street",
		"address2": "",
		"city": "Portland",
		"state": "OR",
		"province": "",
		"postalCode": "97205",
		"country": "US"
	}
}

See below.

Environments
example response
example response