Skip to content

Instantly share code, notes, and snippets.

@Zaglov
Created January 8, 2018 11:49
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 Zaglov/2d8385a8087e38eb1ccd37b9adc156c8 to your computer and use it in GitHub Desktop.
Save Zaglov/2d8385a8087e38eb1ccd37b9adc156c8 to your computer and use it in GitHub Desktop.
{
"data": {
"sku": "TSHIRT",
"title": "T-Shirt",
"slug": "tshirt",
"description": "Product description",
"type": "product",
"backorders": "yes",
"manage_stock": true,
"stock": 0,
"stock_status": "instock",
"categories": [],
"tags": [],
"attributes": [
{
"label": "Color",
"slug": "product-color",
"visible": 1,
"variation": 1,
"taxonomy": 1,
"options": [
"red",
"blue",
"green"
]
}
],
"variations": [
{
"sku": "TSHIRT.RED",
"master_sku": "TSHIRT",
"title": "Tshirt Red",
"slug": "tshirt-red",
"description": "",
"type": "product_variation",
"backorders": "yes",
"manage_stock": true,
"stock": 33,
"stock_status": "instock",
"variation_attributes": {
"product_color": "red"
},
"price_lists": [
{
"slug": "default",
"regular_price": "2.59"
}
]
},
{
"sku": "TSHIRT.GREEN",
"master_sku": "TSHIRT",
"title": "Tshirt Green",
"slug": "tshirt-green",
"description": "",
"type": "product_variation",
"backorders": "yes",
"manage_stock": true,
"stock": 33,
"stock_status": "instock",
"variation_attributes": {
"product_color": "green"
},
"price_lists": [
{
"slug": "default",
"regular_price": "2.59"
}
]
},
{
"sku": "TSHIRT.BLUE",
"master_sku": "TSHIRT",
"title": "Tshirt Blue",
"slug": "tshirt-blue",
"description": "",
"type": "product_variation",
"backorders": "yes",
"manage_stock": true,
"stock": 33,
"stock_status": "instock",
"variation_attributes": {
"product_color": "blue"
},
"price_lists": [
{
"slug": "default",
"regular_price": "2.59"
}
]
}
],
"product_media": []
},
"shop": "demo-shop"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment