4.1 Other Notes
About 1360 wordsAbout 5 min
2025-04-24
Open Api Price Calculation
occupancyRates Structure
{
"rateData": {
"type": 1,
"roomRate": {
"amountBeforeTax": "190",
"amountAfterTax": "200"
},
"personRate": {
"basePersonRateList": [
{
"childCount": 0,
"adultCount": 2,
"amountBeforeTax": "91",
"amountAfterTax": "100"
},
{
"childCount": 1,
"adultCount": 2,
"amountBeforeTax": "92",
"amountAfterTax": "110"
}
],
"extraAdultRate": {
"amountBeforeTax": "40",
"amountAfterTax": "50"
},
"extraChildRate": {
"childType": 1,
"childByAgeList": [
{
"minAge": 0,
"maxAge": 6,
"amountBeforeTax": "1",
"amountAfterTax": "10"
},
{
"minAge": 6,
"maxAge": 12,
"amountBeforeTax": "2",
"amountAfterTax": "20"
}
],
"childNormal": {
"amountBeforeTax": "8",
"amountAfterTax": "10"
}
}
}
}
}Example
| Field | Setting Content | Description |
|---|---|---|
Maximum Adults | 4 | Maximum number of adults allowed in the room |
Maximum Children | 3 | Maximum number of children allowed in the room |
Maximum Occupancy | 5 | Maximum total occupancy of the room (adults + children) |
RatePlan Occupancy Breakdown Combination
| Combination No. | Adults | Children | Message Example (A-adult, C-child) |
|---|---|---|---|
1 | 1 | 0 | 1A0C |
2 | 1 | 1 | 1A1C |
3 | 1 | 2 | 1A2C |
4 | 1 | 3 | 1A3C |
5 | 2 | 0 | 2A0C |
6 | 2 | 1 | 2A1C |
7 | 2 | 2 | 2A2C |
8 | 2 | 3 | 2A3C |
9 | 3 | 0 | 3A0C |
10 | 3 | 1 | 3A1C |
11 | 3 | 2 | 3A2C |
12 | 4 | 0 | 4A0C |
13 | 4 | 1 | 4A1C |
Message Parsing Example (A-adult C- child)
Room Rate
1-RoomRate
RateData
{
"type": 1,
"roomRate": {
"amountBeforeTax": "90",
"amountAfterTax": "100"
}
}KlookRate
{
"amountBeforeTax": "90",
"amountAfterTax": "100"
}Person rate
2-PersonRate[0-normal][A]
RateData
{
"type": 2,
"personRate": {
"basePersonRateList": [
{
"childCount": 0,
"adultCount": 2,
"amountAfterTax": "100"
},
{
"childCount": 0,
"adultCount": 3,
"amountAfterTax": "110"
}
],
"extraAdultRate": {
"amountAfterTax": "50"
},
"extraChildRate": {
"childType": 0,
"childNormal": {
"amountBeforeTax": "10",
"amountAfterTax": "20"
}
}
}
}KlookRate
Base Price
1. 1A+0C: Cannot provide
2. 1A+1C : Cannot provide
3. 1A+2C: Cannot provide
4. 1A+3C: Cannot provide
5. 2A+0C: 100
6. 2A+1C: Cannot provide
7. 2A+2C: Cannot provide
8. 2A+3C: Cannot provide
9. 3A+0C: 110
10. 3A+1C: 130
11. 3A+2C: 150
12. 4A+0C: 160
13. 4A+1C: 1802-PersonRate[0-normal][B]
RateData
{
"type": 2,
"personRate": {
"basePersonRateList": [
{
"childCount": 0,
"adultCount": 2,
"amountAfterTax": "100"
},
{
"childCount": 0,
"adultCount": 3,
"amountAfterTax": "110"
}
],
"extraChildRate": {
"childType": 0,
"childNormal": {
"amountBeforeTax": "10",
"amountAfterTax": "20"
}
}
}
}KlookRate
Base Price
1. 1A+0C: Cannot provide
2. 1A+1C : Cannot provide
3. 1A+2C: Cannot provide
4. 1A+3C: Cannot provide
5. 2A+0C: 100
6. 2A+1C: Cannot provide
7. 2A+2C: Cannot provide
8. 2A+3C: Cannot provide
9. 3A+0C: 110
10. 3A+1C: 130
11. 3A+2C: 150
12. 4A+0C: Cannot provide
13. 4A+1C: Cannot provide2-PersonRate[0-normal][C]
RateData
{
"type": 2,
"personRate": {
"extraAdultRate": {
"amountAfterTax": "50"
},
"extraChildRate": {
"childType": 0,
"childNormal": {
"amountBeforeTax": "10",
"amountAfterTax": "20"
}
}
}
}KlookRate
Base Price
1. 1A+0C: 50
2. 1A+1C : 70
3. 1A+2C: 90
4. 1A+3C: 110
5. 2A+0C: 100
6. 2A+1C: 120
7. 2A+2C: 140
8. 2A+3C: 160
9. 3A+0C: 150
10. 3A+1C: 170
11. 3A+2C: 190
12. 4A+0C: 200
13. 4A+1C: 2202-PersonRate[0-normal][D]
RateData
{
"type": 2,
"personRate": {
"basePersonRateList": [
{
"childCount": 0,
"adultCount": 2,
"amountAfterTax": "100"
},
{
"childCount": 0,
"adultCount": 3,
"amountAfterTax": "110"
}
],
"extraChildRate": {
"childType": 0,
}
}
}KlookRate
Base Price
1. 1A+0C: Cannot provide
2. 1A+1C : Cannot provide
3. 1A+2C: Cannot provide
4. 1A+3C: Cannot provide
5. 2A+0C: 100
6. 2A+1C: Cannot provide
7. 2A+2C: Cannot provide
8. 2A+3C: Cannot provide
9. 3A+0C: 110
10. 3A+1C: Cannot provide
11. 3A+2C: Cannot provide
12. 4A+0C: Cannot provide
13. 4A+1C: Cannot provide2-PersonRate[1-byAge][A]
RateData
{
"type": 2,
"personRate": {
"basePersonRateList": [
{
"childCount": 0,
"adultCount": 2,
"amountAfterTax": "100"
},
{
"childCount": 0,
"adultCount": 3,
"amountAfterTax": "110"
}
],
"extraAdultRate": {
"amountAfterTax": "50"
},
"extraChildRate": {
"childType": 1,
"childByAgeList": [
{
"minAge": 0,
"maxAge": 6,
"amountBeforeTax": "1",
"amountAfterTax": "10"
},
{
"minAge": 6,
"maxAge": 12,
"amountBeforeTax": "2",
"amountAfterTax": "20"
}
]
}
}
}KlookRate
Base Price
1. 1A+0C: Cannot provide
2. 2A+0C: 100
3. 3A+0C: 110
4. 4A+0C: 160
Child Price
[
{
"minAge": 0,
"maxAge": 6,
"amountBeforeTax": "1",
"amountAfterTax": "10"
},
{
"minAge": 6,
"maxAge": 12,
"amountBeforeTax": "2",
"amountAfterTax": "20"
}
]
Actual Price = Base Price + Child Price (calculated in the specific price check)
If the child's age range is not matched, the child is upgraded to an adult, i.e., child count -1, adult count +12-PersonRate[1-byAge][B]
RateData
{
"type": 2,
"personRate": {
"basePersonRateList": [
{
"childCount": 0,
"adultCount": 2,
"amountAfterTax": "100"
},
{
"childCount": 0,
"adultCount": 3,
"amountAfterTax": "110"
}
],
"extraChildRate": {
"childType": 1,
"childByAgeList": [
{
"minAge": 0,
"maxAge": 6,
"amountBeforeTax": "1",
"amountAfterTax": "10"
},
{
"minAge": 6,
"maxAge": 12,
"amountBeforeTax": "2",
"amountAfterTax": "20"
}
]
}
}
}KlookRate
Base Price
1. 1A+0C: Cannot provide
2. 2A+0C: 100
3. 3A+0C: 110
Child Price
[
{
"minAge": 0,
"maxAge": 6,
"amountBeforeTax": "1",
"amountAfterTax": "10"
},
{
"minAge": 6,
"maxAge": 12,
"amountBeforeTax": "2",
"amountAfterTax": "20"
}
]
Actual Price = Base Price + Child Price (calculated in the specific price check)
If the child's age range is not matched, the child is upgraded to an adult, i.e., child count -1, adult count +12-PersonRate[1-byAge][C]
RateData
{
"type": 2,
"personRate": {
"extraAdultRate": {
"amountAfterTax": "50"
},
"extraChildRate": {
"childType": 1,
"childByAgeList": [
{
"minAge": 0,
"maxAge": 6,
"amountBeforeTax": "1",
"amountAfterTax": "10"
},
{
"minAge": 6,
"maxAge": 12,
"amountBeforeTax": "2",
"amountAfterTax": "20"
}
]
}
}
}KlookRate
Base Price
1. 1A+0C: 50
2. 2A+0C: 100
3. 3A+0C: 150
4. 4A+0C: 200
Child Price
[
{
"minAge": 0,
"maxAge": 6,
"amountBeforeTax": "1",
"amountAfterTax": "10"
},
{
"minAge": 6,
"maxAge": 12,
"amountBeforeTax": "2",
"amountAfterTax": "20"
}
]
Actual Price = Base Price + Child Price (calculated in the specific price check)
If the child's age range is not matched, the child is upgraded to an adult, i.e., child count -1, adult count +12-PersonRate[2-free][A]
RateData
{
"type": 2,
"personRate": {
"basePersonRateList": [
{
"childCount": 0,
"adultCount": 2,
"amountAfterTax": "100"
},
{
"childCount": 0,
"adultCount": 3,
"amountAfterTax": "110"
}
],
"extraAdultRate": {
"amountAfterTax": "50"
},
"extraChildRate": {
"childType": 2,
}
}
}KlookRate
Base Price
1. 1A+0C: Cannot provide
2. 2A+0C: 100
3. 3A+0C: 110
4. 4A+0C: 160
Child Price null
Actual Price = Base Price + Child Price (calculated in the specific price check), child count is calculated as 02-PersonRate[2-free][B]
RateData
{
"type": 2,
"personRate": {
"basePersonRateList": [
{
"childCount": 0,
"adultCount": 2,
"amountAfterTax": "100"
},
{
"childCount": 0,
"adultCount": 3,
"amountAfterTax": "110"
}
],
"extraChildRate": {
"childType": 2,
}
}
}KlookRate
Base Price
1. 1A+0C: Cannot provide
2. 2A+0C: 100
3. 3A+0C: 110
Child Price null
Actual Price = Base Price + Child Price (calculated in the specific price check), child count is calculated as 02-PersonRate[2-free][C]
RateData
{
"type": 2,
"personRate": {
"basePersonRateList": [
{
"childCount": 0,
"adultCount": 2,
"amountAfterTax": "100"
},
{
"childCount": 0,
"adultCount": 3,
"amountAfterTax": "110"
}
],
"extraAdultRate": {
"amountAfterTax": "50"
},
"extraChildRate": {
"childType": 2,
}
}
}KlookRate
Base Price
1. 1A+0C: 50
2. 2A+0C: 100
3. 3A+0C: 150
4. 4A+0C: 200
Child Price null
Actual Price = Base Price + Child Price (calculated in the specific price check), child count is calculated as 02-PersonRate[3-asAdult][A]
RateData
{
"type": 2,
"personRate": {
"basePersonRateList": [
{
"childCount": 0,
"adultCount": 2,
"amountAfterTax": "100"
},
{
"childCount": 0,
"adultCount": 3,
"amountAfterTax": "110"
}
],
"extraAdultRate": {
"amountAfterTax": "50"
},
"extraChildRate": {
"childType": 3,
}
}
}KlookRate
Base Price
1. 1A+0C: Cannot provide
2. 2A+0C: 100
3. 3A+0C: 110
4. 4A+0C: 160
Child Price null
Actual Price = Base Price + Child Price (calculated in the specific price check), child count -1, adult count +12-PersonRate[3-asAdult][B]
RateData
{
"type": 2,
"personRate": {
"basePersonRateList": [
{
"childCount": 0,
"adultCount": 2,
"amountAfterTax": "100"
},
{
"childCount": 0,
"adultCount": 3,
"amountAfterTax": "110"
}
],
"extraChildRate": {
"childType": 3,
}
}
}KlookRate
Base Price
1. 2A+0C: 100
2. 3A+0C: 110
Child Price null
Actual Price = Base Price + Child Price (calculated in the specific price check), child count -1, adult count +12-PersonRate[3-asAdult][B]
RateData
{
"type": 2,
"personRate": {
"extraAdultRate": {
"amountAfterTax": "50"
},
"extraChildRate": {
"childType": 3,
}
}
}KlookRate
Base Price
1. 1A+0C: 50
2. 2A+0C: 100
3. 3A+0C: 150
4. 4A+0C: 200
Child Price null
Actual Price = Base Price + Child Price (calculated in the specific price check), child count -1, adult count +1