Sample code for 30+ languages & platforms
Classic ASP

Shopify Delete Product

See more Shopify Examples

Delete a product from the shop.

Chilkat Classic ASP Downloads

Classic ASP
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
success = 0

set rest = Server.CreateObject("Chilkat.Rest")

success = rest.SetAuthBasic("SHOPIFY_PRIVATE_API_KEY","SHOPIFY_PRIVATE_API_SECRET_KEY")

success = rest.Connect("chilkat.myshopify.com",443,1,1)
If (success <> 1) Then
    Response.Write "<pre>" & Server.HTMLEncode( rest.LastErrorText) & "</pre>"
    Response.End
End If

set sbResponse = Server.CreateObject("Chilkat.StringBuilder")
success = rest.FullRequestNoBodySb("DELETE","/admin/products/#{id}.json",sbResponse)
If (success <> 1) Then
    Response.Write "<pre>" & Server.HTMLEncode( rest.LastErrorText) & "</pre>"
    Response.End
End If

If (rest.ResponseStatusCode <> 200) Then
    Response.Write "<pre>" & Server.HTMLEncode( "Received error response code: " & rest.ResponseStatusCode) & "</pre>"
    Response.Write "<pre>" & Server.HTMLEncode( "Response body:") & "</pre>"
    Response.Write "<pre>" & Server.HTMLEncode( sbResponse.GetAsString()) & "</pre>"
    Response.End
End If

Response.Write "<pre>" & Server.HTMLEncode( "Example Completed.") & "</pre>"

%>
</body>
</html>