woocommerce - Create product with variations in the same request -


i'm using rest api v2 woocommerce 3.

i trying insert products variations in same request, can v2 rest api version ?

this request:

      {       "create": [         {           "name": "9325400137",           "type": "variable",           "sku": "93254",           "status": "pending",           "id": "",           "attributes": [             {               "position": 0,               "name": "color",               "slug": "color",               "options": [                 "black",                 "red"               ],               "variation": true,               "visible": true             },             {               "position": 0,               "name": "size",               "slug": "size",               "options": [                 "37",                 "40",                 "39",                 "38",                 "41",                 "36"               ],               "variation": true,               "visible": true             }           ],           "variations": [             {               "id": "234234",               "sku": "9325400137",               "manage_stock": true,               "regular_price": "50",               "stock_quantity": 0,               "in_stock": false,               "status": "pending",               "attributes": [                 {                   "id": "233423",                   "name": "color",                   "option": "black"                 },                 {                   "id": "2342342",                   "name": "size",                   "option": "37"                 }               ]             }           ]         }       ]     }  

the response empty variations array.

"variations": [] 


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -