Programs
List programs
Returns all publicly available programs belonging to the authenticated partner.
- HTTP METHOD
- GET
- PATH
/v1/programs- PURPOSE
- Token kiracısına ait yayımlanabilir programları listeler.
- AUTHENTICATION
- Bearer token
- REQUIRED SCOPE
programs.read- PATH PARAMETERS
- None
- QUERY PARAMETERS
- None
- REQUEST BODY
- None
- RESPONSE
- 200 JSON
ProgramListResponse - ERRORS
- 401, 403, 405, 429, 500
Canonical runtime URL: https://api.sefera.com.tr/v1/programs
Yalnızca yayımlanabilir programlar döner. remaining = 0 olan dolu programlar listelenmeye devam eder. Taslak, iptal, tamamlanmış, arşiv ve bitmiş programlar dönmez.
Liste öğesinde duration, durationDays, category, guide ve prices.startingAmount bulunabilir. Yeni alanlar optional/nullable olabilir.
Request
Headers
| Field | Type | Description | |
|---|---|---|---|
Authorization |
string | required | Bearer <partner_token> |
Accept |
string | optional | application/json |
X-Request-Id |
string | optional | Optional client id, echoed when valid |
QUERY PARAMETERS: None. REQUEST BODY: None.
Response
- 200ProgramListResponse
- 401unauthorized
- 403forbidden
- 429rate_limit_exceeded
- 500internal_error
Schema
| Field | Type | Description | |
|---|---|---|---|
id |
string | required | Firestore tour document id |
name |
string | required | |
status |
string | required | Stable public lifecycle. Publishable programs are always active. |
departureDate |
string | null | optional | |
returnDate |
string | null | optional | |
durationDays |
integer | null | optional | Inclusive date-only difference |
duration |
Duration | optional | Days and nights when both travel dates exist |
capacity |
Capacity | required | |
currency |
string | null | optional | |
category |
Category | optional | Display category |
guide |
Guide | optional | Guide display name only |
prices |
Prices | required |
Examples
-kw">curl -sS \
-H "Authorization: Bearer $SEFERA_PARTNER_TOKEN" \
-H "Accept: application/json" \
"https://api.sefera.com.tr/v1/programs"
const token = process.env.SEFERA_PARTNER_TOKEN;
const base = 'https://api.sefera.com.tr';
const res = await fetch(`${base}/v1/programs`, {
headers: { Authorization: `Bearer ${token}` },
});
if (!res.ok) {
throw new Error(`Partner API HTTP ${res.status}`);
}
const payload = await res.json();
<?php
$token = getenv('SEFERA_PARTNER_TOKEN');
$base = 'https://api.sefera.com.tr';
$ch = curl_init($base . '/v1/programs');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token,
'Accept: application/json',
],
]);
$body = curl_exec($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($code !== 200) {
throw new RuntimeException('Partner API HTTP ' . $code);
}
$payload = json_decode($body, true);
{
"data": [
{
"id": "abc123",
"name": "15 Günlük Umre",
"status": "active",
"departureDate": "2026-10-12",
"returnDate": "2026-10-25",
"durationDays": 14,
"duration": {
"days": 14,
"nights": 13
},
"capacity": {
"total": 45,
"used": 23,
"remaining": 22
},
"currency": "USD",
"category": { "type": "Yurt Dışı", "subtype": "Umre" },
"guide": { "name": "Rehber Adı" },
"prices": {
"startingAmount": 1950,
"rooms": [
{
"occupancy": 2,
"amount": 1950
}
],
"children": [
{
"minAge": 2,
"maxAge": 7,
"amount": 1400
}
]
}
}
],
"meta": {
"count": 1
}
}
Request
-kw">curl -sS \
-H "Authorization: Bearer $SEFERA_PARTNER_TOKEN" \
-H "Accept: application/json" \
"https://api.sefera.com.tr/v1/programs"
const token = process.env.SEFERA_PARTNER_TOKEN;
const base = 'https://api.sefera.com.tr';
const res = await fetch(`${base}/v1/programs`, {
headers: { Authorization: `Bearer ${token}` },
});
if (!res.ok) {
throw new Error(`Partner API HTTP ${res.status}`);
}
const payload = await res.json();
<?php
$token = getenv('SEFERA_PARTNER_TOKEN');
$base = 'https://api.sefera.com.tr';
$ch = curl_init($base . '/v1/programs');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token,
'Accept: application/json',
],
]);
$body = curl_exec($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($code !== 200) {
throw new RuntimeException('Partner API HTTP ' . $code);
}
$payload = json_decode($body, true);
Response
{
"data": [
{
"id": "abc123",
"name": "15 Günlük Umre",
"status": "active",
"departureDate": "2026-10-12",
"returnDate": "2026-10-25",
"durationDays": 14,
"duration": {
"days": 14,
"nights": 13
},
"capacity": {
"total": 45,
"used": 23,
"remaining": 22
},
"currency": "USD",
"category": { "type": "Yurt Dışı", "subtype": "Umre" },
"guide": { "name": "Rehber Adı" },
"prices": {
"startingAmount": 1950,
"rooms": [
{
"occupancy": 2,
"amount": 1950
}
],
"children": [
{
"minAge": 2,
"maxAge": 7,
"amount": 1400
}
]
}
}
],
"meta": {
"count": 1
}
}