It allows you:
to get the price list of product
to write/update prices of one product
to delete a price of one product
This API Method is recommended to use when you have particular price list defined per customer.
Prerequisites:
In order to use this API Method for PUT there must be accomplished the following requirements in SocrateCloud:
to have the product created in SocrateCloud
Columns that can be used as filters:
Organization
Product (value)
PriceListVersion
Name
ValidFrom
ValidTo
BPartner
Active
LastModified (UTC time format ISO 8601: yyyy-MM-dd HH:mm:ss Z, max date from Product Price). Use this filter to get the newest price since last interrogation
IsDefault
IsSaleList
Currency
Mandatory Parameters when inserting product prices:
Product Value
Actions can be done:
list
create
update
delete
API Methods fields:
URL: https://api.socratecloud.com/webapi/rest/product/price/list/{version}?startRow={0}&endRow={100}&accessToken={access_token}&Product={productValue}
Method: GET
Return: JSON object with next format:
{
"data": [
{
"Organization": "Demo SRL",
"Created": "2014-04-25 13:00:08",
"CreatedBy": "System",
"Updated": "2007-08-22 08:30:19",
"UpdatedBy": "System",
"Active":true,
"Product":"Standard",
"ProductName":"Standard",
"PriceList": "RON Standard",
"PriceListVersion": "RON Generic",
"ListPrice": 10,
"StdPrice": 10,
"ValidFrom": "2007-01-01 00:00:00",
"ValidTo": null,
"Currency": "RON",
"NoPromoForecastQty": 5,
"BPartner": null,
"IsSaleList": true,
"IsDefault": false
}
],
"totalRows": 1
}
URL: https://api.socratecloud.com/webapi/rest/product/price/create/{version}?accessToken={access_token}&Product={product_value}&PriceListVersion={price_list_version}
Method: POST
Return: 'productValue_priceListVersion' for success or error message (start with "ERROR: ")
Data format:
{
"Organization": "Demo SRL",
"Active": "true",
"ListPrice": 17,
"StdPrice": 17
}
URL: https://api.socratecloud.com/webapi/rest/product/price/update/{version}?accessToken={access_token}&Product={product_value}&PriceListVersion={price_list_version}
Method: POST
Return: 'productValue_priceListVersion' for success or error message (start with "ERROR: ")
Data format:
{
"Organization": "Demo SRL",
"Active": "true",
"ListPrice": 20,
"StdPrice": 20
}
URL: https://api.socratecloud.com/webapi/rest/product/price/delete/{version}?accessToken={access_token}&Product={product_value}&PriceListVersion={price_list_version}
Method: POST
Return: 'Deleted' for success or error message (start with "ERROR: ")