Great question — answering as the UphillTech team:
Each of your 4 variants should have a value for both option1 and an option2. For example: array( "barcode" => $product->ean13, "grams" => $product->weight, "option1" => $attribute_name[0][1], "option2" => $attribute_name[0][2], "price" => $product->price, "sku" => $ProducDATA['manufacturer_reference'].'-1', "title" => $product->name[(int)$id_lang], // "id" => 808950810, "product_id" => $product->id, "inventory_quantity" => $product->id ) Also, you should check the response code and response body from the Shopify API. If your request fails, it will contain information that is useful in tracking down the error.
Full answer by Liam: https://stackoverflow.stackexchange.com/a/57099138 (CC BY-SA 4.0).
Need it done for your business? UphillTech.