Sample code for 30+ languages & platforms
Go

Akeneo: Delete Product

See more HTTP Misc Examples

Demonstrates how to delete product.

Chilkat Go Downloads

Go
    success := false

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

    http := chilkat.NewHttp()

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

    http.SetUrlVar("productCode","123")

    respStr := http.QuickDeleteStr("http://pim.my-akeneo-site.com/api/rest/v1/products/{$productCode}")
    if http.LastMethodSuccess() != true {
        fmt.Println(http.LastHeader())
        fmt.Println(http.LastErrorText())
        http.DisposeHttp()
        return
    }

    fmt.Println("Response Status Code: ", http.LastStatus())
    fmt.Println("Response Body: ", *respStr)

    http.DisposeHttp()