Sample code for 30+ languages & platforms
PowerBuilder

Akeneo: Delete Product

See more HTTP Misc Examples

Demonstrates how to delete product.

Chilkat PowerBuilder Downloads

PowerBuilder
integer li_rc
integer li_Success
oleobject loo_Http
string ls_RespStr

li_Success = 0

// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

loo_Http = create oleobject
li_rc = loo_Http.ConnectToNewObject("Chilkat.Http")
if li_rc < 0 then
    destroy loo_Http
    MessageBox("Error","Connecting to COM object failed")
    return
end if

// Use your previously obtained access token.
// See Get Akeneo Access Token
loo_Http.AuthToken = "access_token"

loo_Http.SetUrlVar("productCode","123")

ls_RespStr = loo_Http.QuickDeleteStr("http://pim.my-akeneo-site.com/api/rest/v1/products/{$productCode}")
if loo_Http.LastMethodSuccess <> 1 then
    Write-Debug loo_Http.LastHeader
    Write-Debug loo_Http.LastErrorText
    destroy loo_Http
    return
end if

Write-Debug "Response Status Code: " + string(loo_Http.LastStatus)
Write-Debug "Response Body: " + ls_RespStr


destroy loo_Http