P5-6491 use market instead of territory for price calculations (#37)

This commit is contained in:
Martin Carlsson
2021-01-25 09:24:26 +01:00
committed by GitHub
parent dee7344ba5
commit 464e2f1fa6
11 changed files with 127 additions and 256 deletions
+12 -12
View File
@@ -10,14 +10,14 @@ Calculate price inc VAT of a wallpaper product. The response will contain prices
| --------- | ------------|
| `width` | Wallpaper width in cm e.g `100` |
| `height` | Wallpaper height in cm e.g `50` |
| `territory` | Two letter iso code e.g `SE`. Territory affect the price in different ways like VAT, currency exchanges etc. |
| `market` | Market id e.g `1` for sweden. Markets affect the price in different ways like VAT, currency exchanges etc. |
| `dealerurl` | Optional parameter e.g `ackes`. Should always be used when calling the api from a dealerstore. If a dealerstore exists with this url additional fees will be applied to the price. |
| `product` | Optional parameter e.g `43894`. If a product with this id exists the api will calculate the price for the given product. |
Sample request
`curl -X GET 'https://api.photowall.com/prices/wallpaper?width=200&height=200&territory=SE&dealerurl=ackes&product=43894'`
`curl -X GET 'https://api.photowall.com/prices/wallpaper?width=200&height=200&market=1&dealerurl=ackes&product=43894'`
Sample response
```
@@ -51,14 +51,14 @@ Calculate price inc VAT of a canvas product. The response will contain informati
| --------- | ------------|
| `width` | Canvas width in cm e.g `100` |
| `height` | Canvas height in cm e.g `50` |
| `territory` | Two letter iso code e.g `SE`. Territory affect the price in different ways like VAT, currency exchanges etc. |
| `market` | Market id e.g `1` for sweden. Markets affect the price in different ways like VAT, currency exchanges etc. |
| `dealerurl` | Optional parameter e.g `ackes`. Should always be used when calling the api from a dealerstore. If a dealerstore exists with this url additional fees will be applied to the price. |
| `product` | Optional parameter e.g `43894`. If a product with this id exists the api will calculate the price for the given product. |
Sample request
`curl -X GET 'https://api.photowall.com/prices/canvas?width=100&height=50&territory=PL`
`curl -X GET 'https://api.photowall.com/prices/canvas?width=100&height=50&market=14`
Sample response
```
@@ -94,13 +94,13 @@ Calculate price inc VAT of a poster product. The response will contain prices fo
| --------- | ------------|
| `width` | Poster width in cm e.g `100` |
| `height` | Poster height in cm e.g `50` |
| `territory` | Two letter iso code e.g `SE`. Territory affect the price in different ways like VAT, currency exchanges etc. |
| `market` | Market id e.g `1` for sweden. Markets affect the price in different ways like VAT, currency exchanges etc. |
| `dealerurl` | Optional parameter e.g `ackes`. Should always be used when calling the api from a dealerstore. If a dealerstore exists with this url additional fees will be applied to the price. |
| `product` | Optional parameter e.g `43894`. If a product with this id exists the api will calculate the price for the given product. |
Sample request
`curl -X GET 'https://api.photowall.com/prices/poster?width=50&height=30&territory=SE&product=46654`
`curl -X GET 'https://api.photowall.com/prices/poster?width=50&height=30&market=1&product=46654`
Sample response
```
@@ -131,13 +131,13 @@ Calculate price inc VAT of a framed print product.
| Parameter | Description |
| --------- | ------------|
| `sku` | Pwinty SKU number |
| `territory` | Two letter iso code e.g `SE`. Territory affect the price in different ways like VAT, currency exchanges etc. |
| `market` | Market id e.g `1` for sweden. Markets affect the price in different ways like VAT, currency exchanges etc. |
| `dealerurl` | Optional parameter e.g `ackes`. Should always be used when calling the api from a dealerstore. If a dealerstore exists with this url additional fees will be applied to the price. |
| `product` | Optional parameter e.g `43894`. If a product with this id exists the api will calculate the price for the given product. |
Sample request
`curl -X GET 'https://api.photowall.com/prices/framed-print?sku=GLOBAL-CFP-12x12&territory=SE`
`curl -X GET 'https://api.photowall.com/prices/framed-print?sku=GLOBAL-CFP-12x12&market=1`
Sample response
```
@@ -160,13 +160,13 @@ Calculate the price for the "do it yourself frame" (DIY). Note that width and he
| --------- | ------------|
| `width` | Canvas width in cm e.g `100` |
| `height` | Canvas height in cm e.g `50` |
| `territory` | Two letter iso code e.g `SE`. Territory affect the price in different ways like VAT, currency exchanges etc. |
| `market` | Market id e.g `1` for sweden. Markets affect the price in different ways like VAT, currency exchanges etc. |
| `dealerurl` | Optional parameter e.g `ackes`. Should always be used when calling the api from a dealerstore. If a dealerstore exists with this url additional fees will be applied to the price. |
Sample request
`curl -X GET 'https://api.photowall.com/prices/diy-frame?width=150&height=150&territory=SE`
`curl -X GET 'https://api.photowall.com/prices/diy-frame?width=150&height=150&market=1`
Sample response
```
@@ -188,13 +188,13 @@ Calculate the price for a poster hanger
| Parameter | Description |
| --------- | ------------|
| `width` | Poster hanger width in cm e.g `100` |
| `territory` | Two letter iso code e.g `SE`. Territory affect the price in different ways like VAT, currency exchanges etc. |
| `market` | Market id e.g `1` for sweden. Markets affect the price in different ways like VAT, currency exchanges etc. |
| `dealerurl` | Optional parameter e.g `ackes`. Should always be used when calling the api from a dealerstore. If a dealerstore exists with this url additional fees will be applied to the price. |
Sample request
`curl -X GET 'https://api.photowall.com/prices/poster-hanger?width=50&territory=SE`
`curl -X GET 'https://api.photowall.com/prices/poster-hanger?width=50&market=1`
Sample response
```