Skip to main content

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

  1. Room Inventory count (per Pelican's Room and Rate combination, per date)
  2. Room Rate amount (per Pelican's Room and Rate combination, per date)
  3. 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"
}
]
}
]
}
]
}
FIELDDESCRIPTIONTYPEREQUIREDNOTES
hotelidPelican’s Hotel IDstringRequired
room [id]Pelican’s unique room IDstringRequired
date [from]Specifying a range in requests will update from date allocated in request.datetimeRequiredFormat: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 datedatetimeRequiredFormat:YYYY-MM-DD. Only current date to max up to 730 days in the future.
date.rate [id]Pelican’s unique rateplan ID.stringRequiredmax up to 730 days in the future.
date [roomsotsell]The amount of rooms that can be sold by Partner.integerOptionalCannot be a negative number.
date [closed]This room is closed (or opened)booleanOptional0 = opened, 1 = closed
date.price [NumberOfGuests]Number of guests for which the price is applied.integerOptionalNeeds 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.doubleOptionalPrice after tax. Price cannot be a negative number.
date.price [currencycode]The rate plan currency sign.stringOptional
date [minimumstay]The minimum stay.integerOptionalCannot be a negative number.
date [maximumstay]The maximum stay.integerOptionalCannot be a negative number.
date [closedonarrival]The closed on arrival setting.booleanOptional0 = opened, 1 = closed
date [closedondeparture]The closed on departure setting.booleanOptional0 = 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
}
]
}
FIELDDESCRIPTIONTYPEREQUIREDNOTES
reservations-array of reservationRequired
booked_atThe book datedateRequired
commissionamountThe total commission a hotel has to pay to OTA per complete reservationdobleOptional
currencycodeThe rate plan currency signstringRequired
paymenttypePayment type of the reservation. Either Hotel Collect or Channel CollectstringRequired
hotel_idThe hotel idstringRequired
hotel_nameThe hotel namestringRequired
customer [address]The customer's address.objectOptional
customer [cc_expiration_date]The customer's cc expiration date.stringOptional
customer [cc_name]The customer's cc name.stringOptional
customer [cc_number]The customer's cc number.stringOptional
customer [cc_type]The customer's cc type.stringOptional
customer [city]The customer's city.stringOptional
customer [state]The customer's state.stringOptional
customer [countrycode]The customer's country code.stringOptional
customer [email]The customer's email.stringOptional
customer [first_name]The customer's first name.stringRequired
customer [last_name]The customer's last name.stringRequired
customer [remarks]The customer's remarks.stringOptional
customer [telephone]The customer's telephone.stringOptional
customer [zip]The customer's zipcode.stringOptional
rooms-array of roomRequired
room [arrival_date]Date of arrival of the guests.dateRequired
room [departure_date]Date of departure of the guests.dateRequired
room [guest_name]The guest's namestringRequired
room [first_name]The guest's first namestringRequired
room [last_name]The guest's last namestringRequired
room [id]The room type IDstringRequired
room [numberofguests]It is the number of guests for this reservationintegerRequired
room [numberofchildren]It is the number of children for this reservation.integerOptional
room [numberofadults]It is the number of adults for this reservationintegerRequired
room [roomstaystatus]The roomstaystatus ('new', 'modified' or 'cancelled') identifies the stay whether it is new, modified, or cancelled.stringRequired
room [roomreservation_id]The room reservation IDstringRequired
room [totalbeforetax]The total before tax for the corresponding roomdoubleRequired
room [totaltax]The total amount of tax for the corresponding roomdoubleRequired
room [totalprice]The total price for the corresponding roomdoubleRequired
room [price]Price and rate category ID per night as known at the moment of reservationdoubleRequired
price [date]Staying datedateRequired
price [rate_id]Rate category IDstringRequired
price [mealplan_id]Meal Plan IDRequired
price [mealplan]Meal Plan NamestringRequired
price [tax]Tax amount per night of reservationdoubleRequired
price [pricebeforetax]Room rate amount per night of reservation before taxdoubleRequired
price [priceaftertax]Room rate amount per night of reservation after taxdoubleRequired
room [addons]Additional services added to the reservation.arrayOptional
addon [name]The add-on namestringOptional
addon [nights]Number of nights this customer has booked the addon forintegerOptional
addon [priceperunit]The unitary price for this add-ondoubleOptional
addon [pricemode]An integer identifying the price mode (per stay, per night, per person per night).integerOptional
addon [price]The total calculated price for the add-on, taking into consideration the price mode.doubleOptional
room [extrcomponents]The tag contains details of all Extra / Other charges charged on a room.arrayOptional
extracomponent [name]The extracomponent's namestringOptional
extracomponent [value]The extracomponent's valuedoubleOptional
affiliationSource Information of reservation.objectRequired
affiliation [pos]Point of sale of reservation.stringRequired
affiliation [source]Source of reservation.stringRequired
affiliation [OTA_Code]Source of reservation.numberRequired
channel_booking_idBooking reference number of OTA/PartnerstringRequired
processed_atDate and Time Stamp (HH:MM:SS) when the booking was processed (GMT Time).datetimeRequired
idThe reservation IDstringRequired
reservation_notif_idThe reservation notification ID used to mark reservation as received.stringRequired
modified_atThe book/modify/cancel datedateRequired
statusThe reservation status ('new', 'modified' or 'cancelled').stringRequired
totalpriceThe total amount of reservation. All rooms, all addons including Taxes.doubleRequired
totaltaxThe total amount of tax for this reservation. All rooms, all addons combined.doubleRequired
totalroomThe total amount of room sales of this reservation. All rooms * all nights combineddoubleRequired
totalroomtaxThe total amount of tax for room sales. All rooms * all nights combined.doubleRequired
totaladdonThe total amount of addon sales of this reservation.doubleRequired
totaladdontaxThe total amount of tax for addon salesdoubleRequired

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"
}
}