- Getting Started
- Version
- Auth
- User
- Kereta
- Pelanggan
- Gerbong
- Kursi
- Jadwal
- Pembelian Tiket
Create Gerbong
Developing
POST
/gerbong
Maintainer:Muhammad Fadhil Kholaf
Request
Cookie Params
token
string
required
Body Params application/json
namaGerbong
string
required
kuota
number
required
keretaId
string
required
Example
{
"namaGerbong": "string",
"kuota": 0,
"keretaId": "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/gerbong' \
--header 'Cookie: token=' \
--header 'Content-Type: application/json' \
--data-raw ''
Responses
🟢201Created
application/json
Body
message
string
required
data
object (Gerbong)
required
id
string
required
namaGerbong
string
required
kuota
number
required
keretaId
string
required
createdAt
string
required
updatedAt
string
required
Example
{
"message": "string",
"data": {
"id": "string",
"namaGerbong": "string",
"kuota": 0,
"keretaId": "string",
"createdAt": "string",
"updatedAt": "string"
}
}
🔴500Server Error
🟠401Unauthorized
🟠400Bad Request
🟠404Not Found
🟠409Conflict
Modified at 2025-03-17 01:45:07