shopify-api-node, productVariant.create method returns me status 422 error

New Member
1 0 0

Hi, I'm trying to use the shopify-api-node to sync products from my database. I can create a new product and post it to shopify  with no problem but I can't create a new variant for an existing product on shopify. I amtrying the solve this for a week still I haven't came cross with a solution

My code is down below, 

Thank you.

(async () => {
  let params = {
    "variant": {
      "option1": "Yellow",
      "price": "1.00"
  const addvariant = await shopify.productVariant.create(6246048366765params)
  .then(res => console.log(res)).catch(err => console.log(err))