Skip to content

Instantly share code, notes, and snippets.

@ericz
Created August 12, 2014 18:08
Show Gist options
  • Save ericz/9d3c36b14f0bb63a91ef to your computer and use it in GitHub Desktop.
Save ericz/9d3c36b14f0bb63a91ef to your computer and use it in GitHub Desktop.
Failure output of order API
{
"statusCode": 400,
"issues": [
"No value for required field 'design[type]'.",
"No value for required field 'design[sides][0][name]'.",
"No value for required field 'design[sides][0][artwork]'.",
"No value for required field 'address[address]'.",
"No value for required field 'address[city]'.",
"No value for required field 'address[state]'.",
"No value for required field 'address[zip]'."
],
"schema": {
"design": {
"type": {
"type": "String",
"description": "The type of product this design is for. 'screenprint', 'dtg', 'case', or 'mug'.",
"required": true
},
"sides": [
{
"name": {
"type": "String",
"description": "The name of this side. For garments sides can include 'front', 'back', 'left', 'right'. For cases and mugs, only 'front' is supported.",
"required": true
},
"artwork": {
"type": "String | File",
"description": "The artwork file or url to the file for this side of the design.",
"required": true
},
"proof": {
"type": "String | File",
"description": "An image showing placement of artwork on the product, used by our artists to make sure the print dimensions and placement are as intended."
},
"colors": [
{
"type": "String",
"description": "(Required) Screenprint only. A list of named colors or PMS colors used in design. See http:\/\/####."
}
],
"dimensions": {
"width": {
"type": "Number",
"description": "(Optional) Screenprint only. Width in inches of the print on the garment. Specify this OR the height of the print. See http:\/\/###."
},
"height": {
"type": "Number",
"description": "(Optional) Screenprint only. Height in inches of the print on the garment. Specify this OR the width of the print. See http:\/\/###."
}
},
"placement": {
"type": "String",
"description": "(Optional) Screenprint only. The location of the print on the garment. Defaults to center. See http:\/\/###."
}
}
]
},
"products": [
{
"id": {
"type": "String",
"description": "The id of the product wish to order. Retrieved from the Products API. This product must be compatible with the design provided.",
"required": true
},
"color": {
"type": "String",
"description": "The color of the product, if it has multiple colors. See the Products API for available colors."
},
"size": {
"type": "String",
"description": "The size of the product, if it has multiple sizes. See the Products API for available sizes."
},
"quantity": {
"type": "Number",
"description": "How many of this product\/color\/size to order. Defaults to 1."
}
}
],
"address": {
"name": {
"type": "String",
"description": "Recipient name"
},
"company": {
"type": "String",
"description": "Company name"
},
"address": {
"type": "String",
"description": "Street address",
"required": true
},
"address2": {
"type": "String",
"description": "Address (2nd line)"
},
"city": {
"type": "String",
"description": "City",
"required": true
},
"state": {
"type": "String",
"description": "State of province",
"required": true
},
"zip": {
"type": "String",
"description": "Zip or postal code",
"required": true
},
"country": {
"type": "String",
"description": "ISO 3166 country code. Defaults to US."
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment