price_change
POST /price_change
To create a new price adjustment (change).
{
"api_credentials": {
"token": "XXXX"
},
"price_change": {
"price_change_header": {
"price_change_code": "DEVICEID04082016030211",
"price_change_date_utc0": "2016-07-17 08:25:00",
"changed_price": "Price2",
"changed_based_on": "Price1",
"allow_price_below_minimum_price": true,
"change_only_zero_price": false,
"price_includes_vat": true,
"fixed_price": false,
"fixed_price_value": 0.0,
"price_changed_by_percentage_value": true,
"price_changed_by_amount_or_percentage_value": 25,
"price_changed_increased": false,
"price_has_been_rounded":false,
"price_has_been_rounded_to_value":0.0,
"user_code_365":"your_user_code_here"
},
"list_price_change_details": [
{
"line_number": "1",
"item_code_365": "ARTICLE01-AZURE-240",
"based_on_price_incl_vat":200.00,
"based_on_price_excl_vat":168.07,
"current_price_incl_vat": 150.00,
"current_price_excl_vat": 126.05,
"vat_code_365": "019",
"vat_percentage": 19.00
},
{
"line_number": "2",
"item_code_365": "ARTICLE01-BLK-290",
"based_on_price_incl_vat":200.00,
"based_on_price_excl_vat":168.07,
"current_price_incl_vat": 150.00,
"current_price_excl_vat": 126.05,
"vat_code_365": "019",
"vat_percentage": 19.00
}
]
}
}
| field |
type |
description |
|
api_credentials
|
| token |
string |
Credentials provided by Powersoft that allow access to the API |
|
price_change
|
|
price_change_header
|
| price_change_code |
string |
The unique number of price adjustment in your system |
| price_change_date_utc0 |
datetime |
This is the Coordinated Universal Time (UTC). ie at time zone +0 when the price change occured |
| changed_price |
string |
Which price has been changed. Only "Price1","Price2","Price3","Price4","Price5","Price6","Price7","Price8","Price9","Price10","MinimumPrice" values are allowed. |
| changed_based_on |
string |
Based on which price the price has been changed. Only "Price1","Price2","Price3","Price4","Price5","Price6","Price7","Price8","Price9","Price10","MinimumPrice","Itself","LatestCost","AverageCost","WeightedAverageCost" values are allowed. |
| allow_price_below_minimum_price |
boolean |
If the change of the price is allowed to be below minimum price of the item |
| change_only_zero_price |
boolean |
If have been changed only the items for which the changed_price was zero |
| price_includes_vat |
boolean |
If the price changed is the one including VAT, the other one excluding VAT has been calculated based on the price including vat and vat value |
| fixed_price |
boolean |
If changed_price for all items involved has been changed with a fixed price value |
| fixed_price_value |
decimal |
The fixed price value |
| price_changed_by_percentage_value |
boolean |
The changed_price has been changed based on a percentage value or based on a certain amount |
| price_changed_by_amount_or_percentage_value |
decimal |
The percentage value or the amount value the price has been changed. |
| price_changed_increased |
boolean |
If changed_price resulted in an increase of the actually price |
| price_has_been_rounded |
boolean |
If changed_price has been rounded |
| price_has_been_rounded_to_value |
decimal |
The value which changed_price has been rounded to |
| user_code_365 |
string |
The user code that performed the price change |
|
list_price_change_details
|
| line_number |
int |
The position of this line in the price_change list. eg 1 |
| item_code_365 |
string |
The code or barcode of the item in 365 |
| based_on_price_incl_vat |
decimal |
The value of the price including VAT based on which the price has been changed |
| based_on_price_excl_vat |
decimal |
The value of the price excluding VAT based on which the price has been changed |
| current_price_incl_vat |
decimal |
The new value of the price including VAT after changes have been applied |
| current_price_excl_vat |
decimal |
The new value of the price excluding VAT after changes have been applied |
| vat_code_365 |
string |
The code of the vat in 365 |
| vat_percentage |
decimal |
The vat percentage of the item. eg. If the vat is 19%, pass 19.00 |
Returns
Returns the standard api_response object. The Powersoft365 price adjustment code is returned in the response_id field.