(C#) Shopify Delete Product
Delete a product from the shop.
Chilkat.Rest rest = new Chilkat.Rest();
bool success;
rest.SetAuthBasic("SHOPIFY_PRIVATE_API_KEY","SHOPIFY_PRIVATE_API_SECRET_KEY");
success = rest.Connect("chilkat.myshopify.com",443,true,true);
if (success != true) {
Debug.WriteLine(rest.LastErrorText);
return;
}
Chilkat.StringBuilder sbResponse = new Chilkat.StringBuilder();
success = rest.FullRequestNoBodySb("DELETE","/admin/products/#{id}.json",sbResponse);
if (success != true) {
Debug.WriteLine(rest.LastErrorText);
return;
}
if (rest.ResponseStatusCode != 200) {
Debug.WriteLine("Received error response code: " + Convert.ToString(rest.ResponseStatusCode));
Debug.WriteLine("Response body:");
Debug.WriteLine(sbResponse.GetAsString());
return;
}
Debug.WriteLine("Example Completed.");
|