Prices and restrictions
This endpoint allows you to import prices and restrictions.
Last updated
This endpoint allows you to import prices and restrictions.
Last updated
POST
https://api.mobile-calendar.com/get/pricing
This enpoint resturn the price list for date range as well as for given rooms.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
The request below gets prices for January 1, 2021, through January 2, 2021 and for rooms with ID 5630 and 5645.
If there is no room_ids
parameter, the API will return prices for all rooms.
You can find the room ID in the rooms details form.
"Price per room" pricing model. Means that the price per room is fixed, regardless of the number of people.
HTTP status 200 OK.
Note that the HTTP 200 OK code does not mean the answer is correct at all!
Authorization
string
API login and password are required header parameters for authentication
from
string
"Date from" to import price list
Correct format: YYYY-MM-DD
to
string
"Date to" to import price list
Correct format: YYYY-MM-DD
room_ids
array
Room IDs for which the price list should be imported. This field is not required. If it is not set, the API will return prices for all rooms.
Field
Level
Type
Description
status
L0
string
Responsne status success | errror
errors
L0
array
Informations about errors
data
L0
object
Main object "Pricing"
currency
L1
string(3)
Price list currency, 3-character currency format compatilbe withISO 4217 Standard
room
L1
array
List of rooms, the key of given room is it's ID
room_name
L3
string
Room name
pricing_type
L3
string
Type of price list. Allowed formats:
PRICE_PER_ROOM | PRICE_PER_PERSON | DERIVED_PRICE_MODEL
options
L3
array
Prices for different person. Only available in the pricing model DERIVED_PRICE_MODEL
leading_occupancy
L4
integer
Leading occupancy. Only occur with the parent field options
persons
L4
array
Individual options. Only occur with the parent field options
person
L5
integer
Number of people referenced by prices
type
L5
string
Indicates whether the discount is to be a percentage or an amount. Formats:
additional
- currency / amount discount
%
- percentage discount
prefix
L5
string(1)
Indicates whether the amount should be negative or positive. Formats: + | -
amount
L5
float
Amount, correct format: 100 | 100.00
prices_and_restrictions
L3
array
Prices and restrictions for a given day, the key of a given day is its date
price
L5
float
Price, correct format: 100 | 100.00
min_price
L5
float
Minimal price, Only available in the pricing model PRICE_PER_PERSON
correct format: 100 | 100.00
price_child
L5
float
Price for a child, Only available in the pricing modelPRICE_PER_PERSON
correct format: 100 | 100.00
min_stay
L5
integer
Minimum period of stay
max_stay
L5
integer
Maximum period of stay
avail_arrival
L5
bool
Available arrival, format: 0 | 1
avail_departure
L5
bool
Available departure, format 0 | 1
discount
L5
array
Discount for the stay
discount.min_stay
L6
integer
The minimum period of stay for which the discount begins
discount.price
L6
float
Amount or % discount, correct format: 100 | 100.00
discount.type
L6
integer
Percentage or currency discount type.
0 - oznacza procentowy
1 - oznacza walutowy
Error
Description
Set date range. Field "From" and "To" is required.
FieldFrom
and To
are required parameters
Incorrect format of "From" and/or "To" fields. Correct format YYYY-MM-DD
Invalid date format. The correct format is: YYYY-MM-DD
"From" date can not be greater than or equal to "To" date.
Incorrect date "From" or "To"
Date From
can not be greather than to
date
Maximum date range is 90 days
The maximum range for dates is 90 days
Add room IDs
If you set room_ids
parameter, then you must enter value
Wrong room IDs
You entered the wrong room ID or the rooms are not assigned to your account