post
https://{URL}/v1/open-api/transports/block-seat
This method involves a POST request to retrieve blocked seats provided by Klikoo’s B2B.
A. Request Header
| Field | Format | Mandatory | Length | Example |
|---|---|---|---|---|
| Content-Type | string | Y | application/json | |
| Open-Api-Timestamp | yyyy-mm-dd'T'hh:mm:ss+07:00 | Y | 2024-02-07T10:28:35.000+07:0 | |
| Open-Api-Signature | Digital Signature | Y | 88 | vNMoAmiDRV+paVyD5FaidgI5k Ry2pCo8oEoQN/GBpIPuO3eicY 63b7xY0WDffScvkOZsZ1442ewa bI7Wzd22pw== |
B. Request Body
| Field | Type | Description | Required | Example |
|---|---|---|---|---|
| product_code | string | Unique identifier for the product | true | "BUS" |
| selling_price | string | The selling price of the product | true | “20000” |
| partner_reference_no | string | The partner’s reference number for the order | true | “1238” |
| order_detail | object | An object containing details about the order | true | |
name | string | The name of the person placing the order | true | “Pandu” |
email | string | The email address of the person placing the order | true | pdputra @pvg.co.id |
phone_number | string | The phone number of the person placing the order | true | “082122274139” |
| departure | object | An object containing details about the departure | true | |
trip_id | int | The ID of the trip for the departure | true | 188336 |
| passengers | array of objects | An array of objects representing the passengers | true | |
seat_name | string | The name or number of the passenger’s seat seat name obtained from API Get Trip Detail | true | “8” |
name | string | The name of the passenger | true | “Pandu” |
dob | string | The date of birth of the passenger | true | "1996-12-09" |
gender | string | The gender of the passenger | true | "male" |
id_card_number | string | The ID card number of the passenger | true | "3174100921 9923332" |
| return | object | An object containing details about the returned (if round trip) | true | |
seat_name | string | The name or number of the passenger’s seat seat name obtained from API Get Trip Detail | true | “9” |
name | string | The name of the passenger | true | “Pandu” |
dob | string | The date of birth of the passenger | true | “1996-12-09" |
gender | string | The gender of the passenger | true | "male" |
id_card_number | string | The ID card number of the passenger | true | "31741009219 923332" |
C. Sample Request
{
"product_code": "BUS",
"selling_price": "20000",
"partner_reference_no": "1238",
"order_detail": {
"name": "Pandu",
"email": "[email protected]",
"phone_number": "082122274139"
},
"departure": {
"trip_id": 188336,
"passengers": [
{
"seat_name": "8",
"name": "Pandu",
"dob": "1996-12-09",
"gender": "male",
"id_card_number": "31741009219923332"
}
]
},
"return": null
}
D. Response Body
| Field | Type | Description | Example |
|---|---|---|---|
| response_code | string | Contains the OpenAPI response code | “201052001” |
| response_message | string | Contains the value of OpenAPI response message | “Berhasil dibuat” |
| data | object | The object containing the main data of block seat info | |
transaction_id | string | The unique identifier for the transaction | "14429004" |
status | string | The status of the transaction | "WAITING" |
expired_at | string | The expiration date and time of the transaction | "2024-04-30T07:56:28+07:00" |
E. Sample Response
{
"response_code": "201052001",
"response_message": "Berhasil dibuat",
"data": {
"transaction_id": "14429004",
"status": "WAITING",
"expired_at": "2024-04-30T07:56:28+07:00"
}
}
Try It Here (Form)
To try the following endpoint, enter the example request data you want to use in the following form