Overview

This method allows you to obtain the list of items available in the Vendor Availability.

Request

https://api.kometsales.com/api/vendor.availability.items.list

  • Method: POST
  • Content-Type: application/json

Input Parameters:

  • authenticationToken (required) (string:50): Komet Sales security token.
  • dateFrom (required) (date): available date from (date format YYYY-MM-DD).
  • dateTo (required) (date): available date to (date format YYYY-MM-DD).
  • locationId (optional) (integer:20): Id of the location where belongs the inventory. This applies for companies in multilocations mode. 
  • customerId (optional) (integer:20): Id of the customer. This value could be given if you want the API result to show the correct FOB Price based on the settings of the customer given. 
  • shipViaId (optional) (integer:1):  0 if it's ship via warehouse, 1 for ship via grower. If this field is not given the system will assume the product will be shipped via warehouse. 
  • availableOnly (optional) (boolean): true if you want to have listed only the items that have quantity available. 

Request Example
{
   "authenticationToken": "your_token_goes_here",
   "dateFrom": "2016-11-22",
   "dateTo": "2016-11-22",
   "customerId": 29559,
   "shipViaId":1
}

Response

Output:

  • status (integer:1): transaction status. 1 for success or 0 for failure/error.
  • message (string:500): contains the status description of the request.
  • inventoryItems: array of available inventory items.
    • inventoryId (integer:20): Inventory Item ID. In Komet Sales this id represents the Vendor Availability Item ID. 
    • companyProductId (integer:20): ID of the product.
    • productDescription (string:200): product description.
    • productCode (string:20): product code. It's also called Product Legacy Code. 
    • grade (string:100): grade or product cut point.
    • category (string: 200): category name.
    • vendor (string: 200): vendor code or vendor name. This field will be only returned when the customer given in the filters has access to see the vendor code or name. 
    • vendorName (string: 200): vendor name. This field will be only returned when the customer given in the filters has access to see the vendor code or when the token used doesn't belong to a specific customer.  
    • vendorCode (string: 20): vendor code. This field will be only returned when the customer given in the filters has access to see the vendor code or when the token used doesn't belong to a specific customer. 
    • quantity (integer:20): Quantity available, this can be either in Boxes or Units depending on the value of the itemType field. 
    • itemType (string:5): Box or Un.
    • quantitySold (integer:20): Quantity sold, this can be either in Boxes or Units depending on the value of the itemType field. 
    • originalQuantity (integer:20): Original quantity, this can be either in Boxes or Units depending on the value of the itemType field. 
    • totalUnits (integer:20): total units. When the unit type is bunch this is the number of total bunches; when the unit type is stem this is the number of total stems.
    • boxTypeId (integer:20): box type ID.
    • boxTypeCode (string:3): code used that corresponds to the size of the box (i.e. FB, EB, etc.).
    • unitType (string:5): unit type (Bunch or Stem).
    • bunches (integer:20): number of bunches per box.
    • unitsPerBox (integer:20): units per box or pack.
    • stemsBunch (integer:20) number of stems per bunch.
    • price (decimal:10,2): unit price based on the unit type of the product. 
    • fobPrice (decimal:10,2): unit fob price based on the unit type of the product and the customer given on the filters. If the customer is not given, this value will be the same unit price. 
    • image (string:200): The url of the product image, if it exists. 
    • availableFrom (date): available date from (date format YYYY-MM-DD).
    • availableTo: (date): available date to (date format YYYY-MM-DD).

 

Response Example
{
  "message": "success",
  "status": "1",
  "inventoryItems": [
    {
      "inventoryId": 482594,
      "companyProductId": 235229,
      "productDescription": "Rose Red 50 cm",
      "productCode": "235229",
      "grade": "50 cm",
      "category": "Rose",
      "vendor": "",
      "quantity": 116,
      "totalUnits": null,
      "boxTypeId": 901,
      "boxTypeCode": "HB",
      "unitType": "Bunch",
      "bunches": 12,
      "unitsPerBox": 12,
      "stemsBunch": 21,
      "price": 2.86,
      "fobPrice": null,
      "image": "http://d2qenwyttjq8k0.cloudfront.net/7030/product/Image",
      "availableFrom": "2016-11-24",
      "availableTo": "2016-11-29"
    }
  ]
}