Skip to main content

Price

Price provides access to the price resource. Prices are host specific. They should always be linked to a priceChange. Posting a price with an invalid or null fk_priceChange property will result in an error.

Price Properties

PropertyExampleDescription
id"5A57CB7..."The unique id for the price record
fk_hostVariant"BAFE9B..."The foreign key to the host variant (Mandatory)
fk_priceChange"8FB207..."The foreign key to the host variant (Mandatory)
price0The sort order for the size within the SKU (Mandatory)
currency"GBP"The currency for the price (Mandatory)
detail{object}An object which can contain any host specific price detail.
price_hostVariant{related entity}The related hostVariant record detail
price_priceChange{related entity}The related price change record detail

Price Methods

GET/api/price

Returns all price records for the current scope with all published fields.

POST*/api/price

Allows for the creation of price records. Prices can be posted as part of the priceChange resource or separately.

Example

Example of a returned price entity with all fields
{
"response": {
"page": 1,
"pageCount": 190,
"recordsSent": 1,
"recordsFound": 190,
"price": [
{
"id": "5A57CB7503A4FA44A1607BFCC66E2B54",
"fk_hostVariant": "BAFE9BE5DFFD3840A612063942AD7ED1",
"fk_priceChange": "8FB2079377DB674291DCDD1B026516CF",
"price": 24,
"currency": "",
"detail": {},
"price_hostVariant": {
"hostVariant_variant": {
"code": "16427035 C",
"barcode": "5060409819066",
"variant_product": {
"id": "93528730202F494594B12BC6D85E86AC",
"fk_brand": "3A74DB24AE629E4489FD4CA55057A80B",
"code": "16427",
"title": "Ashton Cardigan",
"category": "Knitwear",
"description": "Long sleeved Knitted Cardigan",
"productBrand": "LaFashion",
"season": "SS20",
"origin": "India",
"composition": "58% cotton, 32% polyamide and 10% wool",
"careInstructions": "",
"createdDate": "",
"status": "",
"detail": {
"importFile": "F202E6A031AE1544933C028A0A4CAD05"
},
"commodityCode": ""
}
}
},
"price_priceChange": {
"id": "8FB2079377DB674291DCDD1B026516CF",
"fk_file": "852063AA62ADDA4FBB1A483F42C03622",
"name": "",
"startDate": "2020-09-10T00:00:00",
"endDate": "0000-00-00T00:00:00",
"appliedDate": "",
"detail": {}
}
}
]
}
}