Sample code for 30+ languages & platforms
PHP

Akeneo: Delete Product

See more HTTP Misc Examples

Demonstrates how to delete product.

Chilkat PHP Downloads

PHP
<?php

use Chilkat2\Http;

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

$http = new Http();

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

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

try {
    $respStr = $http->QuickDeleteStr('http://pim.my-akeneo-site.com/api/rest/v1/products/{$productCode}');
} catch (\Chilkat2\Exception $e) {
    echo $http->LastHeader, "\n";
    echo $e->getMessage(), "\n";
    exit;
}

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