Sample code for 30+ languages & platforms
Perl

Akeneo: Delete Product

See more HTTP Misc Examples

Demonstrates how to delete product.

Chilkat Perl Downloads

Perl
use strict;
use warnings;
use Chilkat2;

my $success = 0;

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

my $http = Chilkat2::Http->new;

# Use your previously obtained access token.
# See Get Akeneo Access Token
$http->AuthToken('access_token');

$http->SetUrlVar('productCode', '123');

my $respStr = $http->QuickDeleteStr('http://pim.my-akeneo-site.com/api/rest/v1/products/{$productCode}');
if (!$http->LastMethodSuccess) {
    print $http->LastHeader, "\n";
    print $http->LastErrorText, "\n";
    exit;
}

print 'Response Status Code: ', $http->LastStatus, "\n";
print 'Response Body: ', $respStr, "\n";