24/7 Support: 800.608.6482

Navigation


PricingAndInventory

This function will allow you to pass in an array of product codes or Ids and get back the current price (including any discounts) and inventory counts. This function is intended to be called in front end JavaScript for when a 3rd party search provider may not have the most up to date pricing or discount data for products

This function is part of the the Search Spring Live Indexing module and it is required to be installed (but not required to be used)

Request Body Parameters

Store_Code Type:
String
Title:
Store Code
Required - Store Code
Session_Type Type:
String
Title:
Session Type
This will alwsys be "runtime"
Function Type:
String
Title:
Function
Because this is a module defined funciton this value will always be "Module"
Module_Code Type:
String
Title:
Module Code
Code of the module which defines the function. Will always be "searchspringlive" for this function
Module_Function Type:
Stringr
Title:
Module Function
Function Name you wish to execute
Identifier Type:
String
Title:
Identifier
Possible values include: code or id
Codes Type:
Stringr
Title:
Product Codes
[optional] Comma seperated list of product codes to lookup and return pricing and inventory for. Only passed if identifier is set to "code"
Ids Type:
Stringr
Title:
Product IDs
[optional] Comma seperated list of product ids to lookup and return pricing and inventory for. Only passed if identifier is set to "id"

Response Parameters

success Type:
Boolean
Title:
Success
True/false whether the request was successful
price Type:
Number
Title:
Product Price (with Discounts)
Product price including any product level discounts applied to the product
inv_active Type:
Boolean
Title:
Inventory Active
Boolean for if inventory is being tracked for this product
inv_level Type:
String
Title:
Inventory Level
One of In Stock, Low Stock, Out of Stock (in, low, out)
inv_available Type:
Number
Title:
Inventory Available
Inventory Available. This is the instock amount - threshold you have set for out of stock level (default is 0)
inv_instock Type:
Number
Title:
Inventory Instock
Inventory In Stock
inv_short Type:
String
Title:
Inventory Short Message
Inventory Short Message
inv_long Type:
String
Title:
Inventory Long Message
Inventory Long Message

Example Request

Example Response

This website uses cookies to identify visitors, track visitors to our website, store login session information and to remember your user preferences. By continuing to use this site you agree to our use of cookies. Learn More.

This website uses cookies. By continuing to use this site you agree to our use of cookies. Learn More.

Accept

Copyright © 1997 – 2022 Miva©, Miva Merchant©, MivaPay©, MivaCon©, Camp Miva ℠, Miva, Inc. All Rights Reserved.