> ## Documentation Index
> Fetch the complete documentation index at: https://docs.seyaha.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Reseller Quickstart

> Get your first booking in four steps using the Reseller API.

Resellers embed Seyaha's activity catalog and booking flow into their own platforms.
Authentication uses a static API token — no user login flow needed.

<Steps>
  <Step title="Get your API token">
    Contact your Seyaha account manager or email `tech@seyaha.net` to get a reseller
    account and API token. Tokens look like `rsl_live_abc123...` and don't expire.

    Set the token in every request via the `x-api-token` header:

    ```http theme={null}
    x-api-token: rsl_live_abc123def456
    ```
  </Step>

  <Step title="Browse activities">
    Fetch the activity catalog with optional currency and language filtering:

    <CodeGroup>
      ```bash cURL theme={null}
      curl "https://api.seyaha.net/api/v1/resellers/activities?currency=USD&language=en&page=1&limit=10" \
        -H "x-api-token: $RESELLER_TOKEN"
      ```

      ```javascript Node.js theme={null}
      const res = await fetch(
        'https://api.seyaha.net/api/v1/resellers/activities?' +
          new URLSearchParams({ currency: 'USD', language: 'en', page: '1', limit: '10' }),
        { headers: { 'x-api-token': process.env.RESELLER_TOKEN } }
      );
      const { data, pagination } = await res.json();
      ```
    </CodeGroup>

    Each activity includes variations but **not slots** — load slots separately via the
    availability endpoints when a user picks a date.
  </Step>

  <Step title="Check availability">
    Once a user selects a variation and date, fetch bookable slots:

    <CodeGroup>
      ```bash cURL theme={null}
      curl "https://api.seyaha.net/api/v1/resellers/activities/$ACTIVITY_ID/variations/$VAR_ID/availability?date=2026-07-15&currency=USD&guests=2" \
        -H "x-api-token: $RESELLER_TOKEN"
      ```

      ```javascript Node.js theme={null}
      const res = await fetch(
        `https://api.seyaha.net/api/v1/resellers/activities/${activityId}/variations/${varId}/availability?` +
          new URLSearchParams({ date: '2026-07-15', currency: 'USD', guests: '2' }),
        { headers: { 'x-api-token': process.env.RESELLER_TOKEN } }
      );
      const { data } = await res.json();
      // data.slots → array of bookable time slots with prices
      ```
    </CodeGroup>
  </Step>

  <Step title="Create a booking">
    Submit the booking with customer details and the chosen date/time/slot:

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST https://api.seyaha.net/api/v1/resellers/add-booking \
        -H "x-api-token: $RESELLER_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{
          "activity_id": "6744810075becd2ef8c140f7",
          "variation_id": "6751ad2d7533f379c9a1711b",
          "customer_details": {
            "name": "John Doe",
            "email": "john@example.com",
            "phone": "+966501234567"
          },
          "booking_details": {
            "booking_date": "2026-07-15",
            "booking_time": "10:00",
            "currency": "USD",
            "guests": { "adult": 2, "child": 1, "infant": 0 }
          }
        }'
      ```

      ```javascript Node.js theme={null}
      const res = await fetch('https://api.seyaha.net/api/v1/resellers/add-booking', {
        method: 'POST',
        headers: {
          'x-api-token': process.env.RESELLER_TOKEN,
          'Content-Type': 'application/json',
        },
        body: JSON.stringify({
          activity_id: activityId,
          variation_id: varId,
          customer_details: { name: 'John Doe', email: 'john@example.com', phone: '+966501234567' },
          booking_details: {
            booking_date: '2026-07-15',
            booking_time: '10:00',
            currency: 'USD',
            guests: { adult: 2, child: 1, infant: 0 },
          },
        }),
      });
      const { data: booking } = await res.json();
      // booking.status === 'Booking Attempt'
      ```
    </CodeGroup>

    After the customer pays, call `POST /payment-success` with the external payment ID
    to confirm the booking. See [Bookings](/pages/reseller/bookings) for the full flow.
  </Step>
</Steps>

## What's next

* [Activities](/pages/reseller/activities) — full search, filter, and currency options
* [Availability](/pages/reseller/availability) — calendar view vs. date-specific slots
* [Bookings](/pages/reseller/bookings) — payment confirmation and cancellation
