Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ryanmarshall/959e30ee011cde478d0273e61b2285f8 to your computer and use it in GitHub Desktop.
Save ryanmarshall/959e30ee011cde478d0273e61b2285f8 to your computer and use it in GitHub Desktop.
Error Response
{
"statusCode" => 400,
"issues" => [
[ 0] {
"code" => "invalid_type",
"path" => "items[0][type]",
"message" => "String value required",
"spec" => {
"type" => "String",
"description" => "The type of product this design is for",
"enum" => [
[ 0] "screenprint",
[ 1] "dtg",
[ 2] "case",
[ 3] "mug",
[ 4] "poster",
[ 5] "embr",
[ 6] "sublimation-3pf-fleece-blankets-coral-30-40",
[ 7] "sublimation-3pf-fleece-blankets-coral-50-60",
[ 8] "sublimation-3pf-fleece-blankets-coral-60-80",
[ 9] "sublimation-3pf-fleece-blankets-sherpa-50-60",
[10] "sublimation-3pf-fleece-blankets-sherpa-60-80",
[11] "sublimation-3pf-pillow-16-16",
[12] "sublimation-3pf-pillow-18-18",
[13] "sublimation-3pf-all-over-totes",
[14] "sublimation-3pf-accessory-black-zipper-125-85",
[15] "sublimation-3pf-accessory-black-zipper-85-6",
[16] "sublimation-3pf-weekender-tote",
[17] "sublimation-3pf-wall-tapestries-26-36",
[18] "sublimation-3pf-wall-tapestries-51-60",
[19] "sublimation-3pf-wall-tapestries-68-80",
[20] "sublimation-3pf-wall-tapestries-88-104",
[21] "sublimation-3pf-comforters-104-88",
[22] "sublimation-3pf-comforters-88-88",
[23] "sublimation-3pf-comforters-68-92",
[24] "sublimation-3pf-comforters-68-88",
[25] "sublimation-3pf-shower-curtain",
[26] "sublimation-3pf-rugs-3-2",
[27] "sublimation-3pf-rugs-6-4",
[28] "sublimation-3pf-duvet-covers-104-88",
[29] "sublimation-3pf-duvet-covers-88-88",
[30] "sublimation-3pf-duvet-covers-68-88",
[31] "sublimation-3pf-duvet-covers-68-92",
[32] "sublimation-3pf-pillow-shams-microfiber-30-22",
[33] "sublimation-3pf-pillow-shams-microfiber-38-22",
[34] "sublimation-3pf-window-curtains-50-84-blackout",
[35] "sublimation-3pf-window-curtains-50-84-sheer",
[36] "sublimation-3pf-bath-mats-24-17",
[37] "sublimation-3pf-bath-mats-34-21",
[38] "sublimation-3pf-bath-towel",
[39] "sublimation-3pf-beach-towel",
[40] "sublimation-3pf-placemats",
[41] "sublimation-3pf-runners-16-72",
[42] "sublimation-3pf-runners-16-90",
[43] "sublimation-3pf-tea-towels",
[44] "sublimation-3pf-apron",
[45] "sublimation-3pf-pet-beds-28-18",
[46] "sublimation-3pf-pet-beds-40-30",
[47] "sublimation-3pf-pet-beds-50-40",
[48] "sublimation-3pf-quilt-blanket-40x50",
[49] "sublimation-3pf-quilt-blanket-50x60",
[50] "sublimation-3pf-quilt-blanket-60x70",
[51] "sublimation-3pf-quilt-blanket-70x80",
[52] "sublimation-3pf-men-low-top-shoes-black",
[53] "sublimation-3pf-men-low-top-shoes-white",
[54] "sublimation-3pf-women-low-top-shoes-black",
[55] "sublimation-3pf-women-low-top-shoes-white",
[56] "sublimation-3pf-men-high-top-shoes-black",
[57] "sublimation-3pf-men-high-top-shoes-white",
[58] "sublimation-3pf-women-high-top-shoes-black",
[59] "sublimation-3pf-women-high-top-shoes-white",
[60] "sublimation-3pf-men-hoodie",
[61] "sublimation-3pf-women-hoodie",
[62] "sublimation-3pf-men-zip-hoodie",
[63] "sublimation-3pf-women-zip-hoodie",
[64] "case",
[65] "mug",
[66] "sublimation-bracelet-circle",
[67] "sublimation-coaster-circle",
[68] "sublimation-coaster-square",
[69] "sublimation-cutting-board-cheese",
[70] "sublimation-cutting-board-circle",
[71] "sublimation-cutting-board-rectangle",
[72] "sublimation-dress",
[73] "sublimation-earring-circle",
[74] "sublimation-earring-teardrop",
[75] "sublimation-magnet-circle",
[76] "sublimation-magnet-square",
[77] "sublimation-metal-print",
[78] "sublimation-mousepad",
[79] "sublimation-necklace-circle",
[80] "sublimation-necklace-diamond",
[81] "sublimation-necklace-heart",
[82] "sublimation-necklace-rectangle",
[83] "sublimation-necklace-triangle",
[84] "sublimation-pillowcase-rectangle",
[85] "sublimation-pillowcase-square",
[86] "sublimation-sandals",
[87] "sublimation-scarf",
[88] "sublimation-shirt",
[89] "sublimation-sock-long",
[90] "sublimation-sock-medium",
[91] "sublimation-sock-short",
[92] "sublimation-tank",
[93] "sublimation-tie",
[94] "sublimation-tote",
[95] "sublimation-towel-beach",
[96] "sublimation-towel-hand"
],
"required" => true
}
},
[ 1] {
"code" => "invalid_type",
"path" => "items[0][designId]",
"message" => "String value required",
"spec" => {
"type" => "String",
"description" => "The id of the design to use for this order. This must be compatible with the products being ordered"
}
},
[ 2] {
"code" => "invalid_type",
"path" => "items[0][products][0][id]",
"message" => "String value required",
"spec" => {
"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
}
},
[ 3] {
"code" => "invalid_type",
"path" => "items[0][products][0][color]",
"message" => "String value required",
"spec" => {
"type" => "String",
"description" => "The color of the product, if it has multiple colors. See the Products API for available colors",
"required" => true
}
},
[ 4] {
"code" => "invalid_type",
"path" => "items[0][products][0][size]",
"message" => "String value required",
"spec" => {
"type" => "String",
"description" => "The size of the product, if it has multiple sizes. See the Products API for available sizes"
}
},
[ 5] {
"code" => "invalid_type",
"path" => "items[0][products][0][quantity]",
"message" => "Number value required",
"spec" => {
"type" => "Number",
"description" => "How many of this product/color/size to order",
"required" => true
}
},
[ 6] {
"code" => "invalid_type",
"path" => "items[0][address][name]",
"message" => "String value required",
"spec" => {
"type" => "String",
"description" => "Recipient name"
}
},
[ 7] {
"code" => "invalid_type",
"path" => "items[0][address][address1]",
"message" => "String value required",
"spec" => {
"type" => "String",
"description" => "Street address"
}
},
[ 8] {
"code" => "invalid_type",
"path" => "items[0][address][city]",
"message" => "String value required",
"spec" => {
"type" => "String",
"description" => "City"
}
},
[ 9] {
"code" => "invalid_type",
"path" => "items[0][address][state]",
"message" => "String value required",
"spec" => {
"type" => "String",
"description" => "State of province"
}
},
[10] {
"code" => "invalid_type",
"path" => "items[0][address][zip]",
"message" => "String value required",
"spec" => {
"type" => "String",
"description" => "Zip or postal code"
}
},
[11] {
"code" => "invalid_type",
"path" => "items[0][address][country]",
"message" => "String value required",
"spec" => {
"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