Introduction
How to obtain credentials
To obtain credentials please contact our support Team.
Swagger docs
Your system contains swagger docs, that can be found by path /external/v1/docs/
Booking Checkout API
Allows to make checkout on Stays side. To use this API, you have to get unique credentials (client_id, client_secret) from Stays provider.
Initiate checkout process
curl -X POST "https://play.stays.net/external/v1/book-request" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d \
'{
"from": "2019-12-10",
"to":"2019-12-14",
"aptid":"YT04A",
"persons":2,
"client": {
"email":"client@example.com",
"fName":"First Name",
"lName":"Last Name"
}
}'
The above command returns JSON structured like this:
{
"redirectUrl":"https://play.stays.com.br/external/v1/book-request?from=2019-12-10&to=2019-12-14&id=YT04A&persons=2&suffix=MTg5MTdjODNlMzk1Zjk0M2M3ZGFlOGY2Zjk0M2E1YmMwMDZhMmNkMjY4MWYwZDMy"
}
This endpoint checks booking possibility and returns url that you have to redirect guest to complete checkout process. Guest will be created inside Stays system if he doesn't exist.
HTTP Request
POST /external/v1/book-request
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Body Parameters
Parameter | Type | Description |
---|---|---|
from | ISO date string YYYY-MM-DD |
booking start date |
to | ISO date string YYYY-MM-DD |
booking end date |
aptid | String | Stays apartment identifier |
persons | Integer | total guests number (Optional. Default is 1) |
client | Object | client who makes booking |
client.email | String | email address of client (will use to search if client already exists in Stays system) |
client.fName | String | client first name |
cient.lName | String | client last name |
Promo code API
Allows to manage promo codes.
Create promo code
curl -X POST "https://play.stays.net/external/v1/booking/promo-codes" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d "{\"name\":\"test 2\",\"type\":\"percent\",\"_f_discount\":\"10\",\"status\":\"active\",\"maxUsesCount\":10,\"useWithOtherPromotions\":false,\"periodRestrictions\":{\"enable\":true,\"from\":\"2020-05-10\",\"to\":\"2020-07-31\",\"invalidDaysOfWeek\":[6,7]},\"calendarRestrictions\":{\"enable\":true,\"validArrivalDates\":{\"from\":\"2020-06-01\",\"to\":\"2020-09-01\"},\"invalidArrivalDates\":{\"from\":\"2020-10-01\",\"to\":\"2020-10-10\"},\"validDepartureDates\":{\"from\":\"2020-06-01\",\"to\":\"2020-09-01\"},\"invalidDepartureDates\":{\"from\":\"2020-11-01\",\"to\":\"2020-11-03\"},\"minLengthOfStay\":5},\"productRestrictions\":{\"enable\":true,\"bedrooms\":[2,3,4,5]},\"userRestrictions\":{\"enable\":true,\"emails\":[\"test1@stays.net\",\"test2@stays.net\"],\"minReservationsCount\":2,\"maxGuestsCount\":5}}"
The above command returns JSON structured like this:
{
"_id": "5ea9c4a34a113f67a90ca4f9",
"name": "test 2",
"status": "active",
"type": "percent",
"_f_discount": 10,
"maxUsesCount": 10,
"maxUsesCountPerGuest": 1,
"usedCount": 0,
"usedCountPerGuest": 0,
"useWithOtherPromotions": false,
"periodRestrictions": {
"enable": true,
"from": "2020-05-10",
"to": "2020-07-31",
"invalidDaysOfWeek": [
6,
7
]
},
"calendarRestrictions": {
"enable": true,
"validArrivalDates": {
"from": "2020-06-01",
"to": "2020-09-01"
},
"invalidArrivalDates": {
"from": "2020-10-01",
"to": "2020-10-10"
},
"validDepartureDates": {
"from": "2020-06-01",
"to": "2020-09-01"
},
"invalidDepartureDates": {
"from": "2020-11-01",
"to": "2020-11-03"
},
"minLengthOfStay": 5
},
"productRestrictions": {
"enable": true,
"bedrooms": [
2,
3,
4,
5
],
"listingsLimit": {
"type": "no",
"apartments": [
"5dee464910450609ca7ea2d7"
],
"buildings": [
"5dee464910450609ca7ea2d7"
]
}
},
"userRestrictions": {
"enable": true,
"emails": [
"test1@stays.net",
"test2@stays.net"
],
"minReservationsCount": 2,
"maxGuestsCount": 5
}
}
Creates promo code
HTTP Request
POST /external/v1/booking/promo-codes
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Body Parameters
Parameter | Type | Description |
---|---|---|
name * | String | Promo code name |
type * | String | Promo code discount type. Can be 'fixed' or 'percent' |
_f_discount | Number | Promo code percentage discount |
_mcdiscount | Object | Promo code fixed discount with mutlicurrency |
status | String | Promo code status. Can be 'active' or 'inactive' |
maxUsesCount | Integer | Define, how many times promo code can be used |
maxUsesCountPerGuest | Integer | Define, how many times per guest promo code can be used |
usedCount | Integer | Define, how many times the promo was used |
usedCountPerGuest | Integer | Define, how many times the promo was used per guest |
useWithOtherPromotions | Boolean | Can promocode be applied if other promotions exists |
periodRestrictions | Object | Defines general restrictions for date range of using |
periodRestrictions.enable | Boolean | Indicates if restrictions are active |
periodRestrictions.from | ISO date string YYYY-MM-DD |
Start date when promocode can be applied |
periodRestrictions.to | ISO date string YYYY-MM-DD |
End date when promocode can be applied |
periodRestrictions.invalidDaysOfWeek | Array | Days of week, when promocode cannot be applied. Possible values are 1-7. Where 1 is Monday, 7 is Sunday |
calendarRestrictions | Object | Defines calendar restrictions |
calendarRestrictions.enable | Boolean | Indicates if restrictions are active |
calendarRestrictions.validArrivalDates | Object | Defines date range for arrival, when promocode can be applied |
calendarRestrictions.validArrivalDates.from | ISO date string YYYY-MM-DD |
Start arrival date when promocode can be applied |
calendarRestrictions.validArrivalDates.to | ISO date string YYYY-MM-DD |
End arrival date when promocode can be applied |
calendarRestrictions.invalidArrivalDates | Object | Defines date range for arrival, when promocode cannot be applied |
calendarRestrictions.invalidArrivalDates.from | ISO date string YYYY-MM-DD |
Start arrival date when promocode cannot be applied |
calendarRestrictions.invalidArrivalDates.to | ISO date string YYYY-MM-DD |
End arrival date when promocode cannot be applied |
calendarRestrictions.validDepartureDates | Object | Defines date range for departuren, when promocode can be applied |
calendarRestrictions.validDepartureDates.from | ISO date string YYYY-MM-DD |
Start departure date when promocode can be applied |
calendarRestrictions.validDepartureDates.to | ISO date string YYYY-MM-DD |
End departure date when promocode can be applied |
calendarRestrictions.invalidDepartureDates | Object | Defines date range for departure, when promocode cannot be applied |
calendarRestrictions.invalidDepartureDates.from | ISO date string YYYY-MM-DD |
Start departure date when promocode cannot be applied |
calendarRestrictions.invalidDepartureDates.to | ISO date string YYYY-MM-DD |
End departure date when promocode cannot be applied |
calendarRestrictions.minLengthOfStay | Integer | Indicates minimum nights number of booking when promocode can be applied |
productRestrictions | Object | Defines product restrictions using bedrooms or groups |
productRestrictions.enable | Boolean | Indicates if restrictions are active |
productRestrictions.bedgrooms | Array | Defines bedrooms numbers for what promo code is applicable. For Studio is 0 |
productRestrictions.groups | Array | Defines groups identifiers for what promo code is applicable |
productRestrictions.listingsLimit | Object | Defines the limit of the listings |
productRestrictions.listingsLimit.type | String | Type of listing limit [ no, exclude, include ] |
productRestrictions.listingsLimit.apartments | String | Apartments identifier |
productRestrictions.listingsLimit.buildings | String | Buildings identifier |
userRestrictions | Object | Defines user restrictions |
userRestrictions.enable | Boolean | Indicates if restrictions are active |
userRestrictions.emails | Array | Defines list of guests emails for what promo code is applicable. |
userRestrictions.clients | Array | Defines list of clients identifiers for what promo code is applicable. |
userRestrictions.minReservationsCount | Integer | Defines min number of previous guest's reservations after promo code will be valid |
userRestrictions.minAmountSpentByGuest | Number | Defines min amount of money that guest spent before to make promo code valid |
userRestrictions.maxGuestsCount | Integer | Defines max guests count for reservations |
* - required params
Get promo code
curl -X GET "https://play.stays.net/external/v1/booking/promo-codes/5ea9c4a34a113f67a90ca4f9" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"_id": "5ea9c4a34a113f67a90ca4f9",
"name": "test 2",
"status": "active",
"type": "percent",
"_f_discount": 10,
"maxUsesCount": 10,
"maxUsesCountPerGuest": 1,
"usedCount": 0,
"usedCountPerGuest": 0,
"useWithOtherPromotions": false,
"periodRestrictions": {
"enable": true,
"from": "2020-05-10",
"to": "2020-07-31",
"invalidDaysOfWeek": [
6,
7
]
},
"calendarRestrictions": {
"enable": true,
"validArrivalDates": {
"from": "2020-06-01",
"to": "2020-09-01"
},
"invalidArrivalDates": {
"from": "2020-10-01",
"to": "2020-10-10"
},
"validDepartureDates": {
"from": "2020-06-01",
"to": "2020-09-01"
},
"invalidDepartureDates": {
"from": "2020-11-01",
"to": "2020-11-03"
},
"minLengthOfStay": 5
},
"productRestrictions": {
"enable": true,
"bedrooms": [
2,
3,
4,
5
],
"listingsLimit": {
"type": "no",
"apartments": [
"5dee464910450609ca7ea2d7"
],
"buildings": [
"5dee464910450609ca7ea2d7"
]
}
},
"userRestrictions": {
"enable": true,
"emails": [
"test1@stays.net",
"test2@stays.net"
],
"minReservationsCount": 2,
"maxGuestsCount": 5
}
}
Get promo code by identifier
HTTP Request
GET /external/v1/booking/promo-codes/{_id}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Modify promo code
curl -X PATCH "https://play.stays.net/external/v1/booking/promo-codes/5ea9c4a34a113f67a90ca4f9" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d "{\"name\":\"test 2-1\",\"type\":\"fixed\",\"_mcdiscount\":{\"BRL\":50}}"
The above command returns JSON structured like this:
{
"_id": "5ea9c4a34a113f67a90ca4f9",
"name": "test 2-1",
"status": "active",
"type": "fixed",
"_mcdiscount": {
"BRL": 50,
"USD": 10,
"EUR": 9
},
"maxUsesCount": 10,
"maxUsesCountPerGuest": 1,
"usedCount": 0,
"usedCountPerGuest": 0,
"useWithOtherPromotions": false,
"periodRestrictions": {
"enable": true,
"from": "2020-04-29",
"to": "2020-07-31",
"invalidDaysOfWeek": [
6,
7
]
},
"calendarRestrictions": {
"enable": true,
"validArrivalDates": {
"from": "2020-06-01",
"to": "2020-09-01"
},
"invalidArrivalDates": {
"from": "2020-10-01",
"to": "2020-10-10"
},
"validDepartureDates": {
"from": "2020-06-01",
"to": "2020-09-01"
},
"invalidDepartureDates": {
"from": "2020-11-01",
"to": "2020-11-03"
},
"minLengthOfStay": 5
},
"productRestrictions": {
"enable": true,
"bedrooms": [
2,
3,
4,
5
],
"listingsLimit": {
"type": "no",
"apartments": [
"5dee464910450609ca7ea2d7"
],
"buildings": [
"5dee464910450609ca7ea2d7"
]
}
},
"userRestrictions": {
"enable": true,
"emails": [
"test1@stays.net",
"test2@stays.net"
],
"minReservationsCount": 2,
"maxGuestsCount": 5
}
}
Get promo code by identifier
HTTP Request
PATCH /external/v1/booking/promo-codes/{_id}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Body Parameters
Parameter | Type | Description |
---|---|---|
name * | String | Promo code name |
type * | String | Promo code discount type. Can be 'fixed' or 'percent' |
_f_discount | Number | Promo code percentage discount |
_mcdiscount | Object | Promo code fixed discount with mutlicurrency |
status | String | Promo code status. Can be 'active' or 'inactive' |
maxUsesCount | Integer | Define, how many times promo code can be used |
maxUsesCountPerGuest | Integer | Define, how many times per guest promo code can be used |
usedCount | Integer | Define, how many times the promo was used |
usedCountPerGuest | Integer | Define, how many times the promo was used per guest |
useWithOtherPromotions | Boolean | Can promocode be applied if other promotions exists |
periodRestrictions | Object | Defines general restrictions for date range of using |
periodRestrictions.enable | Boolean | Indicates if restrictions are active |
periodRestrictions.from | ISO date string YYYY-MM-DD |
Start date when promocode can be applied |
periodRestrictions.to | ISO date string YYYY-MM-DD |
End date when promocode can be applied |
periodRestrictions.invalidDaysOfWeek | Array | Days of week, when promocode cannot be applied. Possible values are 1-7. Where 1 is Monday, 7 is Sunday |
calendarRestrictions | Object | Defines calendar restrictions |
calendarRestrictions.enable | Boolean | Indicates if restrictions are active |
calendarRestrictions.validArrivalDates | Object | Defines date range for arrival, when promocode can be applied |
calendarRestrictions.validArrivalDates.from | ISO date string YYYY-MM-DD |
Start arrival date when promocode can be applied |
calendarRestrictions.validArrivalDates.to | ISO date string YYYY-MM-DD |
End arrival date when promocode can be applied |
calendarRestrictions.invalidArrivalDates | Object | Defines date range for arrival, when promocode cannot be applied |
calendarRestrictions.invalidArrivalDates.from | ISO date string YYYY-MM-DD |
Start arrival date when promocode cannot be applied |
calendarRestrictions.invalidArrivalDates.to | ISO date string YYYY-MM-DD |
End arrival date when promocode cannot be applied |
calendarRestrictions.validDepartureDates | Object | Defines date range for departuren, when promocode can be applied |
calendarRestrictions.validDepartureDates.from | ISO date string YYYY-MM-DD |
Start departure date when promocode can be applied |
calendarRestrictions.validDepartureDates.to | ISO date string YYYY-MM-DD |
End departure date when promocode can be applied |
calendarRestrictions.invalidDepartureDates | Object | Defines date range for departure, when promocode cannot be applied |
calendarRestrictions.invalidDepartureDates.from | ISO date string YYYY-MM-DD |
Start departure date when promocode cannot be applied |
calendarRestrictions.invalidDepartureDates.to | ISO date string YYYY-MM-DD |
End departure date when promocode cannot be applied |
calendarRestrictions.minLengthOfStay | Integer | Indicates minimum nights number of booking when promocode can be applied |
productRestrictions | Object | Defines product restrictions using bedrooms or groups |
productRestrictions.enable | Boolean | Indicates if restrictions are active |
productRestrictions.bedgrooms | Array | Defines bedrooms numbers for what promo code is applicable. For Studio is 0 |
productRestrictions.groups | Array | Defines groups identifiers for what promo code is applicable. |
productRestrictions.listingsLimit | Object | Defines the limit of the listings |
productRestrictions.listingsLimit.type | String | Type of listing limit [ no, exclude, include ] |
productRestrictions.listingsLimit.apartments | String | Apartments identifier |
productRestrictions.listingsLimit.buildings | String | Buildings identifier |
userRestrictions | Object | Defines user restrictions |
userRestrictions.enable | Boolean | Indicates if restrictions are active |
userRestrictions.emails | Array | Defines list of guests emails for what promo code is applicable. |
userRestrictions.clients | Array | Defines list of clients identifiers for what promo code is applicable. |
userRestrictions.minReservationsCount | Integer | Defines min number of previous guest's reservations after promo code will be valid |
userRestrictions.minAmountSpentByGuest | Number | Defines min amount of money that guest spent before to make promo code valid |
userRestrictions.maxGuestsCount | Integer | Defines max guests count for reservations |
Delete promo code
curl -X DELETE "https://play.stays.net/external/v1/booking/promo-codes/5ea9c4a34a113f67a90ca4f9" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"_id": "5ea9c4a34a113f67a90ca4f9",
"name": "test 2-1",
"status": "active",
"type": "fixed",
"_mcdiscount": {
"BRL": 50,
"USD": 10,
"EUR": 9
},
"maxUsesCount": 10,
"maxUsesCountPerGuest": 1,
"usedCount": 0,
"usedCountPerGuest": 0,
"useWithOtherPromotions": false,
"periodRestrictions": {
"enable": true,
"from": "2020-04-29",
"to": "2020-07-31",
"invalidDaysOfWeek": [
6,
7
]
},
"calendarRestrictions": {
"enable": true,
"validArrivalDates": {
"from": "2020-06-01",
"to": "2020-09-01"
},
"invalidArrivalDates": {
"from": "2020-10-01",
"to": "2020-10-10"
},
"validDepartureDates": {
"from": "2020-06-01",
"to": "2020-09-01"
},
"invalidDepartureDates": {
"from": "2020-11-01",
"to": "2020-11-03"
},
"minLengthOfStay": 5
},
"productRestrictions": {
"enable": true,
"bedrooms": [
2,
3,
4,
5
],
"listingsLimit": {
"type": "no",
"apartments": [
"5dee464910450609ca7ea2d7"
],
"buildings": [
"5dee464910450609ca7ea2d7"
]
}
},
"userRestrictions": {
"enable": true,
"emails": [
"test1@stays.net",
"test2@stays.net"
],
"minReservationsCount": 2,
"maxGuestsCount": 5
}
}
Delete promo code by identifier
HTTP Request
DELETE /external/v1/booking/promo-codes/{_id}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Search promo codes
curl -X GET "https://play.stays.net/external/v1/booking/promo-codes" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_id": "5ea9c4a34a113f67a90ca4f9",
"name": "test 2-1",
"status": "active",
"type": "fixed",
"_mcdiscount": {
"BRL": 50,
"USD": 10,
"EUR": 9
},
"maxUsesCount": 10,
"maxUsesCountPerGuest": 1,
"usedCount": 0,
"usedCountPerGuest": 0,
"useWithOtherPromotions": false,
"periodRestrictions": {
"enable": true,
"from": "2020-04-29",
"to": "2020-07-31",
"invalidDaysOfWeek": [
6,
7
]
},
"calendarRestrictions": {
"enable": true,
"validArrivalDates": {
"from": "2020-06-01",
"to": "2020-09-01"
},
"invalidArrivalDates": {
"from": "2020-10-01",
"to": "2020-10-10"
},
"validDepartureDates": {
"from": "2020-06-01",
"to": "2020-09-01"
},
"invalidDepartureDates": {
"from": "2020-11-01",
"to": "2020-11-03"
},
"minLengthOfStay": 5
},
"productRestrictions": {
"enable": true,
"bedrooms": [
2,
3,
4,
5
],
"listingsLimit": {
"type": "no",
"apartments": [
"5dee464910450609ca7ea2d7"
],
"buildings": [
"5dee464910450609ca7ea2d7"
]
}
},
"userRestrictions": {
"enable": true,
"emails": [
"test1@stays.net",
"test2@stays.net"
],
"minReservationsCount": 2,
"maxGuestsCount": 5
}
},
{
"_id": "5ea9bd9a4b369c28a22343f4",
"name": "test 1",
"status": "inactive",
"type": "percent",
"_f_discount": 10,
"useWithOtherPromotions": false,
"periodRestrictions": {
"enable": false
},
"calendarRestrictions": {
"enable": false
},
"productRestrictions": {
"enable": false
},
"userRestrictions": {
"enable": false
}
}
]
This endpoint returns bookable listings for certain period. Accepts extra filter, that /searchfilter endpoint returns
HTTP Request
GET /external/v1/booking/promo-codes
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Request Body Parameters
Parameter | Type | Description |
---|---|---|
name | String | Promo code name. If it has special symbols, please use encodeURIComponent |
status | String | Promo code status. Possible values are 'active' or 'inactive' |
used | Boolean | Search by promo codes that were already used or not |
skip | Integer | Number of records to skip. Used to build proper pagination. Default value is 0 |
limit | Integer | Maximum number of records to return. Default and maximum value is 20 |
Booking API
Allows to search available listings, calculate price for certain listing, manage reservations and clients . To use this API, you have to get unique credentials (client_id, client_secret) from Stays provider.
Retrieve Search filter
curl -X GET "https://play.stays.net/external/v1/booking/searchfilter" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"guests": [
{
"_i_val": 1
},
{
"_i_val": 2
},
{
"_i_val": 3
},
{
"_i_val": 4
}
],
"rooms": [
{
"_i_val": 0
},
{
"_i_val": 1
},
{
"_i_val": 2
}
],
"cities": [
{
"val": "São Paulo"
}
],
"regions": [
{
"val": "Aclimação"
}
],
"states": [
{
"val": "Rio de Janeiro"
}
],
"countries": [
{
"val": "BR",
"_msname":{
"en_US":"Brazil",
"pt_BR":"Brasil"
}
}
],
"properties": [
{
"_id": "5c5893b50a195f0010a07db2",
"id": "LU01F",
"_idtype": "5ae04e1022261d03ab814d60",
"_t_typeMeta": {
"_mstitle": {
"pt_BR": "Prédio",
"en_US": "Building"
}
},
"internalName": "Vibe República",
"_mstitle": {
"pt_BR": "Vibe República",
"en_US": "Vibe República"
},
"address": {
"countryCode": "BR",
"state": "SP",
"stateCode": "SP",
"city": "São Paulo",
"region": "Centro",
"street": "Bento Freitas",
"streetNumber": "002",
"zip": "12345-000"
}
}
],
"amenities": [
{
"_id": "58931cd4e1875b6163592c7f",
"_mstitle": {
"pt_BR": "Wifi",
"en_US": "Wifi"
}
},
{
"_id": "58931ce4e1875b6163592c81",
"_mstitle": {
"pt_BR": "Ar condicionado",
"en_US": "Air conditioning"
}
}
],
"inventory": [
{
"_id": "515328def456a12c0c0033b2",
"_mstitle": {
"pt_BR": "maquina de lavar",
"en_US": "washing machine",
"de_DE": "Waschmaschine"
}
},
{
"_id": "515328e0f456a12c0c0035a9",
"_mstitle": {
"pt_BR": "varanda/terraço",
"en_US": "terrace/balcony",
"de_DE": "Terrasse/Balkon"
}
}
],
"minprice": {
"BRL": 0
},
"maxprice": {
"BRL": 10000
},
"groups": [
{
"_id": "5804926d530e93617cfeb362",
"name": "highlights"
"_mstitle": {
"pt_BR": "destaques",
"en_US": "highlights",
}
}
]
}
This endpoint returns possible values that can be used to build own search engine. Data are the same, that used for frontend search.
HTTP Request
GET /external/v1/booking/searchfilter
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Search listings
curl -X POST "https://play.stays.net/external/v1/booking/search-listings" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d \
'{
"from": "2020-04-19",
"to":"2020-04-21",
"guests":1
}'
The above command returns JSON structured like this:
[
{
"_id": "5c5d8937a637940010c06c9b",
"id": "LY04F",
"_idproperty": "5c5c94c87ab5390010e148b7",
"_idpropertyType": "5dee464910450609ca7ea2d7",
"_t_propertyTypeMeta": {
"_mstitle": {
"pt_BR": "Prédio",
"en_US": "Building",
"es_ES": "Edifício",
"pt_PT": "Prédio"
}
},
"_idtype": "5ab8f8a2f6b2dc2e97f97050",
"_t_typeMeta": {
"_mstitle": {
"en_US": "Apartment",
"pt_BR": "Apartamento"
}
},
"subtype": "private_room",
"status": "active",
"internalName": "AR0310 - Studio Standard",
"_mstitle": {
"pt_BR": "Studio Standard",
"en_US": "Studio Standard"
},
"_msdesc": {
"pt_BR": "<p class=\"MsoNormal\">O Studio Standard procura alinhar o melhor da localização com um tamanho\nadequado pra quem tem uma vida plenamente agitada na maior cidade da América\nLatina, focando assim em alinhar o melhor da vida na cidade, liberando mais\ntempo para que as pessoas possam escolher o seu melhor estilo de vida.</p>",
"en_US": "<p class=\"MsoNormal\">The Studio Standard tries to align the best of the\nlocation fully with an appropriate size for who has a life agitated in the\nlargest city of Latin America, focusing like this in aligning the best of the\nlife in the city, liberating more time so that the people can choose his/her\nbest lifestyle.</p>"
},
"_i_maxGuests": 2,
"_i_rooms": 1,
"_i_beds": 1,
"_f_bathrooms": 1,
"address": {
"countryCode": "BR",
"state": "Sp",
"stateCode": "SP",
"city": "São Paulo",
"region": "Brooklin",
"street": "Alvaro Rodrigues",
"streetNumber": "005",
"zip": "12345-000"
},
"latLng": {
"_f_lat": -23.6212769,
"_f_lng": -46.6880436
},
"_idmainImage": "5c9d44da8dca990010557182",
"_t_mainImageMeta": {
"url": "https://play.stays.net/image/d235/5c9d44da8dca990010557182"
},
"_f_square": 0,
"instantBooking": true,
"_idPriceGroupMaster": "5dee464910450609ca7ea2d7",
"_idCloneGroupMaster": "5dee464910450609ca7ea2d7",
"_idPriceMaster": "5dee464910450609ca7ea2d7",
"_idold": "5dee464910450609ca7ea2d7",
"bookingPrice": {
"from": "2020-03-03",
"to": "2020-03-05",
"_mctotal": {
"BRL": 595.21,
"USD": 132.91
},
"feesIncluded": true,
"fees": [
{
"_id": "5cbf135298aa0c0017d501e0",
"_mcval": {
"BRL": 0.01,
"USD": 0.01
},
"_mstitle": {
"pt_BR": "Cleaning Fee",
"en_US": "new fee"
}
}
],
"mainCurrency": "BRL"
}
}
]
This endpoint returns bookable listings for certain period. Accepts extra filter, that /searchfilter endpoint returns
HTTP Request
POST /external/v1/booking/search-listings
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Request Body Parameters
Parameter | Type | Description |
---|---|---|
from | ISO date string YYYY-MM-DD |
Booking start date |
to | ISO date string YYYY-MM-DD |
Booking end date |
guests | Integer | Number of guests |
rooms | Array [integer] | Number of rooms. 0 - Studio, 1 - one room, 2 - two rooms. |
cities | Array [string] | Array of cities names |
regions | Array [string] | Array of regions names |
states | Array [string] | Array of state names |
countries | Array [string] | Array of country codes |
properties | Array [string] | Array of properties identifiers |
amenities | Array [string] | Listing or property amenities as an array of amenity IDs. |
inventory | Array [string] | Rooms inventory as an array of inventory names. |
listingId | String | Listing identifier (short and long both values accepted) |
sort | String | Allows to sort result by provided criteria. Possble values are rating |
skip | Integer | Number of records to skip. Used to build proper pagination. Default value is 0 |
limit | Integer | Maximum number of records to return. Default and maximum value is 20 |
Calculate listing price
curl -X POST "https://play.stays.net/external/v1/booking/calculate-price" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d "{\"from\":\"2020-05-29\",\"to\":\"2020-06-01\",\"listingIds\":[\"WV01B\",\"515328ab80beb0e416000034\"],\"guests\":1}"
The above command returns JSON structured like this:
[
{
"_idlisting": "515328ab80beb0e416000008",
"from": "2020-05-29",
"to": "2020-06-01",
"guests": 1,
"_mctotal": {
"BRL": 480,
"USD": 85,
"EUR": 77
},
"feesIncluded": true,
"fees": [],
"mainCurrency": "BRL"
},
{
"_idlisting": "515328ab80beb0e416000034",
"from": "2020-05-29",
"to": "2020-06-01",
"guests": 1,
"_mctotal": {
"BRL": 600,
"USD": 106,
"EUR": 97
},
"feesIncluded": true,
"fees": [],
"mainCurrency": "BRL"
}
]
This endpoint returns detailed price calculation for certain listing for certain period.
HTTP Request
POST /external/v1/booking/calculate-price
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Body Parameters
Parameter | Type | Description |
---|---|---|
listingIds * | Array | Listings identifiers. Both identifiers (long and short) are supported |
from * | ISO date string YYYY-MM-DD |
Booking start date |
to * | ISO date string YYYY-MM-DD |
Booking end date |
guests | Integer | Number of guests |
promocode | String | Promo code name or identifier. If name has special symbols, please use encodeURIComponent |
* - required params
Create blocking
curl -X POST "https://play.stays.net/external/v1/booking/reservations" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d "{\"type\":\"blocked\",\"listingId\":\"WV01B\",\"checkInDate\":\"2020-04-24\",\"checkOutDate\":\"2020-04-28\",\"internalNote\":\"test blocking\",\"cleaningTaskBefore\":false,\"cleaningTaskAfter\":true}"
The above command returns JSON structured like this:
{
"_id": "5e8de50cc289ba0018352c99",
"id": "CX01G",
"checkInDate": "2020-04-24",
"checkInTime": "14:00",
"checkOutDate": "2020-04-28",
"checkOutTime": "10:00",
"_idlisting": "515328ab80beb0e416000008",
"type": "blocked",
"internalNote": "test blocking",
"cleaningTaskAfter": true
}
Creates simple calendar blocking for any purpose
HTTP Request
POST /external/v1/booking/reservations
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Body Parameters
Parameter | Type | Description |
---|---|---|
type * | String | Blocking type. Possible values are "blocked" or "maintenance" |
listingId * | String | Listing identifier (short and long both values accepted) |
checkInDate * | ISO date string YYYY-MM-DD |
Start date |
checkInTime | String HH:mm |
Start time. If ommited, default check-in time will be applied |
checkOutDate * | ISO date string YYYY-MM-DD |
End date |
checkOutTime | String HH:mm |
End time. If ommited, default check-out time will be applied |
internalNote | String | Some description text |
cleaningTaskBefore | Boolean | Indicates, if system should creates cleaning task before start |
cleaningTaskAfter | Boolean | Indicates, if system should creates cleaning task after end |
* - required params
Modify blocking
curl -X PATCH "https://play.stays.net/external/v1/booking/reservations/CX01G" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d "{\"type\":\"blocked\",\"checkInDate\":\"2020-04-25\",\"checkOutDate\":\"2020-04-29\",\"internalNote\":\"test blocking1\",\"cleaningTaskBefore\":true,\"cleaningTaskAfter\":true}"
# modify start date only
curl -X PATCH "https://play.stays.net/external/v1/booking/reservations/CX01G" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d "{\"type\":\"blocked\",\"checkInDate\":\"2020-04-26\"}"
The above command returns JSON structured like this:
{
"_id": "5e8de50cc289ba0018352c99",
"id": "CX01G",
"creationDate": "2020-04-20",
"checkInDate": "2020-04-25",
"checkInTime": "14:00",
"checkOutDate": "2020-04-29",
"checkOutTime": "10:00",
"_idlisting": "515328ab80beb0e416000008",
"type": "blocked",
"internalNote": "test blocking1",
"cleaningTaskBefore": true,
"cleaningTaskAfter": true
}
Modifies calendar blocking. For modification request you can send only really modified data. Only type
property is mandatory.
HTTP Request
PATCH /external/v1/booking/reservations/{reservationId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Body Parameters
Parameter | Type | Description |
---|---|---|
type * | String | Blocking type. Possible values are "blocked" or "maintenance" |
checkInDate | ISO date string YYYY-MM-DD |
Start date |
checkInTime | String HH:mm |
Start time. If ommited, default check-in time will be applied |
checkOutDate | ISO date string YYYY-MM-DD |
End date |
checkOutTime | String HH:mm |
End time. If ommited, default check-out time will be applied |
internalNote | String | Some description text |
cleaningTaskBefore | Boolean | Indicates, if system should creates cleaning task before start |
cleaningTaskAfter | Boolean | Indicates, if system should creates cleaning task after end |
* - required params
Delete blocking
curl -X DELETE "https://play.stays.net/external/v1/booking/reservations/CX01G" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"_id": "5e8de50cc289ba0018352c99",
"id": "CX01G",
"creationDate": "2020-04-20",
"checkInDate": "2020-04-25",
"checkInTime": "14:00",
"checkOutDate": "2020-04-29",
"checkOutTime": "10:00",
"_idlisting": "515328ab80beb0e416000008",
"type": "blocked",
"internalNote": "test blocking1",
"cleaningTaskBefore": true,
"cleaningTaskAfter": true
}
Deletes calendar blocking.
HTTP Request
DELETE /external/v1/booking/reservations/{reservationId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Create reservation
curl -X POST "https://play.stays.net/external/v1/booking/reservations" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d "{\"listingId\":\"WV01B\",\"checkInDate\":\"2020-04-18\",\"checkInTime\":\"14:00\",\"checkOutDate\":\"2020-04-21\",\"checkOutTime\":\"10:00\",\"_idclient\":\"5719026e79628b0100d6a28d\",\"type\":\"booked\",\"guests\":2,\"guestsDetails\":{\"adults\":2,\"children\":0}}"
The above command returns JSON structured like this:
{
"_id": "5e8ddc47c289ba0018352c10",
"id": "CJ01G",
"creationDate": "2020-04-20",
"checkInDate": "2020-04-10",
"checkInTime": "14:00",
"checkOutDate": "2020-04-15",
"checkOutTime": "10:00",
"_idlisting": "515328ab80beb0e416000008",
"_idclient": "5719026e79628b0100d6a28d",
"type": "booked",
"price": {
"currency": "BRL",
"_f_total": 713
},
"stats": {
"_f_totalPaid": 0
},
"guests": 1,
"guestsDetails": {
"adults": 1,
"children": 0
},
"partnerCode":"HM2QNZPDN1"
}
This endpoint creates new reservation
HTTP Request
POST /external/v1/booking/reservations
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Body Parameters
Parameter | Type | Description |
---|---|---|
type * | String | Reservation type. For creation, applicable only "reserved" or "booked" |
listingId * | String | Reservation identifier (short and long both values accepted) |
checkInDate * | ISO date string YYYY-MM-DD |
Arrival date |
checkInTime | String HH:mm |
Arrival time. If ommited, default check-in time will be applied |
checkOutDate * | ISO date string YYYY-MM-DD |
Departure date |
checkOutTime | String HH:mm |
Departuren time. If ommited, default check-out time will be applied |
_idclient * | String | Client identifier |
guests * | Integer | Guests count |
guestsDetails | Object | Additional details object |
guestsDetails.adults | Integer | Adults count |
guestsDetails.children | Integer | Children count |
promocode | String | Promo code name or identifier. If name has special symbols, please use encodeURIComponent |
partner | Object | Provides information partner of the reservation |
partner._id | String | Partner identifier |
partner.name | String | Partner name |
partner.commission | Object | Provides information partner commission of the reservation |
partner.commission.type | String | Partner commission type. Possible values are "fixed" or "percent" |
partner.commission._mcval | String | Multi currency value if partner commission type is fixed |
partner.commission.percent | String | Percentage partner commission type is percent |
operator | Object | Provides information about who's author of the reservation |
operator._id | String | Operator identifier |
operator.name | String | Operator name |
agent | Object | Provides information about who is responsible for the reservation |
agent._id | String | Agent identifier |
agent.name | String | Agent name |
price | Object | Send this object if you want to overwrite default price |
price.currency | String | ISO currency |
price._f_expected | Number | Expected price value |
internalNote | String | Some description text |
_idagent | String | Agent identifier |
* - required params
Retrieve reservation
curl -X GET "https://play.stays.net/external/v1/booking/reservations/CJ01G" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"_id": "5e8ddc47c289ba0018352c10",
"id": "CJ01G",
"creationDate": "2020-04-20",
"checkInDate": "2020-04-10",
"checkInTime": "14:00",
"checkOutDate": "2020-04-15",
"checkOutTime": "10:00",
"_idlisting": "515328ab80beb0e416000008",
"_idclient": "5719026e79628b0100d6a28d",
"type": "booked",
"price": {
"currency": "BRL",
"_f_total": 713,
"hostingDetails": {
"_f_nightPrice": 417.36,
"fees": [
{
"name": "Cartão de crédito",
"_f_val": 5.64
},
{
"name": "Additional Guests Fee",
"_f_val": 160
}
],
"discounts": [],
"_f_total": 583
},
"extrasDetails": {
"fees": [
{
"name": "Taxa de Limpeza",
"_f_val": 130
}
],
"extraServices": [],
"discounts": [],
"_f_total": 130
}
},
"stats": {
"_f_totalPaid": 0
},
"guests": 2,
"guestsDetails": {
"adults": 2,
"children": 0,
"infants": 0,
"list": [
{
"name": "Gabriel",
"email": "gabriel01@stays.net",
"birthday": "1995-12-12",
"primary": true
},
{
"type": "adult",
"name": "adult",
}
]
},
"partnerCode":"HM2QNZPDN1"
}
This endpoint returns reservation by its identifier
HTTP Request
GET /external/v1/booking/reservations/{reservationId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
reservationId * | String | Reservation identifier: (short and long both values accepted), also partnerCode can be used for it |
* - required params
Modify reservation
curl -X PATCH "https://play.stays.net/external/v1/booking/reservations/CJ01G" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d "{\"type\":\"booked\",\"checkInDate\":\"2020-04-11\",\"checkInTime\":\"15:00\",\"checkOutDate\":\"2020-04-16\",\"guests\":2,\"guestsDetails\":{\"adults\":1,\"children\":1}}"
The above command returns JSON structured like this:
{
"_id": "5e8ddc47c289ba0018352c10",
"id": "CJ01G",
"creationDate": "2020-04-20",
"checkInDate": "2020-04-11",
"checkInTime": "14:00",
"checkOutDate": "2020-04-16",
"checkOutTime": "10:00",
"_idlisting": "515328ab80beb0e416000008",
"_idclient": "5719026e79628b0100d6a28d",
"type": "booked",
"price": {
"currency": "BRL",
"_f_total": 713
},
"stats": {
"_f_totalPaid": 0
},
"guests": 2,
"guestsDetails": {
"adults": 1,
"children": 1
},
"partnerCode":"HM2QNZPDN1"
}
Modifies reservation. For modification request you can send only really modified data. Only type
property is mandatory.
HTTP Request
PATCH /external/v1/booking/reservations/{reservationId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Body Parameters
Parameter | Type | Description |
---|---|---|
type * | String | Reservation type. For creation, applicable only "reserved" or "booked" |
listingId | String | Reservation identifier (short and long both values accepted) |
checkInDate | ISO date string YYYY-MM-DD |
Arrival date |
checkInTime | String HH:mm |
Arrival time. If ommited, default check-in time will be applied |
checkOutDate | ISO date string YYYY-MM-DD |
Departure date |
checkOutTime | String HH:mm |
Departuren time. If ommited, default check-out time will be applied |
_idclient | String | Client identifier |
guests | Integer | Guests count |
guestsDetails | Object | Additional details object |
guestsDetails.adults | Integer | Adults count |
guestsDetails.children | Integer | Children count |
promocode | String | Promo code name or identifier. If name has special symbols, please use encodeURIComponent. For unset previous promocode use 'null' value |
operator | Object | Provides information about who's author of the reservation |
operator._id | String | Operator identifier |
operator.name | String | Operator name |
agent | Object | Provides information about who is responsible for the reservation |
agent._id | String | Agent identifier |
agent.name | String | Agent name |
price | Object | Send this object if you want to overwrite default price |
price.currency | String | ISO currency |
price._f_expected | Number | Expected price value |
internalNote | String | Some description text |
_idagent | String | Agent identifier |
* - required params
Cancel reservation
curl -X PATCH "https://play.stays.net/external/v1/booking/reservations/CJ01G" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d "{\"type\":\"canceled\",\"cancelMessage\":\"test cancellation\"}"
The above command returns JSON structured like this:
{
"_id": "5e8ddc47c289ba0018352c10",
"id": "CJ01G",
"creationDate": "2020-04-20",
"checkInDate": "2020-04-11",
"checkInTime": "14:00",
"checkOutDate": "2020-04-16",
"checkOutTime": "10:00",
"_idlisting": "515328ab80beb0e416000008",
"_idclient": "5719026e79628b0100d6a28d",
"type": "canceled",
"cancelMessage": "test cancellation",
"price": {
"currency": "BRL",
"_f_total": 713
},
"stats": {
"_f_totalPaid": 0
},
"guests": 2,
"guestsDetails": {
"adults": 1,
"children": 1
},
"partnerCode":"HM2QNZPDN1"
}
Cancel reservation.
HTTP Request
PATCH /external/v1/booking/reservations/{reservationId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Body Parameters
Parameter | Type | Description |
---|---|---|
type * | String | Reservation type. For cancellation, applicable only "canceled" |
cancelMessage | String | Cancellation description |
* - required params
Delete reservation
curl -X DELETE "https://play.stays.net/external/v1/booking/reservations/CJ01G" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"_id": "5e8ddc47c289ba0018352c10",
"id": "CJ01G",
"creationDate": "2020-04-20",
"checkInDate": "2020-04-11",
"checkInTime": "14:00",
"checkOutDate": "2020-04-16",
"checkOutTime": "10:00",
"_idlisting": "515328ab80beb0e416000008",
"_idclient": "5719026e79628b0100d6a28d",
"type": "booked",
"price": {
"currency": "BRL",
"_f_total": 713
},
"stats": {
"_f_totalPaid": 0
},
"guests": 2,
"guestsDetails": {
"adults": 1,
"children": 1
},
"partnerCode":"HM2QNZPDN1"
}
Deletes reservation.
HTTP Request
DELETE /external/v1/booking/reservations/{reservationId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Retrieve Extra-services
curl -X GET "https://play.stays.net/external/v1/booking/booking/extra-services" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_id": "5dee464910450609ca7ea2d7",
"_msname": {
"en_US": "string",
"pt_BR": "string",
"de_DE": "string",
"es_ES": "string",
"pt_PT": "string",
"ru_RU": "string",
"sv_SE": "string",
"it_IT": "string",
"fr_FR": "string",
"el_GR": "string"
},
"_msprice": {
"BRL": 0,
"USD": 0,
"EUR": 0,
"MXN": 0,
"ARS": 0,
"UYU": 0,
"PYG": 0,
"CLP": 0,
"COP": 0,
"ZAR": 0,
"XAF": 0,
"BWP": 0,
"MZN": 0,
"NAD": 0,
"SZL": 0,
"LSL": 0,
"AED": 0,
"PEN": 0,
"GBP": 0,
"AUD": 0,
"RUB": 0,
"THB": 0,
"DOP": 0,
"CRC": 0,
"SEK": 0,
"IDR": 0,
"CAD": 0,
"NOK": 0
},
"itemId": "5dee464910450609ca7ea2d7",
"categoryId": "5dee464910450609ca7ea2d7",
"dateTimeRangeSettings": {
"date": "single",
"time": "single",
"chargeType ": "perDay"
},
"lodgingCheck": true
}
]
This endpoint returns a reservation extra-services
HTTP Request
GET /external/v1/booking/reservations/{reservationId}/extra-services
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
itemId | String | Reservation identifier: (short and long both values accepted) |
categoryId | String | Reservation identifier: (short and long both values accepted) |
* - required params
Retrieve Extra-service
curl -X GET "https://play.stays.net/external/v1/booking/booking/extra-services/{id}" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"_id": "5dee464910450609ca7ea2d7",
"_msname": {
"en_US": "string",
"pt_BR": "string",
"de_DE": "string",
"es_ES": "string",
"pt_PT": "string",
"ru_RU": "string",
"sv_SE": "string",
"it_IT": "string",
"fr_FR": "string",
"el_GR": "string"
},
"_msprice": {
"BRL": 0,
"USD": 0,
"EUR": 0,
"MXN": 0,
"ARS": 0,
"UYU": 0,
"PYG": 0,
"CLP": 0,
"COP": 0,
"ZAR": 0,
"XAF": 0,
"BWP": 0,
"MZN": 0,
"NAD": 0,
"SZL": 0,
"LSL": 0,
"AED": 0,
"PEN": 0,
"GBP": 0,
"AUD": 0,
"RUB": 0,
"THB": 0,
"DOP": 0,
"CRC": 0,
"SEK": 0,
"IDR": 0,
"CAD": 0,
"NOK": 0
},
"itemId": "5dee464910450609ca7ea2d7",
"categoryId": "5dee464910450609ca7ea2d7",
"dateTimeRangeSettings": {
"date": "single",
"time": "single",
"chargeType ": "perDay"
},
"lodgingCheck": true
}
This endpoint returns a reservation extra-services
HTTP Request
GET /external/v1/booking/reservations/{reservationId}/extra-services
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
id * | String | Reservation identifier: (short and long both values accepted) |
* - required params
Retrieve reservation extra-services
curl -X GET "https://play.stays.net/external/v1/booking/reservations/CJ01G/extra-services" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_id": "5dee464910450609ca7ea2d7",
"_idextra": "5dee464910450609ca7ea2d7",
"_msname": {
"en_US": "string",
"pt_BR": "string",
"de_DE": "string",
"es_ES": "string",
"pt_PT": "string",
"ru_RU": "string",
"sv_SE": "string",
"it_IT": "string",
"fr_FR": "string",
"el_GR": "string"
},
"_f_unitPrice": 0,
"_i_unitCount": 0,
"_f_val": 0,
"startDate": "2020-02-29",
"endDate": "2020-02-29",
"startTime": "14:00",
"endTime": "14:00",
"desc": "string"
}
]
This endpoint returns a reservation extra-services
HTTP Request
GET /external/v1/booking/reservations/{reservationId}/extra-services
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
reserveId * | String | Reservation identifier: (short and long both values accepted) |
* - required params
Set extra-service reservation
curl -X POST "https://play.stays.net/external/v1/booking/reservations/CJ01G/extra-services" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d {
"_idextra": "5dee464910450609ca7ea2d7",
"_msname": {
"en_US": "string",
"pt_BR": "string",
"de_DE": "string",
"es_ES": "string",
"pt_PT": "string",
"ru_RU": "string",
"sv_SE": "string",
"it_IT": "string",
"fr_FR": "string",
"el_GR": "string"
},
"_f_unitPrice": 0,
"_i_unitCount": 0,
"_f_val": 0,
"startDate": "2020-02-29",
"endDate": "2020-02-29",
"startTime": "14:00",
"endTime": "14:00",
"desc": "string"
}
The above command returns JSON structured like this:
{
"_id": "5dee464910450609ca7ea2d7",
"_idextra": "5dee464910450609ca7ea2d7",
"_msname": {
"en_US": "string",
"pt_BR": "string",
"de_DE": "string",
"es_ES": "string",
"pt_PT": "string",
"ru_RU": "string",
"sv_SE": "string",
"it_IT": "string",
"fr_FR": "string",
"el_GR": "string"
},
"_f_unitPrice": 0,
"_i_unitCount": 0,
"_f_val": 0,
"startDate": "2020-02-29",
"endDate": "2020-02-29",
"startTime": "14:00",
"endTime": "14:00",
"desc": "string"
}
This endpoint sets a extra-services to a reservation
HTTP Request
POST /external/v1/booking/reservations/{reservationId}/extra-services
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
reserveId * | String | Reservation identifier: (short and long both values accepted) |
Request Body
Parameter | Type | Description |
---|---|---|
_idextra * | String | Field identifier |
_msname | Object | Title translation |
_f_unitPrice | Number | Price unit |
_i_unitCount * | Number | Unit amount |
_f_val | Number | Price amount |
startDate * | Date | Start date |
endDate | Date | End date |
startTime | Date | Start time |
endTime | Date | End time |
desc * | String | Extra-Service description |
Response Body
Parameter | Type | Description |
---|---|---|
_id | String | Field identifier |
_idextra | String | Extra-Service field identifier |
_msname | Object | Title translation |
_f_unitPrice | Number | Price unit |
_i_unitCount | Number | Unit amount |
_f_val | Number | Price amount |
startDate | Date | Start date |
endDate | Date | End date |
startTime | Date | Start time |
endTime | Date | End time |
desc | String | Extra-Service description |
* - required params
Retrieve reservation extra-service
curl -X GET "https://play.stays.net/external/v1/booking/reservations/CJ01G/extra-services" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"_id": "5dee464910450609ca7ea2d7",
"_idextra": "5dee464910450609ca7ea2d7",
"_msname": {
"en_US": "string",
"pt_BR": "string",
"de_DE": "string",
"es_ES": "string",
"pt_PT": "string",
"ru_RU": "string",
"sv_SE": "string",
"it_IT": "string",
"fr_FR": "string",
"el_GR": "string"
},
"_f_unitPrice": 0,
"_i_unitCount": 0,
"_f_val": 0,
"startDate": "2020-02-29",
"endDate": "2020-02-29",
"startTime": "14:00",
"endTime": "14:00",
"desc": "string"
}
This endpoint returns a reservation extra-service by its identifier
HTTP Request
GET /external/v1/booking/reservations/{reservationId}/extra-services
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
reserveId * | String | Reservation identifier: (short and long both values accepted) |
extraServiceId * | String | Reservation identifier: (short and long both values accepted) |
* - required params
Modify reservation extra-service
curl -X PATCH "https://play.stays.net/external/v1/booking/reservations/CJ01G/extra-services" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d {
"_id": "5dee464910450609ca7ea2d7",
"_idextra": "5dee464910450609ca7ea2d7",
"_msname": {
"en_US": "string",
"pt_BR": "string",
"de_DE": "string",
"es_ES": "string",
"pt_PT": "string",
"ru_RU": "string",
"sv_SE": "string",
"it_IT": "string",
"fr_FR": "string",
"el_GR": "string"
},
"_f_unitPrice": 0,
"_i_unitCount": 0,
"_f_val": 0,
"startDate": "2020-02-29",
"endDate": "2020-02-29",
"startTime": "14:00",
"endTime": "14:00",
"desc": "string"
}
The above command returns JSON structured like this:
{
"_id": "5dee464910450609ca7ea2d7",
"_idextra": "5dee464910450609ca7ea2d7",
"_msname": {
"en_US": "string",
"pt_BR": "string",
"de_DE": "string",
"es_ES": "string",
"pt_PT": "string",
"ru_RU": "string",
"sv_SE": "string",
"it_IT": "string",
"fr_FR": "string",
"el_GR": "string"
},
"_f_unitPrice": 0,
"_i_unitCount": 0,
"_f_val": 0,
"startDate": "2020-02-29",
"endDate": "2020-02-29",
"startTime": "14:00",
"endTime": "14:00",
"desc": "string"
}
This endpoint modifies a reservation extra-service by its identifier
HTTP Request
PATCH /external/v1/booking/reservations/{reservationId}/extra-services
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
reserveId * | String | Reservation identifier: (short and long both values accepted) |
extraServiceId * | String | Reservation identifier: (short and long both values accepted) |
Request Body
Parameter | Type | Description |
---|---|---|
_id * | String | Field identifier |
_idextra * | String | Extra-Service field identifier |
_msname | Object | Title translation |
_f_unitPrice | Number | Price unit |
_i_unitCount * | Number | Unit amount |
_f_val | Number | Price amount |
startDate * | Date | Start date |
endDate | Date | End date |
startTime | Date | Start time |
endTime | Date | End time |
desc * | String | Extra-Service description |
Response Body
Parameter | Type | Description |
---|---|---|
_id | String | Field identifier |
_idextra | String | Extra-Service field identifier |
_msname | Object | Title translation |
_f_unitPrice | Number | Price unit |
_i_unitCount | Number | Unit amount |
_f_val | Number | Price amount |
startDate | Date | Start date |
endDate | Date | End date |
startTime | Date | Start time |
endTime | Date | End time |
desc | String | Extra-Service description |
* - required params
Delete reservation extra-service
curl -X DELETE "https://play.stays.net/external/v1/booking/reservations/CJ01G/extra-services" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"_id": "5dee464910450609ca7ea2d7",
"id": "XQ02F",
"creationDate": "2020-02-29",
"checkInDate": "2020-02-29",
"checkInTime": "14:00",
"checkOutDate": "2020-02-29",
"checkOutTime": "14:00",
"_idlisting": "5dee464910450609ca7ea2d7",
"_idclient": "5dee464910450609ca7ea2d7",
"type": "reserved",
"price": {
"currency": "BRL",
"_f_total": 0,
"hostingDetails": {
"_f_nightPrice": 0,
"fees": [
{
"name": "string",
"_f_val": 0
}
],
"discounts": [
{
"name": "string",
"_f_val": 0
}
]
},
"extrasDetails": {
"fees": [
{
"name": "string",
"_f_val": 0
}
],
"extraServices": [
{
"_id": "5dee464910450609ca7ea2d7",
"_idextra": "5dee464910450609ca7ea2d7",
"_msname": {
"en_US": "string",
"pt_BR": "string",
"de_DE": "string",
"es_ES": "string",
"pt_PT": "string",
"ru_RU": "string",
"sv_SE": "string",
"it_IT": "string",
"fr_FR": "string",
"el_GR": "string"
},
"_f_unitPrice": 0,
"_i_unitCount": 0,
"_f_val": 0,
"startDate": "2020-02-29",
"endDate": "2020-02-29",
"startTime": "14:00",
"endTime": "14:00",
"desc": "string"
}
],
"discounts": [
{
"name": "string",
"_f_val": 0
}
],
"_f_total": 0
}
},
"partner": {
"id": "5dee464910450609ca7ea2d7",
"name": "string",
"commission": {
"_mcval": {
"BRL": 0,
"USD": 0,
"EUR": 0,
"MXN": 0,
"ARS": 0,
"UYU": 0,
"PYG": 0,
"CLP": 0,
"COP": 0,
"ZAR": 0,
"XAF": 0,
"BWP": 0,
"MZN": 0,
"NAD": 0,
"SZL": 0,
"LSL": 0,
"AED": 0,
"PEN": 0,
"GBP": 0,
"AUD": 0,
"RUB": 0,
"THB": 0,
"DOP": 0,
"CRC": 0,
"SEK": 0,
"IDR": 0,
"CAD": 0,
"NOK": 0
}
}
},
"fees": [
{
"name": "string",
"_f_val": 0
}
],
"guests": 1,
"guestsDetails": {
"adults": 0,
"children": 0,
"infants": 0,
"list": [
{
"type": "adult",
"name": "string",
"email": "string",
"age": 0,
"birthday": "2020-02-29",
"phones": [
{
"iso": "+00000000000",
"hint": "string"
}
],
"documents": [
{
"type": "cpf",
"numb": "string",
"issued": "string",
"date": "2020-02-29"
}
],
"primary": true
}
]
},
"internalNote": "string",
"_idpromoCode": "5dee464910450609ca7ea2d7",
"partnerCode": "A025-D2362",
"isMaster": true,
"childs": [
{
"_idlisting": "5dee464910450609ca7ea2d7",
"checkInDate": "2020-02-29",
"checkInTime": "14:00",
"checkOutDate": "2020-02-29",
"checkOutTime": "14:00"
}
],
"reservationUrl": "string"
}
This endpoint deletes a reservation extra-service by its identifier
HTTP Request
DELETE /external/v1/booking/reservations/{reservationId}/extra-services
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
reserveId * | String | Reservation identifier: (short and long both values accepted) |
extraServiceId * | String | Reservation identifier: (short and long both values accepted) |
* - required params
Search active reservations
curl -X GET "https://play.stays.net/external/v1/booking/reservations?from=2020-04-08&to=2020-04-15&dateType=arrival" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_id": "5e8ddc47c289ba0018352c10",
"id": "CJ01G",
"creationDate": "2020-04-20",
"checkInDate": "2020-04-10",
"checkInTime": "14:00",
"checkOutDate": "2020-04-15",
"checkOutTime": "10:00",
"_idlisting": "515328ab80beb0e416000008",
"_idclient": "5719026e79628b0100d6a28d",
"type": "booked",
"price": {
"currency": "BRL",
"_f_total": 713
},
"stats": {
"_f_totalPaid": 0
},
"guests": 1,
"guestsDetails": {
"adults": 1,
"children": 0
}
}
]
This endpoint returns active reservations for certain period.
HTTP Request
GET /external/v1/booking/reservations
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Query Parameters
Parameter | Type | Description |
---|---|---|
from * | ISO date string YYYY-MM-DD |
Start date range |
to * | ISO date string YYYY-MM-DD |
End date range |
dateType * | String | Criteria for applying dates range. Possible values are "arrival", "departure", "creation", "creationorig", "included" |
listingId | String or [ String ] | Listing identifier. For multiple listings use listingId=WV01B&listingId=YR09A |
type | String or [ String ] | Reservation types. Default types are "reserved","booked", "contract". If you want to search by multple types, use type=reserved&type=booked&type=blocked Possible values are "reserved", "booked", "contract", "blocked", "maintenance", "canceled" |
_idclient | String | Client identifier |
skip | Integer | Number of records to skip. Used to build proper pagination. Default value is 0 |
limit | Integer | Maximum number of records to return. Default and maximum value is 20 |
* - required params
Reservations report ( XLSX )
curl -X GET "https://play.stays.net/external/v1/booking/reservations-export?from=2020-12-01&to=2020-12-31&dateType=arrival" \
-H "accept: application/vnd.openxmlformats" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX"
The above command returns xlsx file
This endpoint returns active reservations for certain period.
HTTP Request
GET /external/v1/booking/reservations-export
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Query Parameters
Parameter | Type | Description |
---|---|---|
from * | ISO date string YYYY-MM-DD |
Start date range |
to * | ISO date string YYYY-MM-DD |
End date range |
dateType * | String | Criteria for applying dates range. Possible values are "arrival", "departure", "creation", "creationorig", "included" |
listingId | String | Listing identifier |
type | String | Reservation types. Default types are "reserved","booked", "contract". |
_idclient | String | Client identifier |
* - required params
Reservations report ( JSON )
curl -X POST "https://play.stays.net/external/v1/booking/reservations-export" \
-H "accept: application/json" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d "{\"from\":\"2020-12-01\",\"to\":\"2020-12-31\",\"dateType\":\"arrival\"}"
The above command returns JSON structured like this:
[
{
"_id": "5fd9f8c88223294d2d247363",
"id": "MI01G",
"type": "reserved",
"currency": "BRL",
"checkInDate": "2020-12-16",
"checkOutDate": "2020-12-16",
"guestTotalCount": 1,
"nightCount": 3,
"creationDate": "2020-12-16",
"forwardingDate": "2020-12-16",
"pricePerNight": 150,
"reserveTotal": 600,
"listingInvoiceTotal": 600,
"extraServicesTotal": 0,
"listing": {
"id": "LZ02G",
"internalName": "API Listing 001"
},
"baseAmountForwarding": 600,
"sellPriceCorrected": 600,
"companyCommision": 0,
"buyPrice": 600,
"totalForwardFee": 0,
"client": {
"name": "Jessica Santos",
"firstName": "Jessica",
"lastName": "Santos",
"email": "noreply@stays.com.br"
},
"fee": [
{
"val": 150
}
],
"ownerFee": [
],
"documents": []
},
{
"_id": "5fd9f896facb2281c66f236d",
"id": "MB01G",
"type": "reserved",
"currency": "BRL",
"checkInDate": "2020-12-16",
"checkOutDate": "2020-12-16",
"guestTotalCount": 1,
"nightCount": 4,
"creationDate": "2020-12-16",
"forwardingDate": "2020-12-16",
"pricePerNight": 150,
"reserveTotal": 750,
"listingInvoiceTotal": 750,
"extraServicesTotal": 0,
"listing": {
"id": "LZ02G",
"internalName": "API Listing 001"
},
"baseAmountForwarding": 750,
"sellPriceCorrected": 742.5,
"companyCommision": 0,
"buyPrice": 742.5,
"totalForwardFee": 7.5,
"client": {
"name": "Luisa Santos",
"firstName": "Luisa",
"lastName": "Santos",
"email": "noreply@stays.com.br"
},
"fee": [
{
"val": 150
}
],
"ownerFee": [
{
"val": 0
},
{
"val": 7.5
}
],
"documents": []
}
]
This endpoint returns reservations resport for certain period.
HTTP Request
POST /external/v1/booking/reservations-export
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Body Parameters
Parameter | Type | Description |
---|---|---|
from * | ISO date string YYYY-MM-DD |
Start date range |
to * | ISO date string YYYY-MM-DD |
End date range |
dateType * | String | Criteria for applying dates range. Possible values are "arrival", "departure", "creation", "creationorig", "included" |
listingId | String | Listing identifier |
type | String | Reservation types. Default types are "reserved","booked", "contract". |
_idclient | String | Client identifier |
* - required params
Returns reservation payments
curl -X GET "https://play.stays.net/external/v1/booking/reservations/UR01H/payments" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_id": "64760f1db2db67050d327b61",
"_idpaymentProvider": "60ba1adea2b39d0ae5f62348",
"type": "credit",
"_f_val": 70.43,
"status": "pending",
"expirationDate": "2023-05-30",
"desc": "desc",
"name": "Res. Downpayment",
"competenceDate": "2023-05-30"
}
]
This endpoint returns reservation payments by its identifier
HTTP Request
GET /external/v1/booking/reservations/{reservationId}/payments
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
reservationId * | String | Reservation identifier: (short and long both values accepted), also partnerCode can be used for it |
* - required params
Create reservation payment
curl -X POST "https://play.stays.net/external/v1/booking/reservations/UR01H/payments" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d '{
"_id": "64760f1db2db67050d327b61",
"_idpaymentProvider": "60ba1adea2b39d0ae5f62348",
"type": "credit",
"_f_val": 20,
"status": "pending",
"expirationDate": "2023-05-30",
"desc": "desc payment",
"name": "Res. Downpayment",
"competenceDate": "2023-05-30"
}'
The above command returns JSON structured like this:
{
"_id": "64875d2d35454e1480eded47",
"_idpaymentProvider": "60ba1adea2b39d0ae5f62348",
"type": "credit",
"_f_val": 20,
"status": "pending",
"expirationDate": "2023-05-30",
"desc": "desc payment",
"name": "Res. Downpayment",
"competenceDate": "2023-05-30"
}
This endpoint creates new reservation payment
HTTP Request
POST /external/v1/booking/reservations/{reservationId}/payments
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Body Parameters
Parameter | Type | Description |
---|---|---|
_id | String | Reservations identifier |
_idpaymentProvider | String | Payment Provider identifier |
type * | String | Payment type. For payments, applicable only "credit" or "debit" |
_f_val * | Number | Payment amount |
status | String | Payment status. For payments, applicable only "pending" or "completed" |
expirationDate * | ISO date string YYYY-MM-DD |
Expiration date |
paymentDate | ISO date string YYYY-MM-DD |
Payment date |
competenceDate | ISO date string YYYY-MM-DD |
Competence date |
name | String | Payment name |
desc | String | Payment description |
_f_fee | Number | Payment fee |
_f_tax | Number | Payment tax |
readonly | Boolean | Indicates that Payment cannot be modified through API |
* - required params
Modifies reservation payment
curl -X PATCH "https://play.stays.net/external/v1/booking/reservations/UR01H/payments/64760f1db2db67050d327b61" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d '{
"type": "debit",
"_f_val": 30
}'
The above command returns JSON structured like this:
{
"_id": "64760f1db2db67050d327b61",
"_idpaymentProvider": "60ba1adea2b39d0ae5f62348",
"type": "debit",
"_f_val": 30,
"status": "pending",
"expirationDate": "2023-05-30",
"desc": "eeee",
"name": "Res. Downpayment",
"competenceDate": "2023-05-30"
}
This endpoint modifies reservation payment
HTTP Request
PATCH /external/v1/booking/reservations/{reservationId}/payments/{paymentId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Body Parameters
Parameter | Type | Description |
---|---|---|
_f_val | Number | Payment amount |
expirationDate | ISO date string YYYY-MM-DD |
Expiration date |
paymentDate | ISO date string YYYY-MM-DD |
Payment date |
competenceDate | ISO date string YYYY-MM-DD |
Competence date |
name | String | Payment name |
desc | String | Payment description |
_f_fee | Number | Payment fee |
_f_tax | Number | Payment tax |
* - required params
Delete reservation payment
curl -X DELETE "https://play.stays.net/external/v1/booking/reservations/UR01H/payments/64760f1db2db67050d327b61" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"_id": "64760f1db2db67050d327b61",
"_idpaymentProvider": "60ba1adea2b39d0ae5f62348",
"type": "credit",
"_f_val": 30,
"status": "pending",
"expirationDate": "2023-05-30",
"desc": "eeee",
"name": "Res. Downpayment",
"competenceDate": "2023-05-30"
}
This endpoint delete reservation payment
HTTP Request
DELETE /external/v1/booking/reservations/{reservationId}/payments/{paymentId}
Clients
curl -X GET "https://play.stays.net/external/v1/booking/clients" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_id": "5e321efdc5fb330012b5d33d",
"kind": "person",
"fName": "fName1",
"lName": "lName1",
"email": "client1@gmail.com",
"isUser": false
},
{
"_id": "5e321e74e3ed7e0010e3e8b0",
"kind": "person",
"fName": "fName2",
"lName": "lName2",,
"email": "client2@guest.booking.com",
"isUser": true
}
]
curl -X GET "https://play.stays.net/external/v1/booking/clients?hasReservations=true&reservationFilter=arrival&reservationFrom=2020-02-01&reservationTo=2020-02-29" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns clients who has reservations and arrival date of reservations is in [2020-02-01, 2020-02-29]:
[
{
"_id": "5e321efdc5fb330012b5d33d",
"kind": "person",
"fName": "fName1",
"lName": "lName1",
"email": "client1@gmail.com",
"isUser": false
},
{
"_id": "5e321e74e3ed7e0010e3e8b0",
"kind": "person",
"fName": "fName2",
"lName": "lName2",,
"email": "client2@guest.booking.com",
"isUser": true
}
]
This endpoint returns clients list.
HTTP Request
GET /external/v1/booking/clients
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Query Parameters
Parameter | Type | Description |
---|---|---|
name | String | Partial or full client's name |
String | Partial or full client's email | |
phone | String | Partial or full client's phone |
hasReservations | Boolean | Allows to search only for clients with/without reservations |
reservationFilter | String | Set criteria to search clients by reservations for certain period. Possible values - creation |
reservationFrom | ISO date string YYYY-MM-DD |
Set start period for searching reservations |
reservationTo | ISO date string YYYY-MM-DD |
Set end period for searching reservations |
sortBy | String | Setup field for sorting. Accepts name |
sort | String | Setup sorting direction. Accepts asc |
skip | Integer | Number of records to skip. Used to build proper pagination. Default value is 0 |
limit | Integer | Maximum number of records to return. Default and maximum value is 20 |
Create client
curl -X POST "https://play.stays.net/external/v1/booking/clients" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"\
-d '{
"_id": "630a0e4948990321ce00d9a3",
"kind": "person",
"fName": "fName",
"lName": "lName",
"email": "fName@gmail.com",
"isUser": true
}'
The above command returns JSON structured like this:
{
"_id": "6487659335454e1480eded5e",
"kind": "person",
"fName": "fName",
"lName": "lName",
"name": "fName lName",
"email": "fname@gmail.com",
"isUser": true,
"creationDate": "2023-06-12",
"clientSource": "booking"
}
This endpoint creates new client
HTTP Request
POST /external/v1/booking/clients
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Body Parameters
Parameter | Type | Description |
---|---|---|
kind | String | Client kind. For client, applicable only "personal" or "company" |
fName | String | First name. Applicable for personal account |
lName | String | Last name. Applicable for personal account |
name | String | Name of client. Applicable for company |
String | email address of client | |
isUser | Boolean | Indicates if client has access to personal area on site |
birthDate | ISO date string YYYY-MM-DD |
Birth date |
gender | String | Gender |
civilState | String | Civil State |
nationality | String | Nationality |
internalNote | String | Some internal information about this client |
phones | Array [Object] | Array of phones object |
phones.iso | String | Phone |
phones.hint | String | Phone hint |
documents | Array [Object] | Array of documents object |
documents.type | String | Document type. For client, applicable only "cpf" or "cnpj" or "id" or "passport" or "rne" |
documents.numb | String | Document number |
documents.issued | String | Name of organization what issued document |
documents.date | ISO date string YYYY-MM-DD |
Documents date |
prefLang | String | Language code in iso format [ en_US, pt_BR, de_DE, es_ES, ru_RU, sv_SE, it_IT, fr_FR, pt_PT, el_GR ] |
alternateLangs | String | Alternative language code in iso format [ en_US, pt_BR, de_DE, es_ES, ru_RU, sv_SE, it_IT, fr_FR, pt_PT, el_GR ] |
responsibility | Object | User responsibility functions |
responsibility.reservationAgent | Boolean | Reservation's agent function |
* - required params
Client
curl -X GET "https://play.stays.net/external/v1/booking/clients/5e321efdc5fb330012b5d33d" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"_id": "5e321efdc5fb330012b5d33d",
"kind": "person",
"fName": "fName1",
"lName": "lName1",
"email": "test1@gmail.com",
"isUser": true,
"phones": [
{
"num": "13 12345-3345",
"hint": "profile"
}
],
"documents": [
{
"type": "cpf",
"numb": "002.001.123-88"
},
{
"type": "id",
"numb": "434243436"
}
],
"alternateLangs": [
"pt_BR"
],
"lastAccess": {
"_dt": "2020-01-30T05:40:09.043Z",
"ip": "187.119.224.3",
"ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.4 Mobile/15E148 Safari/604.1",
"device": "phone"
},
"reservations": [
{
"_id": "5e320a760bb5b8001115103c",
"id": "ZQ67F",
"checkInDate": "2020-01-30",
"checkInTime": "15:00",
"checkOutDate": "2020-02-06",
"checkOutTime": "12:00",
"_idlisting": "5e2615cae2c702001761312c",
"_idclient": "5e320a75650d0e00104bfd6e",
"type": "booked",
"currency": "BRL",
"price": {
"_f_total": 1711.71
},
"guests": 2
}
]
}
This endpoint returns client detailed object.
HTTP Request
GET /external/v1/booking/clients/{clientId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
clientId | String | Client unique identifier |
Modifies client
curl -X PATCH "https://play.stays.net/external/v1/booking/clients/5e321efdc5fb330012b5d33d" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"\
-d '{
"email": "modifiesfName@gmail.com"
}'
The above command returns JSON structured like this:
{
"_id": "6487659335454e1480eded5e",
"kind": "person",
"fName": "fName",
"lName": "lName",
"name": "fName lName",
"email": "modifiesfName@gmail.com",
"isUser": true,
"creationDate": "2023-06-12",
"clientSource": "booking",
"responsibility": {
"reservationAgent": true
}
}
This endpoint creates new client
HTTP Request
PATCH /external/v1/booking/clients/{clientId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Body Parameters
Parameter | Type | Description |
---|---|---|
kind | String | Client kind. For client, applicable only "personal" or "company" |
fName | String | First name. Applicable for personal account |
lName | String | Last name. Applicable for personal account |
name | String | Name of client. Applicable for company |
String | email address of client | |
isUser | Boolean | Indicates if client has access to personal area on site |
birthDate | ISO date string YYYY-MM-DD |
Birth date |
gender | String | Gender |
civilState | String | Civil State |
nationality | String | Nationality |
internalNote | String | Some internal information about this client |
phones | Array [Object] | Array of phones object |
phones[0].iso | String | Phone |
phones[0].hint | String | Phone hint |
documents | Array [Object] | Array of documents object |
documents[0].type | String | Document type. For client, applicable only "cpf" or "cnpj" or "id" or "passport" or "rne" |
documents[0].numb | String | Document number |
documents[0].issued | String | Name of organization what issued document |
documents[0].date | ISO date string YYYY-MM-DD |
Documents date |
prefLang | String | Language code in iso format [ en_US, pt_BR, de_DE, es_ES, ru_RU, sv_SE, it_IT, fr_FR, pt_PT, el_GR ] |
alternateLangs | String | Alternative language code in iso format [ en_US, pt_BR, de_DE, es_ES, ru_RU, sv_SE, it_IT, fr_FR, pt_PT, el_GR ] |
responsibility | Object | User responsibility functions |
responsibility.reservationAgent | Boolean | Reservation's agent function |
* - required params
Finance API
Allows to manage finance area
Create Payment Provider
curl -X POST "https://play.stays.net/external/v1/finance/payment-providers" \
-H "accept: application/json" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d "{\"type\":\"bank\",\"status\":\"active\",\"internalName\":\"Main bank\",\"_mcstartBalance\":{\"BRL\":0},\"allowPayments\":true,\"currencies\":[\"BRL\"],\"_mstitle\":{\"en_US\":\"World wide bank\"},\"_msdesc\":{\"en_US\":\"The greatest bank in the world\"},\"_msconfirmText\":{\"en_US\":\"Finalize your reservation for our customer service team to contact you.\"},\"bankDetails\":\"<p>Itaú / Unibanco </p><p>Cód.231</p><p>Agência: 5362</p><p>Conta Corrente: 11257-0</p>\"}"
The above command returns JSON structured like this:
{
"_id": "632899b716de853470f8a0b8",
"type": "bank",
"status": "active",
"_mcstartBalance": {
"BRL": 0
},
"internalName": "Main bank",
"_mstitle": {
"en_US": "World wide bank"
},
"_msdesc": {
"en_US": "The greatest bank in the world"
},
"allowPayments": true,
"currencies": [
"BRL"
],
"_msconfirmText": {
"en_US": "Finalize your reservation for our customer service team to contact you."
},
"bankDetails": "<p>Unibanco</p><p>Cód.231</p><p>Agência: 5362</p><p>Conta Corrente: 11257-0</p>"
}
Creates new Payment Provider. Now it is possible to create Bank or User providers
HTTP Request
POST /external/v1/finance/payment-providers
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Body Parameters for type "user"
Parameter | Type | Description |
---|---|---|
_id | String | Payment providers identifier |
type * | String | Payment provider type. Must be 'user' |
_iduser | String | User identifier |
status | String | Payment provider status. Can be 'active' or 'inactive' |
_mcstartBalance | Object | Set the accounting starting balance (mutlicurrency) |
Body Parameters for type "bank"
Parameter | Type | Description |
---|---|---|
_id | String | Payment providers identifier |
type * | String | Payment provider type. Must be "bank" |
status | String | Payment provider status. Can be 'active' or 'inactive' |
internalName | String | Payment provider internal name |
_mcstartBalance | Object | Set the accounting starting balance (mutlicurrency) |
allowPayments | Boolean | Indicates if bank will be used for frontend allowPayments |
currencies | Array | List of accepted currencies for frontend allowPayments |
_mstitle | Object | Multilanguage commercial name |
_msdesc | Object | Multilanguage commercial description |
bankDetails | String | Extra info that client needs to complete payment |
_msconfirmText | Object | Multilanguage confirmation text. Will be shown after frontend payment completion |
* - required params
Retrieve Payment Provider
curl -X GET "https://play.stays.net/external/v1/finance/payment-providers/632899b716de853470f8a0b8" \
-H "accept: application/json" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX"
The above command returns JSON structured like this:
{
"_id": "632899b716de853470f8a0b8",
"type": "bank",
"status": "active",
"_mcstartBalance": {
"BRL": 0
},
"internalName": "Main bank",
"_mstitle": {
"en_US": "World wide bank"
},
"_msdesc": {
"en_US": "The greatest bank in the world"
},
"allowPayments": true,
"currencies": [
"BRL"
],
"_msconfirmText": {
"en_US": "Finalize your reservation for our customer service team to contact you."
},
"bankDetails": "<p>Unibanco</p><p>Cód.231</p><p>Agência: 5362</p><p>Conta Corrente: 11257-0</p>"
}
This endpoint returns payment provider item
HTTP Request
GET /external/v1/finance/payment-providers/{providerId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
providerId | String | Provider identifier |
Modify Payment Provider
curl -X PATCH "https://play.stays.net/external/v1/finance/payment-providers/632899b716de853470f8a0b8" \
-H "accept: application/json" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d "{\"type\":\"bank\",\"status\":\"inactive\"}"
The above command returns JSON structured like this:
{
"_id": "632899b716de853470f8a0b8",
"type": "bank",
"status": "active",
"_mcstartBalance": {
"BRL": 0
},
"internalName": "Main bank",
"_mstitle": {
"en_US": "World wide bank"
},
"_msdesc": {
"en_US": "The greatest bank in the world"
},
"allowPayments": false
}
Modifies Payment Provider
HTTP Request
PATCH /external/v1/finance/payment-providers/{providerId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
providerId | String | Provider identifier |
Body Parameters for type "user"
Parameter | Type | Description |
---|---|---|
_id | String | Payment providers identifier |
type * | String | Payment provider type. Must be 'user' |
_iduser | String | User identifier |
status | String | Payment provider status. Can be 'active' or 'inactive' |
_mcstartBalance | Object | Set the accounting starting balance (mutlicurrency) |
Body Parameters for type "bank"
Parameter | Type | Description |
---|---|---|
_id | String | Payment providers identifier |
type * | String | Payment provider type. Must be "bank" |
status | String | Payment provider status. Can be 'active' or 'inactive' |
internalName | String | Payment provider internal name |
_mcstartBalance | Object | Set the accounting starting balance (mutlicurrency) |
allowPayments | Boolean | Indicates if bank will be used for frontend allowPayments |
currencies | Array | List of accepted currencies for frontend allowPayments |
_mstitle | Object | Multilanguage commercial name |
_msdesc | Object | Multilanguage commercial description |
bankDetails | String | Extra info that client needs to complete payment |
_msconfirmText | Object | Multilanguage confirmation text. Will be shown after frontend payment completion |
* - required params
* - required params
Retrieve Payment Providers
curl -X GET "https://play.stays.net/external/v1/finance/payment-providers" \
-H "accept: application/json" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX"
The above command returns JSON structured like this:
[
{
"_id": "603ff86ebd3be0c6db6d83d8",
"type": "bank",
"status": "active",
"_mcstartBalance": {
"BRL": 0
},
"internalName": "PIX",
"_mstitle": {
"pt_BR": "PIX"
},
"_msdesc": {
"pt_BR": "<p>Finalize sua reserva para o nosso time de atendimento entrar em contato.</p>"
},
"allowPayments": true,
"currencies": [
"BRL"
],
"_msconfirmText": {
"pt_BR": "<p>Nossa equipe de atendimento entrará em contato para finalizar sua reserva<br></p>"
},
"bankDetails": "Nossa equipe de atendimento entrará em contato para finalizar sua reserva"
},
{
"_id": "632899b716de853470f8a0b8",
"type": "bank",
"status": "active",
"_mcstartBalance": {
"BRL": 0
},
"internalName": "Main bank",
"_mstitle": {
"en_US": "World wide bank"
},
"_msdesc": {
"en_US": "The greatest bank in the world"
},
"allowPayments": false
},
{
"_id": "6153597bd6f630fd869620fb",
"type": "user",
"status": "active",
"_mcstartBalance": {
"BRL": 0
},
"_iduser": "5e1cab114ca7050010a4f158"
}
]
Retrieves Payment Providers
HTTP Request
GET /external/v1/finance/payment-providers
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Query Parameters
Parameter | Type | Description |
---|---|---|
status | String | Payment provider status. Can be 'active' or 'inactive' |
* - required params
Retrieve finance owners
curl -X GET "https://play.stays.net/external/v1/finance/owners?from=2023-01-01&to=2023-03-01' \
-H "accept: application/json" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX"
The above command returns JSON structured like this:
[
{
"_id": "620e0aa28517475223e5e979",
"name": "Proprietario 1",
"debit": {
"_mcval": {
"USD": 1000
}
},
"credit": {
"_mcval": {
"USD": 199.7
}
},
"dateRange": {
"from": "2023-01-01",
"to": "2023-07-01"
},
"listings": [
{
"_id": "62723898da9653be3af7c0dc",
"id": "YT04A",
"internalName": "U018"
},
{
"_id": "62723895da9653be3af7c0db",
"id": "YR09A",
"internalName": "U119"
},
{
"_id": "6272389fda9653be3af7c0de",
"id": "YV37A",
"internalName": "D119"
},
{
"_id": "627238a2da9653be3af7c0df",
"id": "BM01E",
"internalName": "B1001"
}
]
},
{
"_id": "59e21e20af857d0010aee733",
"name": "Proprietario 2",
"debit": {
"_mcval": {
"USD": 50
}
},
"credit": {
"_mcval": {
"USD": 0
}
},
"dateRange": {
"from": "2023-01-01",
"to": "2023-07-01"
},
"listings": [
{
"_id": "6272389cda9653be3af7c0dd",
"id": "YU16A",
"internalName": "D033"
},
{
"_id": "5afdb943d695340010691835",
"id": "VH02C",
"internalName": "035"
}
]
},
{
"_id": "603d047fd9e77e192e15f36f",
"name": "Proprietario 3",
"debit": {
"_mcval": {
"USD": 150
}
},
"credit": {
"_mcval": {
"USD": 311.53
}
},
"dateRange": {
"from": "2023-01-01",
"to": "2023-07-01"
},
"listings": [
{
"_id": "5afdb930929a8b00111c84d1",
"id": "VH01C",
"internalName": "0333 Copacabana!"
}
]
},
{
"_id": "5a3148cc35b48c0010618556",
"name": "wagner@stays.com.br",
"debit": {
"_mcval": {
"USD": 0
}
},
"credit": {
"_mcval": {
"USD": 92.28
}
},
"dateRange": {
"from": "2023-01-01",
"to": "2023-07-01"
},
"listings": [
{
"_id": "62723891da9653be3af7c0da",
"id": "WV01B",
"internalName": "U115"
}
]
}
]
Retrieves Finance Owners
HTTP Request
GET /external/v1/finance/owners
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Query Parameters
Parameter | Type | Description |
---|---|---|
from | ISO date string YYYY-MM-DD |
Start date of returning data. Required |
to | ISO date string YYYY-MM-DD |
End date of returning data. Required |
Retrieve finance owners by id
curl -X GET "https://play.stays.net/external/v1/finance/owners/603d047fd9e77e192e15f36f?from=2023-01-01&to=2023-07-01' \
-H "accept: application/json" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX"
The above command returns JSON structured like this:
{
"_id": "603d047fd9e77e192e15f36f",
"name": "Proprietario 3",
"debit": {
"_mcval": {
"USD": 150
}
},
"credit": {
"_mcval": {
"USD": 311.53
}
},
"dateRange": {
"from": "2023-01-01",
"to": "2023-07-01"
},
"listings": [
{
"_id": "5afdb930929a8b00111c84d1",
"id": "VH01C",
"internalName": "01 Copacabana",
"credit": {
"_mcval": {
"BRL": 1603.6
}
},
"debit": {
"_mcval": {
"BRL": 772.19
}
},
"balance": {
"_mcval": {
"BRL": 831.41
}
},
"lifeCredit": {
"_mcval": {
"BRL": 5739.26
}
},
"lifeDebit": {
"_mcval": {
"BRL": 4056.52
}
},
"lifeBalance": {
"_mcval": {
"BRL": 1682.74
}
},
"accounts": [
{
"date": "2023-03-23",
"internalName": "01 Copacabana!",
"internalNote": "28/01/2023 - 31/01/2023",
"reserveId": "63ceb439441ec0f74bd0b124",
"_mcval": {
"BRL": 374.3
},
"type": "credit"
},
{
"date": "2023-03-23",
"internalName": "01 Copacabana!",
"internalNote": "01/02/2023 - 03/02/2023",
"reserveId": "63cec6c2cd7dc4b6971b73f0",
"_mcval": {
"BRL": 285
},
"type": "credit"
},
{
"date": "2023-03-23",
"internalName": "01 Copacabana!",
"internalNote": "04/02/2023 - 06/02/2023",
"reserveId": "63cec7a33d48461310300b7b",
"_mcval": {
"BRL": 285
},
"type": "credit"
},
{
"date": "2023-03-23",
"internalName": "01 Copacabana!",
"internalNote": "06/02/2023 - 09/02/2023",
"reserveId": "63cff221df7be676090b9e06",
"_mcval": {
"BRL": 374.3
},
"type": "credit"
},
{
"date": "2023-03-23",
"internalName": "01 Copacabana!",
"internalNote": "11/02/2023 - 13/02/2023",
"reserveId": "63d269c2e58fe308bac64591",
"_mcval": {
"BRL": 285
},
"type": "credit"
},
{
"date": "2023-05-31",
"internalName": "01 Copacabana!",
"transactionName": "123",
"publicNote": "Public note",
"internalNote": "Internal notes",
"_mcval": {
"BRL": 514.79
},
"type": "debit",
"status": "paid"
},
{
"date": "2023-05-31",
"internalName": "01 Copacabana!",
"transactionName": "Transaction name",
"publicNote": "Public note (visible to owners)",
"internalNote": "Internal notes",
"_mcval": {
"BRL": 257.4
},
"type": "debit",
"status": "await"
}
]
}
]
}
Retrieves Finance Owner
HTTP Request
GET /external/v1/finance/owners/{ownerId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
ownerId * | String | Owner identifier
* - required params
Query Parameters
Parameter | Type | Description |
---|---|---|
from | ISO date string YYYY-MM-DD |
Start date of returning data. Required |
to | ISO date string YYYY-MM-DD |
End date of returning data. Required |
Retrieve finance owners by id and listing id
curl -X GET "https://play.stays.net/external/v1/finance/owners/59e21e20af857d0010aee733/5afdb943d695340010691835?from=2023-01-01&to=2023-07-01' \
-H "accept: application/json" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX"
The above command returns JSON structured like this:
{
"_id": "5afdb943d695340010691835",
"id": "VH02C",
"internalName": "035",
"credit": {
"_mcval": {
"BRL": 0
}
},
"debit": {
"_mcval": {
"BRL": 257.4
}
},
"balance": {
"_mcval": {
"BRL": -257.4
}
},
"lifeCredit": {
"_mcval": {
"BRL": 0
}
},
"lifeDebit": {
"_mcval": {
"BRL": 257.4
}
},
"lifeBalance": {
"_mcval": {
"BRL": -257.4
}
},
"accounts": [
{
"date": "2023-05-31",
"internalName": "035",
"transactionName": "01/01/2023 - 09/01/2023",
"publicNote": "",
"internalNote": "Internal notes",
"_mcval": {
"BRL": 257.4
},
"type": "debit",
"status": "await"
}
]
}
Retrieves Finance Owner Listing
HTTP Request
GET /external/v1/finance/owners/{ownerId}/{listingId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
ownerId * | String | Owner identifier listingId * | String | Listing identifier
* - required params
Query Parameters
Parameter | Type | Description |
---|---|---|
from | ISO date string YYYY-MM-DD |
Start date of returning data. Required |
to | ISO date string YYYY-MM-DD |
End date of returning data. Required |
Listing Calendar API
Returns information about availability, prices, restrictions for certain period. Allows to update prices and restrictions.
Retrieve Listing Calendar
curl -X GET "https://play.stays.net/external/v1/calendar/listing/5e2615cae2c702001761312c?from=2023-06-09&to=2023-06-11" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"date": "2023-06-09",
"avail": 0,
"closedToArrival": false,
"closedToDeparture": false,
"prices": [
{
"minStay": 2,
"_mcval": {
"USD": 10,
"BRL": 50,
"EUR": 11
}
}
]
},
{
"date": "2023-06-10",
"avail": 1,
"closedToArrival": false,
"closedToDeparture": false,
"prices": [
{
"minStay": 2,
"_mcval": {
"USD": 10,
"BRL": 50,
"EUR": 11
}
}
]
},
{
"date": "2023-06-11",
"avail": 1,
"closedToArrival": false,
"closedToDeparture": false,
"prices": [
{
"minStay": 2,
"_mcval": {
"USD": 24,
"BRL": 120,
"EUR": 26
}
}
]
}
]
This endpoint returns availability, prices, restrictions information by date
HTTP Request
GET /external/v1/calendar/listing/{listingId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
listingId | String | Unique listing identifier. Accepts short and long ID |
Query Parameters
Parameter | Type | Description |
---|---|---|
from | ISO date string YYYY-MM-DD |
Start date of returning data. Required |
to | ISO date string YYYY-MM-DD |
End date of returning data. Required |
ignorePriceGroupUnits | Boolean | Ignore availability for price group units. Only master listing availability will be returned. |
ignoreCloneGroupUnits | Boolean | Ignore availability for clone group units. Only master listing availability will be returned |
Response Object
Parameter | Type | Description |
---|---|---|
date | ISO date string YYYY-MM-DD |
Target date |
avail | Integer | Available units count |
closedToArrival | Boolean | Arrival restriction |
closedToDeparture | Boolean | Departure restriction |
prices | Array | Array of prices |
prices.minStay | Integer | Minimum stay restriction to apply price |
prices._mcval | Object | Multi currency value |
monthlyPrice | Object | Optional. Exists if monthly price is configured in price rules |
monthlyPrice.minStay | Integer | Minimum stay restriction to apply monthly price |
monthlyPrice._mcval | Object | Multi currency monthly value |
Update Listing Calendar
curl -X PATCH "https://play.stays.net/external/v1/calendar/listing/5e2615cae2c702001761312c/batch" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d '[
{
"from": "2023-07-09",
"to": "2023-07-11",
"closedToArrival": true,
"closedToDeparture": true,
"prices": [
{
"minStay": 2,
"_f_val": 100
}
]
}
]'
The above command returns JSON structured like this:
[
{
"date": "2023-07-09",
"avail": 1,
"closedToArrival": true,
"closedToDeparture": true,
"prices": [
{
"minStay": 2,
"_mcval": {
"USD": 20,
"BRL": 100,
"EUR": 22
}
}
]
},
{
"date": "2023-07-10",
"avail": 1,
"closedToArrival": true,
"closedToDeparture": true,
"prices": [
{
"minStay": 2,
"_mcval": {
"USD": 20,
"BRL": 100,
"EUR": 22
}
}
]
},
{
"date": "2023-07-11",
"avail": 1,
"closedToArrival": true,
"closedToDeparture": true,
"prices": [
{
"minStay": 2,
"_mcval": {
"USD": 20,
"BRL": 100,
"EUR": 22
}
}
]
}
]
This endpoint updates prices and restrictions information by date ranges
HTTP Request
PATCH /external/v1/calendar/listing/{listingId}/batch
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
listingId | String | Listing identifier. Both identifiers (long and short) are supported |
Body Parameters
Body accepts array of items
Parameter | Type | Description |
---|---|---|
from * | ISO date string YYYY-MM-DD |
Start date |
to * | ISO date string YYYY-MM-DD |
End date |
prices * | Array | Prices array |
prices *.minStay | Integer | Minimum stay restriction to apply price |
prices *._f_val | Number | Price value in listing currency |
closedToArrival * | Boolean | Arrival restriction |
closedToDeparture * | Boolean | Departure restriction |
* - required params
Update Rate Values
curl -X PATCH "https://play.stays.net/external/v1/calendar/listing/5e2615cae2c702001761312c/prices" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d '{
"from": "2023-06-09",
"to": "2023-06-10",
"prices": [
{
"minStay": 2,
"_f_val": 50
}
]
}'
The above command returns JSON structured like this:
[
{
"date": "2023-06-09",
"avail": 0,
"closedToArrival": false,
"closedToDeparture": false,
"prices": [
{
"minStay": 2,
"_mcval": {
"USD": 10,
"BRL": 50,
"EUR": 11
}
}
]
},
{
"date": "2023-06-10",
"avail": 1,
"closedToArrival": false,
"closedToDeparture": false,
"prices": [
{
"minStay": 2,
"_mcval": {
"USD": 10,
"BRL": 50,
"EUR": 11
}
}
]
}
]
This endpoint updates rate values
HTTP Request
PATCH /external/v1/calendar/listing/{listingId}/prices
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
listingId | String | Listing identifier. Both identifiers (long and short) are supported |
Body Parameters
Body accepts array of items
Parameter | Type | Description |
---|---|---|
from * | ISO date string YYYY-MM-DD |
Start date |
to * | ISO date string YYYY-MM-DD |
End date |
prices * | Array | Prices array |
prices.minStay * | Integer | Minimum stay restriction to apply price |
prices._f_val * | Number | Price value in listing currency |
* - required params
Update Restriction
curl -X PATCH "https://play.stays.net/external/v1/calendar/listing/5e2615cae2c702001761312c/restrictions" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d '{
"from": "2023-06-09",
"to": "2023-06-10",
"closedToArrival": false,
"closedToDeparture": false
}'
The above command returns JSON structured like this:
[
{
"date": "2023-06-09",
"avail": 0,
"closedToArrival": true,
"closedToDeparture": true,
"prices": [
{
"minStay": 2,
"_mcval": {
"USD": 10,
"BRL": 50,
"EUR": 11
}
}
]
},
{
"date": "2023-06-10",
"avail": 1,
"closedToArrival": true,
"closedToDeparture": true,
"prices": [
{
"minStay": 2,
"_mcval": {
"USD": 10,
"BRL": 50,
"EUR": 11
}
}
]
}
]
This endpoint updates rate values
HTTP Request
PATCH /external/v1/calendar/listing/{listingId}/restrictions
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
listingId | String | Listing identifier. Both identifiers (long and short) are supported |
Body Parameters
Body accepts array of items
Parameter | Type | Description |
---|---|---|
from * | ISO date string YYYY-MM-DD |
Start date |
to * | ISO date string YYYY-MM-DD |
End date |
closedToArrival * | Boolean | Arrival restriction |
closedToDeparture * | Boolean | Departure restriction |
* - required params
Prices API
Allows to manage price rules and rates
Retrieve Price Regions
curl -X GET "https://play.stays.net/external/v1/parr/price-regions" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_id": "5e223aaa9a4c7700109a7d92",
"name": "Recreio"
},
{
"_id": "5e29bd5242add60011119d58",
"name": "Barra"
}
]
This endpoint returns list of price regions
HTTP Request
GET /external/v1/parr/price-regions
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Create Price Region
curl -X POST "https://play.stays.net/external/v1/parr/price-regions" \
-H "accept: application/json" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d '{
"name": "Price region 1"
}'
The above command returns JSON structured like this:
{
"_id": "5f50dd1a885371296e1a3ae0",
"name": "Price region 1"
}
Creates new Price Region
HTTP Request
POST /external/v1/parr/price-regions
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Body Parameters
Parameter | Type | Description |
---|---|---|
name * | String | Price region unique name |
* - required params
Modify Price Region
curl -X PATCH "https://play.stays.net/external/v1/parr/price-regions/5f50dd1a885371296e1a3ae0" \
-H "accept: application/json" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d '{
"name": "Price region 1_1"
}'
The above command returns JSON structured like this:
{
"_id": "5f50dd1a885371296e1a3ae0",
"name": "Price region 1_1"
}
Modifies Price Region
HTTP Request
PATCH /external/v1/parr/price-regions/{_id}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Body Parameters
Parameter | Type | Description |
---|---|---|
name * | String | Price region unique name |
* - required params
Delete Price Region
curl -X DELETE "https://play.stays.net/external/v1/parr/price-regions/5f50dd1a885371296e1a3ae0" \
-H "accept: application/json" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"_id": "5f50dd1a885371296e1a3ae0",
"name": "Price region 1_1"
}
Deletes Price Region
HTTP Request
DELETE /external/v1/parr/price-regions/{_id}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Retrieve Sell Price Rules
curl -X GET "https://play.stays.net/external/v1/parr/seasons-sell?_idregion=5e223aaa9a4c7700109a7d92&from=2020-09-01&to=2020-10-03&status=active" \
-H "accept: application/json" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX"
The above command returns JSON structured like this:
[
{
"_id": "5f50df7988537104f31a3b08",
"name": "September",
"hint": "2020",
"type": "season",
"from": "2020-09-01",
"to": "2020-09-30",
"status": "active",
"ratePlans": [
{
"minStay": 3,
"_i_percent": 0
},
{
"minStay": 5,
"_i_percent": 5
}
],
"_idregion": "5e223aaa9a4c7700109a7d92",
"useMonthlyRate": true
}
]
This endpoint returns list of sell price rules
HTTP Request
GET /external/v1/parr/seasons-sell
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Query Parameters
Parameter | Type | Description |
---|---|---|
_idregion | String | Price region. For default region omit it. |
from | ISO date string YYYY-MM-DD |
start date for search |
to | ISO date string YYYY-MM-DD |
end date for search |
status | String | Status of Sell Price Rule. Accepts values ['active','inactive'] |
Create Sell Price Rule
curl -X POST "https://play.stays.net/external/v1/parr/seasons-sell" \
-H "accept: application/json" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d '{
"_idregion": "5e223aaa9a4c7700109a7d92",
"type": "season",
"name": "October",
"hint": "2020",
"from": "2020-10-01",
"to": "2020-10-30",
"status": "inactive",
"ratePlans": [
{
"minStay": 2,
"_i_percent": 0
},
{
"minStay": 3,
"_i_percent": 3
}
],
"useMonthlyRate": false
}'
The above command returns JSON structured like this:
{
"_id": "5f50e1e988537123711a3b2f",
"name": "October",
"hint": "2020",
"type": "season",
"from": "2020-10-01",
"to": "2020-10-30",
"status": "inactive",
"ratePlans": [
{
"minStay": 2,
"_i_percent": 0
},
{
"minStay": 3,
"_i_percent": 3
}
],
"_idregion": "5e223aaa9a4c7700109a7d92",
"useMonthlyRate": false
}
Creates new Sell Price Rule
HTTP Request
POST /external/v1/parr/seasons-sell
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Body Parameters
Parameter | Type | Description |
---|---|---|
_idregion | String | Price region. For default region omit it. |
type * | String | Type of Sell Price Rule. Accepts ['season','event']. |
name * | String | Internal name of Sell Price Rule. |
hint | String | Hint text. |
from | ISO date string YYYY-MM-DD |
start date of Sell Price Rule |
to | ISO date string YYYY-MM-DD |
end date of Sell Price Rule |
status | String | Status of Sell Price Rule. Accepts values ['active','inactive'] |
ratePlans | Array | List of rate plans |
ratePlans.minStay | Integer | Defines minimal number of nights |
ratePlans._i_percent | Integer | Defines percentage discount for target number of nights. For first rate plan percentage must be 0 |
useMonthlyRate | Boolean | Indicates, should system use special monthly price for long stay. Applicable only for type 'season'. |
* - required params
Retrieve Sell Price Rule
curl -X GET "https://play.stays.net/external/v1/parr/seasons-sell/5f50e1e988537123711a3b2f" \
-H "accept: application/json" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX"
The above command returns JSON structured like this:
{
"_id": "5f50e1e988537123711a3b2f",
"name": "October",
"hint": "2020",
"type": "season",
"from": "2020-10-01",
"to": "2020-10-30",
"status": "inactive",
"ratePlans": [
{
"minStay": 2,
"_i_percent": 0
},
{
"minStay": 3,
"_i_percent": 3
}
],
"_idregion": "5e223aaa9a4c7700109a7d92",
"useMonthlyRate": false
}
Retrieves Sell Price Rule
HTTP Request
GET /external/v1/parr/seasons-sell/{_id}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Modify Sell Price Rule
curl -X PATCH "https://play.stays.net/external/v1/parr/seasons-sell/5f50e1e988537123711a3b2f" \
-H "accept: application/json" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d '{
"name": "October-November",
"from": "2020-10-01",
"to": "2020-11-30",
"status":
"active",
"ratePlans": [
{
"minStay": 2,
"_i_percent": 0
},
{
"minStay": 5,
"_i_percent": 5
}
],
"useMonthlyRate": true
}'
The above command returns JSON structured like this:
{
"_id": "5f50e1e988537123711a3b2f",
"name": "October-November",
"hint": "2020",
"type": "season",
"from": "2020-10-01",
"to": "2020-11-30",
"status": "active",
"ratePlans": [
{
"minStay": 2,
"_i_percent": 0
},
{
"minStay": 5,
"_i_percent": 5
}
],
"_idregion": "5e223aaa9a4c7700109a7d92",
"useMonthlyRate": true
}
Modifies Sell Price Rule
HTTP Request
PATCH /external/v1/parr/seasons-sell/{_id}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Body Parameters
Parameter | Type | Description |
---|---|---|
_idregion | String | Price region. For default region omit it. |
type * | String | Type of Sell Price Rule. Accepts ['season','event']. |
name * | String | Internal name of Sell Price Rule. |
hint | String | Hint text. |
from | ISO date string YYYY-MM-DD |
start date of Sell Price Rule |
to | ISO date string YYYY-MM-DD |
end date of Sell Price Rule |
status | String | Status of Sell Price Rule. Accepts values ['active','inactive'] |
ratePlans | Array | List of rate plans |
ratePlans.minStay | Integer | Defines minimal number of nights |
ratePlans._i_percent | Integer | Defines percentage discount for target number of nights. For first rate plan percentage must be 0 |
useMonthlyRate | Boolean | Indicates, should system use special monthly price for long stay. Applicable only for type 'season'. |
* - required params
Delete Sell Price Rule
curl -X DELETE "https://play.stays.net/external/v1/parr/seasons-sell/5f50df7988537104f31a3b08" \
-H "accept: application/json" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX"
The above command returns JSON structured like this:
{
"_id": "5f50df7988537104f31a3b08",
"name": "September",
"hint": "2020",
"type": "season",
"from": "2020-09-01",
"to": "2020-09-30",
"status": "active",
"ratePlans": [
{
"minStay": 3,
"_i_percent": 0
},
{
"minStay": 5,
"_i_percent": 5
}
],
"_idregion": "5e223aaa9a4c7700109a7d92",
"useMonthlyRate": true
}
Deletes Sell Price Rule
HTTP Request
DELETE /external/v1/parr/seasons-sell/{_id}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Retrieve Listing Sell Prices
curl -X GET "https://play.stays.net/external/v1/parr/listing-rates-sell?listingId=WV01B&from=2020-09-01&to=2020-11-29" \
-H "accept: application/json" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX"
The above command returns JSON structured like this:
[
{
"_idlisting": "515328ab80beb0e416000008",
"_idseason": "5f50e1e988537123711a3b2f",
"type": "global",
"status": "active",
"from": "2020-10-01",
"to": "2020-11-30",
"ratePlans": [
{
"minStay": 2,
"_i_percent": 0
},
{
"minStay": 5,
"_i_percent": 5
}
]
}
]
Retrieves Listing Sell Prices
HTTP Request
GET /external/v1/parr/listing-rates-sell
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Query Parameters
Parameter | Type | Description |
---|---|---|
listingId * | String | Listing identifier (short and long both values accepted) |
from * | ISO date string YYYY-MM-DD |
start date for search |
to * | ISO date string YYYY-MM-DD |
end date for search |
* - required params
Retrieve Listing Sell Price
curl -X GET "https://play.stays.net/external/v1/parr/listing-rates-sell/5f50e1e988537123711a3b2f?listingId=515328ab80beb0e416000008" \
-H "accept: application/json" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX"
The above command returns JSON structured like this:
[
{
"_idlisting": "515328ab80beb0e416000008",
"_idseason": "5f50e1e988537123711a3b2f",
"type": "global",
"status": "active",
"from": "2020-10-01",
"to": "2020-11-30",
"ratePlans": [
{
"minStay": 2,
"_i_percent": 0
},
{
"minStay": 5,
"_i_percent": 5
}
]
}
]
Retrieves Listing Sell Price
HTTP Request
GET /external/v1/parr/listing-rates-sell/{seasonId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Query Parameters
Parameter | Type | Description |
---|---|---|
listingId * | String | Listing identifier (short and long both values accepted) |
* - required params
Modify Listing Sell Price
curl -X PATCH "https://play.stays.net/external/v1/parr/listing-rates-sell/5f50e1e988537123711a3b2f?listingId=515328ab80beb0e416000008" \
-H "accept: application/json" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d '{
"type": "global",
"baseRateValue":150,
"monthlyRateValue":3000
}'
The above command returns JSON structured like this:
{
"_idlisting": "515328ab80beb0e416000008",
"_idseason": "5f50e1e988537123711a3b2f",
"type": "global",
"status": "active",
"from": "2020-10-01",
"to": "2020-11-30",
"baseRateValue": 150,
"ratePlans": [
{
"minStay": 2,
"_i_percent": 0,
"_f_val": 150
},
{
"minStay": 5,
"_i_percent": 5,
"_f_val": 142.5
}
],
"monthlyRate": {
"minStay": 21,
"_f_val": 3000
}
}
Modifies Listing Sell Price using global config of Sell Price Rule
HTTP Request
PATCH /external/v1/parr/listing-rates-sell/{seasonId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Body Parameters
Parameter | Type | Description |
---|---|---|
type * | String | Type of listing sell price. Accepts ['global','individual'] |
baseRateValue * | Double | Price value for minimal night rate plan |
monthlyRateValue * | Double | Price value for monthly rate. Applicable only if season has useMonthlyRate flag |
curl -X PATCH "https://play.stays.net/external/v1/parr/listing-rates-sell/5f50e1e988537123711a3b2f?listingId=515328ab80beb0e416000008" \
-H "accept: application/json" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d '{
"type": "individual",
"baseRateValue": 120,
"ratePlans":[
{
"minStay": 2,
"_i_percent":0
},
{
"minStay":5,
"_i_percent":10
}
],
"monthlyRateValue": 2800
}'
The above command returns JSON structured like this:
{
"_idlisting": "515328ab80beb0e416000008",
"_idseason": "5f50e1e988537123711a3b2f",
"type": "individual",
"status": "active",
"from": "2020-10-01",
"to": "2020-11-30",
"baseRateValue": 120,
"ratePlans": [
{
"minStay": 2,
"_i_percent": 0,
"_f_val": 120
},
{
"minStay": 5,
"_i_percent": 10,
"_f_val": 108
}
],
"monthlyRate": {
"minStay": 26,
"_f_val": 2800
}
}
Modifies Listing Sell Price using individual config options. With type 'individual' you can redefine percentage for rate plans
HTTP Request
PATCH /external/v1/parr/listing-rates-sell/{seasonId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Body Parameters
Parameter | Type | Description |
---|---|---|
type * | String | Type of listing sell price. Accepts ['global','individual'] |
baseRateValue * | Double | Price value for minimal night rate plan |
ratePlans | Array | List of rate plans |
ratePlans.minStay | Integer | Defines minimal number of nights |
ratePlans._i_percent | Integer | Defines percentage discount for target number of nights. For first rate plan percentage must be 0 |
monthlyRateValue * | Double | Price value for monthly rate. Applicable only if season has useMonthlyRate flag |
* - required params
Content API
Manage content of properties and listings
Create Property
curl -X POST "https://play.stays.net/external/v1/content/properties" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d ' {
"_idtype": "5ae04e1022261d03ab814d60",
"internalName": "v10"
}'
The above command returns JSON structured like this:
{
"_id": "6489a694fad02bd482136039",
"id": "UZ01H",
"_idtype": "5ae04e1022261d03ab814d60",
"_t_typeMeta": {
"_mstitle": {
"pt_BR": "Prédio",
"en_US": "Building",
"de_DE": "",
"es_ES": "Edifício",
"ru_RU": "",
"sv_SE": "",
"it_IT": "",
"fr_FR": "",
"pt_PT": "Prédio",
"el_GR": ""
}
},
"internalName": "v10",
"status": "draft"
}
This endpoint creates new property
HTTP Request
POST /external/v1/content/properties
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Body Parameters
Parameter | Type | Description |
---|---|---|
internalName * | String | Property unique internal name |
_idtype * | String | Property type identifier. List of available types is here |
* - required params
Retrieve Property
curl -X GET "https://play.stays.net/external/v1/content/properties/5f8963b5e1b59ec59f091a81" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"_id": "5f8963b5e1b59ec59f091a81",
"id": "JQ07G",
"_idtype": "5ae04e1022261d03ab814d60",
"_t_typeMeta": {
"_mstitle": {
"pt_BR": "Prédio",
"en_US": "Building",
"es_ES": "Edifício",
"pt_PT": "Prédio"
}
},
"internalName": "API PROP 001",
"_mstitle": {
"en_US": "Wonderful Apartments",
"pt_BR": "Maravilhosos Apartamentos"
},
"_msdesc": {
"en_US": "Residential building",
"pt_BR": "Prédio residencial"
},
"status": "active",
"address": {
"countryCode": "BR",
"state": "São Paulo",
"stateCode": "SP",
"city": "Barueri",
"region": "Alphaville",
"street": "Alameda Rio Negro",
"streetNumber": "584",
"zip": "06454000"
},
"latLng": {
"_f_lat": -23.5007271,
"_f_lng": -46.8479001
},
"amenities": [
{
"_id": "5ae18b0122261d76530cc178"
},
{
"_id": "5ae18b0122261d76530cc17b"
}
]
}
This endpoint returns detailed information for certain property
HTTP Request
GET /external/v1/content/properties/{propertyId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
propertyId | String | Property identifier. Both identifiers (long and short) are supported |
Modify Property
curl -X PATCH "https://play.stays.net/external/v1/content/properties/5f8963b5e1b59ec59f091a81" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d "{\"_idtype\":\"5ae04e1022261d03ab814d66\",\"amenities\":[{\"_id\":\"5ae18b0122261d76530cc179\"},{\"_id\":\"5ae18b0122261d76530cc17b\"},{\"_id\":\"5ae18b0122261d76530cc17d\"}]}"
The above command returns JSON structured like this:
{
"_id": "5f8963b5e1b59ec59f091a81",
"id": "JQ07G",
"_idtype": "5ae04e1022261d03ab814d66",
"_t_typeMeta": {
"_mstitle": {
"en_US": "Chalet",
"pt_BR": "Chalé",
"es_ES": "Chalé",
"pt_PT": "Chalé"
}
},
"internalName": "API PROP 001",
"_mstitle": {
"en_US": "Wonderful Apartments",
"pt_BR": "Maravilhosos Apartamentos"
},
"_msdesc": {
"en_US": "Residential building",
"pt_BR": "Prédio residencial"
},
"status": "active",
"address": {
"countryCode": "BR",
"state": "São Paulo",
"stateCode": "SP",
"city": "Barueri",
"region": "Alphaville",
"street": "Alameda Rio Negro",
"streetNumber": "584",
"zip": "06454000"
},
"latLng": {
"_f_lat": -23.5007271,
"_f_lng": -46.8479001
},
"amenities": [
{
"_id": "5ae18b0122261d76530cc179"
},
{
"_id": "5ae18b0122261d76530cc17b"
},
{
"_id": "5ae18b0122261d76530cc17d"
}
],
"images": [
{
"_id": "5dee464910450609ca7ea2d7"
}
],
"_idmainImage": "5dee464910450609ca7ea2d7"
}
This endpoint allows to update information for certain property. For update, you can use the same data as for creation
HTTP Request
PATCH /external/v1/content/properties/{propertyId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
propertyId | String | Property identifier. Both identifiers (long and short) are supported |
Body Parameters
Parameter | Type | Description |
---|---|---|
_idtype | String | Property type identifier. List of available types is here |
status | String | Status of property. Accepts values ['active','inactive','draft'] |
internalName | String | Property unique internal name |
_mstitle | Object | Multilanguage commercial name |
_msdesc | Object | Multilanguage commercial description |
address | Object | Address of property |
address.additional | String | additional addreess info |
address.city | String | City |
address.countryCode | String | ISO country countryCode |
address.streetNumber | Integer | Number of street |
address.region | String | Region of city |
address.state | String | State |
address.stateCode | String | State code |
address.street | String | Street |
addreess.zip | String | Zip code |
latLng | Object | Geo coordinates |
latLng._f_lat | Float | Latitude |
latLng._f_lng | Float | Longitude |
amenities | Array | Property amenities identifiers list. List of available amenities is here |
images | Array | Property images identifier list |
_idmainImage | String | Property main image identifier |
Retrieve Properties
curl -X GET "https://play.stays.net/external/v1/content/properties" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_id": "5f8963b5e1b59ec59f091a81",
"id": "JQ07G",
"_idtype": "5ae04e1022261d03ab814d60",
"_t_typeMeta": {
"_mstitle": {
"pt_BR": "Prédio",
"en_US": "Building",
"es_ES": "Edifício",
"pt_PT": "Prédio"
}
},
"internalName": "API PROP 001",
"_mstitle": {
"en_US": "Wonderful Apartments",
"pt_BR": "Maravilhosos Apartamentos"
},
"_msdesc": {
"en_US": "Residential building",
"pt_BR": "Prédio residencial"
},
"status": "active",
"address": {
"countryCode": "BR",
"state": "São Paulo",
"stateCode": "SP",
"city": "Barueri",
"region": "Alphaville",
"street": "Alameda Rio Negro",
"streetNumber": "584",
"zip": "06454000"
},
"latLng": {
"_f_lat": -23.5007271,
"_f_lng": -46.8479001
}
}
]
This endpoint returns list of properties
HTTP Request
GET /external/v1/content/properties
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Query Parameters
Parameter | Type | Description |
---|---|---|
status | String | Property status. Accepts values ['active','inactive','draft'] |
skip | Integer | Number of records to skip. Used to build proper pagination. Default value is 0 |
limit | Integer | Maximum number of records to return. Default and maximum value is 20 |
Create Listing
curl -X POST "https://play.stays.net/external/v1/content/listings" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d "{\"internalName\":\"API Listing 001\",\"_idproperty\":\"5f8963b5e1b59ec59f091a81\",\"_idtype\":\"5ab8f8a2f6b2dc2e97f97050\",\"subtype\":\"private_room\",\"_mstitle\":{\"en_US\":\"Wonderful Apartment\",\"pt_BR\":\"Apartamento maravilhoso\"},\"_msdesc\":{\"en_US\":\"Apartment API description\",\"pt_BR\":\"Descrição do Apartment API\"},\"status\":\"active\",\"address\":{\"countryCode\":\"BR\",\"state\":\"São Paulo\",\"stateCode\":\"SP\",\"city\":\"Barueri\",\"region\":\"Alphaville\",\"street\":\"Alameda Rio Negro\",\"streetNumber\":584,\"additional\":\"2b\",\"zip\":\"06454000\"},\"latLng\":{\"_f_lat\":-23.5007271,\"_f_lng\":-46.8479001},\"amenities\":[{\"_id\":\"58931ca0e1875b6163592c7b\"},{\"_id\":\"58931b86e1875b6163592c74\"}]}"
The above command returns JSON structured like this:
{
"_id": "5f896e2165394ecf5ddcfb97",
"id": "JQ08G",
"_idproperty": "5f8963b5e1b59ec59f091a81",
"_t_propertyTypeMeta": {
"_mstitle": {
"pt_BR": "Prédio",
"en_US": "Building",
"es_ES": "Edifício",
"pt_PT": "Prédio"
}
},
"_idtype": "5ab8f8a2f6b2dc2e97f97050",
"_t_typeMeta": {
"_mstitle": {
"en_US": "Apartment",
"pt_BR": "Apartamento",
"es_ES": "Departamento",
"pt_PT": "Apartamento"
}
},
"subtype": "private_room",
"internalName": "API Listing 001",
"_mstitle": {
"en_US": "Wonderful Apartment",
"pt_BR": "Apartamento maravilhoso"
},
"_msdesc": {
"en_US": "Apartment API description",
"pt_BR": "Descrição do Apartment API"
},
"status": "draft",
"address": {
"countryCode": "BR",
"state": "São Paulo",
"stateCode": "SP",
"city": "Barueri",
"region": "Alphaville",
"street": "Alameda Rio Negro",
"streetNumber": "584",
"additional": "2b",
"zip": "06454000"
},
"latLng": {
"_f_lat": -23.5007271,
"_f_lng": -46.8479001
},
"amenities": [
{
"_id": "58931ca0e1875b6163592c7b"
},
{
"_id": "58931b86e1875b6163592c74"
}
],
"deff_curr": "BRL",
"_t_imagesMeta": [],
"instantBooking": true
}
This endpoint creates new listing
HTTP Request
POST /external/v1/content/listings
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Body Parameters
Parameter | Type | Description |
---|---|---|
internalName * | String | Listing unique internal name |
_idproperty * | String | Property identifier. If you want to create single-unit listing (outside of property), instead _idproperty you need to send _idpropertyType - single-unit property type identifier. List of available types is here |
_idtype * | String | Listing type identifier. List of available types is here |
subtype * | String | Listing subtype identifier. Accepts values ["private_room", "entire_home", "shared_room"] |
* - required params
Retrieve Listing
curl -X GET "https://play.stays.net/external/v1/content/listings/5f896e2165394ecf5ddcfb97" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"_id": "5f896e2165394ecf5ddcfb97",
"id": "JQ08G",
"_idproperty": "5f8963b5e1b59ec59f091a81",
"_t_propertyTypeMeta": {
"_mstitle": {
"pt_BR": "Prédio",
"en_US": "Building",
"es_ES": "Edifício",
"pt_PT": "Prédio"
}
},
"_idtype": "5ab8f8a2f6b2dc2e97f97050",
"_t_typeMeta": {
"_mstitle": {
"en_US": "Apartment",
"pt_BR": "Apartamento",
"es_ES": "Departamento",
"pt_PT": "Apartamento"
}
},
"subtype": "private_room",
"internalName": "API Listing 001",
"_mstitle": {
"en_US": "Wonderful Apartment",
"pt_BR": "Apartamento maravilhoso"
},
"_msdesc": {
"en_US": "Apartment API description",
"pt_BR": "Descrição do Apartment API"
},
"status": "draft",
"address": {
"countryCode": "BR",
"state": "São Paulo",
"stateCode": "SP",
"city": "Barueri",
"region": "Alphaville",
"street": "Alameda Rio Negro",
"streetNumber": "584",
"additional": "2b",
"zip": "06454000"
},
"latLng": {
"_f_lat": -23.5007271,
"_f_lng": -46.8479001
},
"amenities": [
{
"_id": "58931ca0e1875b6163592c7b"
},
{
"_id": "58931b86e1875b6163592c74"
}
],
"deff_curr": "BRL",
"_t_imagesMeta": [],
"instantBooking": true
}
This endpoint returns detailed information for certain listing
HTTP Request
GET /external/v1/content/listings/{listingId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
listingId | String | Listing identifier. Both identifiers (long and short) are supported |
Modify Listing
curl -X PATCH "https://play.stays.net/external/v1/content/listings/5f896e2165394ecf5ddcfb97" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d "{\"status\":\"active\",\"amenities\":[{\"_id\":\"58931ca0e1875b6163592c7b\"},{\"_id\":\"58931b86e1875b6163592c74\"},{\"_id\":\"58931c96e1875b6163592c7a\"}]}"
The above command returns JSON structured like this:
{
"_id": "5f896e2165394ecf5ddcfb97",
"id": "JQ08G",
"_idproperty": "5f8963b5e1b59ec59f091a81",
"_t_propertyTypeMeta": {
"_mstitle": {
"pt_BR": "Prédio",
"en_US": "Building",
"es_ES": "Edifício",
"pt_PT": "Prédio"
}
},
"_idtype": "5ab8f8a2f6b2dc2e97f97050",
"_t_typeMeta": {
"_mstitle": {
"en_US": "Apartment",
"pt_BR": "Apartamento",
"es_ES": "Departamento",
"pt_PT": "Apartamento"
}
},
"subtype": "private_room",
"internalName": "API Listing 001",
"_mstitle": {
"en_US": "Wonderful Apartment",
"pt_BR": "Apartamento maravilhoso"
},
"_msdesc": {
"en_US": "Apartment API description",
"pt_BR": "Descrição do Apartment API"
},
"status": "active",
"address": {
"countryCode": "BR",
"state": "São Paulo",
"stateCode": "SP",
"city": "Barueri",
"region": "Alphaville",
"street": "Alameda Rio Negro",
"streetNumber": "584",
"additional": "2b",
"zip": "06454000"
},
"latLng": {
"_f_lat": -23.5007271,
"_f_lng": -46.8479001
},
"amenities": [
{
"_id": "58931ca0e1875b6163592c7b"
},
{
"_id": "58931b86e1875b6163592c74"
},
{
"_id": "58931c96e1875b6163592c7a"
}
],
"deff_curr": "BRL",
"_t_imagesMeta": [],
"instantBooking": true
}
This endpoint updates certain listing. For update, you can use the same data as for creation
HTTP Request
PATCH /external/v1/content/listings/{listingId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
listingId | String | Listing identifier. Both identifiers (long and short) are supported |
Body Parameters
Parameter | Type | Description |
---|---|---|
_idproperty | String | Property identifier. If you want to create single-unit listing (outside of property), instead _idproperty you need to send _idpropertyType - single-unit property type identifier. List of available types is here |
_idtype | String | Listing type identifier. List of available types is here |
subtype | String | Listing subtype identifier. Accepts values ["private_room", "entire_home", "shared_room"] |
status | String | Status of listing. Accepts values ['active','hidden','inactive','draft'] |
internalName | String | Listing unique internal name |
_mstitle | Object | Multilanguage commercial name |
_msdesc | Object | Multilanguage commercial description |
address | Object | Address of listing. For listings that are inside property, address will be inherit from corresponding property. |
address.additional | Integer | Additional number of listing |
address.city | String | City |
address.countryCode | String | ISO country countryCode |
address.streetNumber | Integer | Number of street |
address.region | String | Region of city |
address.state | String | State |
address.stateCode | String | State code |
address.street | String | Street |
addreess.zip | String | Zip code |
latLng | Object | Geo coordinates. For listings that are inside property, coordinates will be inherit from corresponding property. |
latLng._f_lat | Float | Latitude |
latLng._f_lng | Float | Longitude |
_idmainImage | String | Image identifier |
_f_square | Number | Listing square |
_mshouserules | Object | Multilanguage house rules description |
_mssummary | Object | Multilanguage summary description |
_msnotes | Object | Multilanguage notes description |
_msspace | Object | Multilanguage space description |
_msaccess | Object | Multilanguage access description |
_msinteraction | Object | Multilanguage interaction description |
_msneighborhood_overview | Object | Multilanguage neighborhood overview description |
_mstransit | Object | Multilanguage transit overview description |
amenities | Array | Listing amenities identifiers list. List of available amenities is here |
propertyAmenities | Array | Listing property amenities identifiers list |
customFields | Array | CustomFields list |
Retrieve Listings
curl -X GET "https://play.stays.net/external/v1/content/listings" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_id": "5f86264ada93f730341a942a",
"id": "JN02G",
"_idproperty": "5f862581da93f7fd611a941f",
"_idtype": "5ab8f8a2f6b2dc2e97f97050",
"_t_typeMeta": {
"_mstitle": {
"pt_BR": "Apartamento",
"en_US": "Apartment",
"de_DE": "Ferienwohnung",
"es_ES": "Departamento",
"pt_PT": "Apartamento"
}
},
"subtype": "private_room",
"internalName": "AP 1510",
"_mstitle": {
"pt_BR": "Prédio em Alphaville"
},
"_msdesc": {
"pt_BR": "<p>Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado<br></p>"
},
"status": "active",
"address": {
"countryCode": "BR",
"state": "São Paulo",
"stateCode": "SP",
"city": "Barueri",
"region": "Alphaville",
"street": "Alameda Rio Negro",
"streetNumber": "584",
"zip": "06454000"
},
"latLng": {
"_f_lat": -23.5007271,
"_f_lng": -46.8479001
},
"deff_curr": "BRL",
"instantBooking": true
},
{
"_id": "5f88637d34a3af630db63619",
"id": "JP01G",
"_idproperty": "5f862581da93f7fd611a941f",
"_idtype": "5ab8f8a2f6b2dc2e97f97050",
"_t_typeMeta": {
"_mstitle": {
"pt_BR": "Apartamento",
"en_US": "Apartment",
"de_DE": "Ferienwohnung",
"es_ES": "Departamento",
"pt_PT": "Apartamento"
}
},
"subtype": "private_room",
"internalName": "001",
"_mstitle": {
"pt_BR": "Prédio em Alphaville"
},
"_msdesc": {
"pt_BR": "<p>Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado Prédio em Alphaville muito bem localizado<br></p>"
},
"status": "active",
"address": {
"countryCode": "BR",
"state": "São Paulo",
"stateCode": "SP",
"city": "Barueri",
"region": "Alphaville",
"street": "Alameda Rio Negro",
"streetNumber": "584",
"zip": "06454000"
},
"latLng": {
"_f_lat": -23.5007271,
"_f_lng": -46.8479001
},
"deff_curr": "BRL",
"instantBooking": true,
"_idCloneGroupMaster": "5f86264ada93f730341a942a"
}
]
This endpoint returns list of listings.
HTTP Request
GET /external/v1/content/listings
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Query Parameters
Parameter | Type | Description |
---|---|---|
status | String | Listing status. Accepts values active,inactive,hidden,draft |
groupId | String | Group identifier that listing belongs |
rel | String | Relation of listing. Allows to filter master/child listings. Accepts values ['master','child']. Child listing has special fields, that allows to identify its type. _idCloneGroupMaster - means that listing is in Clone Group with master listing defined in this field_idPriceGroupMaster - means that listing is in Vertical Price Group with master listing defined in this field_idPriceMaster - means that listing is in Horizontal Price Group with master listing defined in this field |
skip | Integer | Number of records to skip. Used to build proper pagination. Default value is 0 |
limit | Integer | Maximum number of records to return. Default and maximum value is 20 |
propertyId | String | Property identifier |
Create group
curl -X POST "https://play.stays.net/external/v1/content/groups" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d "{\"status\":\"active\",\"internalName\":\"test group 1\",\"types\":[\"system\"],\"_mstitle\":{\"en_US\":\"Test Group 1\"}}"
The above command returns JSON structured like this:
{
"_id": "5eb2ae76e4dd9757b91fffb5",
"status": "active",
"internalName": "test group 1",
"types": [
"system"
],
"_mstitle": {
"en_US": "Test Group 1"
},
"listingIds": []
}
Creates new group
HTTP Request
POST /external/v1/content/groups
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Body Parameters
Parameter | Type | Description |
---|---|---|
internalName * | String | Group unique internal name |
status | String | Group status. Accepts [ "active","inactive" ] |
types | Array [ String] | Group types. Possible values are ["system", "front", "communication", "highlight"] |
_mstitle | Object | Multilanguage title |
listingIds | Array [ String ] | Listings identifiers asigned to group |
* - required params
Retrieve group
curl -X GET "https://play.stays.net/external/v1/content/groups/5eb2ae76e4dd9757b91fffb5" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"_id": "5eb2ae76e4dd9757b91fffb5",
"status": "active",
"internalName": "test group 1",
"types": [
"system"
],
"_mstitle": {
"en_US": "Test Group 1"
},
"listingIds": []
}
Retrieves group by identifier
HTTP Request
GET /external/v1/content/groups/{groupId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
groupId | String | Group identifier |
Modify group
curl -X PATCH "https://play.stays.net/external/v1/content/groups/5eb2ae76e4dd9757b91fffb5" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d "{\"internalName\":\"test group 1-1\",\"_mstitle\":{\"en_US\":\"Test Group 1-1\",\"pt_BR\":\"Grupo de teste 1-1\"},\"types\":[\"system\",\"highlight\"],\"listingIds\":[\"515328ab80beb0e416000008\"]}"
The above command returns JSON structured like this:
{
"_id": "5eb2ae76e4dd9757b91fffb5",
"status": "active",
"internalName": "test group 1-1",
"types": [
"system",
"highlight"
],
"_mstitle": {
"en_US": "Test Group 1-1",
"pt_BR": "Grupo de teste 1-1"
},
"listingIds": [
"515328ab80beb0e416000008"
]
}
Modifies certain group
HTTP Request
PATCH /external/v1/content/groups/{groupId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
groupId | String | Group identifier |
Body Parameters
Parameter | Type | Description |
---|---|---|
internalName | String | Group unique internal name |
status | String | Group status. Accepts [ "active","inactive" ] |
types | Array [ String] | Group types. Possible values are ["system", "front", "communication", "highlight"] |
_mstitle | Object | Multilanguage title |
listingIds | Array [ String ] | Listings identifiers asigned to group |
Delete group
curl -X DELETE "https://play.stays.net/external/v1/content/groups/5eb2ae76e4dd9757b91fffb5" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"_id": "5eb2ae76e4dd9757b91fffb5",
"status": "active",
"internalName": "test group 1-1",
"types": [
"system",
"highlight"
],
"_mstitle": {
"en_US": "Test Group 1-1",
"pt_BR": "Grupo de teste 1-1"
},
"listingIds": [
"515328ab80beb0e416000008"
]
}
Deletes certain group
HTTP Request
DELETE /external/v1/content/groups/{groupId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
groupId | String | Group identifier |
Retrieve Groups
curl -X GET "https://play.stays.net/external/v1/content/groups" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_id": "5eb2ae76e4dd9757b91fffb5",
"status": "active",
"internalName": "test group 1-1",
"types": [
"system",
"highlight"
],
"_mstitle": {
"en_US": "Test Group 1-1",
"pt_BR": "Grupo de teste 1-1"
},
"listingIds": [
"515328ab80beb0e416000008"
]
}
]
This endpoint returns list of groups
HTTP Request
GET /external/v1/content/groups
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Query Parameters
Parameter | Type | Description |
---|---|---|
status | String | Group status. Accepts values active,inactive |
skip | Integer | Number of records to skip. Used to build proper pagination. Default value is 0 |
limit | Integer | Maximum number of records to return. Default and maximum value is 20 |
Retrieve Room List
curl -X GET "https://play.stays.net/external/v1/content/listing-rooms/RZ02H" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_id": "642335e0e81ed7de022d7ba0",
"_idlisting": "642335dde81ed7de022d7b9a",
"_idtype": "5ab8f8a2f6b2dc2e97f9704b",
"beds": [
{
"_id": "5ab8f8a2f6b2dc2e97f97041",
"_i_count": 1
},
{
"_id": "5ab8f8a2f6b2dc2e97f97045",
"_i_count": 2
}
],
"images": [
{
"_id": "644a7a2e0a2871ec7d3ec23e"
},
{
"_id": "644a7a3f0a2871ec7d3ec244"
},
{
"_id": "644a7a8f0a2871ec7d3ec24a"
},
{
"_id": "644a7a910a2871ec7d3ec24f"
},
{
"_id": "644a7a930a2871ec7d3ec254"
},
{
"_id": "644a7a960a2871ec7d3ec259"
},
{
"_id": "644a7a980a2871ec7d3ec25e"
}
],
"_i_order": 0,
"inventory": []
},
{
"_id": "642335e0e81ed7de022d7ba2",
"_idlisting": "642335dde81ed7de022d7b9a",
"_idtype": "5ad9b01422261d6cda27d3e1",
"beds": [],
"_i_order": 1,
"inventory": []
}
]
This endpoint returns list of rooms
HTTP Request
GET /external/v1/content/listing-rooms/{listingId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
listingId | String | Listing identifier. Both identifiers (long and short) are supported |
Create Room List
curl -X POST "https://play.stays.net/external/v1/content/listing-rooms/RZ02H" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d '{
"_idtype": "5ab8f8a2f6b2dc2e97f9704b",
"beds": [
{
"_id": "5ab8f8a2f6b2dc2e97f97041",
"_i_count": 2
},
{
"_id": "5ab8f8a2f6b2dc2e97f97045",
"_i_count": 3
}
]
}'
The above command returns JSON structured like this:
{
"_id": "6489c537fad02bd482136051",
"_idlisting": "642335dde81ed7de022d7b9a",
"_idtype": "5ab8f8a2f6b2dc2e97f9704b",
"beds": [
{
"_id": "5ab8f8a2f6b2dc2e97f97041",
"_i_count": 2
},
{
"_id": "5ab8f8a2f6b2dc2e97f97045",
"_i_count": 3
}
],
"_i_order": 2
}
This endpoint creates new room List
HTTP Request
POST /external/v1/content/listing-rooms/{listingId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
listingId | String | Listing identifier. Both identifiers (long and short) are supported |
Body Parameters
Parameter | Type | Description |
---|---|---|
_id | String | Room identifier |
_idtype * | String | Listing type identifier |
_idlisting | String | Listing identifier |
beds | Array [ Object ] | Array of beds object |
beds._id * | String | Beds identifier |
beds._i_count * | Number | Beds number |
images | Array [ Object ] | Array of images object |
images._id | String | Images identifier |
inventory | Array [string] | Rooms inventory as an array of inventory names. |
inventory._id | String | Inventory identifier |
inventory._idname * | String | Name identifier |
inventory._i_qnt * | Number | Amount of inventory |
inventory._idcondName * | String | CondName identifier |
inventory.note | String | Note |
* - required params
Retrieve Room by Id
curl -X GET "https://play.stays.net/external/v1/content/listing-rooms/RZ02H/6489c537fad02bd482136051" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"_id": "6489c537fad02bd482136051",
"_idlisting": "642335dde81ed7de022d7b9a",
"_idtype": "5ab8f8a2f6b2dc2e97f9704b",
"beds": [
{
"_id": "5ab8f8a2f6b2dc2e97f97041",
"_i_count": 2
},
{
"_id": "5ab8f8a2f6b2dc2e97f97045",
"_i_count": 3
}
],
"_i_order": 2
}
This endpoint returns room
HTTP Request
GET /external/v1/content/listing-rooms/{listingId}/{roomId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
listingId | String | Listing identifier. Both identifiers (long and short) are supported |
roomId | String | Room identifier |
Modify Room
curl -X PATCH "https://play.stays.net/external/v1/content/listing-rooms/RZ02H/5dee464910450609ca7ea2d7" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d '{
"_idtype": "5ab8f8a2f6b2dc2e97f9704b",
"beds": [
{
"_id": "5ab8f8a2f6b2dc2e97f97041",
"_i_count": 2
}
]
}'
The above command returns JSON structured like this:
{
"_id": "6489c537fad02bd482136051",
"_idlisting": "642335dde81ed7de022d7b9a",
"_idtype": "5ab8f8a2f6b2dc2e97f9704b",
"beds": [
{
"_id": "5ab8f8a2f6b2dc2e97f97041",
"_i_count": 2
}
],
"_i_order": 2
}
This endpoint modify room
HTTP Request
PATCH /external/v1/content/listing-rooms/{listingId}/{roomId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
listingId | String | Listing identifier. Both identifiers (long and short) are supported |
roomId | String | Room identifier |
Body Parameters
Parameter | Type | Description |
---|---|---|
_id | String | Room identifier |
_idtype * | String | Listing type identifier |
_idlisting | String | Listing identifier |
beds | Array [ Object ] | Array of beds object |
beds._id * | String | Beds identifier |
beds._i_count * | Number | Beds number |
images | Array [ Object ] | Array of images object |
images._id | String | Images identifier |
inventory | Array [string] | Rooms inventory as an array of inventory names. |
inventory._id | String | Inventory identifier |
inventory._idname * | String | Name identifier |
inventory._i_qnt * | Number | Amount of inventory |
inventory._idcondName * | String | CondName identifier |
inventory.note | String | Note |
* - required params
Delete Room by Id
curl -X DELETE "https://play.stays.net/external/v1/content/listing-rooms/RZ02H/6489c537fad02bd482136051" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"_id": "6489c537fad02bd482136051",
"_idlisting": "642335dde81ed7de022d7b9a",
"_idtype": "5ab8f8a2f6b2dc2e97f9704b",
"beds": [
{
"_id": "5ab8f8a2f6b2dc2e97f97041",
"_i_count": 2
}
],
"_i_order": 2
}
This endpoint delete room
HTTP Request
DELETE /external/v1/content/listing-rooms/{listingId}/{roomId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
listingId | String | Listing identifier. Both identifiers (long and short) are supported |
roomId | String | Room identifier |
Upload image
curl -X POST "https://play.stays.net/external/v1/content/upload-images" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-H 'Content-Type: multipart/form-data' \
-F 'images=@índice.jpeg;type=image/jpeg'
The above command returns JSON structured like this:
[
"6489f618fad02bd482136075"
]
This endpoint add new image
HTTP Request
POST /external/v1/content/content/upload-images
Body Parameters
Parameter | Type | Description |
---|---|---|
images * | String ($binary) | Image with multipart/form-data |
* - required params
Create Clone Groups
curl -X POST "https://play.stays.net/external/v1/content/clone-groups" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d '{
"name": "Clone groups",
"_idmaster": "642335dde81ed7de022d7b9a",
"items": [
{
"internalName": "Clone 1"
},
{
"internalName": "Clone 2"
}
]
}'
The above command returns JSON structured like this:
{
"masterId": "642335dde81ed7de022d7b9a",
"name": "Clone groups",
"visibleItems": 2,
"totalItems": 2,
"items": [
{
"internalName": "Clone 1",
"status": "active",
"_idlisting": "648a01d3a115af1c07cea8da",
"visible": true
},
{
"internalName": "Clone 2",
"status": "active",
"_idlisting": "648a01d3a115af1c07cea8e0",
"visible": true
}
]
}
This endpoint create clone groups
HTTP Request
POST /external/v1/content/clone-groups
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Body Parameters
Parameter | Type | Description |
---|---|---|
name * | String | Name of the clone group |
_idmaster * | String | Identifiers of Master Apartment |
items | Array [ Object ] | Array of items |
items.internalName | String | Internal name of items |
* - required params
Retrieve Clone Groups
curl -X GET "https://play.stays.net/external/v1/content/clone-groups/642335dde81ed7de022d7b9a" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"masterId": "642335dde81ed7de022d7b9a",
"name": "Clone groups",
"visibleItems": 2,
"totalItems": 2,
"items": [
{
"internalName": "Clone 1",
"status": "active",
"_idlisting": "648a01d3a115af1c07cea8da",
"visible": true
},
{
"internalName": "Clone 2",
"status": "active",
"_idlisting": "648a01d3a115af1c07cea8e0",
"visible": true
}
]
}
This endpoint return clone groups
HTTP Request
GET /external/v1/content/clone-groups/{masterId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
masterId | String | Identifiers of Master Apartment |
Modify Clone Groups
curl -X PATCH "https://play.stays.net/external/v1/content/clone-groups/642335dde81ed7de022d7b9a" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d '{
"name": "Clone groups Update"
}'
The above command returns JSON structured like this:
{
"masterId": "642335dde81ed7de022d7b9a",
"name": "Clone groups Update",
"visibleItems": 2,
"totalItems": 2,
"items": [
{
"internalName": "Clone 1",
"status": "active",
"_idlisting": "648a01d3a115af1c07cea8da",
"visible": true
},
{
"internalName": "Clone 2",
"status": "active",
"_idlisting": "648a01d3a115af1c07cea8e0",
"visible": true
}
]
}
This endpoint modify clone groups
HTTP Request
PATCH /external/v1/content/clone-groups/{masterId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
masterId | String | Identifiers of Master Apartment |
Body Parameters
Parameter | Type | Description |
---|---|---|
name * | String | Name of the clone group |
* - required params
Delete Clone Groups
curl -X DELETE "https://play.stays.net/external/v1/content/clone-groups/642335dde81ed7de022d7b9a" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"masterId": "642335dde81ed7de022d7b9a",
"name": "Clone groups",
"visibleItems": 2,
"totalItems": 2,
"items": [
{
"internalName": "Clone 1",
"status": "active",
"_idlisting": "648a01d3a115af1c07cea8da",
"visible": true
},
{
"internalName": "Clone 2",
"status": "active",
"_idlisting": "648a01d3a115af1c07cea8e0",
"visible": true
}
]
}
This endpoint return clone groups
HTTP Request
DELETE /external/v1/content/clone-groups/{masterId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
masterId | String | Identifiers of Master Apartment |
Retrieve Clone Groups Items
curl -X GET "https://play.stays.net/external/v1/content/clone-groups/642335dde81ed7de022d7b9a/items" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"internalName": "Clone 1",
"status": "active",
"_idlisting": "648a01d3a115af1c07cea8da",
"visible": true
},
{
"internalName": "Clone 2",
"status": "active",
"_idlisting": "648a01d3a115af1c07cea8e0",
"visible": true
}
]
This endpoint return clone groups items
HTTP Request
GET /external/v1/content/clone-groups/{masterId}/items
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
masterId | String | Identifiers of Master Apartment |
Create Clone Groups Items
curl -X POST "https://play.stays.net/external/v1/content/clone-groups/642335dde81ed7de022d7b9a/items" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d '{
"internalName": "Clone 3"
}'
The above command returns JSON structured like this:
{
"internalName": "Clone 3",
"status": "active",
"_idlisting": "648a0c78a115af1c07cea8f4",
"visible": true
}
This endpoint create clone groups item
HTTP Request
POST /external/v1/content/clone-groups/{masterId}/items
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
masterId | String | Identifiers of Master Apartment |
Body Parameters
Parameter | Type | Description |
---|---|---|
internalName * | String | Name of the clone group item |
* - required params
Retrieve Clone Groups Item
curl -X GET "https://play.stays.net/external/v1/content/clone-groups/642335dde81ed7de022d7b9a/items/648a0c78a115af1c07cea8f4" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"internalName": "Clone 3",
"status": "active",
"_idlisting": "648a0c78a115af1c07cea8f4",
"visible": true
}
This endpoint return clone groups item
HTTP Request
GET /external/v1/content/clone-groups/{masterId}/items/{listingId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
masterId | String | Identifiers of Master Apartment |
listingId | String | Identifiers listing |
Modify Clone Groups Item
curl -X PATCH "https://play.stays.net/external/v1/content/clone-groups/642335dde81ed7de022d7b9a/items/648a0c78a115af1c07cea8f4" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d '{
"visible": false
}'
The above command returns JSON structured like this:
{
"internalName": "Clone 3",
"status": "active",
"_idlisting": "648a0c78a115af1c07cea8f4",
"visible": false
}
This endpoint modify clone groups item
HTTP Request
PATCH /external/v1/content/clone-groups/{masterId}/items/{listingId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
masterId | String | Identifiers of Master Apartment |
listingId | String | Identifiers listing |
Body Parameters
Parameter | Type | Description |
---|---|---|
visible | Boolean | Visible of the clone group item |
Delete Clone Groups Item
curl -X DELETE "https://play.stays.net/external/v1/content/clone-groups/642335dde81ed7de022d7b9a/items/648a0c78a115af1c07cea8f4" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"internalName": "Clone 3",
"status": "active",
"_idlisting": "648a0c78a115af1c07cea8f4",
"visible": false
}
This endpoint modify clone groups item
HTTP Request
DELETE /external/v1/content/clone-groups/{masterId}/items/{listingId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
masterId | String | Identifiers of Master Apartment |
listingId | String | Identifiers listing |
Create Price Groups
curl -X POST "https://play.stays.net/external/v1/content/price-groups" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d '{
"name": "Price groups",
"_idmaster": "642335dde81ed7de022d7b9a",
"items": [
{
"_idlisting": "648a01d3a115af1c07cea8e0"
}
]
}'
The above command returns JSON structured like this:
{
"masterId": "642335dde81ed7de022d7b9a",
"name": "Price groups",
"visibleItems": 1,
"totalItems": 1,
"items": [
{
"status": "active",
"_idlisting": "648a01d3a115af1c07cea8e0",
"visible": true
}
]
}
This endpoint create price groups
HTTP Request
POST /external/v1/content/price-groups
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Body Parameters
Parameter | Type | Description |
---|---|---|
name * | String | Name of the price group |
_idmaster * | String | Identifiers of Master Apartment |
items * | Array [ Object ] | Array of items |
items._idlisting * | String | Identifiers of listing |
* - required params
Retrieve Price Groups
curl -X GET "https://play.stays.net/external/v1/content/price-groups/642335dde81ed7de022d7b9a" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"masterId": "642335dde81ed7de022d7b9a",
"name": "Price groups",
"visibleItems": 1,
"totalItems": 1,
"items": [
{
"status": "active",
"_idlisting": "648a01d3a115af1c07cea8e0",
"visible": true
}
]
}
This endpoint return price groups
HTTP Request
GET /external/v1/content/price-groups/{masterId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
masterId | String | Identifiers of Master Apartment |
Modify Price Groups
curl -X PATCH "https://play.stays.net/external/v1/content/price-groups/642335dde81ed7de022d7b9a" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d '{
"name": "Price groups Update"
}'
The above command returns JSON structured like this:
{
"masterId": "642335dde81ed7de022d7b9a",
"name": "Price groups Update",
"visibleItems": 1,
"totalItems": 1,
"items": [
{
"status": "active",
"_idlisting": "648a01d3a115af1c07cea8e0",
"visible": true
}
]
}
This endpoint modify price groups
HTTP Request
PATCH /external/v1/content/price-groups/{masterId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
masterId | String | Identifiers of Master Apartment |
Body Parameters
Parameter | Type | Description |
---|---|---|
name * | String | Name of the price group |
* - required params
Delete Price Groups
curl -X DELETE "https://play.stays.net/external/v1/content/price-groups/642335dde81ed7de022d7b9a" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"masterId": "642335dde81ed7de022d7b9a",
"name": "Price groups",
"visibleItems": 1,
"totalItems": 1,
"items": [
{
"status": "active",
"_idlisting": "648a01d3a115af1c07cea8da",
"visible": true
}
]
}
This endpoint return price groups
HTTP Request
DELETE /external/v1/content/price-groups/{masterId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
masterId | String | Identifiers of Master Apartment |
Retrieve Price Groups Items
curl -X GET "https://play.stays.net/external/v1/content/price-groups/642335dde81ed7de022d7b9a/items" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"status": "active",
"_idlisting": "648a01d3a115af1c07cea8da",
"visible": true
}
]
This endpoint return price groups items
HTTP Request
GET /external/v1/content/price-groups/{masterId}/items
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
masterId | String | Identifiers of Master Apartment |
Create Price Groups Items
curl -X POST "https://play.stays.net/external/v1/content/price-groups/642335dde81ed7de022d7b9a/items" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d '{
"_idlisting": "5dee464910450609ca7ea2d7"
}'
The above command returns JSON structured like this:
{
"status": "active",
"_idlisting": "5dee464910450609ca7ea2d7",
"visible": true
}
This endpoint create price groups item
HTTP Request
POST /external/v1/content/price-groups/{masterId}/items
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
masterId | String | Identifiers of Master Apartment |
Body Parameters
Parameter | Type | Description |
---|---|---|
_idlisting * | String | Listing identifier |
* - required params
Retrieve Price Groups Item
curl -X GET "https://play.stays.net/external/v1/content/price-groups/642335dde81ed7de022d7b9a/items/648a0c78a115af1c07cea8f4" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"status": "active",
"_idlisting": "648a0c78a115af1c07cea8f4",
"visible": true
}
This endpoint return price groups item
HTTP Request
GET /external/v1/content/price-groups/{masterId}/items/{listingId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
masterId | String | Identifiers of Master Apartment |
listingId | String | Identifiers listing |
Modify Price Groups Item
curl -X PATCH "https://play.stays.net/external/v1/content/price-groups/642335dde81ed7de022d7b9a/items/648a0c78a115af1c07cea8f4" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d '{
"visible": false
}'
The above command returns JSON structured like this:
{
"status": "active",
"_idlisting": "648a0c78a115af1c07cea8f4",
"visible": false
}
This endpoint modify price groups item
HTTP Request
PATCH /external/v1/content/price-groups/{masterId}/items/{listingId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
masterId | String | Identifiers of Master Apartment |
listingId | String | Identifiers listing |
Body Parameters
Parameter | Type | Description |
---|---|---|
visible | Boolean | Visible of the price group item |
Delete Price Groups Item
curl -X DELETE "https://play.stays.net/external/v1/content/price-groups/642335dde81ed7de022d7b9a/items/648a0c78a115af1c07cea8f4" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"status": "active",
"_idlisting": "648a0c78a115af1c07cea8f4",
"visible": false
}
This endpoint modify price groups item
HTTP Request
DELETE /external/v1/content/price-groups/{masterId}/items/{listingId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
masterId | String | Identifiers of Master Apartment |
listingId | String | Identifiers listing |
Global Settings API
Allows to fetch global settings
Retrieve global listing custom fields
curl -X GET "https://play.stays.net/external/v1/settings/global/listing-custom-fields" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"id": 946361490530,
"_msname": {
"pt_BR": "Teste Custom Field 1",
"en_US": "Test Custom Field 1"
},
"varName": "Custom Field 1",
"varPreview": "Custom Field 1"
}
]
This endpoint returns custom global fields settings
HTTP Request
GET /external/v1/settings/global/listing-custom-fields
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Response Object
Parameter | Type | Description |
---|---|---|
id | Number | Listing custom field identifier |
_msname | Object | Name translation |
varName | String | Variable name |
varPreview | String | Preview variable name |
Create global listing custom fields
curl -X POST "https://play.stays.net/external/v1/settings/global/listing-custom-fields" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d '{
"_msname": {
"pt_BR": "Teste Custom Field 2",
"en_US": "Test Custom Field 2"
},
"varName": "Custom Field 2",
"varPreview": "Custom Field 2"
}'
The above command returns JSON structured like this:
[
{
"id": 946361490530,
"_msname": {
"pt_BR": "Teste Custom Field 1",
"en_US": "Test Custom Field 1"
},
"varName": "Custom Field 1",
"varPreview": "Custom Field 1"
},
{
"id": 1209715029510,
"_msname": {
"pt_BR": "Teste Custom Field 2",
"en_US": "Test Custom Field 2"
},
"varName": "Custom Field 2",
"varPreview": "Custom Field 2"
}
]
This endpoint create custom global fields settings
HTTP Request
POST /external/v1/settings/global/listing-custom-fields
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Request Body
Parameter | Type | Description |
---|---|---|
_msname | Object | Name translation |
varName * | String | Variable name |
varPreview * | Object | Preview variable name |
Response Object
Parameter | Type | Description |
---|---|---|
id | Number | Listing custom field identifier |
_msname | Object | Name translation |
varName | String | Variable name |
varPreview | String | Preview variable name |
* - required params
Modify global listing custom fields
curl -X PATCH "https://play.stays.net/external/v1/settings/global/listing-custom-fields" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d ' {
"id": 1209715029510,
"_msname": {
"pt_BR": "Teste Custom Field 3",
"en_US": "Test Custom Field 3"
},
"varName": "Custom Field 3",
"varPreview": "Custom Field 3"
}'
The above command returns JSON structured like this:
[
{
"id": 946361490530,
"_msname": {
"pt_BR": "Teste Custom Field 1",
"en_US": "Test Custom Field 1"
},
"varName": "Custom Field 1",
"varPreview": "Custom Field 1"
},
{
"id": 1209715029510,
"_msname": {
"pt_BR": "Teste Custom Field 3",
"en_US": "Test Custom Field 3"
},
"varName": "Custom Field 3",
"varPreview": "Custom Field 3"
}
]
This endpoint modify custom global fields settings
HTTP Request
PATCH /external/v1/settings/global/listing-custom-fields
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Request Body
Parameter | Type | Description |
---|---|---|
id * | Number | Listing custom field identifier |
_msname | Object | Name translation |
varName | String | Variable name |
varPreview | String | Preview variable name |
Response Object
Parameter | Type | Description |
---|---|---|
id | Number | Listing custom field identifier |
_msname | Object | Name translation |
varName | String | Variable name |
varPreview | String | Preview variable name |
* - required params
Delete global listing custom fields
curl -X DELETE "https://play.stays.net/external/v1/settings/global/listing-custom-fields" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d ' {
"id": 1209715029510
}'
The above command returns JSON structured like this:
[
{
"id": 946361490530,
"_msname": {
"pt_BR": "Teste Custom Field 1",
"en_US": "Test Custom Field 1"
},
"varName": "Custom Field 1",
"varPreview": "Custom Field 1"
}
]
This endpoint delete custom global fields settings
HTTP Request
DELETE /external/v1/settings/global/listing-custom-fields
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Request Body
Parameter | Type | Description |
---|---|---|
id * | Number | Listing custom field identifier |
Response Object
Parameter | Type | Description |
---|---|---|
id | Number | Listing custom field identifier |
_msname | Object | Name translation |
varName | String | Variable name |
varPreview | String | Preview variable name |
* - required params
App Settings API
Allows to fetch app settings
Retrieve app listing custom fields
curl -X GET "https://play.stays.net/external/v1/settings/app/listing-custom-fields" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_idfield": 946361490530,
"_msname": {
"pt_BR": "Teste Custom Field 1",
"en_US": "Test Custom Field 1"
},
"internalName": "Custom Field 1",
"type": "Custom Field 1"
}
]
This endpoint returns custom app fields settings
HTTP Request
GET /external/v1/settings/app/listing-custom-fields
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Response Object
Parameter | Type | Description |
---|---|---|
id | Number | Listing custom field identifier |
_msname | Object | Name translation |
internalName | String | Variable name |
type | Object | Preview variable name |
Create app listing custom fields
curl -X POST "https://play.stays.net/external/v1/settings/app/listing-custom-fields" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d '{
"_msname": {
"pt_BR": "Teste Custom Field 2",
"en_US": "Test Custom Field 2"
},
"internalName": "Custom Field 2",
"type": "Custom Field 2"
}'
The above command returns JSON structured like this:
{
"_idfield": 1209715029510,
"_msname": {
"pt_BR": "Teste Custom Field 2",
"en_US": "Test Custom Field 2"
},
"internalName": "Custom Field 2",
"type": "Custom Field 2"
}
This endpoint creates custom app fields setting
HTTP Request
POST /external/v1/settings/app/listing-custom-fields
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Request Body
Parameter | Type | Description |
---|---|---|
_msname | Object | Name translation |
internalName * | String | Variable name |
type * | Object | Preview variable name |
Response Object
Parameter | Type | Description |
---|---|---|
id | Number | Listing custom field identifier |
_msname | Object | Name translation |
internalName | String | Variable name |
type | Object | Preview variable name |
* - required params
Retrieve specific app listing custom fields
curl -X GET "https://play.stays.net/external/v1/settings/app/listing-custom-fields/{fieldId}" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"_idfield": 946361490530,
"_msname": {
"pt_BR": "Teste Custom Field 1",
"en_US": "Test Custom Field 1"
},
"internalName": "Custom Field 1",
"type": "Custom Field 1"
}
This endpoint returns custom app fields setting
HTTP Request
GET /external/v1/settings/app/listing-custom-fields/{fieldId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
fieldId | String | Field identifier. |
Response Object
Parameter | Type | Description |
---|---|---|
id | Number | Listing custom field identifier |
_msname | Object | Name translation |
internalName | String | Variable name |
type | Object | Preview variable name |
Modify app listing custom fields
curl -X PATCH "https://play.stays.net/external/v1/settings/app/listing-custom-fields/{fieldId}" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
-d ' {
"_idfield": 1209715029510,
"_msname": {
"pt_BR": "Teste Custom Field 3",
"en_US": "Test Custom Field 3"
},
"internalName": "Custom Field 3",
"type": "Custom Field 3"
}'
The above command returns JSON structured like this:
{
"_idfield": 946361490530,
"_msname": {
"pt_BR": "Teste Custom Field 1",
"en_US": "Test Custom Field 1"
},
"internalName": "Custom Field 1",
"type": "Custom Field 1"
}
This endpoint modify custom app fields setting
HTTP Request
PATCH /external/v1/settings/app/listing-custom-fields/{fieldId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
fieldId | String | Field identifier. |
Request Body
Parameter | Type | Description |
---|---|---|
_msname | Object | Name translation |
internalName | String | Variable name |
type | Object | Preview variable name |
Response Object
Parameter | Type | Description |
---|---|---|
id | Number | Listing custom field identifier |
_msname | Object | Name translation |
internalName | String | Variable name |
type | Object | Preview variable name |
* - required params
Delete app listing custom fields
curl -X DELETE "https://play.stays.net/external/v1/settings/app/listing-custom-fields/{fieldId}" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json" \
The above command returns JSON structured like this:
{
"_idfield": 946361490530,
"_msname": {
"pt_BR": "Teste Custom Field 1",
"en_US": "Test Custom Field 1"
},
"internalName": "Custom Field 1",
"type": "Custom Field 1"
}
This endpoint deletes custom app fields setting
HTTP Request
DELETE /external/v1/settings/app/listing-custom-fields/{fieldId}
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
fieldId | String | Field identifier. |
Response Object
Parameter | Type | Description |
---|---|---|
id | Number | Listing custom field identifier |
_msname | Object | Name translation |
internalName | String | Variable name |
type | Object | Preview variable name |
* - required params
The above command returns JSON structured like this:
{
"_idlisting": "6100177563cd0f28803e011b",
"mainCurrency": "BRL",
"fees": [
{
"_id": "57a31968b9b1fb291f3bcc1b",
"_f_val": 200,
"type": "fixed",
"chargeType": "perReserve",
"invoiceVisibility": "basic",
"internalName": "Cleaning Fee",
"_mstitle": {
"en_US": "Cleaning Fee"
}
},
{
"_id": "6101442b3d031dc3bd813f1b",
"_f_val": 3,
"type": "percent",
"chargeType": "perPerson",
"invoiceVisibility": "extras",
"internalName": "City Tax",
"_mstitle": {
"pt_PT": "Imposto Municipal",
"en_US": "City Tax"
}
}
],
"securityDeposit": 300,
"guestsIncluded": 2,
"extraGuests": {
"type": "percent",
"_f_val": 10,
"_f_fallbackAbsVal": 150
}
}
Listing Settings API
Allows to fetch listing settings
Listing sell price settings
curl -X GET "https://play.stays.net/external/v1/settings/listing/UO01G/sellprice" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"_idlisting": "6100177563cd0f28803e011b",
"mainCurrency": "BRL",
"fees": [
{
"_id": "57a31968b9b1fb291f3bcc1b",
"_f_val": 200,
"type": "fixed",
"chargeType": "perReserve",
"invoiceVisibility": "basic",
"internalName": "Cleaning Fee",
"_mstitle": {
"en_US": "Cleaning Fee"
}
},
{
"_id": "6101442b3d031dc3bd813f1b",
"_f_val": 3,
"type": "percent",
"chargeType": "perPerson",
"invoiceVisibility": "extras",
"internalName": "City Tax",
"_mstitle": {
"pt_PT": "Imposto Municipal",
"en_US": "City Tax"
}
}
],
"securityDeposit": 300,
"guestsIncluded": 2,
"extraGuests": {
"type": "percent",
"_f_val": 10,
"_f_fallbackAbsVal": 150
}
}
This endpoint returns sell price settings for certain listing
HTTP Request
GET /external/v1/settings/listing/{listingId}/sellprice
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
listingId | String | Listing identifier. Both identifiers (long and short) are supported |
Response Object
Parameter | Type | Description |
---|---|---|
_idlisting | String | Listing identifier |
_idmasterListing | String | Master listing identifier. If exists, means all config data are from master listing |
mainCurrency | String | Listing main currency |
region | Object | Pricing region object. Exists only if region is not Default |
fees | Array | Listing fees configuration |
fees._id | String | Fee identifier |
fees._f_val | Number | Fee value |
fees.type | String | Fee type. Can be "fixed" or "percent" |
fees.chargeType | String | Defines how fee will be charged. Can be "perNight", "perReserve", "perPerson" |
fees.invoiceVisibility | String | Defines how fee will be displayed in reservation invoice. Can be "hidden","basic","extras" |
fees.internalName | String | Fee internal name |
fees._mstitle | String | Fee multilanguage public name |
petFee | Array | Listing Pet fees configuration |
petFee._f_val | Number | Pet fee value |
petFee.currency | String | ISO currency |
securityDeposit | Number | Listing security deposit |
guestsIncluded | Integer | Indicates number of guests without extra costs |
extraGuests | Object | Contains rules for charging extra guests |
extraGuests.type | String | Extra guests commission type. Can be "fixed" or "percent" |
extraGuests._f_val | Number | Extra guests commission value |
extraGuests._f_fallbackAbsVal | Number | Extra guests absolute commission value. Exists if type is "percent". |
Listing booking settings
curl -X GET "https://play.stays.net/external/v1/settings/listing/UO01G/booking" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"_idlisting": "6100177563cd0f28803e011b",
"policy": {
"_id": "580dc8a41a1f81123584faf3",
"_t_meta": {
"internalName": "Padrão",
"_mstitle": {
"pt_BR": "Padrão",
"en_US": "Moderate",
"es_ES": "Moderada"
},
"_msdesc": {
"pt_BR": "<p>O hóspede pode cancelar gratuitamente até 7 dias antes da chegada. Após este período será cobrado 50% do valor total da Reserva.</p>",
"en_US": "The guest can cancel free of charge until 7 days before arrival. The guest will be charged 50% of the total price if they cancel in the 7 days before arrival.",
"es_ES": "<p>El huésped puede cancelar la reserva gratis hasta 7 días antes de la fecha de llegada. El huésped va a tener que pagar el 50% del precio total en caso de cancelar durante los 7 días anteriores a la fecha de llegada.</p>"
}
}
},
"instantBooking": true,
"checkInTime": "14:00",
"checkInTimeEnd": "22:00",
"checkOutTimeStart": "03:00",
"checkOutTime": "10:00"
}
This endpoint returns booking settings for certain listing
HTTP Request
GET /external/v1/settings/listing/{listingId}/booking
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
listingId | String | Listing identifier. Both identifiers (long and short) are supported |
Response Object
Parameter | Type | Description |
---|---|---|
_idlisting | String | Listing identifier |
_idmasterListing | String | Master listing identifier |
policy | Object | Cancellation policy object |
policy._id | String | Cancellation policy identifier |
policy._t_meta | Object | Extra information about policy |
instantBooking | Boolean | Listing instant booking state |
checkInTime | String HH:mm |
Default check-in time start |
checkInTimeEnd | String HH:mm |
Default check-in time end |
checkOutTimeStart | String HH:mm |
Default check-out time start |
checkOutTime | String HH:mm |
Default check-out time end |
Retrieve house rules for listing
curl -X GET 'http://dev.stayslocal.net/external/v1/settings/listing/PN02G/house-rules' \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"smokingAllowed": false,
"eventsAllowed": false,
"quietHours": true,
"quietHoursDetails": {
"_i_from": 22,
"_i_to": 8
},
"petsAllowed": "yes",
"petsPriceType": "chargesmayapply",
"_mshouserules": {
"pt_BR": "<p>Respeitar as regras informadas na carta de boas-vindas e também as regras informadas nos locais do prédio, através de placas, avisos, cartazes e adesivos.<br></p>"
}
}
This endpoint returns listing house rules
HTTP Request
GET /external/v1/settings/listing/{listingId}/house-rules
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
listingId * | String | Listing identifier. Both identifiers (long and short) are supported |
* - required params
Update listing house rules
curl -X PATCH 'http://dev.stayslocal.net/external/v1/settings/listing/PN02G/house-rules' \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
{
"smokingAllowed": true,
"eventsAllowed": false,
"quietHours": true,
"quietHoursDetails": {
"_i_from": 22,
"_i_to": 8
},
"petsAllowed": "yes",
"petsPriceType": "chargesmayapply",
"_mshouserules": {
"pt_BR": "<p>Respeitar as regras informadas na carta de boas-vindas e também as regras informadas nos locais do prédio, através de placas, avisos, cartazes e adesivos.<br></p>"
}
}
This endpoint returns listing house rules
HTTP Request
PATCH /external/v1/settings/listing/{listingId}/house-rules
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
listingId * | String | Listing identifier. Both identifiers (long and short) are supported |
* - required params
Response Object
Parameter | Type | Description |
---|---|---|
smokingAllowed | Boolean | Listing allow smoking |
eventsAllowed | Boolean | Listing allow events |
petsAllowed | String | Listing allow pets [ yes, no, onrequest ] |
petsPriceType | String | Pets price if allowed or on request [ free, chargesmayapply ] |
quietHours | Boolean | Listing has quiet hours period |
quietHoursDetails | Object | Quiet hours time range |
quietHoursDetails._i_from | ISO date string YYYY-MM-DD |
Start queit hour |
quietHoursDetails._i_to | ISO date string YYYY-MM-DD |
End queit hour |
_mshouserules | Object | Multilanguage house rules description |
Translations API
Returns information of system build-in types
Multi-unit property types
curl -X GET "https://play.stays.net/external/v1/translation/multi-unit-property-types" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_id": "5ae04e1022261d03ab814d60",
"_mstitle": {
"pt_BR": "Prédio",
"en_US": "Building",
"es_ES": "Edifício",
"pt_PT": "Prédio"
}
},
{
"_id": "5ae04e1022261d03ab814d61",
"_mstitle": {
"pt_BR": "Apartamento",
"en_US": "Apartment",
"de_DE": "Ferienwohnung",
"es_ES": "Departamento",
"pt_PT": "Apartamento"
}
},
{
"_id": "5ae04e1022261d03ab814d62",
"_mstitle": {
"en_US": "Bed and breakfast",
"pt_BR": "Cama & Café (B&Bs)",
"es_ES": "Bed and Breakfast",
"pt_PT": "Alojamentos de Acomodação e Pequeno-Almoço"
}
},
{
"_id": "5ae04e1022261d03ab814d65",
"_mstitle": {
"en_US": "Campground",
"pt_BR": "Campings",
"es_ES": "Campings",
"pt_PT": "Parques de campismo"
}
},
{
"_id": "5ae04e1022261d03ab814d66",
"_mstitle": {
"pt_BR": "Chalé (Área de Camping)",
"en_US": "Chalet (Camping Ground)",
"es_ES": "Chalé (Area de Camping)",
"pt_PT": "Chalé (Área de Camping)"
}
},
...
]
This endpoint returns list of available entities that can be used as _idtype
for properties
HTTP Request
GET /external/v1/translation/multi-unit-property-types
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
searchString | String | Optional search string |
Single-unit property types
curl -X GET "https://play.stays.net/external/v1/translation/single-unit-property-types" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_id": "5ae04e1022261d03ab814d61",
"_mstitle": {
"pt_BR": "Apartamento",
"en_US": "Apartment",
"de_DE": "Ferienwohnung",
"es_ES": "Departamento",
"pt_PT": "Apartamento"
}
},
{
"_id": "5ae04e1022261d03ab814d63",
"_mstitle": {
"en_US": "Cabin",
"pt_BR": "Cabana",
"es_ES": "Cabaña",
"pt_PT": "Cabana"
}
},
{
"_id": "5ae04e1022261d03ab814d64",
"_mstitle": {
"en_US": "Bungalow",
"pt_BR": "Bangalô",
"es_ES": "Cabaña",
"pt_PT": "Bungalow"
}
},
{
"_id": "5ae04e1022261d03ab814d72",
"_mstitle": {
"en_US": "Mobile-home",
"pt_BR": "Casa móvel",
"es_ES": "Casa rodante",
"pt_PT": "Casa móvel"
}
},
{
"_id": "5ae04e1022261d03ab814d74",
"_mstitle": {
"pt_BR": "Apartamento residencial",
"en_US": "Residential apartment",
"es_ES": "Apartamento residencial",
"pt_PT": "Apartamento residencial"
}
},
{
"_id": "5ae04e1022261d03ab814d76",
"_mstitle": {
"en_US": "Sailing ship",
"pt_BR": "Veleiro",
"es_ES": "Velero",
"pt_PT": "Veleiro"
}
},
{
"_id": "5ae04e1022261d03ab814d77",
"_mstitle": {
"pt_BR": "Acomodação móvel",
"en_US": "Mobile accommodation",
"es_ES": "Acomodación móvil",
"pt_PT": "Acomodação móvel"
}
},
{
"_id": "5ae04e1022261d03ab814d78",
"_mstitle": {
"en_US": "Tent",
"pt_BR": "Tenda",
"es_ES": "Tienda",
"pt_PT": "Tenda"
}
},
{
"_id": "5ae04e1022261d03ab814d79",
"_mstitle": {
"en_US": "Villa",
"pt_BR": "Villa",
"es_ES": "Villa",
"pt_PT": "Villa"
}
},
{
"_id": "5ae04e1022261d03ab814d7b",
"_mstitle": {
"en_US": "Castle",
"pt_BR": "Castelo",
"es_ES": "Castillo",
"pt_PT": "Castelo"
}
},
{
"_id": "5ae04e1022261d03ab814d7f",
"_mstitle": {
"pt_BR": "Boutique",
"en_US": "Boutique",
"es_ES": "Boutique",
"pt_PT": "Boutique"
}
},
{
"_id": "5ae04e1022261d03ab814d82",
"_mstitle": {
"pt_BR": "Casa",
"en_US": "House",
"es_ES": "Casa",
"pt_PT": "Casa"
}
},
{
"_id": "5ae04e1022261d03ab814d83",
"_mstitle": {
"en_US": "Barn",
"pt_BR": "Celeiro",
"es_ES": "Granero",
"pt_PT": "Celeiro"
}
}
]
This endpoint returns list of available entities that can be used as _idpropertyType
for listings (Property Type) that are not inside property
HTTP Request
GET /external/v1/translation/single-unit-property-types
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
searchString | String | Optional search string |
Listing types
curl -X GET "https://play.stays.net/external/v1/translation/listing-types" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_id": "5ab8f8a2f6b2dc2e97f97050",
"_mstitle": {
"pt_BR": "Apartamento",
"en_US": "Apartment",
"de_DE": "Ferienwohnung",
"es_ES": "Departamento",
"pt_PT": "Apartamento"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f97049",
"_mstitle": {
"pt_BR": "Quádruplo",
"en_US": "Quadruple",
"es_ES": "Cuádruple",
"pt_PT": "Quádruplo"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f9704b",
"_mstitle": {
"pt_BR": "Triplo",
"en_US": "Triple",
"es_ES": "Triple",
"pt_PT": "Triplo"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f9704c",
"_mstitle": {
"pt_BR": "Com 2 camas de solteiro",
"en_US": "Twin",
"es_ES": "Doble 2 camas",
"pt_PT": "Twin"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f9704d",
"_mstitle": {
"pt_BR": "Duplo",
"en_US": "Double",
"de_DE": "Doppel",
"es_ES": "Duplo",
"pt_PT": "Duplo"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f9704e",
"_mstitle": {
"pt_BR": "Individual",
"en_US": "Single",
"es_ES": "Individual",
"pt_PT": "Individual"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f9704f",
"_mstitle": {
"pt_BR": "Estúdio",
"en_US": "Studio",
"de_DE": "Studio",
"es_ES": "Estudio",
"pt_PT": "Estúdio"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f97051",
"_mstitle": {
"pt_BR": "Dormitório",
"en_US": "Dormitory room",
"de_DE": "Schlafsaal",
"es_ES": "Habitación compartida",
"pt_PT": "Dormitório"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f97052",
"_mstitle": {
"pt_BR": "Cama em Dormitório",
"en_US": "Bed in Dormitory",
"de_DE": "Bett im Schlafsaal",
"es_ES": "Cama en Habitación Compartida",
"pt_PT": "Cama em Dormitório"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f97053",
"_mstitle": {
"en_US": "Bungalow",
"pt_BR": "Bangalô",
"es_ES": "Cabaña",
"pt_PT": "Bungalow"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f97059",
"_mstitle": {
"en_US": "Cabin",
"pt_BR": "Cabana",
"es_ES": "Cabaña",
"pt_PT": "Cabana"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f97054",
"_mstitle": {
"en_US": "Chalet",
"pt_BR": "Chalé",
"es_ES": "Chalet",
"pt_PT": "Chalé"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f97056",
"_mstitle": {
"pt_BR": "Villa/Casa",
"en_US": "Villa/House",
"de_DE": "Villa / Haus",
"es_ES": "Villa/Casa",
"pt_PT": "Villa/Casa"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f97057",
"_mstitle": {
"pt_BR": "Caravan/Trailor",
"en_US": "Mobile home/Trailor",
"es_ES": "Caravan/Trailor",
"pt_PT": "Caravan/Trailor"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f97058",
"_mstitle": {
"en_US": "Tent",
"pt_BR": "Tenda",
"es_ES": "Tienda",
"pt_PT": "Tenda"
}
}
]
This endpoint returns list of available entities that can be used as _idtype
for listings (Housing Unit Type)
HTTP Request
GET /external/v1/translation/listing-types
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
searchString | String | Optional search string |
Room types
curl -X GET "https://play.stays.net/external/v1/translation/room-types" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_id": "5ab8f8a2f6b2dc2e97f97048",
"_mstitle": {
"pt_BR": "Outras Dependências",
"en_US": "Other Areas",
"es_ES": "Otras Dependencias",
"pt_PT": "Outras Dependências"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f97049",
"_mstitle": {
"pt_BR": "Quádruplo",
"en_US": "Quadruple",
"es_ES": "Cuádruple",
"pt_PT": "Quádruplo"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f9704a",
"_mstitle": {
"pt_BR": "Suíte",
"en_US": "Suite",
"de_DE": "Suite",
"es_ES": "Suite",
"pt_PT": "Suíte"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f9704b",
"_mstitle": {
"pt_BR": "Triplo",
"en_US": "Triple",
"es_ES": "Triple",
"pt_PT": "Triplo"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f9704c",
"_mstitle": {
"pt_BR": "Com 2 camas de solteiro",
"en_US": "Twin",
"es_ES": "Doble 2 camas",
"pt_PT": "Twin"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f9704d",
"_mstitle": {
"pt_BR": "Duplo",
"en_US": "Double",
"de_DE": "Doppel",
"es_ES": "Duplo",
"pt_PT": "Duplo"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f9704e",
"_mstitle": {
"pt_BR": "Individual",
"en_US": "Single",
"es_ES": "Individual",
"pt_PT": "Individual"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f9704f",
"_mstitle": {
"pt_BR": "Estúdio",
"en_US": "Studio",
"de_DE": "Studio",
"es_ES": "Estudio",
"pt_PT": "Estúdio"
}
},
{
"_id": "5ad9b01422261d6cda27d3e0",
"_mstitle": {
"pt_BR": "1/2 Banheiro",
"en_US": "1/2 Bathroom",
"es_ES": "1/2 Baño",
"pt_PT": "1/2 Banheiro"
}
},
{
"_id": "5ad9b01422261d6cda27d3e1",
"_mstitle": {
"pt_BR": "Banheiro",
"en_US": "Bathroom",
"de_DE": "Badezimmer",
"es_ES": "Baño",
"pt_PT": "Banheiro"
}
},
{
"_id": "5b02f846ffa8050df3c27f35",
"_mstitle": {
"pt_BR": "Sala/Área Comum",
"en_US": "Living Room / Common Area",
"de_DE": "Wohnzimmer",
"es_ES": "Sala / Area Común",
"pt_PT": "Sala / Área Comum"
}
}
]
This endpoint returns list of available entities that can be used as _idtype
for room. Below you can find separate endpoints, that allows you to retrieve these types by category
HTTP Request
GET /external/v1/translation/room-types
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
searchString | String | Optional search string |
Bedroom types
curl -X GET "https://play.stays.net/external/v1/translation/bedroom-types" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_id": "5ab8f8a2f6b2dc2e97f97049",
"_mstitle": {
"pt_BR": "Quádruplo",
"en_US": "Quadruple",
"es_ES": "Cuádruple",
"pt_PT": "Quádruplo"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f9704a",
"_mstitle": {
"pt_BR": "Suíte",
"en_US": "Suite",
"de_DE": "Suite",
"es_ES": "Suite",
"pt_PT": "Suíte"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f9704b",
"_mstitle": {
"pt_BR": "Triplo",
"en_US": "Triple",
"es_ES": "Triple",
"pt_PT": "Triplo"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f9704c",
"_mstitle": {
"pt_BR": "Com 2 camas de solteiro",
"en_US": "Twin",
"es_ES": "Doble 2 camas",
"pt_PT": "Twin"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f9704d",
"_mstitle": {
"pt_BR": "Duplo",
"en_US": "Double",
"de_DE": "Doppel",
"es_ES": "Duplo",
"pt_PT": "Duplo"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f9704e",
"_mstitle": {
"pt_BR": "Individual",
"en_US": "Single",
"es_ES": "Individual",
"pt_PT": "Individual"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f9704f",
"_mstitle": {
"pt_BR": "Estúdio",
"en_US": "Studio",
"de_DE": "Studio",
"es_ES": "Estudio",
"pt_PT": "Estúdio"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f97052",
"_mstitle": {
"pt_BR": "Cama em Dormitório",
"en_US": "Bed in Dormitory",
"de_DE": "Bett im Schlafsaal",
"es_ES": "Cama en Habitación Compartida",
"pt_PT": "Cama em Dormitório"
}
}
]
This endpoint returns list of available entities that can be used as _idtype
for bedroom
HTTP Request
GET /external/v1/translation/bedroom-types
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
searchString | String | Optional search string |
Bathroom types
curl -X GET "https://play.stays.net/external/v1/translation/bathroom-types" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_id": "5ad9b01422261d6cda27d3e0",
"_mstitle": {
"pt_BR": "1/2 Banheiro",
"en_US": "1/2 Bathroom",
"es_ES": "1/2 Baño",
"pt_PT": "1/2 Banheiro"
}
},
{
"_id": "5ad9b01422261d6cda27d3e1",
"_mstitle": {
"pt_BR": "Banheiro",
"en_US": "Bathroom",
"de_DE": "Badezimmer",
"es_ES": "Baño",
"pt_PT": "Banheiro"
}
}
]
This endpoint returns list of available entities that can be used as _idtype
for bathroom
HTTP Request
GET /external/v1/translation/bathroom-types
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
searchString | String | Optional search string |
Other living room types
curl -X GET "https://play.stays.net/external/v1/translation/other-living-room-types" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_id": "5b02f846ffa8050df3c27f35",
"_mstitle": {
"pt_BR": "Sala/Área Comum",
"en_US": "Living Room / Common Area",
"de_DE": "Wohnzimmer",
"es_ES": "Sala / Area Común",
"pt_PT": "Sala / Área Comum"
}
}
]
This endpoint returns list of available entities that can be used as _idtype
for other living area
HTTP Request
GET /external/v1/translation/other-living-room-types
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
searchString | String | Optional search string |
Bed types
curl -X GET "https://play.stays.net/external/v1/translation/bed-types" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_id": "5ab8f8a2f6b2dc2e97f97040",
"_mstitle": {
"pt_BR": "Cama de Solteiro",
"en_US": "Single bed",
"es_ES": "Cama Individual",
"pt_PT": "Cama de Solteiro"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f97041",
"_mstitle": {
"pt_BR": "Cama de Casal",
"en_US": "Double bed",
"es_ES": "Cama Doble",
"pt_PT": "Cama de Casal"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f97042",
"_mstitle": {
"pt_BR": "Cama de Casal extragrande (King-size)",
"en_US": "Extra large Double (King Size)",
"es_ES": "Cama doble extragrande (King Size)",
"pt_PT": "Cama de Casal extragrande (King-size)"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f97043",
"_mstitle": {
"pt_BR": "Camal de Casal Grande (Queen-Size)",
"en_US": "Large Double (Queen Size)",
"es_ES": "Cama Doble Grande (Queen)",
"pt_PT": "Cama Grande (Queen-Size)"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f97044",
"_mstitle": {
"pt_BR": "Sofá-cama",
"en_US": "Sofa Bed single",
"es_ES": "Sofá cama",
"pt_PT": "Sofá-cama"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f97045",
"_mstitle": {
"pt_BR": "Cama de Solteiro",
"en_US": "Twin bed",
"es_ES": "Cama Individual",
"pt_PT": "Cama individual"
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f97046",
"_mstitle": {
"pt_BR": "Colchão / Futón indiv.",
"en_US": "Mattress / Futon Mat single",
"es_ES": "Colchón / Futón solo",
"pt_PT": "Colchão / Futón indiv."
}
},
{
"_id": "5ab8f8a2f6b2dc2e97f97047",
"_mstitle": {
"pt_BR": "Cama em Beliche (1 pessoa)",
"en_US": "Bunk bed single",
"es_ES": "Litera (1 persona)",
"pt_PT": "Beliche (1 pessoa)"
}
},
{
"_id": "5afebf57afbcc20cec261e8c",
"_mstitle": {
"pt_BR": "Sofá-cama Casal",
"en_US": "Sofa Bed double",
"es_ES": "Sofá cama casal",
"pt_PT": "Sofá-cama Casal"
}
},
{
"_id": "5afec011afbcc20cec261e93",
"_mstitle": {
"pt_BR": "Colchão / Futón Casal",
"en_US": "Mattress / Futon Mat double",
"es_ES": "Colchón / Futón Casal",
"pt_PT": "Colchão / Futón Casal"
}
},
{
"_id": "5afec08eafbcc20cec261e96",
"_mstitle": {
"pt_BR": "Cama em Beliche (2 pessoas)",
"en_US": "Bunk bed double",
"es_ES": "Litera (2 personas)",
"pt_PT": "Beliche (2 pessoas)"
}
}
]
This endpoint returns list of available entities that can be used as _idtype
for beds
HTTP Request
GET /external/v1/translation/bed-types
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
searchString | String | Optional search string |
Property amenities
curl -X GET "https://play.stays.net/external/v1/translation/property-amenities" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_id": "5ae18b0122261d76530cc177",
"_mstitle": {
"pt_BR": "Recepção 24 horas",
"en_US": "24-hour front desk",
"es_ES": "Recepción 24 horas",
"pt_PT": "Recepção disponível 24 horas",
"el_GR": "24ώρη ρεσεψιόν"
}
},
{
"_id": "5ae18b0122261d76530cc178",
"_mstitle": {
"pt_BR": "Ar condicionado",
"en_US": "Air conditioning",
"es_ES": "Aire acondicionado",
"pt_PT": "Ar condicionado",
"el_GR": "Κλιματιστικό"
}
},
{
"_id": "5ae18b0122261d76530cc179",
"_mstitle": {
"pt_BR": "Caixa eletrônico na propriedade",
"en_US": "ATM on site",
"de_DE": "Geldautomat auf dem Gelände",
"es_ES": "Cajero automático en el hotel",
"pt_PT": "Multibanco no local",
"el_GR": "πρόσβαση σε ATM"
}
},
{
"_id": "5ae18b0122261d76530cc17a",
"_mstitle": {
"pt_BR": "Babá / Serviços para crianças",
"en_US": "Baby sitting",
"es_ES": "Niñera / servicios infantiles",
"pt_PT": "Baby-sitting / serviço para crianças",
"el_GR": "Baby sitting"
}
},
{
"_id": "5ae18b0122261d76530cc17b",
"_mstitle": {
"pt_BR": "Churrasqueira / Área para piquenique",
"en_US": "BBQ / Picnic area",
"de_DE": "Grill- / Picknickplatz",
"es_ES": "Parrilla / Zona de pícnic",
"pt_PT": "Área para churrascos / Pic-nic",
"el_GR": "BBQ / Χώρος για πίκνικ"
}
},
{
"_id": "5ae18b0122261d76530cc17c",
"_mstitle": {
"pt_BR": "Biblioteca",
"en_US": "Library",
"es_ES": "Biblioteca",
"pt_PT": "Biblioteca",
"el_GR": "Βιβλιοθήκη"
}
},
{
"_id": "5ae18b0122261d76530cc17d",
"_mstitle": {
"pt_BR": "Aluguel de carros",
"en_US": "Car rental",
"de_DE": "Autovermietung",
"es_ES": "Alquiler de autos",
"pt_PT": "Aluguer de carro",
"el_GR": "Ενοικίαση αυτοκινήτου"
}
},
{
"_id": "5ae18b0122261d76530cc17e",
"_mstitle": {
"pt_BR": "Cassino",
"en_US": "Casino",
"es_ES": "Casino",
"pt_PT": "Casino",
"el_GR": "Κασίνο"
}
},
{
"_id": "5ae18b0122261d76530cc17f",
"_mstitle": {
"pt_BR": "Serviço de concierge",
"en_US": "Concierge desk",
"es_ES": "Servicio de conserjería",
"pt_PT": "Serviço de concierge",
"el_GR": "Ρεσεψιόν"
}
},
{
"_id": "5ae18b0122261d76530cc180",
"_mstitle": {
"pt_BR": "Serviço de câmbio",
"en_US": "Currency exchange",
"es_ES": "Cambio de moneda",
"pt_PT": "Serviços de câmbios",
"el_GR": "Ανταλλαγή συναλλάγματος"
}
},
...
]
This endpoint returns list of available entities that can be used as amenity identifier for property
HTTP Request
GET /external/v1/translation/property-amenities
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
searchString | String | Optional search string |
Listing amenities
curl -X GET "https://play.stays.net/external/v1/translation/listing-amenities" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_id": "58931b3fe1875b6163592c6f",
"_mstitle": {
"pt_BR": "Estacionamento",
"en_US": "Free parking on premises",
"de_DE": "Kostenloses Parken",
"es_ES": "Parking",
"pt_PT": "Estacionamento",
"el_GR": "Δωρεάν χώρος στάθμευσης στις εγκαταστάσεις",
"ru_RU": ""
}
},
{
"_id": "58931b8be1875b6163592c75",
"_mstitle": {
"pt_BR": "Academia (privativa)",
"en_US": "Gym (private)",
"es_ES": "Gimnasio (privado)",
"el_GR": "Γυμναστήριο (ιδιωτικό)",
"de_DE": "",
"ru_RU": ""
}
},
{
"_id": "58931b95e1875b6163592c76",
"_mstitle": {
"pt_BR": "Lareira Interna",
"en_US": "Indoor Fireplace",
"es_ES": "Chimenea Interior",
"pt_PT": "Lareira Interna",
"el_GR": "Τζάκι"
}
},
{
"_id": "58931b65e1875b6163592c71",
"_mstitle": {
"pt_BR": "Elevador",
"en_US": "Elevator in building",
"de_DE": "Aufzug im Gebäude",
"es_ES": "Elevador",
"el_GR": "Ανελκυστήρας",
"ru_RU": ""
}
},
{
"_id": "58931b6de1875b6163592c72",
"_mstitle": {
"pt_BR": "Porteiro",
"en_US": "Doorman",
"de_DE": "Portier",
"es_ES": "Portero",
"pt_PT": "Porteiro",
"el_GR": "Θυρωρός",
"ru_RU": ""
}
},
{
"_id": "58931b75e1875b6163592c73",
"_mstitle": {
"pt_BR": "Piscina Privada",
"en_US": "Private Pool",
"es_ES": "Piscina Private",
"pt_PT": "Piscina",
"el_GR": "Ιδιωτική πισίνα"
}
},
{
"_id": "58931b86e1875b6163592c74",
"_mstitle": {
"pt_BR": "Quartos para famílias",
"en_US": "Family/kid friendly",
"de_DE": "Familienfreundlich",
"es_ES": "Habitaciones familiares",
"pt_PT": "Quartos familiares",
"el_GR": "Φιλικό για οικογένειες / παιδιά",
"ru_RU": ""
}
},
{
"_id": "58931c96e1875b6163592c7a",
"_mstitle": {
"pt_BR": "Internet",
"en_US": "Internet",
"de_DE": "Internet",
"es_ES": "Internet",
"pt_PT": "Internet",
"el_GR": "Ίντερνετ"
}
},
{
"_id": "58931ca0e1875b6163592c7b",
"_mstitle": {
"pt_BR": "Jacuzzi",
"en_US": "Hot Tub",
"es_ES": "Jacuzzi",
"pt_PT": "Jacuzzi",
"el_GR": "Υδρομασάζ"
}
},
{
"_id": "58931cbbe1875b6163592c7d",
"_mstitle": {
"pt_BR": "Café da Manhã Incluído",
"en_US": "Breakfast",
"de_DE": "Frühstück",
"es_ES": "Desayuno Incluido",
"pt_PT": "Pequeno-almoço Incluído",
"el_GR": "Πρωινό",
"ru_RU": ""
}
},
{
"_id": "58931cdae1875b6163592c80",
"_mstitle": {
"pt_BR": "Cozinha/Cozinha Compacta",
"en_US": "Kitchen/Kitchenette",
"es_ES": "Cocina",
"pt_PT": "Cozinha/Kitchenette",
"el_GR": "Κουζίνα / Κουζινάκι"
}
},
...
]
This endpoint returns list of available entities that can be used as amenity identifier for listing
HTTP Request
GET /external/v1/translation/listing-amenities
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
searchString | String | Optional search string |
Inventory category
curl -X GET "https://play.stays.net/external/v1/translation/inventory-categories" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_id": "515328def456a12c0c0033b1",
"_mstitle": {
"pt_BR": "internet",
"en_US": "internet",
"de_DE": "Internet",
"es_ES": "internet",
"ru_RU": "Интернет"
}
},
{
"_id": "515328def456a12c0c0033b2",
"_mstitle": {
"pt_BR": "maquina de lavar",
"en_US": "washing machine",
"de_DE": "Waschmaschine",
"es_ES": "lavadora",
"ru_RU": "Стиральная машина"
}
}
]
This endpoint returns list of available entities that can be used as amenity identifier for inventory category
HTTP Request
GET /external/v1/translation/inventory-categories
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
searchString | String | Optional search string |
Inventory items
curl -X GET "https://play.stays.net/external/v1/translation/inventory-items" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_id": "515328e0f456a12c0c0033e1",
"_mstitle": {
"pt_BR": "cama de casal",
"en_US": "double bed",
"de_DE": "Doppelbett",
"es_ES": "cama de matrimonio",
"ru_RU": "двухспальная кровать"
}
},
{
"_id": "515328e0f456a12c0c0033e3",
"_mstitle": {
"pt_BR": "bicama",
"en_US": "single bed w/ extension",
"de_DE": "Single- Ausziehbett",
"es_ES": "bi-cama",
"ru_RU": "односпальная кровать возможностью расширения"
}
}
]
This endpoint returns list of available entities that can be used as amenity identifier for inventory items
HTTP Request
GET /external/v1/translation/inventory-items
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
searchString | String | Optional search string |
Inventory items conditions
curl -X GET "https://play.stays.net/external/v1/translation/inventory-items-conditions" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_id": "515328e0f456a12c0c0033b8",
"_mstitle": {
"pt_BR": "novo",
"en_US": "new",
"de_DE": "neu",
"es_ES": "nuevo",
"ru_RU": "новое"
}
},
{
"_id": "515328e0f456a12c0c0033b9",
"_mstitle": {
"pt_BR": "bom",
"en_US": "good",
"de_DE": "gut",
"es_ES": "bueno",
"ru_RU": "хорошее"
}
}
]
This endpoint returns list of available entities that can be used as amenity identifier for inventory items conditions
HTTP Request
GET /external/v1/translation/inventory-items-conditions
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
searchString | String | Optional search string |
Measure units
curl -X GET "https://play.stays.net/external/v1/translation/measure-units" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_id": "5aec31e422261d099840c8a4",
"_mstitle": {
"en_US": "meters",
"pt_BR": "m",
"es_ES": "m",
"pt_PT": "m"
}
},
{
"_id": "5aec31e422261d099840c8a6",
"_mstitle": {
"pt_BR": "ft",
"en_US": "feet",
"de_DE": "",
"es_ES": "ft",
"ru_RU": "",
"sv_SE": "",
"it_IT": "",
"fr_FR": "",
"pt_PT": "ft",
"el_GR": ""
}
}
]
This endpoint returns list of available entities that can be used as amenity identifier for measure units
HTTP Request
GET /external/v1/translation/measure-units
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
searchString | String | Optional search string |
Neighbourhoods
curl -X GET "https://play.stays.net/external/v1/translation/neighbourhoods" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_id": "5ae2fd2522261d43932a96b1",
"_mstitle": {
"pt_BR": "Lago",
"en_US": "lake",
"es_ES": "Lago",
"pt_PT": "Lago"
}
},
{
"_id": "5ae2fd2522261d43932a96b2",
"_mstitle": {
"pt_BR": "Rio",
"en_US": "river",
"es_ES": "Río",
"pt_PT": "Rio"
}
}
]
This endpoint returns list of available entities that can be used as amenity identifier for neighbourhoods
HTTP Request
GET /external/v1/translation/neighbourhoods
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
searchString | String | Optional search string |
Retrieve Extra-services Categories
curl -X GET "https://play.stays.net/external/v1/translation/extra-services-categories" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_id": "5dee464910450609ca7ea2d7",
"_mstitle": {
"en_US": "string",
"pt_BR": "string",
"de_DE": "string",
"es_ES": "string",
"pt_PT": "string",
"ru_RU": "string",
"sv_SE": "string",
"it_IT": "string",
"fr_FR": "string",
"el_GR": "string"
}
}
]
This endpoint returns a reservation extra-services
HTTP Request
GET /external/v1/translation/extra-services-categories
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
id | String | Reservation identifier: (short and long both values accepted) |
searchString | String | Reservation identifier: (short and long both values accepted) |
Response Object
Parameter | Type | Description |
---|---|---|
id | Number | Listing custom field identifier |
_mstitle | Object | Title translation |
Retrieve Extra-services Items
curl -X GET "https://play.stays.net/external/v1/translation/extra-services-items" \
-H "Authorization: Basic ODAwOTQxMTU1NjpNTHlHTEl3RkFX" \
-H "Content-Type: application/json"
The above command returns JSON structured like this:
[
{
"_id": "5dee464910450609ca7ea2d7",
"_mstitle": {
"en_US": "string",
"pt_BR": "string",
"de_DE": "string",
"es_ES": "string",
"pt_PT": "string",
"ru_RU": "string",
"sv_SE": "string",
"it_IT": "string",
"fr_FR": "string",
"el_GR": "string"
}
}
]
This endpoint returns a reservation extra-services
HTTP Request
GET /external/v1/translation/extra-services-items
Header Parameters
Parameter | Value |
---|---|
Authorization | Basic hash_base64(client_id:client_secret) |
Content-Type | application/json |
Path Parameters
Parameter | Type | Description |
---|---|---|
id | String | Reservation identifier: (short and long both values accepted) |
searchString | String | Reservation identifier: (short and long both values accepted) |
Response Object
Parameter | Type | Description |
---|---|---|
id | Number | Listing custom field identifier |
_mstitle | Object | Title translation |
Webhook Notifications
System triggers different notifications, when something changed. To activate this feature, please contact our support team and provide url that you will use for receiving notifications. We use json notation to send notifications. To confirm receiving, please send json answer {succeed: true}
. System will use 3 attempts to send notification if success answer is not received.
Each notification is json object with 3 fields: action
, _dt
, payload
For each notification we send several custom headers:
x-stays-client-id
- contains API user login
x-stays-signature
- contains signature to verify that message was really send from us. To verify it, please contact us to get public key for your application.
Example how to verify signature using node js
const crypto = require('crypto');
const dataBuffer = Buffer.from(JSON.stringify({action, _dt, payload })),
signature = Buffer.from(signature, 'base64');
const result = crypto.verify("SHA256", dataBuffer, <your public key>, signature);
Reservation Notifications
Example of reservation notification:
{
"action": "reservation.created",
"_dt": "2020-08-25T08:26:41.044Z",
"payload": {
"_id": "5f44cb2c9711ba5c07c35f28",
"id": "HW04G",
"checkInDate": "2020-08-31",
"checkInTime": "15:00",
"checkOutDate": "2020-09-04",
"checkOutTime": "11:00",
"_idlisting": "5e693a78f29390001011bbde",
"_idclient": "5f3fa68776fd8f2edd50ef3e",
"type": "booked",
"price": {
"currency": "BRL",
"_f_total": 696
},
"stats": {
"_f_totalPaid": 696
},
"guests": 2,
"guestsDetails": {
"adults": 2,
"children": 0
}
}
}
Action | Payload |
---|---|
reservation.created | Reservation object |
reservation.modified | Reservation object |
reservation.canceled | Reservation object |
reservation.deleted | { _id, _idlisting, from, to } |
reservation.reactivated | Reservation object |
Calendar Notifications
Example of calendar.rates notification:
{
"action": "calendar.rates.modified",
"_dt": "2020-08-25T08:26:41.044Z",
"payload": {
"from" : "2020-08-29",
"to" : "2020-08-31",
"_idlisting" : "569641258eea1001004b0316",
"prices" : [
{
"minStay" : 1,
"_mcval" : {
"BRL" : 150
}
},
{
"minStay" : 2,
"_mcval" : {
"BRL" : 120
}
},
{
"minStay" : 3,
"_mcval" : null
}
]
}
}
Example of calendar.restrictions notification:
{
"action": "calendar.restrictions.modified",
"_dt": "2020-08-25T15:25:02.098Z",
"payload": {
"from" : "2020-08-30",
"to" : "2020-08-31",
"_idregion" : null,
"_idlisting" : "569641258eea1001004b0316",
"closedToArrival" : true,
"closedToDeparture" : false,
"weekdays" : [ ]
}
}
Action | Payload |
---|---|
calendar.rates.modified | { _idlisting, from, to, prices } |
calendar.restrictions.modified | {_idlisting, from, to, _idregion, closedToDeparture, closedToArrival, weekdays } |
Price-region Notifications
Example of Price-region notification:
{
"action": "price-region.created",
"_dt": "2020-08-25T15:27:42.143Z",
"payload": {
"_id": "5f452de946ae1779ab9de115",
"_s_name": "Region 1"
}
}
Action | Payload |
---|---|
price-region.created | Price-region object |
price-region.modified | Price-region object |
price-region.deleted | Price-region object |
Season-sell Notifications
Example of Season-sell notification:
{
"action": "season-sell.created",
"_dt": "2020-08-25T15:30:42.612Z",
"payload": {
"_id" : "5f452e9f46ae1779ab9de11a",
"name" : "High Season",
"hint" : "2021",
"type" : "season",
"from" : "2020-12-01",
"to" : "2021-03-31",
"status" : "active",
"ratePlans" : [
{
"minStay" : 3,
"_i_percent" : 0
},
{
"minStay" : 5,
"_i_percent" : 5
}
],
"_idregion" : "5f452de946ae1779ab9de115",
"useMonthlyRate" : false
}
}
Action | Payload |
---|---|
season-sell.created | Season-sell object |
season-sell.modified | Season-sell object |
season-sell.deleted | { _id, from, to } |
season-sell.reactivated | Season-sell object |
Client Notifications
Example of Client notification:
{
"action": "client.created",
"_dt": "2020-08-25T15:38:22.250Z",
"payload": {
"_id" : "5f452ffe46ae1779ab9de125",
"kind" : "person",
"fName" : "John",
"lName" : "Last",
"name" : "John Last",
"email" : "john@stays.net",
"isUser" : false,
"phones" : [
{
"iso" : "+5511965311223",
"hint" : "mobile"
}
],
"documents" : [
{
"type" : "passport",
"numb" : "1234567",
"issued" : "",
"date" : "2014-08-14"
}
],
"prefLang" : "pt_BR",
"alternateLangs" : [
"pt_BR",
"en_US"
],
"internalNote" : "internal note"
}
}
Action | Payload |
---|---|
client.created | Client object |
client.modified | Client object |
Promocode Notifications
Example of Promocode notification:
{
"action": "promocode.created",
"_dt": "2020-08-25T15:40:22.325Z",
"payload": {
"_id" : "5f4530e146ae1779ab9de134",
"name" : "summer2020",
"status" : "active",
"type" : "percent",
"_f_discount" : 10,
"maxUsesCount" : 10,
"usedCount" : 0,
"useWithOtherPromotions" : false,
"periodRestrictions" : {
"enable" : true,
"from" : "2020-08-25",
"to" : "2020-09-01",
"invalidDaysOfWeek" : [
1,
2
]
},
"calendarRestrictions" : {
"enable" : false
},
"productRestrictions" : {
"enable" : false
},
"userRestrictions" : {
"enable" : false
}
}
}
Action | Payload |
---|---|
promocode.created | Promocode object |
promocode.modified | Promocode object |
promocode.deleted | { _id, name } |
Listing Notifications
Example of Listing notification:
{
"action": "listing.created",
"_dt": "2020-08-25T15:42:22.338Z",
"payload": {
"_id" : "5f45315346ae1779ab9de13b",
"id" : "HQ01G",
"_idtype" : "5ab8f8a2f6b2dc2e97f97050",
"_t_typeMeta" : {
"_mstitle" : {
"en_US" : "Apartment",
"pt_BR" : "Apartamento",
"es_ES" : "Departamento"
}
},
"subtype" : "entire_home",
"internalName" : "int001",
"status" : "draft",
"deff_curr" : "BRL",
"_t_imagesMeta" : [ ],
"instantBooking" : true
}
}
Action | Payload |
---|---|
listing.created | Listing object |
listing.linked | Listing object. It triggered when you link listing to target application |
listing.unlinked | Listing object. It triggered when you unlink listing from target application |
listing.modified | Listing object. It triggered when you modify listing |
Listing Notifications Rates Sell
Example of Listing notification:
{
"action": "listing-rates-sell.modified",
"_dt": "2023-06-28T16:14:58.031Z",
"payload": {
"_idlisting": "649c5cb6b628867eeb845bf6",
"_idseason": "649c5cc3b628867eeb845bf7",
"type": "global",
"status": "active",
"from": "2022-01-01",
"to": "2023-01-01",
"baseRateValue": 1,
"ratePlans": [
{
"minStay": 1,
"_i_percent": 0,
"_f_val": 1
},
{
"minStay": 3,
"_i_percent": 2,
"_f_val": 0.98
},
{
"minStay": 5,
"_i_percent": 3,
"_f_val": 0.97
},
{
"minStay": 7,
"_i_percent": 4,
"_f_val": 0.96
}
],
"monthlyRate": {
"minStay": 21,
"_f_val": 20
}
}
}
Action | Payload |
---|---|
listing-rates-sell.modified | Listing object. It triggered when you modify listing |