This Service provides a complete cloud based catalogue management. An app can keep all its items based on category on the Cloud. This service provides several utility methods to manage catalogue on the cloud. One can add items with its related information in a particular category. And there can be several categories in a catalogue. The App developer can create several catalogues if needed. The Cart service can be used along with Catalogue service to create an end to end Shopping feature for a Mobile and Web App.
In order to use various functions available in a specific API, a developer has to create an instance of ServiceAPI by passing the apiKey and secretKey which will be created after the app creation from AppHQ dashboard.
Required Parameters
apiKey - The Application key given when the application was created.
secretKey - The secret key corresponding to the application key given when the application was created.
ServiceAPI api = new ServiceAPI("API_KEY","SECRET_KEY");ServiceAPI api = new ServiceAPI("API_KEY","SECRET_KEY");ServiceAPI *api = [[ServiceAPI alloc]init]; api.apiKey = @"<API_KEY>"; api.secretKey = @"<SECRET_KEY>";ServiceAPI api = new ServiceAPI("API_KEY","SECRET_KEY");ServiceAPI api = new ServiceAPI("API_KEY","SECRET_KEY");Coming SoonApp42.initialize("API_KEY","SECRET_KEY");ServiceAPI api = new ServiceAPI("API_KEY","SECRET_KEY");$api = new ServiceAPI("API_KEY","SECRET_KEY");Coming Soonapi = App42::ServiceAPI.new("<API_KEY>","<SECRET_KEY>")Coming SoonComing Soon
After initialization, developer needs to call the buildXXXService method on ServiceAPI instance to get the instance of the particular API that you wish to build. For example, To build an instance of CatalogueService, buildCatalogueService() method needs to be called.
CatalogueService catalogueService = api.buildCatalogueService();CatalogueService catalogueService = api.BuildCatalogueService();CatalogueService *catalogueService = [api buildCatalogueService];CatalogueService catalogueService = api.buildCatalogueService();CatalogueService catalogueService = api.buildCatalogueService();Coming SoonNot AvailableCatalogueService catalogueService = api.BuildCatalogueService();$catalogueService = $api->buildCatalogueService();Coming Sooncatalogue_service = api.build_catalogue_service()Coming SoonComing Soon
import com.shephertz.app42.paas.sdk.android.ServiceAPI; import com.shephertz.app42.paas.sdk.android.App42Response; import com.shephertz.app42.paas.sdk.android.App42Exception; import com.shephertz.app42.paas.sdk.android.App42BadParameterException; import com.shephertz.app42.paas.sdk.android.App42NotFoundException; import com.shephertz.app42.paas.sdk.android.shopping.Catalogue; import com.shephertz.app42.paas.sdk.android.shopping.CatalogueService; import com.shephertz.app42.paas.sdk.android.shopping.ItemData;using com.shephertz.app42.paas.sdk.windows; using com.shephertz.app42.paas.sdk.windows.shopping;#import "Shephertz_App42_iOS_API/Shephertz_App42_iOS_API.h"import com.shephertz.app42.paas.sdk.jme.ServiceAPI; import com.shephertz.app42.paas.sdk.jme.App42Response; import com.shephertz.app42.paas.sdk.jme.App42Exception; import com.shephertz.app42.paas.sdk.jme.App42BadParameterException; import com.shephertz.app42.paas.sdk.jme.App42NotFoundException; import com.shephertz.app42.paas.sdk.jme.shopping.Catalogue; import com.shephertz.app42.paas.sdk.jme.shopping.CatalogueService; import com.shephertz.app42.paas.sdk.jme.shopping.ItemDataimport com.shephertz.app42.paas.sdk.java.ServiceAPI; import com.shephertz.app42.paas.sdk.java.App42Response; import com.shephertz.app42.paas.sdk.java.App42Exception; import com.shephertz.app42.paas.sdk.java.App42BadParameterException; import com.shephertz.app42.paas.sdk.java.App42NotFoundException; import com.shephertz.app42.paas.sdk.java.shopping.Catalogue; import com.shephertz.app42.paas.sdk.java.shopping.CatalogueService; import com.shephertz.app42.paas.sdk.java.shopping.ItemDataComing SoonNot Availableusing com.shephertz.app42.paas.sdk.csharp; using com.shephertz.app42.paas.sdk.csharp.shopping;use com\shephertz\app42\paas\sdk\php\App42Response; use com\shephertz\app42\paas\sdk\php\App42Exception; use com\shephertz\app42\paas\sdk\php\App42BadParameterException; use com\shephertz\app42\paas\sdk\php\App42NotFoundException; use com\shephertz\app42\paas\sdk\php\shopping\CatalogueService; use com\shephertz\app42\paas\sdk\php\ServiceAPI; include_once '../CatalogueService.php'; include_once '../ServiceAPI.php'; include_once '../App42Response.php'; include_once '../App42Exception.php'; include_once '../App42BadParameterException.php'; include_once '../App42NotFoundException.php';Coming Soonrequire 'App42_Ruby_API'Coming SoonComing Soon
Creates a Catalogue for a particular App. Categories can be added to the Catalogue.
Required Parameters
catalogueName - Name of the Catalogue to be created.
description - Description of the catalogue to be created.
String catalogueName = "catalogueName"; String description = "Catalogue descrption"; Catalogue catalogue = catalogueService.createCatalogue(catalogueName,description); System.out.println("catalogueName is " + catalogue.getName()); System.out.println("description is " + catalogue.getDescription()); String jsonResponse = catalogue.toString();public class Callback : App42Callback { String catalogueName = "catalogueName"; String description = "Catalogue descrption"; catalogueService.CreateCatalogue(catalogueName,description,this); void App42Callback.OnException(App42Exception exception) { Console.WriteLine("Exception Message"); } void App42Callback.OnSuccess(Object response) { Catalogue catalogue = (Catalogue) response; Console.WriteLine("catalogueName is " + catalogue.GetName()); Console.WriteLine("description is " + catalogue.GetDescription()); String jsonResponse = catalogue.ToString(); } }NSString *catalogueName = @"catalogueName"; NSString *description = @"Catalogue descrption"; Catalogue *catalogue = [catalogueService createCatalogue:catalogueName catalogueDescription:description]; NSLog(@"catalogueName is = %@" catalogue.name); NSLog(@"catalogueDescription is = %@",catalogue.description); NSString *jsonResponse = [catalogue toString];String catalogueName = "catalogueName"; String description = "Catalogue descrption"; Catalogue catalogue = catalogueService.createCatalogue(catalogueName,description); System.out.println("catalogueName is " + catalogue.getName()); System.out.println("description is " + catalogue.getDescription()); String jsonResponse = catalogue.toString();String catalogueName = "catalogueName"; String description = "Catalogue descrption"; Catalogue catalogue = catalogueService.createCatalogue(catalogueName,description); System.out.println("catalogueName is " + catalogue.getName()); System.out.println("description is " + catalogue.getDescription()); String jsonResponse = catalogue.toString();Coming SoonNot AvailableString catalogueName = "catalogueName"; String description = "Catalogue descrption"; Catalogue catalogue = catalogueService.CreateCatalogue(catalogueName,description); Console.WriteLine("catalogueName is " + catalogue.GetName()); Console.WriteLine("description is " + catalogue.GetDescription()); String jsonResponse = catalogue.ToString();$catalogueName = "catalogueName"; $description = "Catalogue descrption"; $catalogue = $catalogueService->createCatalogue($catalogueName,$description); print_r("catalogueName is " . $catalogue->getName()); print_r("description is " . $catalogue->getDescription()); $jsonResponse = $catalogue->toString();Coming Sooncatalogue_name = "catalogueName"; catalogue_description = "Catalogue descrption"; catalogue = catalogue_service.create_catalogue(catalogue_name, catalogue_description); puts "name is #{catalogue.name}"; puts "description is #{catalogue.description}"; json_response = catalogue.to_s();Coming SoonComing Soon
Creates a Category for a particular Catalogue e.g. Books, Music etc.
Required Parameters
catalogueName - Name of the Catalogue for which Category has to be created.
categoryName - Name of the Category that has to be created
description - Description of the category to be created.
String catalogueName = "catalogueName"; String categoryName = "categoryName"; String description = "descrption"; Catalogue catalogue = catalogueService.createCategory(catalogueName,categoryName,description); System.out.println("catalogueName is " + catalogue.getName()); String jsonResponse = catalogue.toString();public class Callback : App42Callback { String catalogueName = "catalogueName"; String categoryName = "categoryName"; String description = "descrption"; catalogueService.CreateCategory(catalogueName,categoryName,description,this); void App42Callback.OnException(App42Exception exception) { Console.WriteLine("Exception Message"); } void App42Callback.OnSuccess(Object response) { Catalogue catalogue = (Catalogue) response; Console.WriteLine("catalogueName is " + catalogue.GetName()); String jsonResponse = catalogue.ToString(); } }NSString *catalogueName = @"catalogueName"; NSString *categoryName = @"categoryName"; NSString *description = @"descrption"; Catalogue *catalogue = [catalogueService createCategory:catalogueName categoryName:categoryName categoryDescription:description]; NSLog(@"catalogueName is = %@" catalogue.name); NSString *jsonResponse = [catalogue toString];String catalogueName = "catalogueName"; String categoryName = "categoryName"; String description = "descrption"; Catalogue catalogue = catalogueService.createCategory(catalogueName,categoryName,description); System.out.println("catalogueName is " + catalogue.getName()); String jsonResponse = catalogue.toString();String catalogueName = "catalogueName"; String categoryName = "categoryName"; String description = "descrption"; Catalogue catalogue = catalogueService.createCategory(catalogueName,categoryName,description); System.out.println("catalogueName is " + catalogue.getName()); String jsonResponse = catalogue.toString();Coming SoonNot AvailableString catalogueName = "catalogueName"; String categoryName = "categoryName"; String description = "descrption"; Catalogue catalogue = catalogueService.CreateCategory(catalogueName,categoryName,description); Console.WriteLine("catalogueName is " + catalogue.GetName()); String jsonResponse = catalogue.ToString();$catalogueName = "catalogueName"; $categoryName = "categoryName"; $description = "descrption"; $catalogue = $catalogueService->createCategory($catalogueName,$categoryName,$description); print_r("catalogueName is " . $catalogue->getName()); $jsonResponse = $catalogue->toString();Coming Sooncatalogue_name = "catalogueName"; category_name = "categoryName"; category_description = "CategoryDescription"; catalogue = catalogue_service.create_category(catalogue_name, category_name, category_description); puts "catalogueName is #{catalogue.name}"; category_list = Array.new(); category_list = catalogue.category_list(); puts "name is #{category.name}"; puts "description is #{category.description}"; json_response = catalogue.to_s();Coming SoonComing Soon
Creates a Category for a particular Catalogue e.g. Books, Music etc.
Required Parameters
catalogueName - Name of the Catalogue for which item has to be added.
categoryName - Name of the Category for which item has to be added.
itemData - Item Information that has to be added.
String catalogueName = "catalogueName"; String categoryName = "categoryName"; ItemData itemData = new ItemData(); itemData.setDescription("Image Description"); itemData.setImage("Your File Path"); itemData.setItemId("abc1234007"); itemData.setName("Item"); itemData.setPrice(20.0); Catalogue catalogue = catalogueService.addItem(catalogueName,categoryName,itemData); System.out.println("catalogueName is " + catalogue.getName()); String jsonResponse = catalogue.toString();public class Callback : App42Callback { String catalogueName = "catalogueName"; String categoryName = "categoryName"; ItemData itemData = new ItemData(); itemData.setDescription("Image Description"); itemData.setImage("Your File Path"); itemData.setItemId("abc1234007"); itemData.setName("Item"); itemData.setPrice(20.0); catalogueService.AddItem(catalogueName,categoryName,itemData,this); void App42Callback.OnException(App42Exception exception) { Console.WriteLine("Exception Message"); } void App42Callback.OnSuccess(Object response) { Catalogue catalogue = (Catalogue) response; Console.WriteLine("catalogueName is " + catalogue.GetName()); String jsonResponse = catalogue.ToString(); } }NSString *catalogueName = @"catalogueName"; NSString *categoryName = @"categoryName"; ItemData itemData = [[ItemData alloc]init]; itemData.description = @"Pic"; itemData.image = [[NSBundle mainBundle]pathForResource:@"Flowers" ofType:@"jpg"]; itemData.itemId = @"abc1234007"; itemData.name = @"Item"; itemData.price = 20.0; Catalogue *catalogue = [catalogueService addItem:catalogueName categoryName:categoryName itemData:itemData]; NSLog(@"catalogueName is ", catalogue.name); NSString *jsonResponse = [catalogue toString];String catalogueName = "catalogueName"; String categoryName = "categoryName"; ItemData itemData = new ItemData(); itemData.setDescription("Image Description"); itemData.setImage("Your File Path"); itemData.setItemId("abc1234007"); itemData.setName("Item"); itemData.setPrice(20.0); Catalogue catalogue = catalogueService.addItem(catalogueName,categoryName,itemData); System.out.println("catalogueName is " + catalogue.getName()); String jsonResponse = catalogue.toString();String catalogueName = "catalogueName"; String categoryName = "categoryName"; ItemData itemData = new ItemData(); itemData.setDescription("Image Description"); itemData.setImage("Your File Path"); itemData.setItemId("abc1234007"); itemData.setName("Item"); itemData.setPrice(20.0); Catalogue catalogue = catalogueService.addItem(catalogueName,categoryName,itemData); System.out.println("catalogueName is " + catalogue.getName()); String jsonResponse = catalogue.toString();Coming SoonNot AvailableString catalogueName = "catalogueName"; String categoryName = "categoryName"; ItemData itemData = new ItemData(); itemData.setDescription("Image Description"); itemData.setImage("Your File Path"); itemData.setItemId("abc1234007"); itemData.setName("Item"); itemData.setPrice(20.0); Catalogue catalogue = catalogueService.AddItem(catalogueName,categoryName,itemData); Console.WriteLine("catalogueName is " + catalogue.GetName()); String jsonResponse = catalogue.ToString();$catalogueName = "catalogueName"; $categoryName = "categoryName"; $itemData = new ItemData(); $itemData->setItemId("ItemId01"); $itemData->setDescription("ItemDescription01"); $itemData->setName("ItemName01"); $itemData->setPrice(200); $itemData->setImage("your local image path."); $catalogue = $catalogueService->addItem($catalogueName,$categoryName,$itemData); print_r("catalogueName is " . $catalogue->getName()); $jsonResponse = $catalogue->toString();Coming Sooncatalogue_name = "catalogueName"; category_name = "categoryName"; item_data = App42::Shopping::ItemData.new(); item_data.item_id="itemId01"; item_data.description="ItemDescription01"; item_data.name="ItemName01"; item_data.price="200"; item_data.image="your local image path" ; catalogue = catalogue_service.add_item(catalogue_name,category_name, item_data); puts "name is #{catalogue.name}"; category_list = Array.new(); category_list = catalogue.category_list(); for category in category_list do puts "name is #{category.name}"; puts "description is #{category.description}"; item_list = Array.new(); item_list = category.item_list(); for item in item_list do puts "price is #{item.price}"; puts "itemId is #{item.item_id}" ; puts "name is #{item.name}"; end end json_response = catalogue.to_s();Coming SoonComing Soon
Fetches all items for a Catalogue.
Required Parameters
catalogueName - Name of the Catalogue from which item has to be fetched.
String catalogueName = "catalogueName"; Catalogue catalogue = catalogueService.getItems(catalogueName); System.out.println("catalogueName is " + catalogue.getName()); String jsonResponse = catalogue.toString();public class Callback : App42Callback { String catalogueName = "catalogueName"; catalogueService.GetItems(catalogueName,this); void App42Callback.OnException(App42Exception exception) { Console.WriteLine("Exception Message"); } void App42Callback.OnSuccess(Object response) { Catalogue catalogue = (Catalogue) response; Console.WriteLine("catalogueName is " + catalogue.GetName()); String jsonResponse = catalogue.ToString(); } }NSString *catalogueName = @"catalogueName"; Catalogue *catalogue = [catalogueService getItems:catalogueName]; NSLog(@"catalogueName is = %@" catalogue.name); NSString *jsonResponse = [catalogue toString];String catalogueName = "catalogueName"; Catalogue catalogue = catalogueService.getItems(catalogueName); System.out.println("catalogueName is " + catalogue.getName()); String jsonResponse = catalogue.toString();String catalogueName = "catalogueName"; Catalogue catalogue = catalogueService.getItems(catalogueName); System.out.println("catalogueName is " + catalogue.getName()); String jsonResponse = catalogue.toString();Coming SoonNot AvailableString catalogueName = "catalogueName"; Catalogue catalogue = catalogueService.getItems(catalogueName); Console.WriteLine("catalogueName is " + catalogue.GetName()); String jsonResponse = catalogue.ToString();$catalogueName = "catalogueName"; $catalogue = $catalogueService->getItems($catalogueName); print_r("catalogueName is " . $catalogue->getName()); $jsonResponse = $catalogue->toString();Coming Sooncatalogue_name = "catalogueName"; catalogue = catalogue_service.get_items(catalogue_name); puts "name is #{catalogue.name}"; puts "description is #{catalogue.description}"; category_list = Array.new(); category_list = catalogue.category_list(); for category in category_list do puts "name is #{category.name}"; puts "description is #{category.description}"; item_list = Array.new(); item_list = category.item_list(); for item in item_list do puts "price is #{item.price}"; puts "itemId is #{item.item_id}"; puts "name is #{item.name}"; end end json_response = catalogue.to_s();Coming SoonComing Soon
Fetches all items for a Catalogue and Category.
Required Parameters
catalogueName - Name of the Catalogue from which item has to be fetched.
categoryName - Name of the Category from which item has to be fetched.
String catalogueName = "catalogueName"; String categoryName = "categoryName"; Catalogue catalogue = catalogueService.getItemsByCategory(catalogueName,categoryName); System.out.println("catalogueName is " + catalogue.getName()); String jsonResponse = catalogue.toString();public class Callback : App42Callback { String catalogueName = "catalogueName"; String categoryName = "categoryName"; catalogueService.GetItemsByCategory(catalogueName,categoryName,this); void App42Callback.OnException(App42Exception exception) { Console.WriteLine("Exception Message"); } void App42Callback.OnSuccess(Object response) { Catalogue catalogue = (Catalogue) response; Console.WriteLine("catalogueName is " + catalogue.GetName()); String jsonResponse = catalogue.ToString(); } }NSString *catalogueName = @"catalogueName"; NSString *categoryName = @"categoryName"; Catalogue *catalogue = [catalogueService getItemsByCategoryetItems:catalogueName categoryName:categoryName]; NSLog(@"catalogueName is = %@" catalogue.name); NSString *jsonResponse = [catalogue toString];String catalogueName = "catalogueName"; String categoryName = "categoryName"; Catalogue catalogue = catalogueService.getItemsByCategory(catalogueName,categoryName); System.out.println("catalogueName is " + catalogue.getName()); String jsonResponse = catalogue.toString();String catalogueName = "catalogueName"; String categoryName = "categoryName"; Catalogue catalogue = catalogueService.getItemsByCategory(catalogueName,categoryName); System.out.println("catalogueName is " + catalogue.getName()); String jsonResponse = catalogue.toString();Coming SoonNot AvailableString catalogueName = "catalogueName"; String categoryName = "categoryName"; Catalogue catalogue = catalogueService.GetItemsByCategory(catalogueName,categoryName); Console.WriteLine("catalogueName is " + catalogue.GetName()); String jsonResponse = catalogue.ToString();$catalogueName = "catalogueName"; $categoryName = "categoryName"; $catalogue = $catalogueService->getItemsByCategory($catalogueName,$categoryName); print_r("catalogueName is " . $catalogue->getName()); $jsonResponse = $catalogue->toString();Coming Sooncatalogue_name = "catalogueName"; category_name = "categoryName"; catalogue = catalogue_service.get_items_by_category(catalogue_name, category_name); puts "name is #{catalogue.name}"; category_list = Array.new(); category_list = catalogue.category_list(); for category in category_list do puts "name is #{category.name}"; item_list = Array.new(); item_list = category.item_list(); for item in item_list do puts "price is #{item.price}"; puts "itemId is #{item.item_id}"; puts "name is #{item.name}"; end end json_response = catalogue.to_s();Coming SoonComing Soon
Fetches count of all items for a Catalogue and Category.
Required Parameters
catalogueName - Name of the Catalogue from which count of item has to be fetched.
categoryName - Name of the Category from which count of item has to be fetched.
String catalogueName = "catalogueName "; String categoryName = "categoryName"; App42Response response = catalogueService.getItemsCountByCategory(catalogueName, categoryName); boolean success = response.isResponseSuccess(); String jsonResponse = response.toString();public class Callback : App42Callback { String catalogueName = "catalogueName "; String categoryName = "categoryName"; catalogueService.GetItemsCountByCategory(catalogueName, categoryName, this); void App42Callback.OnException(App42Exception exception) { Console.WriteLine("Exception Message"); } void App42Callback.OnSuccess(Object response) { App42Response response = (App42Response) response; String jsonResponse = response.ToString(); } }NSString *catalogueName = @"catalogueName "; NSString *categoryName = @"categoryName"; App42Response *response = [catalogueService getItemsCountByCategory:catalogueName categoryName:categoryName]; NSString *success = response.isResponseSuccess; NSString *jsonResponse = [response toString];String catalogueName = "catalogueName "; String categoryName = "categoryName"; App42Response response = catalogueService.getItemsCountByCategory(catalogueName, categoryName); boolean success = response.isResponseSuccess(); String jsonResponse = response.toString();String catalogueName = "catalogueName "; String categoryName = "categoryName"; App42Response response = catalogueService.getItemsCountByCategory(catalogueName, categoryName); boolean success = response.isResponseSuccess(); String jsonResponse = response.toString();Coming SoonNot AvailableString catalogueName = "catalogueName "; String categoryName = "categoryName"; App42Response response = catalogueService.GetItemsCountByCategory(catalogueName, categoryName); Boolean success = response.IsResponseSuccess(); String jsonResponse = response.ToString();$catalogueName = "catalogueName "; $categoryName = "categoryName"; $response = $catalogueService->getItemsCountByCategory($catalogueName, $categoryName); $success = $respons->isResponseSuccess(); $jsonResponse = $respons->toString();Coming Sooncatalogue_name = "catalogueName"; category_name = "categoryName"; response = catalogue_service.get_items_count_by_category(catalogue_name, category_name); success = response.is_response_success(); total_records = response.total_records(); json_response = response.to_s();Coming SoonComing Soon
Fetches all items for a Catalogue and Category by paging.
Required Parameters
catalogueName - Name of the Catalogue from which item has to be fetched.
categoryName - Name of the Category from which item has to be fetched.
max - Maximum number of records to be fetched.
offset - From where the records are to be fetched.
String catalogueName = "catalogueName"; String categoryName = "categoryName"; int max = 1; int offset = 0 ; Catalogue catalogue = catalogueService.getItemsByCategory(catalogueName,categoryName,max,offset); System.out.println("catalogueName is " + catalogue.getName()); String jsonResponse = catalogue.toString();public class Callback : App42Callback { String catalogueName = "catalogueName"; String categoryName = "categoryName"; int max = 1; int offset = 0 ; catalogueService.GetItemsByCategory(catalogueName,categoryName,max,offset,this); void App42Callback.OnException(App42Exception exception) { Console.WriteLine("Exception Message"); } void App42Callback.OnSuccess(Object response) { Catalogue catalogue = (Catalogue) response; Console.WriteLine("catalogueName is " + catalogue.GetName()); String jsonResponse = catalogue.ToString(); } }NSString *catalogueName = @"catalogueName"; NSString *categoryName = @"categoryName"; int max = 1; int offset = 0 ; Catalogue *catalogue = [catalogueService getItemsByCategoryetItems:catalogueName categoryName:categoryName max:max offset:offset]; NSLog(@"catalogueName is = %@" catalogue.name); NSString *jsonResponse = [catalogue toString];String catalogueName = "catalogueName"; String categoryName = "categoryName"; Integer max = new Integer(1); Integer offset = new Integer(0); Catalogue catalogue = catalogueService.getItemsByCategory(catalogueName,categoryName,max,offset); System.out.println("catalogueName is " + catalogue.getName()); String jsonResponse = catalogue.toString();String catalogueName = "catalogueName"; String categoryName = "categoryName"; int max = 1; int offset = 0 ; Catalogue catalogue = catalogueService.getItemsByCategory(catalogueName,categoryName,max,offset); System.out.println("catalogueName is " + catalogue.getName()); String jsonResponse = catalogue.toString();Coming SoonNot AvailableString catalogueName = "catalogueName"; String categoryName = "categoryName"; int max = 1; int offset = 0 ; Catalogue catalogue = catalogueService.GetItemsByCategory(catalogueName,categoryName,max,offset); Console.WriteLine("catalogueName is " + catalogue.GetName()); String jsonResponse = catalogue.ToString();$catalogueName = "catalogueName"; $categoryName = "categoryName"; $max = 1; $offset = 0 ; $catalogue = $catalogueService->getItemsByCategory($catalogueName,$categoryName,$max,$offset); print_r("catalogueName is " . $catalogue->getName()); $jsonResponse = $catalogue->toString();Coming Sooncatalogue_name = "catalogueName"; category_name = "categoryName"; max = 1; offset = 0; catalogue = catalogue_service.get_items_by_category_by_paging(catalogue_name, category_Name, max, offset); puts "name is #{catalogue.name}"; category_list = Array.new(); category_list = catalogue.category_list(); for category in category_list do item_list = Array.new(); item_list = category.item_list(); for item in item_list do puts "price is #{item.price}"; puts "itemId is #{item.item_id}"; puts "name is #{item.name}"; end end json_response = catalogue.to_s();Coming SoonComing Soon
Fetches Item by id for a Catalogue and Category.
Required Parameters
catalogueName - Name of the Catalogue from which item has to be fetched.
categoryName - Name of the Category from which item has to be fetched.
itemId - Item id for which information has to be fetched.
String catalogueName = "catalogueName"; String categoryName = "categoryName"; String itemId = "itemId"; Catalogue catalogue = catalogueService.getItemById(catalogueName,categoryName,itemId); System.out.println("catalogueName is " + catalogue.getName()); String jsonResponse = catalogue.toString();public class Callback : App42Callback { String catalogueName = "catalogueName"; String categoryName = "categoryName"; String itemId = "itemId"; catalogueService.GetItemById(catalogueName,categoryName,itemId,this); void App42Callback.OnException(App42Exception exception) { Console.WriteLine("Exception Message"); } void App42Callback.OnSuccess(Object response) { Catalogue catalogue = (Catalogue) response; Console.WriteLine("catalogueName is " + catalogue.GetName()); String jsonResponse = catalogue.ToString(); } }NSString *catalogueName = @"catalogueName"; NSString *categoryName = @"categoryName"; NSString *itemId = @"itemId"; Catalogue *catalogue = [catalogueService getItemById:catalogueName categoryName:categoryName itemId:itemId]; NSLog(@"catalogueName is = %@" catalogue.name); NSString *jsonResponse = [catalogue toString];String catalogueName = "catalogueName"; String categoryName = "categoryName"; String itemId = "itemId"; Catalogue catalogue = catalogueService.getItemById(catalogueName,categoryName,itemId); System.out.println("catalogueName is " + catalogue.getName()); String jsonResponse = catalogue.toString();String catalogueName = "catalogueName"; String categoryName = "categoryName"; String itemId = "itemId"; Catalogue catalogue = catalogueService.getItemById(catalogueName,categoryName,itemId); System.out.println("catalogueName is " + catalogue.getName()); String jsonResponse = catalogue.toString();Coming SoonNot AvailableString catalogueName = "catalogueName"; String categoryName = "categoryName"; String itemId = "itemId"; Catalogue catalogue = catalogueService.GetItemById(catalogueName,categoryName,itemId); Console.WriteLine("catalogueName is " + catalogue.GetName()); String jsonResponse = catalogue.ToString();$catalogueName = "catalogueName"; $categoryName = "categoryName"; $itemId = "itemId"; $catalogue = $catalogueService->getItemById($catalogueName,$categoryName,$itemId); print_r("catalogueName is " . $catalogue->getName()); $jsonResponse = $catalogue->toString();Coming Sooncatalogue_name = "catalogueName"; category_name = "categoryName"; item_id = "ItemId01"; catalogue = catalogue_service.get_item_by_id(catalogue_name, category_name, item_id); puts "name is #{catalogue.name}"; category_list = Array.new(); category_list = catalogue.category_list(); for category in category_list do puts "name is #{category.name}"; puts "description is #{category.description}"; item_list = Array.new(); item_list = category.item_list(); for item in item_list do puts "price is #{item.price}"; puts "itemId is #{item.item_id}"; puts "name is #{item.name}"; end end json_response = catalogue.to_s();Coming SoonComing Soon
Removes all Items in a Catalogue.
Required Parameters
catalogueName - Name of the Catalogue from which item has to be removed.
String catalogueName = "catalogueName"; App42Response response = catalogueService.removeAllItems(catalogueName); boolean success = response.isResponseSuccess(); String jsonResponse = response.toString();public class Callback : App42Callback { String catalogueName = "catalogueName"; catalogueService.RemoveAllItems(catalogueName, this); void App42Callback.OnException(App42Exception exception) { Console.WriteLine("Exception Message"); } void App42Callback.OnSuccess(Object response) { App42Response response = (App42Response) response; String jsonResponse = response.ToString(); } }NSString *catalogueName = @"catalogueName"; App42Response *response = [catalogueService removeAllItems:catalogueName]; NSString *success = response.isResponseSuccess; NSString *jsonResponse = [response toString];String catalogueName = "catalogueName"; App42Response response = catalogueService.removeAllItems(catalogueName); boolean success = response.isResponseSuccess(); String jsonResponse = response.toString();String catalogueName = "catalogueName"; App42Response response = catalogueService.removeAllItems(catalogueName); boolean success = response.isResponseSuccess(); String jsonResponse = response.toString();Coming SoonNot AvailableString catalogueName = "catalogueName"; App42Response response = catalogueService.RemoveAllItems(catalogueName); Boolean success = response.IsResponseSuccess(); String jsonResponse = response.ToString();$catalogueName = "catalogueName"; $response = $catalogueService->removeAllItems($catalogueName); $success = $respons->isResponseSuccess(); $jsonResponse = $respons->toString();Coming Sooncatalogue_name = catalogueName; response = catalogue_service.remove_all_items(catalogue_name); success = response.is_response_success(); json_response = catalogue.to_s();Coming SoonComing Soon
Removes all Items from a Catalogue and Category.
Required Parameters
catalogueName - Name of the Catalogue from which item has to be removed.
categoryName - Name of the Category from which item has to be removed.
String catalogueName = "catalogueName"; String categoryName = "categoryName"; App42Response response = catalogueService.removeItemsByCategory(catalogueName,categoryName); boolean success = response.isResponseSuccess(); String jsonResponse = response.toString();public class Callback : App42Callback { String catalogueName = "catalogueName"; String categoryName = "categoryName"; catalogueService.RemoveItemsByCategory(catalogueName,categoryName, this); void App42Callback.OnException(App42Exception exception) { Console.WriteLine("Exception Message"); } void App42Callback.OnSuccess(Object response) { App42Response response = (App42Response) response; String jsonResponse = response.ToString(); } }NSString *catalogueName = @"catalogueName"; NSString *categoryName = @"categoryName"; App42Response *response = [catalogueService removeItemsByCategory:catalogueName categoryName:categoryName]; NSString *success = response.isResponseSuccess; NSString *jsonResponse = [response toString];String catalogueName = "catalogueName"; String categoryName = "categoryName"; App42Response response = catalogueService.removeItemsByCategory(catalogueName,categoryName); boolean success = response.isResponseSuccess(); String jsonResponse = response.toString();String catalogueName = "catalogueName"; String categoryName = "categoryName"; App42Response response = catalogueService.removeItemsByCategory(catalogueName,categoryName); boolean success = response.isResponseSuccess(); String jsonResponse = response.toString();Coming SoonNot AvailableString catalogueName = "catalogueName"; String categoryName = "categoryName"; App42Response response = catalogueService.RemoveItemsByCategory(catalogueName,categoryName); Boolean success = response.IsResponseSuccess(); String jsonResponse = response.ToString();$catalogueName = "catalogueName"; $categoryName = "categoryName"; $response = $catalogueService->removeItemsByCategory($catalogueName,$categoryName); $success = $respons->isResponseSuccess(); $jsonResponse = $respons->toString();Coming Sooncatalogue_name = "catalogueName"; category_name = "categoryName"; response = catalogue_service.remove_items_by_category(catalogue_name, category_name); success = response.is_response_success(); json_response = catalogue.to_s();Coming SoonComing Soon
Removes Item by Id.
Required Parameters
catalogueName - Name of the Catalogue from which item has to be removed.
categoryName - Name of the Category from which item has to be removed.
itemId - Item id which has to be removed.
String catalogueName = "catalogueName"; String categoryName = "categoryName"; String itemId = "itemId"; App42Response response = catalogueService.removeItemById(catalogueName,categoryName,itemId); boolean success = response.isResponseSuccess(); String jsonResponse = response.toString();public class Callback : App42Callback { String catalogueName = "catalogueName"; String categoryName = "categoryName"; String itemId = "itemId"; catalogueService.RemoveItemById(catalogueName,categoryName, itemId,this); void App42Callback.OnException(App42Exception exception) { Console.WriteLine("Exception Message"); } void App42Callback.OnSuccess(Object response) { App42Response response = (App42Response) response; String jsonResponse = response.ToString(); } }NSString *catalogueName = @"catalogueName"; NSString *categoryName = @"categoryName"; NSString *itemId = @"itemId"; App42Response *response = [catalogueService removeItemById:catalogueName categoryName:categoryName itemId:itemId]; NSString *success = response.isResponseSuccess; NSString *jsonResponse = [response toString];String catalogueName = "catalogueName"; String categoryName = "categoryName"; String itemId = "itemId"; App42Response response = catalogueService.removeItemById(catalogueName,categoryName,itemId); boolean success = response.isResponseSuccess(); String jsonResponse = response.toString();String catalogueName = "catalogueName"; String categoryName = "categoryName"; String itemId = "itemId"; App42Response response = catalogueService.removeItemById(catalogueName,categoryName,itemId); boolean success = response.isResponseSuccess(); String jsonResponse = response.toString();Coming SoonNot AvailableString catalogueName = "catalogueName"; String categoryName = "categoryName"; String itemId = "itemId"; App42Response response = catalogueService.RemoveItemById(catalogueName,categoryName,itemId); Boolean success = response.IsResponseSuccess(); String jsonResponse = response.ToString();$catalogueName = "catalogueName"; $categoryName = "categoryName"; $itemId = "itemId"; $response = $catalogueService->removeItemById($catalogueName,$categoryName,$itemId); $success = $respons->isResponseSuccess(); $jsonResponse = $respons->toString();Coming Sooncatalogue_name = "catalogueName"; category_name = "categoryName"; item_id = "ItemId01"; response = catalogue_service.remove_item_by_id(catalogue_name, category_name, item_id); success = response.is_response_success(); json_response = catalogue.to_s();Coming SoonComing Soon
Delete all Items from a Catalogue and Category.
Required Parameters
catalogueName - Name of the Catalogue from which item has to be removed.
categoryName - Name of the Category from which item has to be removed.
String catalogueName = "catalogueName"; String categoryName = "categoryName"; App42Response response = catalogueService.removeItemsByCategory(catalogueName,categoryName); boolean success = response.isResponseSuccess(); String jsonResponse = response.toString();public class Callback : App42Callback { String catalogueName = "catalogueName"; String categoryName = "categoryName"; catalogueService.RemoveItemsByCategory(catalogueName,categoryName, this); void App42Callback.OnException(App42Exception exception) { Console.WriteLine("Exception Message"); } void App42Callback.OnSuccess(Object response) { App42Response response = (App42Response) response; String jsonResponse = response.ToString(); } }NSString *catalogueName = @"catalogueName"; NSString *categoryName = @"categoryName"; App42Response *response = [catalogueService removeItemsByCategory:catalogueName categoryName:categoryName]; NSString *success = response.isResponseSuccess; NSString *jsonResponse = [response toString];String catalogueName = "catalogueName"; String categoryName = "categoryName"; App42Response response = catalogueService.removeItemsByCategory(catalogueName,categoryName); boolean success = response.isResponseSuccess(); String jsonResponse = response.toString();String catalogueName = "catalogueName"; String categoryName = "categoryName"; App42Response response = catalogueService.removeItemsByCategory(catalogueName,categoryName); boolean success = response.isResponseSuccess(); String jsonResponse = response.toString();Coming SoonNot AvailableString catalogueName = "catalogueName"; String categoryName = "categoryName"; App42Response response = catalogueService.RemoveItemsByCategory(catalogueName,categoryName); Boolean success = response.IsResponseSuccess(); String jsonResponse = response.ToString();$catalogueName = "catalogueName"; $categoryName = "categoryName"; $response = $catalogueService->removeItemsByCategory($catalogueName,$categoryName); $success = $respons->isResponseSuccess(); $jsonResponse = $respons->toString();Coming SoonComing SoonComing SoonComing Soon
The functions available under Catalogue API can throw some exceptions in abnormal conditions. Example of the same has been given below. E.g. If App developer is creating a category under the catalogue which is not in database, the function will throw the App42Exception (as shown below) with message as “Not Found” and the appErrorCode as “3401” and the details as “Catalogue by the name ‘@catalogueName’ does not exist”.
String catalogueName = "catalogueName"; String categoryName = "categoryName"; String categoryDescription = "categoryDescription"; try { Catalogue catalogue = catalogueService.createCategory(catalogueName,categoryName,categoryDescription); } catch( App42Exception ex ) { int appErrorCode = ex.getAppErrorCode(); int httpErrorCode = ex.getHttpErrorCode(); if(appErrorCode == 3401) { // Handle here for Not Found (Catalogue by the name '@catalogueName' does not exist.) } else if(appErrorCode == 3402) { // Handle here for Bad Request (The request parameters are invalid. Category by the name '@categoryName' for the Catalogue by the name '@categoryName' already exists.) } else if(appErrorCode == 1401) { // handle here for Client is not authorized } else if(appErrorCode == 1500) { // handle here for Internal Server Error } String jsonText = ex.getMessage(); }public class Callback : App42Callback { String catalogueName = "catalogueName"; String categoryName = "categoryName"; String categoryDescription = "categoryDescription"; catalogueService.CreateCategory(catalogueName,categoryName,categoryDescription, this); void App42Callback.OnException(App42Exception exception) { int appErrorCode = exception.GetAppErrorCode(); int httpErrorCode = exception.GetHttpErrorCode(); if(appErrorCode == 3401) { // Handle here for Not Found (Catalogue by the name '@catalogueName' does not exist.) } else if(appErrorCode == 3402) { // Handle here for Bad Request (The request parameters are invalid. Category by the name '@categoryName' for the Catalogue by the name '@categoryName' already exists.) } else if(appErrorCode == 1401) { // handle here for Client is not authorized } else if(appErrorCode == 1500) { // handle here for Internal Server Error } String jsonText = exception.GetMessage(); } void App42Callback.OnSuccess(Object object) { Catalogue catalogue = (Catalogue) object; String jsonResponse = catalogue.ToString(); } }NSString *catalogueName = @"catalogueName"; NSString *categoryName = @"categoryName"; NSString *categoryDescription = @"categoryDescription"; @try { Catalogue *catalogue = [catalogueService createCategory:catalogueName categoryName:categoryName categoryDescription:categoryDescription]; } @catch(App42Exception *ex) { int appErrorCode = ex.appErrorCode; int httpErrorCode = ex.httpErrorCode; if(appErrorCode == 3401) { // Handle here for Not Found (Catalogue by the name '@catalogueName' does not exist.) } else if(appErrorCode == 3402) { // Handle here for Bad Request (The request parameters are invalid. Category by the name '@categoryName' for the Catalogue by the name '@categoryName' already exists.) } else if(appErrorCode == 1401) { // handle here for Client is not authorized } else if(appErrorCode == 1500) { // handle here for Internal Server Error } NSString *jsonText = ex.reason; }String catalogueName = "catalogueName"; String categoryName = "categoryName"; String categoryDescription = "categoryDescription"; try { Catalogue catalogue = catalogueService.createCategory(catalogueName,categoryName,categoryDescription); } catch( App42Exception ex ) { int appErrorCode = ex.getAppErrorCode(); int httpErrorCode = ex.getHttpErrorCode(); if(appErrorCode == 3401) { // Handle here for Not Found (Catalogue by the name '@catalogueName' does not exist.) } else if(appErrorCode == 3402) { // Handle here for Bad Request (The request parameters are invalid. Category by the name '@categoryName' for the Catalogue by the name '@categoryName' already exists.) } else if(appErrorCode == 1401) { // handle here for Client is not authorized } else if(appErrorCode == 1500) { // handle here for Internal Server Error } String jsonText = ex.getMessage(); }String catalogueName = "catalogueName"; String categoryName = "categoryName"; String categoryDescription = "categoryDescription"; try { Catalogue catalogue = catalogueService.createCategory(catalogueName,categoryName,categoryDescription); } catch( App42Exception ex ) { int appErrorCode = ex.getAppErrorCode(); int httpErrorCode = ex.getHttpErrorCode(); if(appErrorCode == 3401) { // Handle here for Not Found (Catalogue by the name '@catalogueName' does not exist.) } else if(appErrorCode == 3402) { // Handle here for Bad Request (The request parameters are invalid. Category by the name '@categoryName' for the Catalogue by the name '@categoryName' already exists.) } else if(appErrorCode == 1401) { // handle here for Client is not authorized } else if(appErrorCode == 1500) { // handle here for Internal Server Error } String jsonText = ex.getMessage(); }Coming SoonNot AvailableString catalogueName = "catalogueName"; String categoryName = "categoryName"; String categoryDescription = "categoryDescription"; try { Catalogue catalogue = catalogueService.CreateCategory(catalogueName,categoryName,categoryDescription); } catch( App42Exception ex ) { int appErrorCode = ex.GetAppErrorCode(); int httpErrorCode = ex.GetHttpErrorCode(); if(appErrorCode == 3401) { // Handle here for Not Found (Catalogue by the name '@catalogueName' does not exist.) } else if(appErrorCode == 3402) { // Handle here for Bad Request (The request parameters are invalid. Category by the name '@categoryName' for the Catalogue by the name '@categoryName' already exists.) } else if(appErrorCode == 1401) { // handle here for Client is not authorized } else if(appErrorCode == 1500) { // handle here for Internal Server Error } String jsonText = ex.GetMessage(); }$catalogueName = "catalogueName"; $categoryName = "categoryName"; $categoryDescription = "categoryDescription"; try { $catalogue = $catalogueService->createCategory($catalogueName,$categoryName,$categoryDescription); } catch(App42Exception $ex ) { $appErrorCode = ex->getAppErrorCode(); $httpErrorCode = ex->getHttpErrorCode(); if($appErrorCode == 3401) { // Handle here for Not Found (Catalogue by the name '@catalogueName' does not exist.) } else if($appErrorCode == 3402) { // Handle here for Bad Request (The request parameters are invalid. Category by the name '@categoryName' for the Catalogue by the name '@categoryName' already exists.) } else if($appErrorCode == 1401) { // handle here for Client is not authorized } else if($appErrorCode == 1500) { // handle here for Internal Server Error } String $jsonText = ex->getMessage(); }Coming SoonComing SoonComing SoonComing Soon
Functions in Catalogue API might throw exceptions with following HTTP and Application Error Codes (along with their descriptions):
1400 - BAD REQUEST - The Request parameters are invalid.
1401 - UNAUTHORIZED - Client is not authorized.
1500 - INTERNAL SERVER ERROR - Internal Server Error. Please try again.
3400 - BAD REQUEST - The request parameters are invalid. Catalogue by the name '@catalogueName' already exists.
3401 - NOT FOUND - Catalogue by the name '@catalogueName' does not exist.
3402 - BAD REQUEST - The request parameters are invalid. Category by the name '@categoryName' for the Catalogue by the name '@catalogueName' already exists.
3403 - NOT FOUND - Category by the name '@categoryName' for the Catalogue by the name '@catalogueName' does not exist.
3404 - BAD REQUEST - The request parameters are invalid. Item with the id '@itemId' for the Category by the name '@categoryName' and Catalogue by the name '@catalogueName' already exists.
3405 - NOT FOUND - Item with the id '@itemId' for the Category by the name '@categoryName' and Catalogue by the name '@catalogueName' does not exist.
3406 - NOT FOUND - Item with the id '@itemId' does not exist.
3407 - NOT FOUND - The number of items for category by the name '@categoryName' for Catalogue by the name '@catalogueName' are less than the specified offset