Service

Name Edit Property Rate
Description Edit a rate of a property
Method PUT
URL /properties/{property}/rates/{rate}
Example /api/properties/11111111/rates/12345
Access OWNER, MANAGER

HTTP Headers

Authorization eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXUyJ9...

Parameters

Fields Type Required Description
property number yes Property id.
rate number yes Rate id.
rates_type number yes 1 - Seasonal, 2 - Holiday.
period_name text yes Name to identify the period.
start_date date yes Date when the period starts.
end_date date yes Date when the period ends.
minimum_stay number yes Minimum number of days. If rates_type is different to holiday, this field is required.
nightly number yes Price per night. If rates_type is different to holiday, this field is required.
weekly number no Price per week. If rates_type is different to holiday, you will can fill this field.
monthly number no Price per month. If rates_type is different to holiday, you will can fill this field.
holiday_price number no If rates_type is holiday, this field is required.
weekend_nights_charge bool no If rates_type is different to holiday, it is can accept value.
weekend_nights_price number no If weekend_nights_charge is true, you need to specified the value.
weekend_days array no Only required when rates_type is different to holiday and weekend_nights_carge is true.
guest_fee bool no If rates_type is different to holiday, you will can fill this field.
guest_fee_price number no If guest_fee is true, this field is required.
guests_quantity number no If guest_fee is true, this field is required.
notes text no Additional notes to specified any things.

Parameter: weekend_days

Fields Type Required Description
[thursday] bool yes If charge applied Thursday.
[friday] bool yes If charge applied Friday.
[saturday] bool yes If charge applied Saturday.
[sunday] bool yes If charge applied Sunday.

Response

            
                {
                    "code": R111,
                    "message": "Success"
                }
            
            

Response Codes

Code Message Cause Possible Frontend Message [Behavior]
EC000 Internal error in API Internal error connecting the database "Oops! Looks like we hit a snag. Try closing the app and reopening it."
EC001 User not found Token user id doesn't match our records "Sorry, We couldn't find your information!"
EC002 Property not found Property id doesn't match our records "Sorry, We couldn't find that property!"
EC013 Rate not found Rate id doesn't match our records "Sorry, We couldn't find that rate!"
EC014 Property doesn't belong to that user The user logged in is not the property's owner "Sorry, you do not have access to that property!"
EC018 Rate does not belong to the user Rate id does not belong to the user "Sorry, you do not have access to that rate!"
EC021 Standard Rate not editable in this service. You are trying to edit the Standard Rate [Call the API again using the correct service]
EC022 Kind of period different to rates_type. Rates_type is different than the type of the rate that you are editing
EC024 Range of date not valid The range of date is not valid Please enter valid dates
EC026 Period does not belong to the property Rate id doesn't belong to the property "Sorry, We couldn't find that rate!"
R000 Fail The rate wasn't updated
R111 Success The operation was successful
SC006 User no authorization The token role is not valid for using the API services "You have been logged out." - [Take the user to the login screen]
SC014 Expired token The token has expired "You have been logged out." - [Take the user to the login screen]
VID112 Invalid input for property Property id is not a number [Call the API again using a valid value for property id]
VID167 Invalid input for rate Rate id is not a number [Call the API again using a valid value for rate id]
VID168 Invalid input for rates_type Rates_type is not in [1, 2] [Call the API again using a valid value for rates_type]
VID169 Invalid input for rate minimum stay Minimum_stay is not a number between 0-180 "Please select an item from the list"
VID170 Invalid input for rate price nightly Nightly is not a number Nightly must be a number
VID171 Invalid input for rate price weekly Weekly is not a number Weekly must be a number
VID172 Invalid input for rate price monthly Monthly is not a number Monthly must be a number
VID173 Invalid input for rate weekend_charge Weekend_charge is not in [0, 1] [Call the API again using a valid value for weekend_charge]
VID174 Invalid input for rate weekend_price Weekend_price is not a number Weekend nights price must be a number
VID175 Invalid input for rate weekend_days Weekend_days is not an array of 4 item or some items are not in [0, 1] [Call the API again using a valid value for weekend_days]
VID176 Invalid input for rate guest_fee Guest_fee is not in [0, 1] [Call the API again using a valid value for guest_fee]
VID177 Invalid input for guest_price Guest_price is not a number Guest fee must be a number
VID178 Invalid input for guest_quantity Guest_quantity is not a number "Please select an item from the list"
VID179 Invalid input for period name Period name is empty or it has only characters not allowed(" ", ', ’, ‘, ’, ", &, \, <, >, --) "Please enter a valid text for Period Name"
VID180 Invalid input for start date Start date doesn't meet the date's format "Please enter a valid Start date"
VID181 Invalid input for end date End date doesn't meet the date's format "Please enter a valid End date"
VID182 Invalid input for holiday_price Holiday_price is not a number Holiday price must be a number
VID183 Invalid input for notes Notes has only characters not allowed(" ", ', ’, ‘, ’, ", &, \, <, >, --) "Please enter a valid text for Notes"