phpExt / Shopify / Delete a product variant
Back to Collection Items
<?php
include("chilkat.php");
// Use "chilkat_9_5_0.php" for versions of Chilkat < 10.0.0
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
$http = new CkHttp();
$http->SetRequestHeader('Content','<>');
// resp is a CkHttpResponse
$resp = $http->QuickRequest('DELETE','httpsDefaultParameterValue:DefaultParameterValue@DefaultParameterValue.myshopify.com/admin/products/7990943555/variants/34705478094.json');
if ($http->get_LastMethodSuccess() == false) {
print $http->lastErrorText() . "\n";
exit;
}
print $resp->get_StatusCode() . "\n";
print $resp->bodyStr() . "\n";
?>
Curl Command
curl -X DELETE
-H "Content: <>"
httpsDefaultParameterValue:DefaultParameterValue@DefaultParameterValue.myshopify.com/admin/products/7990943555/variants/34705478094.json
Postman Collection Item JSON
{
"name": "Delete a product variant",
"request": {
"method": "DELETE",
"header": [
{
"key": "Content",
"value": "<>"
}
],
"url": {
"raw": "{{baseUrl}}/admin/products/7990943555/variants/34705478094.json",
"host": [
"{{baseUrl}}"
],
"path": [
"admin",
"products",
"7990943555",
"variants",
"34705478094.json"
]
},
"description": "Delete a product variant."
},
"response": [
]
}