Overview


This method returns a list of the inventory displayed on e-commerce for a given customer. This method includes all the inventories based on the setup of the company: On Hand, Future and Vendor Availability in Boxes.

Request

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

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

Header

  • 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 the inventory based on the configuration for the customer. You can obtain this value from the customer.list API method.
  • companyLocationId (integer:20). Required if the company is in Multi Location mode. You can obtain this value from the location.list API method.
  • availableDate (date) (date format YYYY-MM-DD). The date when the product is available. Leaving this field empty, the system will search for inventory available from the current date up to 2 months in the future. Use this filter only if you want to search for Open Market inventory.
  • page (integer:20): the paging number where you want to place.
  • rows (integer:20): the number of rows that each page will display. 
  • searchText (String): a field for searching for a product by its description.
  • categoryId (integer:20): Komet Sales internal category ID. You can obtain this value from the category.list API method.
  • color (String): a field for searching for products by color.

 

Sample
https://api.kometsales.com/api/ecommerce/inventory.list?customerId=7349&page=1&rows=28&companyLocationId=13 -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.
    • total (integer:20): the total of records found.
    • inventoryItems (array): array of inventory items available in the inventory. 
      • id (integer: 20): Number that identifies the row between all the records of the result. Starts with 0 and it is auto-incremental. 
      • 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. 
      • color (string: 50): Color of the product. 
      • category (string: 50): Category name of the product. 
      • categoryId (integer: 20): Category Id.
      • 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. 
      • vendor (string: 50): vendor name of code.
      • companyProductId (integer:20): ID of the product. 
      • 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.
      • companyLocationId (integer: 20): Id the location. Only applies for companies in Multi Location mode. 
      • sellFast (boolean): true if the product was marked as Sell Fast. 
      • productImageUrl (string): URL for the product image. 
      • availableFrom (date): Date when the product is available from. Date format: YYYY-MM-DD.  
      • availableFromCalculated (date): First date when the product is available from based on the rules applied for the customer and the date range between the fields availableFrom and availableTo. Date format: YYYY-MM-DD. 
      • availableTo (date): Date when the product is available to. Date format: YYYY-MM-DD. 
      • unableToBuy (string: 50): Any reason that indicates that the product cannot be bought. 
      • carrierId (integer: 20): Suggested carrier ID for the first day available. 
    • categoriesList (array): array of categories available in the inventory. 
      • categoryId (integer:20): Id of the category.
      • categoryName (string:20): Name of the category.
    • colorsList (array): array of product colors available in the inventory. 

Sample
{ "total":1, "message":"OK", "colorsList":[ "Blue", "Red" ], "status":1, "inventoryItems":[ { "id":"0", "inventoryLineIds":"428720", "productDescription":"Agapanthus Blue Queen", "color":"Blue", "price":19.67, "units":2, "bunches":2, "pack":2, "totalBunches":0, "totalUnits":10, "itemSizeCode":"FB", "category":"Agapanthus", "categoryId":11454, "isAssorted":false, "unitType":"Bunch", "companyLocationId":0, "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", "availableFrom":"2017-06-29", "availableFromCalculated":"2017-06-29", "availableTo":"2017-07-06", "unableToBuy":null, "carrierId":4521 }, { "id":"0", "inventoryLineIds":"428729", "productDescription":"Rose Red Freedom 50 cm", "color":"Red", "price":2.67, "units":10, "bunches":10, "pack":5, "totalBunches":10, "totalUnits":10, "itemSizeCode":"FB", "category":"Rose", "categoryId":11451, "isAssorted":false, "unitType":"Stem", "companyLocationId":0, "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", "availableFrom":"2017-06-29", "availableFromCalculated":"2017-06-29", "availableTo":"2017-07-06", "unableToBuy":null, "carrierId":4521 } ], "categoriesList":[ { "categoryId":11454, "categoryName":"Agapanthus" }, { "categoryId":11451, "categoryName":"Rose" } ]