UKK Kereta API 2025
  1. Kereta
UKK Kereta API 2025
  • Getting Started
  • Version
    • Version
      GET
  • Auth
    • Sign Up
      POST
    • Sign In
      POST
    • Sign Out
      POST
  • User
    • Create User
      POST
    • Find User
      GET
    • Find Many User
      GET
    • Update User
      PATCH
    • Delete User
      DELETE
  • Kereta
    • Create Kereta
      POST
    • Find Kereta
      GET
    • Find Many Kereta
      GET
    • Find Many Kereta Filter
      GET
    • Update Kereta
      PATCH
    • Delete Kereta
      DELETE
  • Pelanggan
    • Create Pelanggan
      POST
    • Find Pelanggan
      GET
    • Find Many Pelanggan
      GET
    • Update Pelanggan
      PATCH
    • Delete Pelanggan
      DELETE
  • Gerbong
    • Create Gerbong
      POST
    • Find Gerbong
      GET
    • Find Many Gerbong
      GET
    • Update Gerbong
      PATCH
    • Untitled Endpoint
      DELETE
  • Kursi
    • Create Kursi
    • Find Kursi
    • Find Many Kursi
    • Update Kursi
    • Delete Kursi
  • Jadwal
    • Create Jadwal
    • Find Jadwal
    • Find Many Jadwal
    • Update Jadwal
    • Delete Jadwal
  • Pembelian Tiket
    • Create Pembelian Tiket
    • Find Many Pembelian Tiket History
    • Find Many Pemasukan Pembelian Tiket
    • Find Pembelian Tiket Nota
  1. Kereta

Update Kereta

Developing
PATCH
/kereta/{id}
Maintainer:Muhammad Fadhil Kholaf
Update existing kereta.

Request

Path Params
id
string 
required
Cookie Params
token
string 
required
Body Params application/json
namaKereta
string 
optional
deskripsi
string 
optional
kelas
enum<string> 
optional
Allowed values:
ekonomibisniseksekutifluxury
Example
{
    "namaKereta": "string",
    "deskripsi": "string",
    "kelas": "ekonomi"
}

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 PATCH 'https://kereta.api.fadhilkholaf.my.id/kereta/' \
--header 'Cookie: token=' \
--header 'Content-Type: application/json' \
--data-raw '{
    "namaKereta": "string",
    "deskripsi": "string",
    "kelas": "ekonomi"
}'

Responses

🟢200Success
application/json
Body
message
string 
required
data
object (Kereta) 
required
id
string 
required
namaKereta
string 
required
deskripsi
string 
required
kelas
enum<string> 
required
Allowed values:
ekonomibisniseksekutifluxury
createdAt
string 
required
updatedAt
string 
required
Example
{
    "message": "string",
    "data": {
        "id": "string",
        "namaKereta": "string",
        "deskripsi": "string",
        "kelas": "ekonomi",
        "createdAt": "string",
        "updatedAt": "string"
    }
}
🔴500Server Error
🟠401Unauthorized
🟠404Not Found
Previous
Find Many Kereta Filter
Next
Delete Kereta
Built with