Sample code for 30+ languages & platforms
B4X

Shopify Delete Product

See more Shopify Examples

Delete a product from the shop.

Chilkat B4X Downloads

B4X
Dim success As Boolean = False

Dim rest As ChilkatRest
rest.Initialize("rest")

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

success = rest.Connect("chilkat.myshopify.com", 443, True, True)
If success <> True Then
    Log(rest.LastErrorText)
    Return
End If


Dim sbResponse As ChilkatStringBuilder
sbResponse.Initialize
success = rest.FullRequestNoBodySb("DELETE", "/admin/products/#{id}.json", sbResponse)
If success <> True Then
    Log(rest.LastErrorText)
    Return
End If


If rest.ResponseStatusCode <> 200 Then
    Log("Received error response code: " & rest.ResponseStatusCode)
    Log("Response body:")
    Log(sbResponse.GetAsString)
    Return
End If


Log("Example Completed.")