Sample code for 30+ languages & platforms
Tcl

Akeneo: Delete Product

See more HTTP Misc Examples

Demonstrates how to delete product.

Chilkat Tcl Downloads

Tcl

load ./chilkat.dll

set success 0

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

set http [new_CkHttp]

# Use your previously obtained access token.
# See Get Akeneo Access Token
CkHttp_put_AuthToken $http "access_token"

CkHttp_SetUrlVar $http "productCode" "123"

set respStr [CkHttp_quickDeleteStr $http "http://pim.my-akeneo-site.com/api/rest/v1/products/{$productCode}"]
if {[CkHttp_get_LastMethodSuccess $http] != 1} then {
    puts [CkHttp_lastHeader $http]
    puts [CkHttp_lastErrorText $http]
    delete_CkHttp $http
    exit
}

puts "Response Status Code: [CkHttp_get_LastStatus $http]"
puts "Response Body: $respStr"

delete_CkHttp $http