Sync PLN E API
Partner machine-to-machine APIs for SPPD sync. Auth uses the Customer travel request
API key (amy_live_…) as client_secret, exchanged for a short-lived access token.
Protected calls send Authorization: <access_token> with no Bearer prefix.
Rules of thumb
- Create the key in corp Config → Profile → Customer travel request API (
amy_live_…).
- Transport submit locks the SPPD to flight only; hotel submit locks hotel only.
- Same
noreg on both products merges into Hotel + Flight.
- Detail tax: DPP = 1.9% of price; PPN = 11% of DPP. Train arrays stay empty for now.
GET/POST
/external/auth
Get access token
Canonical: GET with query client_secret
(the Customer travel request API key amy_live_…).
Same key also works as Bearer on /api/v1/integration/requests.
POST with JSON body is also accepted. Alias: /external/auth/accesstoken.
Request (GET)
GET /external/auth?client_secret=amy_live_…
Response
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expired": 3600
}
POST
/external/submit/transport
Submit transport
Create or merge a draft travel request as flight_only. Required: noreg, chargeCode, pic, dates, dataDestination.
{
"chargeCode": "P.5.I5.A3.23.01",
"noreg": "0002/SPPD/PLN-E/08/2026",
"pic": "traveler@example.com",
"departureDate": 1786875620,
"returnDate": 1797416420,
"description": "SPPD flight",
"tax": "VATI-11",
"dataDestination": [
{ "destination_no": 1, "from": "JAKARTA", "to": "DENPASAR", "departure_date": 1786962020 }
],
"passengers": ["traveler@example.com"]
}
POST
/external/submit/hotel
Submit hotel
Create or merge as hotel_only. Same noreg after transport upgrades to Hotel + Flight.
{
"chargeCode": "P.5.I5.A3.23.01",
"noreg": "0002/SPPD/PLN-E/08/2026",
"pic": "traveler@example.com",
"startDate": 1775667600,
"endDate": 1776693606,
"ticket": "Hotel",
"guests": ["traveler@example.com"],
"dataDestination": [
{
"destination_no": 1,
"location": { "id": "", "name": "SURABAYA" },
"checkInDate": 1775754000,
"checkOutDate": 1775840400,
"numRooms": "1"
}
]
}
GET
/external/trip/detail?id=<noreg>
Trip detail
Returns pesawat / hotel lines for an SPPD. Each priced line includes
total (price), dpp (1.9% of price), and ppn (11% of DPP).
Service-fee arrays echo DPP/PPN for partner reconciliation.
keterangan_train and servicefee_train are always empty for now.
{
"code": 200,
"error": false,
"message": "Request Successful",
"data": {
"charge_code": "P.5.I5.A3.23.01",
"jenis": "Tiket Pesawat & Hotel",
"noreg": "0002/SPPD/PLN-E/08/2026",
"keterangan_pesawat": [
{
"departure_date": "2026-08-16",
"dpp": 19000,
"ppn": 2090,
"from_to": "JAKARTA - DENPASAR",
"total": 1000000,
"status": "DRAFT"
}
],
"keterangan_hotel": [],
"keterangan_train": [],
"servicefee_pesawat": [],
"servicefee_hotel": [],
"servicefee_train": []
}
}
GET
/external/trip
List / filter trips
Optional query: id (noreg), start_date, end_date in DD-MM-YYYY.
GET /external/trip?start_date=01-08-2026&end_date=31-08-2026
{
"code": 200,
"error": false,
"message": "Request Successful",
"data": [
{
"noreg": "0002/SPPD/PLN-E/08/2026",
"charge_code": "P.5.I5.A3.23.01",
"jenis": "Tiket Pesawat",
"departure_date": "2026-08-16",
"return_date": "2026-12-16",
"status": "DRAFT"
}
]
}