FetchProducts

Returns multiple products by searching for category, brand, description, or full name.

Arguments
auth (Required)
Your API application key.
field (Required)
Defines the field to search.
  • Allowed values: category, brand, & description, fullname (e.g. brand and description combined).
search (Required)
Defines the keyword you would like to search (e.g. "Milk").
requirenutrition (Optional)
Defines whether to require results to have nutrition facts.
  • If requirenutrition is set to False (default) all items will be returned even if they don't have nutrition information.
  • If requirenutrition is set to True only items with nutrition information will be returned.
matchtype (Optional)
Defines whether to make a partial or exact match.
  • By default, search requests will search in 'present' mode which performs partial matches (e.g. 'Turkey' matches with 'Poultry - Chicken & Turkey'
  • Use 'Exact' mode to search exact words (e.g. 'Turkey' would only return items that only contain 'Turkey')
limit (Optional)
Sets the maximum number of items to return.
  • By default, search requests will return up to 30 results (the maximum) at a time.
    offset (Optional)
    Determines where in the result set results are returned.
    • When the result set exceeds that which can be returned at once, additional parameters will be present indicating what the “next” and “previous” offsets should be.
    • This effect is used in conjunction with the limit parameter, and is similar to pagination.

    Example Request:
    {
    "auth":"API Key",
    "method":"FetchProducts",
    "params"':
    	{
    	"field":"fullname",
    	"search":"Lactaid",
    	"requirenutrition": False,
    	"matchType":"present",
    	"limit":"10",
    	"offset":"10"
    	},
    "returnFormat":"json"
    }
    
    Example Response:
    {
    	"success":true,
    	"count":10,
    	"nextOffset":20,
    	"prevOffset":0,
    	"results":[
    	{
    		"description":"100% Lactose Free  Whole Milk",
    		"container":"Jug",
    		"size":"96",
    		"category":"Milk - All Sizes",
    		"units":"Oz",
    		"upc":"041383090738",
    		"ProductHasImage":"true",
    		"ProductHasNutritionFacts":"true",
    		"brand":"Lactaid",
    		"manufacturer":"HP Hood LLC"
    	},
    /* NOTE: Additional results omitted in example */
    	]
    
    Notes:
    • Count indicates the number of returned results
    • In XML format, the individual results will be in uniform '' containers
    Error Codes (40XX):
    • 01: One or more required parameters not present
    • 02: The search criteria was missing or malformed
    • 03: The search criteria specified an invalid field
    • 04: The search criteria specified an invalid match type
    • 05: The specified offset was invalid
    • 06: The specified limit was invalidC
    • 07: Error retrieving result set
    • 09: No products match the specified result criteria