Chilkat2-Python
Chilkat2-Python
Shopify Delete Product
See more Shopify Examples
Delete a product from the shop.Chilkat Chilkat2-Python Downloads
import sys
import chilkat2
success = False
rest = chilkat2.Rest()
rest.SetAuthBasic("SHOPIFY_PRIVATE_API_KEY","SHOPIFY_PRIVATE_API_SECRET_KEY")
success = rest.Connect("chilkat.myshopify.com",443,True,True)
if (success != True):
print(rest.LastErrorText)
sys.exit()
sbResponse = chilkat2.StringBuilder()
success = rest.FullRequestNoBodySb("DELETE","/admin/products/#{id}.json",sbResponse)
if (success != True):
print(rest.LastErrorText)
sys.exit()
if (rest.ResponseStatusCode != 200):
print("Received error response code: " + str(rest.ResponseStatusCode))
print("Response body:")
print(sbResponse.GetAsString())
sys.exit()
print("Example Completed.")