Site Flow API Documentation

All RESTful queries are HTTP commands (GET, POST, PUT, DELETE etc.) to a base URL combined with a specific endpoint path to perform a specific action.  The information below outlines the available base URL and supported endpoints for the Site Flow API.

Table of Contents

Base URL

  • Production:  https://printos.api.hp.com/siteflow  (for existing PrintOS customers)
  • Staging:  https://stage.printos.api.hp.com/siteflow  (for 3rd parties)

Code Samples: https://github.com/HPInc/printos-siteflow-api-samples
 

 

API Endpoints:

 

Validate an Order

HTTP Method Endpoint Body
POST /api/order/validate JSON Object
Note that is the most basic structure of an order to validate or submit. See the Order JSON Structure documentation for more information.
{
  "destination": {
    "name": "accountName"
  },
  "orderData": {
    "sourceOrderId": "1234512345",
    "items": [
      {
        "sku": "Business Cards",
        "components": [
          {
            "code": "Content",            
            "fetch": true,
            "path": "http://www.w2psite.com/businessCard.pdf"
          }
        ]
      }
    ],
    "shipments": [
      {
        "shipTo": {
          "name": "John Doe",
          "companyName": "Acme",
          "address1": "1234 Main St.",
          "town": "Capitol",
          "postcode": "12345",
          "isoCountry": "US"
        },
        "carrier":{
          "code": "fedex",
          "service": "ground"
        }
      }
    ]
  }
}
{
    "destination": {
        "id": "57ad022fc3af860f00c7ed4e",
        "name": "accountName"
    },
    "orderData": {
        "items": [
            {
                "components": [
                    {
                        "attributes": {
                            "cut": "To Trim",
                            "finish": "Lamination",
                            "folding": "Half/Single",
                            "orientation": "Landscape",
                            "pageSize": "Tabloid",
                            "substrate": "Coated",
                            "substrateWeight": "200 gsm"
                        },
                        "barcodes": [],
                        "code": "Content",
                        "colour": {
                            "side1": "4process",
                            "side2": "4process"
                        },
                        "duplicate": 1,
                        "errorCheck": true,
                        "fetch": "true",
                        "finish": {
                            "side1": "none",
                            "side2": "none"
                        },
                        "height": 55,
                        "infotech": false,
                        "legacyWorkQueue": true,
                        "pages": 2,
                        "paperId": "57ad0231c3af860f00c7ed54",
                        "path": "pdf-sample.pdf",
                        "simplex": false,
                        "weight": "200",
                        "width": 90
                    }
                ],
                "dispatchAlert": "",
                "printQuantity": 1,
                "productDescription": "Brochure",
                "quantity": 1,
                "sku": "Brochure",
                "sourceItemId": "FBAK1F",
                "totalPages": 2,
                "unitCost": 0.1,
                "unitPrice": 1,
                "unitWeight": 5
            }
        ],
        "postbackAddress": "http://postback.genesis.com",
        "shipments": [
            {
                "carrier": {
                    "code": "customer",
                    "service": "shipping",
                    "serviceId": "57ad0231c3af860f00c7ee0d"
                },
                "shipTo": {
                    "address1": "5th Avenue",
                    "email": "johnd@acme.com",
                    "isoCountry": "US",
                    "name": "John Doe",
                    "phone": "01234567890",
                    "postcode": "12345",
                    "state": "New York",
                    "town": "New York"
                }
            }
        ],
        "sourceOrderId": "82TE0N"
    },
    "source": {
        "id": "57ad022fc3af860f00c7ed4e",
        "name": "accountName"
    }
}

 

Submit an Order

HTTP Method Endpoint Body
POST /api/order JSON Object
Note that is the most basic structure of an order to validate or submit. See the Order JSON Structure documentation for more information.
{
  "destination": {
    "name": "accountName"
  },
  "orderData": {
    "sourceOrderId": "1234512345",
    "items": [
      {
        "sku": "Business Cards",
        "components": [
          {
            "code": "Content",            
            "fetch": true,
            "path": "http://www.w2psite.com/businessCard.pdf"
          }
        ]
      }
    ],
    "shipments": [
      {
        "shipTo": {
          "name": "John Doe",
          "companyName": "Acme",
          "address1": "1234 Main St.",
          "town": "Capitol",
          "postcode": "12345",
          "isoCountry": "US"
        },
        "carrier":{
          "code": "fedex",
          "service": "ground"
        }
      }
    ]
  }
}
{
	"success": true,
	"order": {
		"_id": "56fc03fd6dead10e00730c7a",
		"__v": 1,
		"orderData": {
			"sourceOrderId": "WSGWWX",
			"messages": [],
			"shipments": [{
				"_id": "56fc03fd6dead10e00730c7d",
				"partial": false,
				"pspBranding": true,
				"printJobs": [],
				"expectedQuantity": 0,
				"scannedQuantity": 0,
				"packages": [],
				"stockItems": [],
				"status": "live",
				"trackingRequired": false,
				"singleItem": false,
				"shipTo": {
					"town": "New York",
					"isoCountry": "US",
					"state": "New York",
					"name": "John Doe",
					"phone": "01234567890",
					"address1": "5th Avenue",
					"email": "johnd@acme.com",
					"postcode": "12345"
				},
				"shipmentIndex": 0,
				"labelNotRequired": false,
				"labelName": "default",
				"jobId": [],
				"itemIds": [],
				"items": [],
				"componentIds": [],
				"carrier": {
					"code": "customer",
					"service": "pickup",
					"serviceId": "56f016d56dead10e0072f980"
				},
				"canShipEarly": true,
				"attachments": []
			}],
			"stockItems": [],
			"items": [{
				"sku": "Business Cards",
				"sourceItemId": "9K98LJ",
				"unitCost": 0.1,
				"unitPrice": 1,
				"dispatchAlert": "",
				"totalPages": 2,
				"productDescription": "Business Cards",
				"unitWeight": 5,
				"printQuantity": 1,
				"_id": "56fc03fd6dead10e00730c7b",
				"components": [{
					"path": "https://Server/Path/business_cards.pdf",
					"code": "Content",
					"attributes": {
						"cut": "To Trim",
						"substrateWeight": "300 gsm",
						"substrate": "Coated",
						"orientation": "Landscape",
						"pageSize": "50 x 90 mm"
					},
					"paperId": "56f016d56dead10e0072f8c6",
					"width": 90,
					"height": 55,
					"weight": "200",
					"pages": 2,
					"batchImpositionId": "56f016d56dead10e0072f8cd",
					"_id": "56fc03fd6dead10e00730c7c",
					"fileId": "56fc03fd6dead10e00730c80",
					"preflightImageRes": 300,
					"nup": 1,
					"simplex": false,
					"finish": {
						"side2": "none",
						"side1": "none"
					},
					"colour": {
						"side2": "4process",
						"side1": "4process"
					},
					"type": "press",
					"status": "live",
					"reprintCount": 0,
					"route": [],
					"proof": false,
					"preflightProfile": "",
					"preflight": false,
					"localFile": false,
					"infotechImpose": false,
					"infotechExternal": false,
					"infotechPadding": 1,
					"infotechCopies": 1,
					"infotech": false,
					"legacyWorkQueue": true,
					"errorCheck": true,
					"duplicate": 1,
					"fetch": true,
					"barcodes": [],
					"barcode": "B4000A6C1C"
				}],
				"scanned": 0,
				"status": "live",
				"shipmentIndex": 0,
				"quantity": 1,
				"reprintCount": 0,
				"folding": "none",
				"binding": "none",
				"barcode": "B3000A6C1B",
				"attributes": []
			}],
			"publicUploads": false,
			"consolidatedInvoice": false,
			"currency": "GBP",
			"reprintCount": 0,
			"reprint": false,
			"amount": 0,
			"date": "2016-03-30T16:51:09.144Z",
			"postbackMethod": "none",
			"slaTimestamp": "2016-03-30T16:51:09.144Z",
			"status": "dataready",
			"printType": "digital",
			"colour": "black",
			"tags": [],
			"attributes": []
		},
		"logs": [{
			"resourceId": "56fc03fd6dead10e00730c7a",
			"resourceType": "order",
			"timestamp": "2016-03-30T16:51:09.221Z",
			"message": "Order created",
			"level": "info"
		},
		{
			"resourceId": "56fc03fd6dead10e00730c80",
			"resourceType": "file",
			"timestamp": "2016-03-30T16:51:09.259Z",
			"message": "Added file to order",
			"level": "info"
		}],
		"files": [{
			"_id": "56fc03fd6dead10e00730c80",
			"orderId": "56fc03fd6dead10e00730c7a",
			"componentId": "56fc03fd6dead10e00730c7c",
			"preflightProfile": "",
			"preflightImageRes": 300,
			"path": "business_cards.pdf",
			"fetchUrl": "https://Server/Path/business_cards.pdf",
			"currentVersionId": "56fc03fdcb77570e000000eb",
			"__v": 0,
			"versions": [{
				"_id": "56fc03fdcb77570e000000eb",
				"paths": {
					"fetchUrl": "https://Server/Path/business_cards.pdf",
					"localFilename": "business_cards.pdf",
					"thumbnailPath": "",
					"pageThumbnailPath": ""
				},
				"error": {
					"code": 0,
					"message": ""
				},
				"pages": [],
				"pageConfigs": [],
				"syncComplete": false,
				"status": "noreceived",
				"preflightReport": [],
				"pageCount": 0,
				"fileSize": 0,
				"revision": 1
			}],
			"currentRevision": 1,
			"pageRotation": 0,
			"barcodes": [],
			"localInfo": "",
			"localProgress": 0,
			"localStatus": "notreceived",
			"status": "notreceived",
			"pageCount": 0,
			"fileSize": 0,
			"proof": false,
			"preflightReport": [],
			"preflight": false,
			"fetch": true,
			"simplex": false,
			"infotechImpose": false,
			"infotechExternal": false,
			"infotechPadding": 1,
			"infotechCopies": 1,
			"infotech": false,
			"legacyWorkQueue": true,
			"errorCheck": true,
			"duplicate": 1,
			"localFile": false,
			"orderTime": "2016-03-30T16:51:09.238Z",
			"syncComplete": false,
			"syncRequired": false,
			"error": {
				"code": 0,
				"message": ""
			},
			"destination": {
				"id": "56f016d36dead10e0072f8bc",
				"name": "hp.partnertest"
			},
			"source": {
				"name": "hp.partnertest",
				"id": "56f016d36dead10e0072f8bc"
			},
			"type": "artwork",
			"created": "2016-03-30T16:51:09.238Z"
		}],
		"destination": {
			"id": "56f016d36dead10e0072f8bc",
			"name": "hp.partnertest"
		},
		"source": {
			"name": "hp.partnertest",
			"id": "56f016d36dead10e0072f8bc"
		}
	}
}

 

Get File Upload URLs

HTTP Method Endpoint Parameters
GET /api/file/getpreupload MIME Type of file to upload (i.e. application/pdf)
The "upload" URL is used to upload a local file to Amazon S3, the "fetch" URL is used in the order JSON during order submission.
{
    "upload": "https://s3-eu-west-1.amazonaws.com/live-oneflow-files/591378e1bba5ec12000a9db6/uploads/bcb491aa-46f6-e9c7-f107-bb522b8beb43?AWSAccessKeyId=AKIAIA47U7OWPTPNUOAQ&Expires=1508356048&Signature=5roik2WTSRgRh1R%2Fdtsw%2BPYWa2E%3D",
    "fetch": "https://live-oneflow-files.s3.amazonaws.com/591378e1bba5ec12000a9db6/uploads/bcb491aa-46f6-e9c7-f107-bb522b8beb43?AWSAccessKeyId=AKIAIA47U7OWPTPNUOAQ&Expires=1532116048&Signature=apEiQLlvybZnU1qdyRxK5%2FdC7vg%3D"
}

 

Get All Orders

HTTP Method Endpoint
GET /api/order

Example: https://printos.api.hp.com/siteflow/api/order?page=2&pagesize=20

Parameter Default Description
pagesize 10 (Optional) Size of the page size (number of orders) to return in the response.
page 1 (Optional) The page number to return in the response.
{
    "count": 2,
    "data": [
        {
            "_id": "5820c10e74ec2c110018b155",
            "destination": {
                "name": "hp.partnertest"
            },
            "orderData": {
                "colour": "black",
                "date": "2016-11-07T17:59:42.568Z",
                "items": [
                    {
                        "quantity": 1
                    }
                ],
                "reprintCount": 0,
                "shipments": [
                    {
                        "shipmentIndex": 0
                    }
                ],
                "sourceOrderId": "APN68M",
                "status": "error",
                "tags": []
            },
            "source": {
                "name": "hp.partnertest"
            }
        },
        {
            "_id": "5820c05bdfeb50130048d964",
            "destination": {
                "name": "hp.partnertest"
            },
            "orderData": {
                "colour": "black",
                "date": "2016-11-07T17:56:43.782Z",
                "items": [
                    {
                        "quantity": 1
                    }
                ],
                "reprintCount": 0,
                "shipments": [
                    {
                        "shipmentIndex": 0
                    }
                ],
                "sourceOrderId": "GBHXDE",
                "status": "error",
                "tags": []
            },
            "source": {
                "name": "hp.partnertest"
            }
        }
    ],
    "page": 1,
    "pages": -1,
    "success": true
}

 

Get an Order

HTTP Method Endpoint
GET /api/order/{orderId}

{orderId} - The order id needed is the first _id within the HTTP response after submitting an order (see response below or Submit Order response)

{
    "__v": 1,
    "_id": "5820ab1f053bc50f00f661f7",
    "createdAt": "2016-11-07T16:26:07.380Z",
    "destination": {
        "id": "57ad022fc3af860f00c7ed4e",
        "name": "hp.partnertest"
    },
    "files": [
        "5820ab1f053bc50f00f661fd"
    ],
    "logs": [
        {
            "level": "info",
            "message": "Order created",
            "resourceId": "5820ab1f053bc50f00f661f7",
            "resourceType": "order",
            "timestamp": "2016-11-07T16:26:07.386Z"
        },
        {
            "level": "info",
            "message": "Added file to order",
            "resourceId": "5820ab1f053bc50f00f661fd",
            "resourceType": "file",
            "timestamp": "2016-11-07T16:26:07.409Z"
        },
        {
            "level": "info",
            "message": "Sent order submitted event",
            "resourceId": "5820ab1f053bc50f00f661f7",
            "resourceType": "order",
            "timestamp": "2016-11-07T16:26:07.472Z"
        },
        {
            "level": "info",
            "message": "Sending legacy 'load'' postback",
            "resourceId": "5820ab1f053bc50f00f661f7",
            "resourceType": "order",
            "timestamp": "2016-11-07T16:26:07.481Z",
            "type": "load"
        },
        {
            "level": "info",
            "message": "Postback sent for order.create",
            "resourceId": "5820ab1f053bc50f00f661f7",
            "resourceType": "order",
            "timestamp": "2016-11-07T16:26:07.819Z",
            "type": "order.create"
        }
    ],
    "orderData": {
        "amount": 0,
        "attributes": [],
        "colour": "black",
        "consolidatedInvoice": false,
        "currency": "GBP",
        "date": "2016-11-07T16:26:07.366Z",
        "items": [
            {
                "_id": "5820ab1f053bc50f00f661f9",
                "attributes": [],
                "barcode": "B3001571AF",
                "binding": "none",
                "components": [
                    {
                        "_id": "5820ab1f053bc50f00f661fa",
                        "attributes": {
                            "cut": "To Trim",
                            "finish": "Lamination",
                            "folding": "Half/Single",
                            "orientation": "Landscape",
                            "pageSize": "Tabloid",
                            "substrate": "Coated",
                            "substrateWeight": "200 gsm"
                        },
                        "barcode": "B4001571B0",
                        "barcodes": [],
                        "code": "Content",
                        "colour": {
                            "side1": "4process",
                            "side2": "4process"
                        },
                        "duplicate": 1,
                        "errorCheck": true,
                        "fetch": true,
                        "fileId": "5820ab1f053bc50f00f661fd",
                        "finish": {
                            "side1": "none",
                            "side2": "none"
                        },
                        "height": 55,
                        "infotech": false,
                        "infotechCopies": 1,
                        "infotechExternal": false,
                        "infotechImpose": false,
                        "infotechPadding": 1,
                        "legacyWorkQueue": true,
                        "localFile": false,
                        "nup": 1,
                        "pages": 2,
                        "paperId": "57ad0231c3af860f00c7ed54",
                        "path": "",
                        "preflight": false,
                        "preflightImageRes": 300,
                        "preflightProfile": "",
                        "preflightProfileId": null,
                        "proof": false,
                        "reprintCount": 0,
                        "route": [],
                        "simplex": false,
                        "status": "live",
                        "type": "press",
                        "weight": "200",
                        "width": 90
                    }
                ],
                "dispatchAlert": "",
                "folding": "none",
                "printQuantity": 1,
                "productDescription": "Brochure",
                "quantity": 1,
                "reprintCount": 0,
                "scanned": 0,
                "shipmentIndex": 0,
                "sku": "Brochure",
                "sourceItemId": "IU2YP0",
                "status": "live",
                "totalPages": 2,
                "unitCost": 0.1,
                "unitPrice": 1,
                "unitWeight": 5
            }
        ],
        "messages": [],
        "postbackAddress": "http://postback.genesis.com",
        "postbackMethod": "none",
        "printType": "digital",
        "publicUploads": false,
        "reprint": false,
        "reprintCount": 0,
        "shipments": [
            {
                "_id": "5820ab1f053bc50f00f661f8",
                "agentJobs": [],
                "attachments": [],
                "canShipEarly": true,
                "carrier": {
                    "code": "customer",
                    "service": "shipping",
                    "serviceId": "57ad0231c3af860f00c7ee0d"
                },
                "componentIds": [],
                "expectedQuantity": 0,
                "itemIds": [],
                "items": [],
                "jobIds": [],
                "labelName": "default",
                "labelNotRequired": false,
                "manuallyPacked": false,
                "packages": [],
                "partial": false,
                "printJobs": [],
                "pspBranding": true,
                "scannedQuantity": 0,
                "shipTo": {
                    "address1": "5th Avenue",
                    "email": "johnd@acme.com",
                    "isoCountry": "US",
                    "name": "John Doe",
                    "phone": "01234567890",
                    "postcode": "12345",
                    "state": "New York",
                    "town": "New York"
                },
                "shipmentIndex": 0,
                "singleItem": false,
                "status": "live",
                "stockItems": [],
                "trackingRequired": false
            }
        ],
        "slaTimestamp": "2016-11-07T16:26:07.366Z",
        "sourceOrderId": "HJRZW2",
        "status": "printready",
        "stockItems": [],
        "tags": []
    },
    "source": {
        "id": "57ad022fc3af860f00c7ed4e",
        "name": "hp.partnertest"
    },
    "updatedAt": "2016-11-07T16:26:07.820Z"
}

 

Cancel Order

HTTP Method Endpoint
PUT  /api/order/{sourceAccount}/{sourceOrderId}/cancel

{sourceAccount} - source.name of HTTP Response shown below (towards the end).

{sourceOrderId} -  user generated sourceOrderId, see HTTP Response below (towards the end).

{
    "__v": 1,
    "_id": "5820ab1f053bc50f00f661f7",
    "createdAt": "2016-11-07T16:26:07.380Z",
    "destination": {
        "id": "57ad022fc3af860f00c7ed4e",
        "name": "hp.partnertest"
    },
    "files": [
        "5820ab1f053bc50f00f661fd"
    ],
    "logs": [
        {
            "level": "info",
            "message": "Order created",
            "resourceId": "5820ab1f053bc50f00f661f7",
            "resourceType": "order",
            "timestamp": "2016-11-07T16:26:07.386Z"
        },
        {
            "level": "info",
            "message": "Added file to order",
            "resourceId": "5820ab1f053bc50f00f661fd",
            "resourceType": "file",
            "timestamp": "2016-11-07T16:26:07.409Z"
        },
        {
            "level": "info",
            "message": "Sent order submitted event",
            "resourceId": "5820ab1f053bc50f00f661f7",
            "resourceType": "order",
            "timestamp": "2016-11-07T16:26:07.472Z"
        },
        {
            "level": "info",
            "message": "Sending legacy 'load'' postback",
            "resourceId": "5820ab1f053bc50f00f661f7",
            "resourceType": "order",
            "timestamp": "2016-11-07T16:26:07.481Z",
            "type": "load"
        },
        {
            "level": "info",
            "message": "Postback sent for order.create",
            "resourceId": "5820ab1f053bc50f00f661f7",
            "resourceType": "order",
            "timestamp": "2016-11-07T16:26:07.819Z",
            "type": "order.create"
        },
        {
            "level": "info",
            "message": "Order cancelled by oneflow.hmac",
            "resourceId": "5820ab1f053bc50f00f661f7",
            "resourceType": "order",
            "timestamp": "2016-11-12T00:01:23.442Z"
        }
    ],
    "orderData": {
        "amount": 0,
        "attributes": [],
        "cancelledDate": "2016-11-12T00:01:23.442Z",
        "colour": "black",
        "consolidatedInvoice": false,
        "currency": "GBP",
        "date": "2016-11-07T16:26:07.366Z",
        "items": [
            {
                "_id": "5820ab1f053bc50f00f661f9",
                "attributes": [],
                "barcode": "B3001571AF",
                "binding": "none",
                "components": [
                    {
                        "_id": "5820ab1f053bc50f00f661fa",
                        "attributes": {
                            "cut": "To Trim",
                            "finish": "Lamination",
                            "folding": "Half/Single",
                            "orientation": "Landscape",
                            "pageSize": "Tabloid",
                            "substrate": "Coated",
                            "substrateWeight": "200 gsm"
                        },
                        "barcode": "B4001571B0",
                        "barcodes": [],
                        "code": "Content",
                        "colour": {
                            "side1": "4process",
                            "side2": "4process"
                        },
                        "duplicate": 1,
                        "errorCheck": true,
                        "fetch": true,
                        "fileId": "5820ab1f053bc50f00f661fd",
                        "finish": {
                            "side1": "none",
                            "side2": "none"
                        },
                        "height": 55,
                        "infotech": false,
                        "infotechCopies": 1,
                        "infotechExternal": false,
                        "infotechImpose": false,
                        "infotechPadding": 1,
                        "legacyWorkQueue": true,
                        "localFile": false,
                        "nup": 1,
                        "pages": 2,
                        "paperId": "57ad0231c3af860f00c7ed54",
                        "path": "",
                        "preflight": false,
                        "preflightImageRes": 300,
                        "preflightProfile": "",
                        "preflightProfileId": null,
                        "proof": false,
                        "reprintCount": 0,
                        "route": [],
                        "simplex": false,
                        "status": "live",
                        "type": "press",
                        "weight": "200",
                        "width": 90
                    }
                ],
                "dispatchAlert": "",
                "folding": "none",
                "printQuantity": 1,
                "productDescription": "Brochure",
                "quantity": 1,
                "reprintCount": 0,
                "scanned": 0,
                "shipmentIndex": 0,
                "sku": "Brochure",
                "sourceItemId": "IU2YP0",
                "status": "live",
                "totalPages": 2,
                "unitCost": 0.1,
                "unitPrice": 1,
                "unitWeight": 5
            }
        ],
        "messages": [],
        "postbackAddress": "http://postback.genesis.com",
        "postbackMethod": "none",
        "printType": "digital",
        "publicUploads": false,
        "reprint": false,
        "reprintCount": 0,
        "shipments": [
            {
                "_id": "5820ab1f053bc50f00f661f8",
                "agentJobs": [],
                "attachments": [],
                "canShipEarly": true,
                "carrier": {
                    "code": "customer",
                    "service": "shipping",
                    "serviceId": "57ad0231c3af860f00c7ee0d"
                },
                "componentIds": [],
                "expectedQuantity": 0,
                "itemIds": [],
                "items": [],
                "jobIds": [],
                "labelName": "default",
                "labelNotRequired": false,
                "manuallyPacked": false,
                "packages": [],
                "partial": false,
                "printJobs": [],
                "pspBranding": true,
                "scannedQuantity": 0,
                "shipTo": {
                    "address1": "5th Avenue",
                    "email": "johnd@acme.com",
                    "isoCountry": "US",
                    "name": "John Doe",
                    "phone": "01234567890",
                    "postcode": "12345",
                    "state": "New York",
                    "town": "New York"
                },
                "shipmentIndex": 0,
                "singleItem": false,
                "status": "live",
                "stockItems": [],
                "trackingRequired": false
            }
        ],
        "slaTimestamp": "2016-11-07T16:26:07.366Z",
        "sourceOrderId": "HJRZW2",
        "status": "cancelled",
        "stockItems": [],
        "tags": []
    },
    "source": {
        "id": "57ad022fc3af860f00c7ed4e",
        "name": "hp.partnertest"
    },
    "updatedAt": "2016-11-12T00:01:23.442Z"
}

 

Get Products

HTTP Method Endpoint
GET /api/product
This response shows two Products ("Banner" and "Book"), the "Book" product has two components. The Product components.code value(s) are used in the orderData.items.components.code field(s) in the order JSON during submission.
{
    "success": true,
    "data": [
        {
            "_id": "591378e3bba5ec12000a9e3d",
            "updatedAt": "2017-05-10T20:32:36.180Z",
            "createdAt": "2017-05-10T20:32:36.180Z",
            "__v": 0,
            "accountId": "591378e1bba5ec12000a9db6",
            "binding": "none",
            "description": "Banner",
            "folding": "none",
            "minManufactureTime": 0,
            "productCode": "Banner",
            "unitWeight": 5,
            "components": [
                {
                    "preflightProfileId": null,
                    "code": "Content",
                    "width": 90,
                    "height": 55,
                    "paperId": "591378e3bba5ec12000a9dbc",
                    "attributes": {
                        "pageSize": {
                            "name": "pageSize",
                            "batchable": true,
                            "container": "all",
                            "type": "select",
                            "active": true,
                            "default": "800 x 2000 mm",
                            "show": true,
                            "showAll": true,
                            "allowedValues": {
                                "Letter / A4": true,
                                "Tabloid / A3": true,
                                "Cover - 200 x 290mm": true,
                                "Text - 200x140mm": true,
                                "200 x 145mm": true,
                                "100x70mm": true,
                                "150 x 100": true,
                                "185 x 50": true,
                                "250 x 230": true,
                                "100x70": true,
                                "800X2000mm": true,
                                "3,2X2,2m": true,
                                "120x160": true,
                                "21 in wide x 16-5 ft long": true,
                                "60X40 (and others)": true,
                                "custom size": true,
                                "800 x 2000 mm": true,
                                "Other": true
                            }
                        },
                        "orientation": {
                            "name": "orientation",
                            "batchable": true,
                            "container": "all",
                            "type": "select",
                            "active": true,
                            "default": "Portrait",
                            "show": true,
                            "showAll": true,
                            "allowedValues": {
                                "Landscape": true,
                                "Portrait": true,
                                "Either": true
                            },
                            "externalDisplay": true
                        },
                        "substrate": {
                            "name": "substrate",
                            "batchable": true,
                            "container": "all",
                            "type": "select",
                            "active": true,
                            "default": "Coated",
                            "show": true,
                            "showAll": true,
                            "allowedValues": {
                                "Coated": true,
                                "Pressure sensative label stock": true,
                                "Corrugated cardboard": true,
                                "Non-woven": true,
                                "Self Adhesive": true,
                                "Paper": true,
                                "Polypropylene, paper, polyethilene": true,
                                "Styrene, paper": true,
                                "honey comb, gator board": true,
                                "Other": true,
                                "Uncoated": true
                            },
                            "externalDisplay": true
                        },
                        "substrateWeight": {
                            "name": "substrateWeight",
                            "batchable": true,
                            "container": "all",
                            "type": "select",
                            "active": true,
                            "default": "400 gsm",
                            "show": true,
                            "showAll": true,
                            "allowedValues": {
                                "300 gsm": true,
                                "200 gsm": true,
                                "150 gsm": true,
                                "100 gsm": true,
                                "E-flute corrugated": true,
                                "400 gsm": true,
                                "500 gsm": true,
                                "EB-flute corrugated , E-flute, B-flute": true,
                                "340 gsm": true,
                                "350 gsm": true
                            }
                        },
                        "finish": {
                            "name": "finish",
                            "batchable": true,
                            "container": "all",
                            "type": "select",
                            "active": true,
                            "default": "Lamination",
                            "show": true,
                            "showAll": true,
                            "allowedValues": {
                                "None": true,
                                "Lamination": true,
                                "Varnish": true,
                                "UV Coating": true
                            },
                            "externalDisplay": true
                        },
                        "cut": {
                            "name": "cut",
                            "batchable": true,
                            "container": "all",
                            "type": "select",
                            "active": true,
                            "default": "To Trim",
                            "show": true,
                            "showAll": true,
                            "allowedValues": {
                                "To Trim": true,
                                "Other": true
                            }
                        }
                    },
                    "_id": "5601a2909258680d00a74e84",
                    "preflightProfile": null,
                    "preflight": false,
                    "barcodes": [],
                    "alternateImpositionIds": [],
                    "route": [
                        {
                            "code": 100,
                            "name": "Print",
                            "description": "Print the item",
                            "phase": "print",
                            "eventTypeId": "591378e3bba5ec12000a9dc4",
                            "step": 1,
                            "_id": "5601a2909258680d00a74e86",
                            "batchSync": false
                        },
                        {
                            "code": 500,
                            "name": "Laminate",
                            "description": "Laminating",
                            "phase": "production",
                            "_id": "5601bce89258680d00a74f23",
                            "step": 2,
                            "eventTypeId": "591378e3bba5ec12000a9dc8",
                            "batchSync": false
                        },
                        {
                            "_id": "5601a28f9258680d00a74d8a",
                            "code": 400,
                            "description": "Cutting",
                            "name": "Cut",
                            "phase": "production",
                            "step": 3,
                            "eventTypeId": "591378e3bba5ec12000a9dc7",
                            "batchSync": false
                        }
                    ],
                    "colour": {
                        "side2": "4process",
                        "side1": "4process"
                    },
                    "finish": {
                        "side2": "none",
                        "side1": "none"
                    },
                    "simplex": false,
                    "infotechImpose": false,
                    "infotechExternal": false,
                    "infotechPadding": 1,
                    "infotechCopies": 1,
                    "infotech": false,
                    "legacyWorkQueue": true,
                    "errorCheck": true,
                    "ticketTemplate": "4colors",
                    "blockSize": 1000,
                    "duplicate": 1,
                    "pages": 2,
                    "weight": "200",
                    "type": "press"
                }
            ],
            "type": "catalog",
            "images": [
                "https://s3-eu-west-1.amazonaws.com/oneflow-public/product-images/banner.png"
            ],
            "bulkQuantity": false,
            "tags": [],
            "shrinkWrap": false,
            "imposedInternally": false,
            "baseProduct": false,
            "active": true
        },
        {
            "_id": "591378e3bba5ec12000a9e41",
            "updatedAt": "2017-05-10T20:32:36.188Z",
            "createdAt": "2017-05-10T20:32:36.188Z",
            "__v": 0,
            "accountId": "591378e1bba5ec12000a9db6",
            "binding": "none",
            "description": "Book",
            "folding": "none",
            "icon": "fa-book",
            "minManufactureTime": 0,
            "productCode": "Book",
            "unitWeight": 5,
            "components": [
                {
                    "preflightProfileId": null,
                    "code": "cover",
                    "width": 90,
                    "height": 55,
                    "paperId": "591378e3bba5ec12000a9dbc",
                    "attributes": {
                        "pageSize": {
                            "name": "pageSize",
                            "batchable": true,
                            "container": "all",
                            "type": "select",
                            "active": true,
                            "default": "200 x 290 mm",
                            "show": true,
                            "showAll": true,
                            "allowedValues": {
                                "50 x 90 mm": true,
                                "100 x 150 mm": true,
                                "Letter / A4": true,
                                "Tabloid / A3": true,
                                "Cover - 200 x 290mm": true,
                                "Text - 200x140mm": true,
                                "200 x 145mm": true,
                                "100x70mm": true,
                                "9 x 12 inch": true,
                                "150 x 100": true,
                                "185 x 50": true,
                                "250 x 230": true,
                                "100x70": true,
                                "800X2000mm": true,
                                "3,2X2,2m": true,
                                "120x160": true,
                                "21 in wide x 16-5 ft long": true,
                                "60X40 (and others)": true,
                                "custom size": true,
                                "200 x 290 mm": true,
                                "Other": true
                            },
                            "externalDisplay": true
                        },
                        "orientation": {
                            "name": "orientation",
                            "batchable": true,
                            "container": "all",
                            "type": "select",
                            "active": true,
                            "default": "Landscape",
                            "show": true,
                            "showAll": true,
                            "allowedValues": {
                                "Landscape": true,
                                "Portrait": true,
                                "Either": true,
                                "Not Specified": true
                            },
                            "externalDisplay": true
                        },
                        "substrate": {
                            "name": "substrate",
                            "batchable": true,
                            "container": "all",
                            "type": "select",
                            "active": true,
                            "default": "Coated",
                            "show": true,
                            "showAll": true,
                            "allowedValues": {
                                "Coated": true,
                                "Uncoated": true,
                                "Pressure sensative label stock": true,
                                "Corrugated cardboard": true,
                                "Non-woven": true,
                                "Self Adhesive": true,
                                "Paper": true,
                                "Polypropylene, paper, polyethilene": true,
                                "Styrene, paper": true,
                                "honey comb, gator board": true,
                                "Other": true
                            },
                            "externalDisplay": true
                        },
                        "substrateWeight": {
                            "name": "substrateWeight",
                            "batchable": true,
                            "container": "all",
                            "type": "select",
                            "active": true,
                            "default": "300 gsm",
                            "show": true,
                            "showAll": true,
                            "allowedValues": {
                                "300 gsm": true,
                                "200 gsm": true,
                                "150 gsm": true,
                                "100 gsm": true,
                                "E-flute corrugated": true,
                                "400 gsm": true,
                                "500 gsm": true,
                                "EB-flute corrugated , E-flute, B-flute": true,
                                "340 gsm": true,
                                "350 gsm": true
                            },
                            "externalDisplay": true
                        },
                        "finish": {
                            "name": "finish",
                            "batchable": true,
                            "container": "all",
                            "type": "select",
                            "active": true,
                            "default": "Lamination",
                            "show": true,
                            "showAll": true,
                            "allowedValues": {
                                "None": true,
                                "Lamination": true,
                                "Varnish + hot foil stamp": true,
                                "Varnish": true,
                                "UV Coating": true,
                                "Other": true
                            },
                            "externalDisplay": true
                        },
                        "cut": {
                            "name": "cut",
                            "batchable": true,
                            "container": "all",
                            "type": "select",
                            "active": true,
                            "default": "To Trim",
                            "show": true,
                            "showAll": true,
                            "allowedValues": {
                                "To Trim": true,
                                "XY cut": true,
                                "Die Cut": true
                            }
                        },
                        "binding": {
                            "name": "binding",
                            "batchable": true,
                            "container": "all",
                            "type": "select",
                            "active": true,
                            "default": "Perfect",
                            "show": true,
                            "showAll": true,
                            "allowedValues": {
                                "None": true,
                                "Perfect Bound": true,
                                "Coil": true,
                                "Comb": true,
                                "Perfect": true,
                                "Saddle-Stitch": true,
                                "Other": true
                            },
                            "externalDisplay": true
                        }
                    },
                    "_id": "5601a2909258680d00a74e57",
                    "preflightProfile": null,
                    "preflight": false,
                    "barcodes": [],
                    "alternateImpositionIds": [],
                    "route": [
                        {
                            "code": 100,
                            "name": "Print",
                            "description": "Print",
                            "phase": "print",
                            "_id": "5601a28f9258680d00a74d88",
                            "step": 1,
                            "eventTypeId": "591378e3bba5ec12000a9dc4",
                            "batchSync": false
                        },
                        {
                            "code": 500,
                            "name": "Laminate",
                            "description": "Laminating",
                            "phase": "production",
                            "_id": "5601bce89258680d00a74f23",
                            "step": 2,
                            "eventTypeId": "591378e3bba5ec12000a9dc8",
                            "batchSync": false
                        },
                        {
                            "code": 600,
                            "name": "Bind",
                            "description": "Binding",
                            "phase": "production",
                            "_id": "5601bd089258680d00a74f24",
                            "step": 3,
                            "eventTypeId": "591378e3bba5ec12000a9dc9",
                            "batchSync": false
                        },
                        {
                            "_id": "5601a28f9258680d00a74d8a",
                            "code": 400,
                            "description": "Cutting",
                            "name": "Cut",
                            "phase": "production",
                            "step": 4,
                            "eventTypeId": "591378e3bba5ec12000a9dc7",
                            "batchSync": false
                        }
                    ],
                    "colour": {
                        "side2": "4process",
                        "side1": "4process"
                    },
                    "finish": {
                        "side2": "none",
                        "side1": "none"
                    },
                    "simplex": true,
                    "infotechImpose": false,
                    "infotechExternal": false,
                    "infotechPadding": 0,
                    "infotechCopies": 1,
                    "infotech": false,
                    "legacyWorkQueue": true,
                    "errorCheck": true,
                    "ticketTemplate": "4colors",
                    "blockSize": 1000,
                    "duplicate": 1,
                    "pages": 2,
                    "weight": "200",
                    "type": "press"
                },
                {
                    "preflightProfileId": null,
                    "code": "content",
                    "width": 90,
                    "height": 55,
                    "paperId": "591378e3bba5ec12000a9dbc",
                    "attributes": {
                        "pageSize": {
                            "name": "pageSize",
                            "batchable": true,
                            "container": "all",
                            "type": "select",
                            "active": true,
                            "default": "200 x 140 mm",
                            "show": true,
                            "showAll": true,
                            "allowedValues": {
                                "50 x 90 mm": true,
                                "100 x 150 mm": true,
                                "Letter / A4": true,
                                "Tabloid / A3": true,
                                "Cover - 200 x 290mm": true,
                                "Text - 200x140mm": true,
                                "200 x 145mm": true,
                                "100x70mm": true,
                                "9 x 12 inch": true,
                                "150 x 100": true,
                                "185 x 50": true,
                                "250 x 230": true,
                                "100x70": true,
                                "800X2000mm": true,
                                "3,2X2,2m": true,
                                "120x160": true,
                                "21 in wide x 16-5 ft long": true,
                                "60X40 (and others)": true,
                                "custom size": true,
                                "200 x 140 mm": true,
                                "Other": true
                            },
                            "externalDisplay": true
                        },
                        "orientation": {
                            "name": "orientation",
                            "batchable": true,
                            "container": "all",
                            "type": "select",
                            "active": true,
                            "default": "Portrait",
                            "show": true,
                            "showAll": true,
                            "allowedValues": {
                                "Landscape": true,
                                "Portrait": true,
                                "Either": true,
                                "Not Specified": true
                            },
                            "externalDisplay": true
                        },
                        "substrate": {
                            "name": "substrate",
                            "batchable": true,
                            "container": "all",
                            "type": "select",
                            "active": true,
                            "default": "Uncoated",
                            "show": true,
                            "showAll": true,
                            "allowedValues": {
                                "Coated": true,
                                "Uncoated": true,
                                "Pressure sensative label stock": true,
                                "Corrugated cardboard": true,
                                "Non-woven": true,
                                "Self Adhesive": true,
                                "Paper": true,
                                "Polypropylene, paper, polyethilene": true,
                                "Styrene, paper": true,
                                "honey comb, gator board": true,
                                "Other": true
                            },
                            "externalDisplay": true
                        },
                        "substrateWeight": {
                            "name": "substrateWeight",
                            "batchable": true,
                            "container": "all",
                            "type": "select",
                            "active": true,
                            "default": "100 gsm",
                            "show": true,
                            "showAll": true,
                            "allowedValues": {
                                "300 gsm": true,
                                "200 gsm": true,
                                "150 gsm": true,
                                "100 gsm": true,
                                "E-flute corrugated": true,
                                "400 gsm": true,
                                "500 gsm": true,
                                "EB-flute corrugated , E-flute, B-flute": true,
                                "340 gsm": true,
                                "350 gsm": true
                            },
                            "externalDisplay": true
                        },
                        "cut": {
                            "name": "cut",
                            "batchable": true,
                            "container": "all",
                            "type": "select",
                            "active": true,
                            "default": "To Trim",
                            "show": true,
                            "showAll": true,
                            "allowedValues": {
                                "To Trim": true,
                                "XY cut": true,
                                "Die Cut": true,
                                "Other": true
                            },
                            "externalDisplay": false
                        }
                    },
                    "_id": "5601a2909258680d00a74e54",
                    "preflightProfile": null,
                    "preflight": false,
                    "barcodes": [],
                    "alternateImpositionIds": [],
                    "route": [
                        {
                            "code": 100,
                            "name": "Print",
                            "description": "Print",
                            "phase": "print",
                            "_id": "5601a28f9258680d00a74d88",
                            "step": 1,
                            "eventTypeId": "591378e3bba5ec12000a9dc4",
                            "batchSync": false
                        },
                        {
                            "_id": "5601a28f9258680d00a74d8a",
                            "code": 400,
                            "description": "Cutting",
                            "name": "Cut",
                            "phase": "production",
                            "step": 2,
                            "eventTypeId": "591378e3bba5ec12000a9dc7",
                            "batchSync": false
                        },
                        {
                            "eventTypeId": "591378e3bba5ec12000a9dc9",
                            "name": "Bind",
                            "description": "Binding",
                            "phase": "production",
                            "code": 600,
                            "step": 3,
                            "_id": "560bf7d5dcce18130082e08a",
                            "batchSync": false
                        }
                    ],
                    "colour": {
                        "side2": "4process",
                        "side1": "4process"
                    },
                    "finish": {
                        "side2": "none",
                        "side1": "none"
                    },
                    "simplex": false,
                    "infotechImpose": false,
                    "infotechExternal": false,
                    "infotechPadding": 1,
                    "infotechCopies": 1,
                    "infotech": false,
                    "legacyWorkQueue": true,
                    "errorCheck": true,
                    "ticketTemplate": "4colors",
                    "blockSize": 1000,
                    "duplicate": 1,
                    "pages": 2,
                    "weight": "200",
                    "type": "press"
                }
            ],
            "type": "catalog",
            "images": [
                "https://s3-eu-west-1.amazonaws.com/oneflow-public/product-images/book.png"
            ],
            "bulkQuantity": false,
            "tags": [],
            "shrinkWrap": false,
            "imposedInternally": false,
            "baseProduct": false,
            "active": true
        }
    ],
    "page": 1,
    "pages": -1,
    "count": 2
}

 

Get SKUs

HTTP Method Endpoint
GET /api/sku
The SKU "code" value is used in the orderData.Items.sku field in the order JSON during submission
{
    "success": true,
    "data": [
        {
            "_id": "591378e3bba5ec12000a9e3c",
            "updatedAt": "2017-05-10T20:32:36.281Z",
            "createdAt": "2017-05-10T20:32:36.281Z",
            "accountId": "591378e1bba5ec12000a9db6",
            "code": "Backlit",
            "description": "Backlit Poster",
            "productId": "591378e3bba5ec12000a9e3b",
            "__v": 0,
            "maxItems": 1,
            "labelNotRequired": false,
            "arrivalCutOffTime": 13,
            "productionStartMethod": "nextworkingday",
            "productionCutOffTime": 1,
            "active": true,
            "unitPrice": 1,
            "unitCost": 0.1,
            "minSLA": 0,
            "SLADuration": 1
        },
        {
            "_id": "591378e3bba5ec12000a9e42",
            "updatedAt": "2017-05-10T20:32:36.284Z",
            "createdAt": "2017-05-10T20:32:36.284Z",
            "accountId": "591378e1bba5ec12000a9db6",
            "code": "Book",
            "description": "Book",
            "productId": "591378e3bba5ec12000a9e41",
            "__v": 0,
            "maxItems": 1,
            "labelNotRequired": false,
            "arrivalCutOffTime": 13,
            "productionStartMethod": "nextworkingday",
            "productionCutOffTime": 1,
            "active": true,
            "unitPrice": 1,
            "unitCost": 0.1,
            "minSLA": 0,
            "SLADuration": 1
        }
    ],
    "page": 1,
    "pages": -1,
    "count": 2
}