Sample code for 30+ languages & platforms
Swift

Akeneo: Delete Product

See more HTTP Misc Examples

Demonstrates how to delete product.

Chilkat Swift Downloads

Swift

func chilkatTest() {
    var success: Bool = false

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

    let http = CkoHttp()!

    // Use your previously obtained access token.
    // See Get Akeneo Access Token
    http.authToken = "access_token"

    http.setUrlVar(name: "productCode", value: "123")

    var respStr: String? = http.quickDeleteStr(url: "http://pim.my-akeneo-site.com/api/rest/v1/products/{$productCode}")
    if http.lastMethodSuccess != true {
        print("\(http.lastHeader!)")
        print("\(http.lastErrorText!)")
        return
    }

    print("Response Status Code: \(http.lastStatus.intValue)")
    print("Response Body: \(respStr!)")

}