PowerShell
PowerShell
Akeneo: Delete Product
See more HTTP Misc Examples
Demonstrates how to delete product.Chilkat PowerShell Downloads
Add-Type -Path "C:\chilkat\ChilkatDotNet47-x64\ChilkatDotNet47.dll"
$success = $false
# This example requires the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.
$http = New-Object Chilkat.Http
# Use your previously obtained access token.
# See Get Akeneo Access Token
$http.AuthToken = "access_token"
$http.SetUrlVar("productCode","123")
$respStr = $http.QuickDeleteStr("http://pim.my-akeneo-site.com/api/rest/v1/products/{$productCode}")
if ($http.LastMethodSuccess -ne $true) {
$($http.LastHeader)
$($http.LastErrorText)
exit
}
$("Response Status Code: " + $http.LastStatus)
$("Response Body: " + $respStr)