Overview

This method allows you to obtain the details of e-commerce inventory items for a given customer. This method includes the quantity available based on a certain date specified.

Request

https://api.kometsales.com/api/ecommerce/inventory.get

  • Method: GET
  • Content-Type: URL Params.

Headers

  • X-SALES-CHANNEL (optional) (string: 20): Valid values: "WEB_APP", "MOBILE_APP", "K2K" , "ECOMMERCE_LITE". 
  • X-ACCOUNT (required)(integer:20): Company ID that is using the API. Please ask Komet Sales team to have this ID. 
  • authenticationToken (required)(string:50): Komet Sales security token.

Input parameters:

  • customerId (required)(integer:20): customer ID, used to search orders from only one customer. You can obtain this value from the customer.list API method.
  • inventoryLineIds (required)(string): a list of IDs of the inventory lines displayed on the ecommerce. It depends on the inventoryOrigin. For OM inventory it corresponds to the inventoryLineIds. For FS it corresponds to the purchaseOrderItemsIds. For VA  and K2K inventory it corresponds to vendorAvailabilityItemsIds.
  • inventoryOrigin (required)(integer:1): the inventory type. 1=OM (Open Market), 2=FS (Future Sales), 3=VA (Vendor Availability),4=K2K (Komet to Komet).
  • date (required) (date) (date format YYYY-MM-DD): The specific date you want to purchase the item for. 
  • availableFrom (date) (date format YYYY-MM-DD) (Required if no carrierId is sent). Date range you want to have the item available if carrierId is not specified. 
  • availableTo (date) (date format YYYY-MM-DD) (Required if no carrierId is sent). Date range you want to have the item available if carrierId is not specified.
  • companyLocationId (integer:20): Required if the company is in Multi Location mode. You can obtain this value from the location.list API method.
  • carrierId (Integer:20): Id of the carrier that you want to delivery this item. You can obtain this value from the /ecommerce/inventory.list API method.

 

Sample
https://api.kometsales.com/api/ecommerce/inventory.get?customerId=7349&inventoryLineIds=428720&inventoryOrigin=4&companyLocationId=13&date=2017-06-30 -H authenticationToken=token_info_goes_here

Response

Output:

    • message (String): description of the transaction status.
    • status (integer:1): transaction status. 1 for success or 0 for failure.
    • inventoryItem (Object): the inventory item information.
      • id (integer: 20): Number that identifies the row between all the records of the result. 
      • inventoryLineIds (string: 200): List of inventory IDs that belongs to the line. 
      • inventoryOrigin (integer:1): Number that identifies the type of the inventory. 1 = Open Market, 2 = Future Sales, 3 = VA, 4 = K2K. 
      • productDescription (string: 200): Product description. 
      • productDescriptionEcommerce (string: 500): Additional description of the product for the E-commerce. 
      • price (decimal: 10,3): Unit price. 
      • unitType (string: 10): Stem or Bunch. 
      • units (integer: 10): Number of stems per bunch. 
      • bunches (integer: 10): Number of bunches per box. 
      • pack (integer: 10): Number of units per box. 
      • totalBunches (integer: 10): Total bunches available. 
      • totalUnits (integer: 10): Total units available, based on the Unit Type. 
      • itemSizeCode (string: 3): Box type code (HB, QB, FB, etc). 
      • isAssorted (boolean): true if the product is assorted.
      • sellFast (boolean): true if the product was marked as Sell Fast. 
      • productImageUrl (string): URL for the product image. 
      • vendor (string: 50): vendor name of code.
      • companyProductId (integer:20): ID of the product. 

Sample
{  
   "message":"OK",
   "status":1,
   "inventoryItem":{  
      "id":"f4b993da-5cd9-11e7-81aa-2ca9caf6766c",
      "inventoryLineIds":"428720",
      "productDescription":"Agapanthus Silver Queen",
      "productDescriptionEcommerce":null,
      "quantity":10,
      "price":17.56,
      "units":2,
      "bunches":2,
      "pack":2,
      "totalBunches":0,
      "totalUnits":10,
      "itemSizeCode":"FB",
      "isAssorted":false,
      "unitType":"Bunch",
      "sellFast":false,
      "inventoryOrigin":4,
      "productImageUrl": "http://test.kometsales.com.s3.amazonaws.com/7030/product/217044_250x250.jpg?AWSAccessKeyId=AKIAJCADKODN6ZCRUIYQ&Expires=1498924690&Signature=E8QAUci0ibpj%2F2Jzaf2vXtcmpK4%3D"
   }

}