Skip to content

Instantly share code, notes, and snippets.

@johnpaulhayes
Last active January 3, 2018 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnpaulhayes/ca1ccb2bbdaae483c0a82e398bdfe56c to your computer and use it in GitHub Desktop.
Save johnpaulhayes/ca1ccb2bbdaae483c0a82e398bdfe56c to your computer and use it in GitHub Desktop.
Failing json payload
{
"description": "<h2>A CHILDHOOD CLASSIC</h2><p>This is children's bedroom furniture at its very best. The Huckleberry Cabin Bed is wonderfully sturdy and combines storage with a cool place to snuggle down - it's a real childhood classic.</p><img src=\"https://www.gltc.co.uk/pws/client/images/catalogue/products/l2427/original/l2427_1.jpg\" alt=\"\">|<h2>KEY FEATURES</h2><p>Made from a solid beech frame, with MDF panels and a solid pine slatted base; it's painted in Ivory, so it coordinates well with our <a href=\"/category/dept/bedroom-furniture\">Islander Bedroom Furniture</a> range. Features deep drawers and large cupboards that extend the full width of the bed, and a practical ambidextrous ladder/safety rail attachment, to suit your space. Tested to BS: 8509; suitable for 4yrs+. Assembly service available (&pound;100), includes <a href=\"/content/bed-mattress-guarantee\">10 Year GLTC Guarantee</a>.</p><img src=\"https://www.gltc.co.uk/pws/client/images/catalogue/products/l2427/original/l2427_2.jpg\" alt=\"\">|<h2>WHICH MATTRESS?</h2><p>This mid sleeper bed requires a standard UK Single mattress in a shallower (15cmD or less) mattress. We therefore recommend our Allrounder mattresses, which come in our <a href=\"/product/lullaby-mattress-all-rounder-uk-single-/10004145\">Lullaby</a> construction or in our <a href=\"/product/no-sneezes-mattress-all-rounder-uk-single-/10004142\">No Sneezes</a> format for kids with allergies. If you're in a rush the Express mattress is also safe to use on a raised bed. For more information please see our <a href=\"/content/mattress-buying-guide\">Mattress Buying Guide</a>.</p><img src=\"https://www.gltc.co.uk/pws/client/images/catalogue/products/l2427/original/l2427_2.jpg\" alt=\"\">",
"images": [
{
"src": "https://s3.eu-west-1.amazonaws.com/gltc.btxmedia.com/pws/client/images/catalogue/products/l2427/xzoom/l2427_1.jpg?AWSAccessKeyId=AKIAJFC4JD5CLCO6EF3A&Signature=PV2raK7KT0ZWcCz1sw5Rf2MukEk%3D&Expires=1515000102"
},
{
"src": "https://s3.eu-west-1.amazonaws.com/gltc.btxmedia.com/pws/client/images/catalogue/products/l2427/xzoom/l2427_2.jpg?AWSAccessKeyId=AKIAJFC4JD5CLCO6EF3A&Signature=9w3mOJ94WAhizJCpEVgs96gz32w%3D&Expires=1515000102"
},
{
"src": "https://s3.eu-west-1.amazonaws.com/gltc.btxmedia.com/pws/client/images/catalogue/products/l2427/xzoom/l2427_3.jpg?AWSAccessKeyId=AKIAJFC4JD5CLCO6EF3A&Signature=1%2BJBGXo%2FKBHOo6m0NVHtvVUIhFo%3D&Expires=1515000102"
},
{
"src": "https://s3.eu-west-1.amazonaws.com/gltc.btxmedia.com/pws/client/images/catalogue/products/l2427/xzoom/l2427_fr.jpg?AWSAccessKeyId=AKIAJFC4JD5CLCO6EF3A&Signature=PYPkZICfLSfZq5KydtBP5XHSrwU%3D&Expires=1515000102"
}
],
"measurements": "123H x 199W x 104.5D (cm)",
"meta_description": "If you're short of space this stunning and very sturdy cabin bed will solve the problem, thanks to its brilliant integral storage and cupboard space.",
"metafields": [
{
"description": "dd_weeks",
"key": "dd_weeks",
"namespace": "data-fields",
"value": "31",
"value_type": "string"
},
{
"description": "self_assembly",
"key": "self_assembly",
"namespace": "data-fields",
"value": "33",
"value_type": "string"
},
{
"description": "product_colour",
"key": "product_colour",
"namespace": "data-fields",
"value": "67",
"value_type": "string"
},
{
"description": "made_from",
"key": "made_from",
"namespace": "data-fields",
"value": "86",
"value_type": "string"
},
{
"description": "measurements",
"key": "measurements",
"namespace": "data-fields",
"value": "87",
"value_type": "string"
},
{
"description": "washing_instructions",
"key": "washing_instructions",
"namespace": "data-fields",
"value": "88",
"value_type": "string"
},
{
"description": "other_details",
"key": "other_details",
"namespace": "data-fields",
"value": "89",
"value_type": "string"
},
{
"description": "google_product_category",
"key": "google_product_category",
"namespace": "data-fields",
"value": "90",
"value_type": "string"
},
{
"description": "backorderable",
"key": "backorderable",
"namespace": "data-fields",
"value": "165",
"value_type": "string"
},
{
"description": "min_stock_threshold",
"key": "min_stock_threshold",
"namespace": "data-fields",
"value": "167",
"value_type": "string"
},
{
"description": "continuity",
"key": "continuity",
"namespace": "data-fields",
"value": "168",
"value_type": "string"
},
{
"description": "wc_promo_1",
"key": "wc_promo_1",
"namespace": "data-fields",
"value": "131",
"value_type": "string"
},
{
"description": "wc_promo_2",
"key": "wc_promo_2",
"namespace": "data-fields",
"value": "132",
"value_type": "string"
},
{
"description": "wc_promo_3",
"key": "wc_promo_3",
"namespace": "data-fields",
"value": "133",
"value_type": "string"
}
],
"other_details": "<p><strong>Exclusive to GLTC</strong></p><p><strong>Assembly service available.</strong></p> \n<p>These beds can be tricky to build and may take a couple of hours to assemble. We therefore strongly recommend that these beds are built for you in situ by our expert delivery/assembly team; just add this option to your basket at checkout.</p> \n<p><strong>Self assembly:</strong></p> \n<p>If you plan to assemble this bed yourself you must follow all assembly instructions to the letter so that it complies with British Safety Standard regulations. <br/>We recommend in situ assembly by two competent adults; any attempt to move it once assembled may cause damage to the bed and to you. Please also note that we do not recommend the use of power tools on any MDF panels.</p>",
"short_description": "If you're short of space this stunning and very sturdy cabin bed will solve the problem, thanks to its brilliant integral storage and cupboard space.",
"tags": "L2427, 2427, Huckleberry White Cabin Bed, beds, bunk, cabins, highsleeper, highsleepers, sleeper, sleepers, high, storage, bedroom, furniture, Huck, Huckle, Huckel, Berry, Bury, ivory, chalk white",
"title": "Huckleberry Cabin Bed",
"type_of_gift": "",
"variants": [
{
"barcode": "5055647101509.0",
"fullfillment_service": "CREATIVE WOOD",
"price": "1175.0",
"sku": "L2427",
"sort_order": "",
"taxable": true,
"title": "L2427 - Huckleberry Cabin Bed",
"weight": "0.0",
"weight_unit": "kg"
},
{
"barcode": "5055647105958.0",
"fullfillment_service": "CREATIVE WOOD",
"price": "0.0",
"sku": "L2427A",
"sort_order": "",
"taxable": true,
"title": "L2427A - Huckleberry Cabin Bed",
"weight": "0.0",
"weight_unit": "kg"
},
{
"barcode": "5055647105958.0",
"fullfillment_service": "CREATIVE WOOD",
"price": "0.0",
"sku": "L2427B",
"sort_order": "",
"taxable": true,
"title": "L2427B - Huckleberry Cabin Bed",
"weight": "0.0",
"weight_unit": "kg"
},
{
"barcode": "5055647105958.0",
"fullfillment_service": "CREATIVE WOOD",
"price": "0.0",
"sku": "L2427C",
"sort_order": "",
"taxable": true,
"title": "L2427C - Huckleberry Cabin Bed",
"weight": "0.0",
"weight_unit": "kg"
},
{
"barcode": "5055647105958.0",
"fullfillment_service": "CREATIVE WOOD",
"price": "0.0",
"sku": "L2427D",
"sort_order": "",
"taxable": true,
"title": "L2427D - Huckleberry Cabin Bed",
"weight": "0.0",
"weight_unit": "kg"
},
{
"barcode": "5055647105958.0",
"fullfillment_service": "CREATIVE WOOD",
"price": "0.0",
"sku": "L2427E",
"sort_order": "",
"taxable": true,
"title": "L2427E - Huckleberry Cabin Bed",
"weight": "0.0",
"weight_unit": "kg"
},
{
"barcode": "5055647105958.0",
"fullfillment_service": "CREATIVE WOOD",
"price": "0.0",
"sku": "L2427F",
"sort_order": "",
"taxable": true,
"title": "L2427F - Huckleberry Cabin Bed",
"weight": "0.0",
"weight_unit": "kg"
},
{
"barcode": "5055647105958.0",
"fullfillment_service": "CREATIVE WOOD",
"price": "0.0",
"sku": "L2427G",
"sort_order": "",
"taxable": true,
"title": "L2427G - Huckleberry Cabin Bed",
"weight": "0.0",
"weight_unit": "kg"
},
{
"barcode": "5055647105958.0",
"fullfillment_service": "CREATIVE WOOD",
"price": "0.0",
"sku": "L2427H",
"sort_order": "",
"taxable": true,
"title": "L2427H - Huckleberry Cabin Bed",
"weight": "0.0",
"weight_unit": "kg"
},
{
"barcode": "",
"fullfillment_service": "CREATIVE WOOD",
"price": "0.0",
"sku": "L2427INS",
"sort_order": "",
"taxable": true,
"title": "L2427INS - Huckleberry Cabin Bed",
"weight": "0.0",
"weight_unit": "kg"
},
{
"barcode": "",
"fullfillment_service": "CREATIVE WOOD",
"price": "0.0",
"sku": "L2427UNI",
"sort_order": "",
"taxable": true,
"title": "L2427UNI - Huckleberry Cabin Bed",
"weight": "0.0",
"weight_unit": "kg"
}
],
"vendor": "GLTC",
"washing_instructions": ""
}
@johnpaulhayes
Copy link
Author

The response I get back from the API is
status code: 422
{"errors":{"base":["The variant 'Default Title' already exists."]}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment