- A valid authentication token is required to access the API. How to authenticate your application
PUT - Update pricing
This method allows you to send a new price schema for a specified product
- The request body must be in JSON format and HTTP headers must include
- The headers must include a valid access token.
|product_id||number||yes||ID of the product. NOTE: this should not be included in the payload, but as a path variable|
|type||string||yes||Pricing type. Possible values: DYNAMIC_PRICING|
|valid_from||date-time||no||Time when this pricing becomes valid (ISO8601). Will become valid instantly when null|
|prices||List of prices||yes|
|type||string||yes|| Type of price. Multiple DYNAMIC and REGULAR prices can be used. Possible values: |
|period||string||no||Period for price (e.g. "30 MINUTES", "1 HOUR"). Required if DYNAMIC price does not cover all 24 hours and all non-zero REGULAR prices. Supported periods: SECOND(S),MINUTE(S),HOUR(S),DAY(S)|
|amount||decimal||yes||Price for a period.|
|hourly_amounts||Map<number, decimal>||no||A map where the key is the hour (0-23) and the value is the price for that hour. Only for DYNAMIC price type|
|restrictions||List of restrictions||no||Optional, can be used on both DYNAMIC and REGULAR prices. Multiple restrictions can be used for one price.|
|type||string||yes|| Restriction type. Possible values: |
|restrict_to||List of strings||yes||List of weekdays. ex ["MONDAY", "TUESDAY", "..."] for WEEKDAYS type, period (ex. "30 MINUTES", "1 HOUR") for duration based restrictions|
This example includes:
- Dynamic price that is valid from Monday to Friday. A different minute price is valid each hour from 9 to 17. The rest of the day has a minute price of 1.0
- A regular price that defines the daily price. This will be used on days when dynamic price is not valid (weekends) or when the sum of hourly prices would be more expensive.
- A regular price that makes weekends free if the service (e.g. parking) is longer than 7 days.
- An accumulative daily price. If the car uses the service multiple times in a 24hour period, the price can never exceed 400.
HTTP Code: 204 OK
|error_id||string||Specific code of error. See below for possible values|
|message||string||Description of error|
|description||string||Optional value. Additional description of error.|
Example error response
Possible error id-s
|internal_server_error||Internal server error|