developer:soap-1.4:methods:deleteproductcategory

Soap API v1.4

deleteProductCategory

This method deletes an existing product category.

Description

This method removes the specified ProductCategoryRefNum from the product database. The product category is deleted immediately and this operation can not be undone. The ProductCategoryRefNum is the gateway assigned product Category ID that was returned by addProductCategory.

See also addProductCategory

Syntax

boolean deleteProductCategory ( ueSecurityToken Token, string ProductCategoryRefNum)

Arguments

Type Name Description
ueSecurityToken Token Merchant security token: used to identify merchant and retrieve the custom fields.
string ProductCategoryRefNum Product category reference number used to delete a product category

Return Value

boolean Returns true if product category has been deleted (on error an exception is thrown)

Exceptions

The following exceptions (errors) are applicable to this method.

Code Message Advice
41008 Failed to delete product category Product category specified by ProductCategoryRefNum was not found. Make sure the number stored is not truncated or rounded.

Examples

PHP

For directions on how to set up the WSDL link, create “$token” and “$client”, go to PHP Soap How-to.

 

VB

        Dim catRefNum As String
        catRefNum = "9001169811"
        Dim response As Boolean
 
        response = client.deleteProductCategory(token, catRefNum)
        MsgBox(response) 

.NET C#

            string catRefNum = "900116983";
 
            Boolean response;
 
            try
            {
                response = client.deleteProductCategory(token, catRefNum);
                MessageBox.Show(string.Concat(response));
            }
            catch (Exception err)
            {
                MessageBox.Show(err.Message);
            }

XML

Request:

 

Response:

 

Change History

Version Change
1.3 Method added in this release
developer/soap-1.4/methods/deleteproductcategory.txt · Last modified: 2010/09/07 14:14 by irina

Page Tools