- Getting Started
- Version
- Auth
- User
- Kereta
- Pelanggan
- Gerbong
- Kursi
- Jadwal
- Pembelian Tiket
Create Pembelian Tiket
Developing
POST
/pembelian-tiket
Maintainer:Muhammad Fadhil Kholaf
Request
Cookie Params
token
string
required
Body Params application/json
pelangganId
string
required
jadwalId
string
required
detailPembelianTiket
array [object {3}]
required
nik
string
required
namaPenumpang
string
required
kursiId
string
required
Example
{
"pelangganId": "string",
"jadwalId": "string",
"detailPembelianTiket": [
{
"nik": "string",
"namaPenumpang": "string",
"kursiId": "string"
}
]
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://kereta.api.fadhilkholaf.my.id/pembelian-tiket' \
--header 'Cookie: token=' \
--header 'Content-Type: application/json' \
--data-raw ''
Responses
🟢200OK
application/json
Body
message
string
required
data
object (Pembelian Tiket)
required
id
string
required
pelangganId
string
required
jadwalId
string
required
createdAt
string
required
updatedAt
string
required
Example
{
"message": "string",
"data": {
"id": "string",
"pelangganId": "string",
"jadwalId": "string",
"createdAt": "string",
"updatedAt": "string"
}
}
🔴500Server Error
🟠401Unauthorized
🟠400Bad Request
🟠404Not Found
🟠409Conflict
Modified at 2025-03-17 13:12:30