Files
api2/docs/prices.md
T

294 lines
9.1 KiB
Markdown

# Prices
The prices resource provides a simple API to retrive price information about wallpaper and canvas products.
## Calculate wallpaper price
Calculate price inc VAT of a wallpaper product. The response will contain prices for all available materials.
| Parameter | Description |
| --------- | ------------|
| `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. |
| `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://api2.photowall.com/prices/wallpaper?width=200&height=200&territory=SE&dealerurl=ackes&product=43894'`
Sample response
```
{
"data": [
{
"m2_price": 295.0,
"m2_price_excl_vat": 236.0,
"material": "standard-wallpaper",
"material_id": 1,
"price": 1180.0,
"price_excl_vat": 944.0
},
{
"m2_price": 325.0,
"m2_price_excl_vat": 260.0,
"material": "premium-wallpaper",
"material_id": 4,
"price": 1300.0,
"price_excl_vat": 1040.0
}
]
}
```
## Calculate canvas price
Calculate price inc VAT of a canvas product. The response will contain information for both framed/not framed canvases. Note that width and height parameters may be adjusted if they go over or under the limits that are valid for a canvas. The values that are used in the price-calculation are always returned in the response.
| Parameter | Description |
| --------- | ------------|
| `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. |
| `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://api2.photowall.com/prices/canvas?width=100&height=50&territory=PL`
Sample response
```
{
"data": [
{
"framed": true,
"height": 50,
"m2_price": 252.37137599999997,
"m2_price_excl_vat": 201.89710079999998,
"price": 224.92771680815997,
"price_excl_vat": 179.942173446528,
"width": 100
},
{
"framed": false,
"height": 50,
"m2_price": 252.37137599999997,
"m2_price_excl_vat": 201.89710079999998,
"price": 126.18568799999998,
"price_excl_vat": 100.94855039999999,
"width": 100
}
]
}
```
## Calculate poster price
Calculate price inc VAT of a poster product. The response will contain prices for both with and without hanger.
| Parameter | Description |
| --------- | ------------|
| `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. |
| `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://api2.photowall.com/prices/poster?width=50&height=30&territory=SE&product=46654`
Sample response
```
{
"data": [
{
"hanger": true,
"height": 30,
"price": 401.03000000000003,
"price_excl_vat": 320.824,
"width": 50
},
{
"hanger": false,
"height": 30,
"price": 199.92000000000002,
"price_excl_vat": 159.936,
"width": 50
}
]
}
```
## Calculate framed print price
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. |
| `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://api2.photowall.com/prices/framed-print?sku=GLOBAL-CFP-12x12&territory=SE`
Sample response
```
{
"data": [
{
"price": 557.5,
"price_excl_vat": 446.0,
"sku": "GLOBAL-CFP-12x12"
}
]
}
```
## Calculate "Do it yourself frame" price
Calculate the price for the "do it yourself frame" (DIY). Note that width and height parameters may be adjusted if they go over or under the limits that are valid for a canvas-frame. The values that are used in the price-calculation are always returned in the response.
| Parameter | Description |
| --------- | ------------|
| `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. |
| `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://api2.photowall.com/prices/diy-frame?width=150&height=150&territory=SE`
Sample response
```
{
"data": [
{
"height": 150,
"price": 1327,
"width": 150
}
]
}
```
## Calculate Poster hanger price
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. |
| `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://api2.photowall.com/prices/poster-hanger?width=50&territory=SE`
Sample response
```
{
"data": [
{
"price": 231.5,
"price_excl_vat": 185.2,
"width": 50
}
]
}
```
## 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. 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.
| 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 |
Wallpaper inquiry - sample request
`curl -X GET 'https://api2.photowall.com/prices/inquiry/41015`
Sample response
```
{
"group": "wallpaper",
"height": 600,
"id": 41015,
"prices": [
{
"inquiry_price": 3595.50219975,
"inquiry_price_excl_retouch": 3595.50219975,
"inquiry_price_excl_vat": 2876.4017598,
"inquiry_price_excl_price_premium": 2876.4017598,
"m2_price": 268.72213750000003,
"m2_price_excl_vat": 214.97771,
"material": "standard-wallpaper",
"material_id": 1
},
{
"inquiry_price": 3961.1464912499996,
"inquiry_price_excl_retouch": 3961.1464912499996,
"inquiry_price_excl_vat": 3168.9171929999998,
"inquiry_price_excl_price_premium": 3168.9171929999998,
"m2_price": 296.04981250000003,
"m2_price_excl_vat": 236.83985,
"material": "premium-wallpaper",
"material_id": 4
}
],
"retouch_price": 0,
"width": 223
}
```
Canvas inquiry - sample request
`curl -X GET 'https://api2.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
}
```