گام ۲ — یک صندلی از سفر موردنظر را برای مدت کوتاهی نگه میدارد و یک کد رزرو برای مرحله تأیید برمیگرداند.
| پارامتر | محل | نوع | الزامی |
|---|---|---|---|
tripCodeکد سفری که از جستوجوی سفر دریافت شده است | body | string | الزامی |
isPrivateدربستی یا صندلی (برای سفرهای دربستی مقداری لازم ندارد) | body | boolean | الزامی |
seatnumberشماره صندلی (اختیاری) | body | integer (1–3) | اختیاری |
curl -s -X POST "https://ors.shoofer.taxi/Tickets/reserverTemporarily" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tripCode": "A3F92K7",
"isPrivate": false,
"seatnumber": 2
}'const res = await fetch("https://ors.shoofer.taxi/Tickets/reserverTemporarily", {
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json"
},
body: JSON.stringify({ tripCode: "A3F92K7", isPrivate: false, seatnumber: 2 })
});
const { ticketCode } = await res.json();resp = requests.post(
"https://ors.shoofer.taxi/Tickets/reserverTemporarily",
headers={"Authorization": f"Bearer {token}"},
json={"tripCode": "A3F92K7", "isPrivate": False, "seatnumber": 2},
)
ticket_code = resp.json()["ticketCode"]var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var res = await client.PostAsJsonAsync("https://ors.shoofer.taxi/Tickets/reserverTemporarily", new
{
tripCode = "A3F92K7",
isPrivate = false,
seatnumber = 2
});
var body = await res.Content.ReadFromJsonAsync<JsonElement>();
var ticketCode = body.GetProperty("ticketCode").GetString();{
"message": "Ticket has successfully reserved for 10 minutes.",
"ticketCode": "12345678",
"otaSellerName": "Parsian Travel",
"seatnumber": "1",
"virtualTripCode": null
}The ticketCode in this response is the value you pass as reservationCode to confirmReserve below — the reservation and the ticket it becomes share the same code throughout the flow.
.png)