Programs

List programs

Returns all publicly available programs belonging to the authenticated partner.

GET /v1/programs
Bearer tokenServer-to-serverOpenAPI
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://sefera-api.web.app/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.

Her liste öğesinde programNumber bulunur: acenta panelindeki “No. N” program numarasıdır, acenta içinde benzersizdir ve değişmez; numarası olmayan eski programlarda null döner. Liste öğesinde ayrıca duration, durationDays, category ve prices.startingAmount bulunabilir. Yeni alanlar optional/nullable olabilir.

Request

Headers

FieldTypeDescription
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

FieldTypeDescription
id string required Firestore tour document id
programNumber integer | null required Program number shown as "No. N" in the agency panel. Unique per agency, assigned once when the program is created and never reused or changed. Always present; null for older programs without an assigned number. Same value on list and detail.
name string required
status string required Stable public lifecycle. Publishable programs are always active.
departureDate string | null optional Program start calendar date (YYYY-MM-DD, Europe/Istanbul)
returnDate string | null optional Program end calendar date (YYYY-MM-DD, Europe/Istanbul)
durationDays integer | null optional Inclusive calendar-day difference between departureDate and returnDate
duration Duration optional Days and nights when both travel dates exist
capacity Capacity required
currency string | null optional
category Category optional Display category
prices Prices required

Examples

cURL
-kw">curl -sS \
  -H "Authorization: Bearer $SEFERA_PARTNER_TOKEN" \
  -H "Accept: application/json" \
  "https://sefera-api.web.app/v1/programs"
JSON
{
  "data": [
    {
      "id": "abc123",
      "programNumber": 31,
      "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" },
      "prices": {
        "startingAmount": 1950,
        "rooms": [
          {
            "occupancy": 2,
            "amount": 1950
          }
        ],
        "children": [
          {
            "minAge": 2,
            "maxAge": 7,
            "amount": 1400
          }
        ]
      }
    }
  ],
  "meta": {
    "count": 1
  }
}

Request

cURL
-kw">curl -sS \
  -H "Authorization: Bearer $SEFERA_PARTNER_TOKEN" \
  -H "Accept: application/json" \
  "https://sefera-api.web.app/v1/programs"

Response

JSON
{
  "data": [
    {
      "id": "abc123",
      "programNumber": 31,
      "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" },
      "prices": {
        "startingAmount": 1950,
        "rooms": [
          {
            "occupancy": 2,
            "amount": 1950
          }
        ],
        "children": [
          {
            "minAge": 2,
            "maxAge": 7,
            "amount": 1400
          }
        ]
      }
    }
  ],
  "meta": {
    "count": 1
  }
}