cm-hub-api-documentation
This document describes the API for interacting with CM-Hub service.
Client side
Authentication
Pelican Hub will use API Key to access partner-restricted endpoints. We will include an Authorization header in each request, like so:
Authorization: Basic {Authorization String}
{Authorization String} will be replaced with the API key provided by the Partner Authentication failure
If a call fails authentication, the API must returns HTTP status code 401
{
"Status": false,
"message": "Authorization Required"
}
Endpoint
1. Rate and availability
The availability call facilitates the pushing of the following information from Pelican to Booking Channel
- Room Inventory count (per Pelican's Room and Rate combination, per date)
- Room Rate amount (per Pelican's Room and Rate combination, per date)
- Restrictions (minimum length of stay, maximum length of stay, closed to arrival and closed to departure) (per Pelican's Room and Rate combination, per date) Client must provide an endpoint for receiving updates from Pelican Hub.
Endpoint: POST {client host}/api/availability
Request Headers:
Authorization: Basic {Authorization String}
Response Codes:
200 OK: Successful receiving updates.401 Unauthorized: Invalid or missing API token.
Request Body (JSON):
{
"hotelid": "HT00001100",
"room": [
{
"id": "RO00001101",
"date": [
{
"from": "2020-09-16",
"to": "2020-09-20",
"rate": [
{
"id": "TN00001102"
}
],
"roomstosell": "15",
"closed": "1",
"minimumstay": "2",
"maximumstay": "4",
"closedonarrival": "0",
"closedondeparture": "0",
"price": [
{
"NumberOfGuests": "1",
"value": "125.00",
"CurrencyCode": "USD"
},
{
"NumberOfGuests": "2",
"value": "225.00",
"CurrencyCode": "USD"
}
]
},
{
"from": "2020-09-22",
"to": "2020-09-23",
"rate": [
{
"id": "TN00001102"
}
],
"roomstosell": "15",
"closed": "1",
"minimumstay": "2",
"maximumstay": "4",
"closedonarrival": "0",
"closedondeparture": "0",
"price": [
{
"NumberOfGuests": "1",
"value": "125.00",
"CurrencyCode": "USD"
},
{
"NumberOfGuests": "2",
"value": "225.00",
"CurrencyCode": "USD"
}
]
}
]
}
]
}
| FIELD | DESCRIPTION | TYPE | REQUIRED | NOTES |
|---|---|---|---|---|
| hotelid | Pelican’s Hotel ID | string | Required | |
| room [id] | Pelican’s unique room ID | string | Required | |
| date [from] | Specifying a range in requests will update from date allocated in request. | datetime | Required | Format:YYYY-MM-DD. Only current date to max up to 730 days in the future. |
| date [to] | Specifying a range in requests will update to date | datetime | Required | Format:YYYY-MM-DD. Only current date to max up to 730 days in the future. |
| date.rate [id] | Pelican’s unique rateplan ID. | string | Required | max up to 730 days in the future. |
| date [roomsotsell] | The amount of rooms that can be sold by Partner. | integer | Optional | Cannot be a negative number. |
| date [closed] | This room is closed (or opened) | boolean | Optional | 0 = opened, 1 = closed |
| date.price [NumberOfGuests] | Number of guests for which the price is applied. | integer | Optional | Needs to be a non-negative integer, maximum 30. |
| date.price [value] | The price for the given room for the given date for the given rate category. | double | Optional | Price after tax. Price cannot be a negative number. |
| date.price [currencycode] | The rate plan currency sign. | string | Optional | |
| date [minimumstay] | The minimum stay. | integer | Optional | Cannot be a negative number. |
| date [maximumstay] | The maximum stay. | integer | Optional | Cannot be a negative number. |
| date [closedonarrival] | The closed on arrival setting. | boolean | Optional | 0 = opened, 1 = closed |
| date [closedondeparture] | The closed on departure setting. | boolean | Optional | 0 = opened, 1 = closed |
Response Body (JSON):
{
"Status": "Success",
"TicketId": 159870515681827230000
}
2. Reservation Webhook
Reservation Webhook is used to send information about the success or failure of the reservation saving process in Pelican Hub.
Endpoint: POST your_webhook_url
Request Headers:
Authorization: Basic {Authorization String}
Response Codes:
200 OK: Successful receiving information.401 Unauthorized: Invalid or missing API token.
Request Body (JSON):
Payload if reservation is saved successfully:
{
"status": 200,
"reservation_id": "428000011_HT248000013",
"message": "Reservation saved successfully"
}
Payload if reservation saving failed:
{
"status": 400,
"reservation_id": "428000011_HT248000013",
"message": "Rate plan TN25 not found"
}
Response Body (JSON):
{
"status": 200,
}
Pelican Side
Base URL
- Production :
https://cm-hub.bookandlink.com/api/v1 - Demo hotel code : HT05003406
Authentication
This API uses Bearer token authentication. You need to include an Authorization header with your request:
Authorization: Bearer <client_api_token>
You can obtain an API token from API Get Partner (super admin)
Endpoints
1. Get Room and Rate Plan
Endpoint: GET /room-rateplan/{hotel_code}
Description: Retrieve the Room and Rate Plan list for mapping.
Request Headers:
Authorization:Bearer <client_api_token>
Response Codes:
200 OK: Successful retrieval of room and rate plan.401 Unauthorized: Invalid or missing API token.500 Internal Server Error: Something went wrong on our end.
Response Body (JSON):
{
"status": true,
"message": "Rooms successfully retrieved",
"data": [
{
"room_type_code": "RO24016761",
"num_of_room": 5,
"room_type_name": "Basic Double Room",
"room_desc": "-",
"rm_view_desc": null,
"room_size": "20 sqm ",
"disp_ord_num": 4,
"sts_delete": null,
"updater": "AU00000581",
"last_update": "2025-04-08T20:02:07Z",
"sts_uncheck": null,
"sts_actv": null,
"max_child": 2,
"max_adult": 2,
"room_rate": null,
"rate_plans": [
{
"rate_tier_no": "TN24577260",
"rate_tier_code": "TP",
"tier_name": "Testing Plan",
"assigned_for": "A",
"period_from": "2024-10-15T00:00:00Z",
"period_to": "2026-02-27T00:00:00Z",
"remark": null,
"currency_code": "CUR0037",
"inv_tier_no": null,
"exclude_tax": null
},
{
"rate_tier_no": "TN25577586",
"rate_tier_code": "BARRO",
"tier_name": "Room Only Rate",
"assigned_for": "A",
"period_from": "2025-01-13T00:00:00Z",
"period_to": "2027-01-12T00:00:00Z",
"remark": null,
"currency_code": "CUR0037",
"inv_tier_no": null,
"exclude_tax": null
},
{
"rate_tier_no": "TN24577368",
"rate_tier_code": "test3",
"tier_name": "testing plan 3",
"assigned_for": "A",
"period_from": "2024-10-15T00:00:00Z",
"period_to": "2026-02-27T00:00:00Z",
"remark": null,
"currency_code": "CUR0037",
"inv_tier_no": null,
"exclude_tax": null
}
]
},
{
"room_type_code": "RO16013621",
"num_of_room": 35,
"room_type_name": "Premiere Room",
"room_desc": "Our new PREMIERE room, at a spacious 32 square meters and opening onto a Garden Tropical View, has a stylish contemporary design featuring wood and marble furniture. Amenities include a sleek, glass-enclosed bathtub and shower.",
"rm_view_desc": "Room facing panoramic view of the lavishly sized pool with the majestic fountain at the center.",
"room_size": "40 ",
"disp_ord_num": 3,
"sts_delete": null,
"updater": "AU00000581",
"last_update": "2025-04-08T20:02:07Z",
"sts_uncheck": null,
"sts_actv": null,
"max_child": 1,
"max_adult": 3,
"room_rate": null,
"rate_plans": [
{
"rate_tier_no": "TN24577260",
"rate_tier_code": "TP",
"tier_name": "Testing Plan",
"assigned_for": "A",
"period_from": "2024-10-15T00:00:00Z",
"period_to": "2026-02-27T00:00:00Z",
"remark": null,
"currency_code": "CUR0037",
"inv_tier_no": null,
"exclude_tax": null
},
{
"rate_tier_no": "TN25577586",
"rate_tier_code": "BARRO",
"tier_name": "Room Only Rate",
"assigned_for": "A",
"period_from": "2025-01-13T00:00:00Z",
"period_to": "2027-01-12T00:00:00Z",
"remark": null,
"currency_code": "CUR0037",
"inv_tier_no": null,
"exclude_tax": null
},
{
"rate_tier_no": "TN24577368",
"rate_tier_code": "test3",
"tier_name": "testing plan 3",
"assigned_for": "A",
"period_from": "2024-10-15T00:00:00Z",
"period_to": "2026-02-27T00:00:00Z",
"remark": null,
"currency_code": "CUR0037",
"inv_tier_no": null,
"exclude_tax": null
}
]
},
{
"room_type_code": "RO16013624",
"num_of_room": 25,
"room_type_name": "Standard Room",
"room_desc": "With a 15 square meters private wooden deck terrace, the all twin bedded rooms overlooking the garden Superior Garden is designed to be both spacious and blissful.",
"rm_view_desc": "All room faces The Indian Ocean view",
"room_size": "15 ",
"disp_ord_num": 1,
"sts_delete": null,
"updater": "AU00000581",
"last_update": "2025-04-08T20:02:07Z",
"sts_uncheck": null,
"sts_actv": null,
"max_child": 1,
"max_adult": 2,
"room_rate": null,
"rate_plans": [
{
"rate_tier_no": "TN24577260",
"rate_tier_code": "TP",
"tier_name": "Testing Plan",
"assigned_for": "A",
"period_from": "2024-10-15T00:00:00Z",
"period_to": "2026-02-27T00:00:00Z",
"remark": null,
"currency_code": "CUR0037",
"inv_tier_no": null,
"exclude_tax": null
},
{
"rate_tier_no": "TN25577586",
"rate_tier_code": "BARRO",
"tier_name": "Room Only Rate",
"assigned_for": "A",
"period_from": "2025-01-13T00:00:00Z",
"period_to": "2027-01-12T00:00:00Z",
"remark": null,
"currency_code": "CUR0037",
"inv_tier_no": null,
"exclude_tax": null
},
{
"rate_tier_no": "TN24577368",
"rate_tier_code": "test3",
"tier_name": "testing plan 3",
"assigned_for": "A",
"period_from": "2024-10-15T00:00:00Z",
"period_to": "2026-02-27T00:00:00Z",
"remark": null,
"currency_code": "CUR0037",
"inv_tier_no": null,
"exclude_tax": null
}
]
},
{
"room_type_code": "RO16013623",
"num_of_room": 25,
"room_type_name": "Deluxe Room",
"room_desc": "Built on a compound with direct access to well – designed family or company meeting point, each room is thoughtfully decorated in elegance natural Javanese style.",
"rm_view_desc": "All room faces the city view",
"room_size": "15 ",
"disp_ord_num": 2,
"sts_delete": null,
"updater": "AU00000581",
"last_update": "2025-04-08T20:02:07Z",
"sts_uncheck": null,
"sts_actv": null,
"max_child": 1,
"max_adult": 2,
"room_rate": null,
"rate_plans": [
{
"rate_tier_no": "TN24577260",
"rate_tier_code": "TP",
"tier_name": "Testing Plan",
"assigned_for": "A",
"period_from": "2024-10-15T00:00:00Z",
"period_to": "2026-02-27T00:00:00Z",
"remark": null,
"currency_code": "CUR0037",
"inv_tier_no": null,
"exclude_tax": null
},
{
"rate_tier_no": "TN25577586",
"rate_tier_code": "BARRO",
"tier_name": "Room Only Rate",
"assigned_for": "A",
"period_from": "2025-01-13T00:00:00Z",
"period_to": "2027-01-12T00:00:00Z",
"remark": null,
"currency_code": "CUR0037",
"inv_tier_no": null,
"exclude_tax": null
},
{
"rate_tier_no": "TN24577368",
"rate_tier_code": "test3",
"tier_name": "testing plan 3",
"assigned_for": "A",
"period_from": "2024-10-15T00:00:00Z",
"period_to": "2026-02-27T00:00:00Z",
"remark": null,
"currency_code": "CUR0037",
"inv_tier_no": null,
"exclude_tax": null
}
]
},
{
"room_type_code": "RO24016785",
"num_of_room": 5,
"room_type_name": "family room",
"room_desc": "-",
"rm_view_desc": null,
"room_size": null,
"disp_ord_num": 5,
"sts_delete": null,
"updater": "AU00000581",
"last_update": "2025-04-08T20:02:07Z",
"sts_uncheck": null,
"sts_actv": null,
"max_child": 2,
"max_adult": 4,
"room_rate": 10000000,
"rate_plans": [
{
"rate_tier_no": "TN24577260",
"rate_tier_code": "TP",
"tier_name": "Testing Plan",
"assigned_for": "A",
"period_from": "2024-10-15T00:00:00Z",
"period_to": "2026-02-27T00:00:00Z",
"remark": null,
"currency_code": "CUR0037",
"inv_tier_no": null,
"exclude_tax": null
},
{
"rate_tier_no": "TN25577586",
"rate_tier_code": "BARRO",
"tier_name": "Room Only Rate",
"assigned_for": "A",
"period_from": "2025-01-13T00:00:00Z",
"period_to": "2027-01-12T00:00:00Z",
"remark": null,
"currency_code": "CUR0037",
"inv_tier_no": null,
"exclude_tax": null
},
{
"rate_tier_no": "TN24577368",
"rate_tier_code": "test3",
"tier_name": "testing plan 3",
"assigned_for": "A",
"period_from": "2024-10-15T00:00:00Z",
"period_to": "2026-02-27T00:00:00Z",
"remark": null,
"currency_code": "CUR0037",
"inv_tier_no": null,
"exclude_tax": null
}
]
}
]
}
2. Store reservation
Endpoint: POST /reservation
Description: Store the reservation.
Request Headers:
Authorization:Bearer <client_api_token>Content-Type: application/json
Response Codes:
200 OK: Successful save reservation data.401 Unauthorized: Invalid or missing API token.500 Internal Server Error: Something went wrong on our end.
Request Body (JSON):
{
"reservations": [
{
"booked_at": "2025-04-14",
"commissionamount": "0",
"currencycode": "IDR",
"paymenttype": "Channel Collect",
"hotel_id": "HT05003406",
"hotel_name": "Hotel Demo",
"customer": {
"address": "Street View 345",
"city": "Denpasar",
"state": "",
"countrycode": "ID",
"email": "fery@bookandlink.com",
"first_name": "Fery",
"last_name": "BNL",
"remarks": "Approximate time of arrival: between 17:00 and 18:00",
"telephone": "+62 51212345",
"zip": "11230"
},
"rooms": [
{
"arrival_date": "2025-05-20",
"departure_date": "2025-05-21",
"guest_name": "Fery Test",
"first_name": "Fery",
"last_name": "Test",
"id": "RO16013624",
"numberofguests": 2,
"numberofchildren": 0,
"numberofadults": 2,
"roomstaystatus": "new",
"roomreservation_id": "1708675354433",
"totalbeforetax": 359504.13,
"totaltax": 75495.87,
"totalprice": 435000,
"price": [
{
"date": "2025-05-20",
"rate_id": "TN25577585",
"mealplan_id": "15",
"mealplan": "Room only",
"tax": 31500,
"pricebeforetax": 150000,
"priceaftertax": 181500
},
{
"date": "2025-05-21",
"rate_id": "TN25577585",
"mealplan_id": "15",
"mealplan": "Room only",
"tax": 31500,
"pricebeforetax": 150000,
"priceaftertax": 181500
}
],
"addons": [
{
"name": "Breakfast",
"nights": "2",
"priceperunit": 18000,
"pricemode": "4",
"price": 72000
}
]
}
],
"affiliation": {
"pos": "test1.com",
"source": "test1.com",
"OTA_Code": "1"
},
"channel_booking_id": "4282618470",
"processed_at": "2024-02-23 08:02:26",
"id": "4280000018_HT248000013",
"reservation_notif_id": "170867534138555979264",
"modified_at": "2025-04-14",
"status": "new",
"totalprice": 435000,
"totaltax": 75495.87,
"totalroom": 300000,
"totalroomtax": 63000,
"totaladdon": 59504.13,
"totaladdontax": 12495.87
}
]
}
| FIELD | DESCRIPTION | TYPE | REQUIRED | NOTES |
|---|---|---|---|---|
| reservations | - | array of reservation | Required | |
| booked_at | The book date | date | Required | |
| commissionamount | The total commission a hotel has to pay to OTA per complete reservation | doble | Optional | |
| currencycode | The rate plan currency sign | string | Required | |
| paymenttype | Payment type of the reservation. Either Hotel Collect or Channel Collect | string | Required | |
| hotel_id | The hotel id | string | Required | |
| hotel_name | The hotel name | string | Required | |
| customer [address] | The customer's address. | object | Optional | |
| customer [cc_expiration_date] | The customer's cc expiration date. | string | Optional | |
| customer [cc_name] | The customer's cc name. | string | Optional | |
| customer [cc_number] | The customer's cc number. | string | Optional | |
| customer [cc_type] | The customer's cc type. | string | Optional | |
| customer [city] | The customer's city. | string | Optional | |
| customer [state] | The customer's state. | string | Optional | |
| customer [countrycode] | The customer's country code. | string | Optional | |
| customer [email] | The customer's email. | string | Optional | |
| customer [first_name] | The customer's first name. | string | Required | |
| customer [last_name] | The customer's last name. | string | Required | |
| customer [remarks] | The customer's remarks. | string | Optional | |
| customer [telephone] | The customer's telephone. | string | Optional | |
| customer [zip] | The customer's zipcode. | string | Optional | |
| rooms | - | array of room | Required | |
| room [arrival_date] | Date of arrival of the guests. | date | Required | |
| room [departure_date] | Date of departure of the guests. | date | Required | |
| room [guest_name] | The guest's name | string | Required | |
| room [first_name] | The guest's first name | string | Required | |
| room [last_name] | The guest's last name | string | Required | |
| room [id] | The room type ID | string | Required | |
| room [numberofguests] | It is the number of guests for this reservation | integer | Required | |
| room [numberofchildren] | It is the number of children for this reservation. | integer | Optional | |
| room [numberofadults] | It is the number of adults for this reservation | integer | Required | |
| room [roomstaystatus] | The roomstaystatus ('new', 'modified' or 'cancelled') identifies the stay whether it is new, modified, or cancelled. | string | Required | |
| room [roomreservation_id] | The room reservation ID | string | Required | |
| room [totalbeforetax] | The total before tax for the corresponding room | double | Required | |
| room [totaltax] | The total amount of tax for the corresponding room | double | Required | |
| room [totalprice] | The total price for the corresponding room | double | Required | |
| room [price] | Price and rate category ID per night as known at the moment of reservation | double | Required | |
| price [date] | Staying date | date | Required | |
| price [rate_id] | Rate category ID | string | Required | |
| price [mealplan_id] | Meal Plan ID | Required | ||
| price [mealplan] | Meal Plan Name | string | Required | |
| price [tax] | Tax amount per night of reservation | double | Required | |
| price [pricebeforetax] | Room rate amount per night of reservation before tax | double | Required | |
| price [priceaftertax] | Room rate amount per night of reservation after tax | double | Required | |
| room [addons] | Additional services added to the reservation. | array | Optional | |
| addon [name] | The add-on name | string | Optional | |
| addon [nights] | Number of nights this customer has booked the addon for | integer | Optional | |
| addon [priceperunit] | The unitary price for this add-on | double | Optional | |
| addon [pricemode] | An integer identifying the price mode (per stay, per night, per person per night). | integer | Optional | |
| addon [price] | The total calculated price for the add-on, taking into consideration the price mode. | double | Optional | |
| room [extrcomponents] | The tag contains details of all Extra / Other charges charged on a room. | array | Optional | |
| extracomponent [name] | The extracomponent's name | string | Optional | |
| extracomponent [value] | The extracomponent's value | double | Optional | |
| affiliation | Source Information of reservation. | object | Required | |
| affiliation [pos] | Point of sale of reservation. | string | Required | |
| affiliation [source] | Source of reservation. | string | Required | |
| affiliation [OTA_Code] | Source of reservation. | number | Required | |
| channel_booking_id | Booking reference number of OTA/Partner | string | Required | |
| processed_at | Date and Time Stamp (HH:MM:SS) when the booking was processed (GMT Time). | datetime | Required | |
| id | The reservation ID | string | Required | |
| reservation_notif_id | The reservation notification ID used to mark reservation as received. | string | Required | |
| modified_at | The book/modify/cancel date | date | Required | |
| status | The reservation status ('new', 'modified' or 'cancelled'). | string | Required | |
| totalprice | The total amount of reservation. All rooms, all addons including Taxes. | double | Required | |
| totaltax | The total amount of tax for this reservation. All rooms, all addons combined. | double | Required | |
| totalroom | The total amount of room sales of this reservation. All rooms * all nights combined | double | Required | |
| totalroomtax | The total amount of tax for room sales. All rooms * all nights combined. | double | Required | |
| totaladdon | The total amount of addon sales of this reservation. | double | Required | |
| totaladdontax | The total amount of tax for addon sales | double | Required |
Response Body (JSON):
{
"status": true,
"message": "Save Reservation successfully"
"data": null
}
Super admin
Base URL
- Production :
https://cm-hub.bookandlink.com/api/v1
Authentication
This API uses Bearer token authentication. You need to include an Authorization header with your request:
Authorization: Bearer <super_admin_token>
Endpoints
1. Get Partners
Endpoint: GET /partner
Description: get all partner.
Request Headers:
Authorization:Bearer <super_admin_token>Content-Type: application/json
Response Codes:
200 OK: Successful retrieve partner.401 Unauthorized: Invalid or missing API token.500 Internal Server Error: Something went wrong on our end.
Response Body (JSON):
{
"status": true,
"message": "Partners successfully retrieved",
"data": [
{
"id": 1,
"name": "Tripla",
"code": "tripla",
"config": {
"partner_token": "Basic e10adc3949ba59abbe56e",
"pelican_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiR2VuZXJhdGVkQX",
"ari_url": "https://pms-api.bookandlink.com/pelican/pelican.php",
"reservation_webhook_url": "https://webhook.site/7eb988a7-a11f-4395-a2c3-415ec15f593b",
"ip_whitelist": "161.202.29.37,172.232.234.12,18.142.187.65,52.76.32.96,54.254.16.25,161.202.29.38,127.0.0.1"
},
"status": true,
"created_at": "2025-05-29T11:27:27.6868495+08:00",
"updated_at": "2025-05-29T11:31:11.7126867+08:00"
}
]
}
2. Get Partner by id
Endpoint: GET /partner/{id}
Description: get partner by id.
Request Headers:
Authorization:Bearer <super_admin_token>Content-Type: application/json
Response Codes:
200 OK: Successful retrieve partner.401 Unauthorized: Invalid or missing API token.500 Internal Server Error: Something went wrong on our end.
Response Body (JSON):
{
"status": true,
"message": "Partners successfully retrieved",
"data": {
"id": 1,
"name": "Tripla",
"code": "tripla",
"config": {
"partner_token": "Basic e10adc3949ba59abbe56e",
"pelican_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiR",
"ari_url": "https://pms-api.bookandlink.com/pelican/pelican.php",
"reservation_webhook_url": "https://pms-api.bookandlink.com/pelican/reservation/pelican_confrmation.php",
"ip_whitelist": "161.202.29.37,172.232.234.12,18.142.187.65,52.76.32.96,54.254.16.25,161.202.29.38"
},
"status": true,
"created_at": "2025-05-29T06:19:38.6237282Z",
"updated_at": "2025-05-29T06:25:22.9909483Z"
}
}
3. Add Partner
Endpoint: POST /partner
Description: insert new partner.
Request Headers:
Authorization:Bearer <super_admin_token>Content-Type: application/json
Response Codes:
200 OK: Successful add partner.401 Unauthorized: Invalid or missing API token.500 Internal Server Error: Something went wrong on our end.
Request Body (JSON):
{
"name": "Tripla",
"code": "tripla",
"config": {
"partner_token": "Basic e10adc3949ba59abbe56e0",
"ari_url": "https://webhook.site/7eb988a7-a11f-4395-a2c3-415ec15f593b",
"reservation_webhook_url": "https://webhook.site/7eb988a7-a11f-4395-a2c3-415ec15f593b",
"ip_whitelist": "127.0.0.1"
},
"status": true
}
Response Body (JSON):
{
"status": true,
"message": "Partner added successfully",
"data": {
"id": 1,
"name": "Tripla",
"code": "tripla",
"config": {
"partner_token": "Basic e10adc3949ba59abbe56e0",
"pelican_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiR2VuZXJhdGVkQXQi",
"ari_url": "https://webhook.site/7eb988a7-a11f-4395-a2c3-415ec15f593b",
"reservation_webhook_url": "https://webhook.site/7eb988a7-a11f-4395-a2c3-415ec15f593b",
"ip_whitelist": "161.202.29.37,172.232.234.12,18.142.187.65,52.76.32.96,54.254.16.25,161.202.29.38,127.0.0.1"
},
"status": true,
"created_at": "2025-05-29T06:19:38.623728254Z",
"updated_at": "2025-05-29T06:19:38.672190795Z"
}
}
4. Update Partner
Endpoint: PUT /partner/{id}
Description: update partner by id.
Request Headers:
Authorization:Bearer <super_admin_token>Content-Type: application/json
Response Codes:
200 OK: Successful update partner.401 Unauthorized: Invalid or missing API token.500 Internal Server Error: Something went wrong on our end.
Request Body (JSON):
{
"name": "Tripla",
"code": "tripla",
"config": {
"partner_token": "Basic e10adc3949ba59abbe56e0",
"ari_url": "https://webhook.site/7eb988a7-a11f-4395-a2c3-415ec15f593b",
"reservation_webhook_url": "https://webhook.site/7eb988a7-a11f-4395-a2c3-415ec15f593b",
"ip_whitelist": "127.0.0.1"
},
"status": true
}
Response Body (JSON):
{
"status": true,
"message": "Partner added successfully",
"data": {
"id": 1,
"name": "Tripla",
"code": "tripla",
"config": {
"partner_token": "Basic e10adc3949ba59abbe56e0",
"pelican_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiR2VuZXJhdGVkQXQi",
"ari_url": "https://webhook.site/7eb988a7-a11f-4395-a2c3-415ec15f593b",
"reservation_webhook_url": "https://webhook.site/7eb988a7-a11f-4395-a2c3-415ec15f593b",
"ip_whitelist": "127.0.0.1"
},
"status": true,
"created_at": "2025-05-29T06:19:38.623728254Z",
"updated_at": "2025-05-29T06:19:38.672190795Z"
}
}
5. Regenreate Partner Token
Endpoint: PUT /partner/{id}/generate-token
Description: update partner by id.
Request Headers:
Authorization:Bearer <super_admin_token>Content-Type: application/json
Response Codes:
200 OK: Successful update partner.401 Unauthorized: Invalid or missing API token.500 Internal Server Error: Something went wrong on our end.
Response Body (JSON):
{
"status": true,
"message": "Partner added successfully",
"data": {
"id": 1,
"name": "Tripla",
"code": "tripla",
"config": {
"partner_token": "Basic e10adc3949ba59abbe56e0",
"pelican_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiR2VuZXJhdGVkQXQi",
"ari_url": "https://webhook.site/7eb988a7-a11f-4395-a2c3-415ec15f593b",
"reservation_webhook_url": "https://webhook.site/7eb988a7-a11f-4395-a2c3-415ec15f593b",
"ip_whitelist": "127.0.0.1"
},
"status": true,
"created_at": "2025-05-29T06:19:38.623728254Z",
"updated_at": "2025-05-29T06:19:38.672190795Z"
}
}