Sample code for 30+ languages & platforms
Unicode C

Akeneo: Delete Product

See more HTTP Misc Examples

Demonstrates how to delete product.

Chilkat Unicode C Downloads

Unicode C
#include <C_CkHttpW.h>

void ChilkatSample(void)
    {
    BOOL success;
    HCkHttpW http;
    const wchar_t *respStr;

    success = FALSE;

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

    http = CkHttpW_Create();

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

    CkHttpW_SetUrlVar(http,L"productCode",L"123");

    respStr = CkHttpW_quickDeleteStr(http,L"http://pim.my-akeneo-site.com/api/rest/v1/products/{$productCode}");
    if (CkHttpW_getLastMethodSuccess(http) != TRUE) {
        wprintf(L"%s\n",CkHttpW_lastHeader(http));
        wprintf(L"%s\n",CkHttpW_lastErrorText(http));
        CkHttpW_Dispose(http);
        return;
    }

    wprintf(L"Response Status Code: %d\n",CkHttpW_getLastStatus(http));
    wprintf(L"Response Body: %s\n",respStr);


    CkHttpW_Dispose(http);

    }