Prices
Endpoint to create a customer-based price list from a set of StockItem ids. Price lists are non-persistent due to the fact that prices are based on synchronized StockItem data, customer data, and date-based price overrides.
Fields
customer
- Type: Object
Fields:
customer_price_level:Integer- The Southware price level of the customer
customer_type:String- The Southware customer type code
customer_id: String- The Southware customer ID
list_price
- Type: Number
The default price for this item based on Southware rules
source
- Type: String
The user friendly name of the selected price level
price
- Type: Number
The price for this customer based on Southware Rules
item
- Type: URL String
URL to the StockItem in the API
price_expires
- Type: String or
nullEither the date the price expires ornullif it never expires.
The date will be in the format "YYY-MM-DD"
price_date
- Type: String
The date this price is good for. Will usually be today.
The date will be in the format "YYY-MM-DD"
Endpoints
Create
Creates and returns price list for the specific set of StockItems requested,
for the customer data based on the current authenticated user. must
use the StockItem id.
Expects an object with a field called items that has an array of
StockItem ids
POST /api/prices/
{"items":[1]}
HTTP 200 OK
Allow: POST, OPTIONS
Content-Type: application/json
Vary: Accept
{
"1": {
"customer": {
"customer_price_level": 2,
"customer_type": "CC",
"customer_id": "1000001"
},
"list_price": 55.55,
"source": "Item Price Level 2",
"price": 45.55,
"item": "https://demo.itemextend.com/api/stockitems/1/",
"price_expires": null,
"price_date": "2018-07-12"
}
}
