Skip to content

Cannot create new variant #65

Description

@salvobunetto

Shopify Api reference

Create a new product variant

POST /admin/products/#{product_id}/variants.json
{
"variant": {
"option1": "Yellow",
"price": "1.00"
}
}

With this PHP Code:

$newVariant = array(
        "option1" => "black",
         "price" => "20.00"
         );
	  
$shopify->Product($product_id)->Variant->post($newVariant);

I recive this error:

Fatal error: Uncaught PHPShopify\Exception\CurlException: Request failed with HTTP Code 406.

Activity

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions