C++
C++
Akeneo: Delete Product
See more HTTP Misc Examples
Demonstrates how to delete product.Chilkat C++ Downloads
#include <CkHttp.h>
void ChilkatSample(void)
{
bool success = false;
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
CkHttp http;
// Use your previously obtained access token.
// See Get Akeneo Access Token
http.put_AuthToken("access_token");
http.SetUrlVar("productCode","123");
const char *respStr = http.quickDeleteStr("http://pim.my-akeneo-site.com/api/rest/v1/products/{$productCode}");
if (http.get_LastMethodSuccess() != true) {
std::cout << http.lastHeader() << "\r\n";
std::cout << http.lastErrorText() << "\r\n";
return;
}
std::cout << "Response Status Code: " << http.get_LastStatus() << "\r\n";
std::cout << "Response Body: " << respStr << "\r\n";
}