(Visual FoxPro) Akeneo: Delete Product
Demonstrates how to delete product.
LOCAL loHttp
LOCAL lnSuccess
LOCAL lcRespStr
* This example requires the Chilkat API to have been previously unlocked.
* See Global Unlock Sample for sample code.
* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.Http')
loHttp = CreateObject('Chilkat.Http')
* Use your previously obtained access token.
* See Get Akeneo Access Token
loHttp.AuthToken = "access_token"
loHttp.SetUrlVar("productCode","123")
lcRespStr = loHttp.QuickDeleteStr("http://pim.my-akeneo-site.com/api/rest/v1/products/{$productCode}")
IF (loHttp.LastMethodSuccess <> 1) THEN
? loHttp.LastHeader
? loHttp.LastErrorText
RELEASE loHttp
CANCEL
ENDIF
? "Response Status Code: " + STR(loHttp.LastStatus)
? "Response Body: " + lcRespStr
RELEASE loHttp
|