Add price from value for external product inquiries (#49)

This commit is contained in:
Fredrik Ringqvist
2022-02-23 13:44:47 +01:00
committed by GitHub
parent b1177a1e1c
commit 18fe57fb62
2 changed files with 30 additions and 43 deletions
+16 -38
View File
@@ -238,14 +238,28 @@ Sample response
## Calculate inquiry price
Calculates the price of an inquiry. For wallpapers inquiries the response will contain price information for all available materials and for canvas it will contain the price for both the framed and the not-framed canvas. External print products uses the `external_product_id` attribute. The `group` attribute tells which kind of product you are dealing with.
The width and height stored on the inquiry will be used in the calculations by default. If you want to override these values you can send in your own width/height parameters in the request.
Calculates the price of an inquiry.
For wallpapers inquiries the response will contain price information for all available materials. The width and height stored on the inquiry will be used in the calculations by default. If you want to override these values you can send in your own width/height parameters in the request.
External print products (canvas, posters, framed prints) uses the `external_product_id` attribute.
The `group` attribute tells which kind of product you are dealing with.
Parameters wallpapers
| Parameter | Description |
| --------- | ------------|
| `width` | Width in cm e.g `100`. Defaults to the inquiry stored width |
| `height` | Height in cm e.g `50`. Defaults to the inquiry stored height |
Parameters external print products
| Parameter | Description |
| --------- | ------------|
| `external_product_id` | e.g. `canvas_400x600-mm-16x24-inch_canvas_wood-fsc-slim_4-0_ver` |
| `listprice` | Optional, one of `canvas` or `poster`. Will return the price for the cheapest product in group. Used for "Price from x kr" value |
Wallpaper inquiry - sample request
@@ -285,42 +299,6 @@ Sample response
}
```
Canvas inquiry - sample request
`curl -X GET 'https://api.photowall.com/prices/inquiry/310999?width=500&height=150`
Sample response
```
{
"group": "canvas",
"id": 310999,
"prices": [
{
"framed": true,
"height": 150,
"inquiry_price": 355.71481084,
"inquiry_price_excl_retouch": 355.71481084,
"inquiry_price_excl_vat": 284.571848672,
"m2_price": 112.887,
"m2_price_excl_vat": 90.3096,
"width": 150
},
{
"framed": false,
"height": 150,
"inquiry_price": 846.6525,
"inquiry_price_excl_retouch": 846.6525,
"inquiry_price_excl_vat": 677.322,
"m2_price": 112.887,
"m2_price_excl_vat": 90.3096,
"width": 500
}
],
"retouch_price": 0
}
```
## Calculate wallpaper kit price