getProductCategory

Retrieve all data for a single product category

Description

This method retrieves the ProductCategory object for the product category specified by ProductCateogryRefNum. The ProductCategoryRefNum is the gateway assigned unique product category identifier that was returned by addProductCategory.

The entire ProductCategory object is returned.

See also addProductCategory

Syntax

ProductCategory getProductCategory ( ueSecurityToken Token,string ProductCategoryRefNum)

Arguments

Type Name Description
ueSecurityToken Token Merchant security token: used to identify merchant and retrieve the custom fields.
string ProductCategoryRefNum Gateway assigned product category ID used to pull product category details

Return Value

Type Description
ProductCategory Returns a Product Category object containing fields and their values.

Exceptions

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

Code Message Advice
41006 Product Category Not Found Product category specified by ProductCategoryRefNum was not found. Make sure the number stored is not truncated or rounded.

Examples

VB

        Dim catRefNum As String
            catRefNum = "9001169812"

            Dim category As newtek.ProductCategory
            category = client.getProductCategory(token, catRefNum)
            MsgBox(category.Name)

.NET C

                string catRefNum = "900116985";

                try
                {
                    newtek.ProductCategory category = client.getProductCategory(token, catRefNum);
                    MessageBox.Show(string.Concat(category.Name));
                }
                catch (Exception err)
                {
                    MessageBox.Show(err.Message);
                }