Sample code for 30+ languages & platforms
Java

Akeneo: Delete Product

See more HTTP Misc Examples

Demonstrates how to delete product.

Chilkat Java Downloads

Chilkat2 Java
import com.chilkatsoft.chilkat2.ChilkatException;
import com.chilkatsoft.chilkat2.Http;

public class ChilkatExample {

    public static void main(String[] args) {
        // This example requires the Chilkat API to have been previously unlocked.
        // See Global Unlock Sample for sample code.

        Http http = new Http();

        // Use your previously obtained access token.
        // See Get Akeneo Access Token
        http.setAuthToken("access_token");

        http.setUrlVar("productCode", "123");

        String respStr;
        try {
            respStr = http.quickDeleteStr("http://pim.my-akeneo-site.com/api/rest/v1/products/{$productCode}");
        } catch (ChilkatException e) {
            System.out.println(http.getLastHeader());
            System.out.println(e.getLastErrorText());
            return;
        }

        System.out.println("Response Status Code: " + http.getLastStatus());
        System.out.println("Response Body: " + respStr);
    }
}