Overview

 

This method is still under construction.

 

 This method allows you to set prices to several products at the same time into a certain Price List.

Request

https://api.kometsales.com/api/product.price.list.update

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

The method requires a JSON format request.

 

Input parameters:

  • authenticationToken (required)(string:50): Komet Sales security token.
  • priceListId (required) (integer:20): Komet Sales internal ID of the Price List that you want to update. 
  • seasonName (required) (string: 50): Name of the season that you want to update. 
  • dateFrom (required) (date): The date when the season starts. Format must be YYYY-MM-DD.
  • dateTo (required) (date): The date when the season ends. Format must be YYYY-MM-DD.
  • prices (required)(array): array of prices. 
    • productCode (required) (string:20): Product Legacy Code. You can obtain this value from the product.list API method.
    • price (required) (decimal: 10,2): The price to set. 

Sample 1
{
  "authenticationToken": "token_info_goes_here",
  "priceListId": 1020,
  "seasonName":"Summer 2016",
  "dateFrom": "2016-06-21",
  "dateTo": "2016-09-21",
  "prices": 
  [
    {  
      "productCode": "19878",
      "price": 2.3
    },
    {
      "productCode": "19879",
      "price": 2.5
    },
    {
      "productCode": "19421",
      "price": 2.1
    }
  ]
}

Response

Output:

  • status (integer:1): transaction status. 1 for success or 0 for failure.
  • message (string:500): description of the status of the transaction.
  • failedPrices: array of prices that could not be set.
    • productCode: Product Legacy Code that was sent in the input parameters. 
    • message: description of the status of the transaction.

Output example
{
    "status": "1",
    "message": "OK"
}
Output example
{
    "status": "0",
    "message": "The date format is not valid"
}
Output example
{
    "status": "2",
    "message": "Some prices could not be set. Please see details."
    "failedPrices": 
		[
           {
              "productCode": "19878",
              "message": "The price could not be set because the number format is not valid"
			} 
        ]
}