callInvAPI: Make a call to the Inventory API

Description Usage Arguments Value Examples

View source: R/callInvAPI.R

Description

Make a call to the Inventory API

Usage

1
2
3
callInvAPI(upc, store_num = NULL, search_postal_code = NULL,
  search_radius = NULL, search_radius_units = "miles", api_key = NULL,
  ...)

Arguments

upc

Either a single UPC or a vector of UPCs to return inventory for

store_num

Either a single store number or a vector of store numbers to return inventory for. Note Online inventory is given by 'JAX'. If you don't supply a store number or search paramters the function will return all store inventory.

search_postal_code

A string containing the postal code to search around

search_radius

A string providing the radius to search around the postal code

search_radius_units

A string specifying either miles or meters for the radius search

api_key

The key provided by IT to access this API.

...

additional arguments passed to POST

Value

A dataframe containing the requested UPC and stores or stores within your search radius. If no results exists, the return will be an empty list.

Examples

1
## Not run:  callInvAPI(upc = sample_upc, store_num = sample_store, api_key = Sys.getenv('IBM_API_KEY')) 

dwernersexton/rPOS documentation built on May 21, 2019, 6:49 a.m.