> ## 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.

# Create Booking

> Creates a new booking for an activity



## OpenAPI

````yaml POST /add-booking
openapi: 3.0.0
info:
  title: Seyaha Reseller API
  description: API endpoints for reseller operations
  version: 1.0.0
servers:
  - url: /api/v1/resellers
    description: Reseller API base URL
security: []
paths:
  /add-booking:
    post:
      tags:
        - Reseller Activities
      summary: Create a new booking
      description: Creates a new booking for an activity
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBookingRequest'
            example:
              activity_id: 60d21b4667d0d8992e610c85
              variation_id: 60d21b4667d0d8992e610c86
              promoCode: SUMMER10
              customer_details:
                name: John Doe
                email: john@example.com
                phone: '+1234567890'
              booking_details:
                booking_date: '2023-07-15'
                booking_time: '10:00'
                currency: USD
                guests:
                  adult: 2
                  child: 1
                  infant: 0
                pickup_address:
                  address: 123 Main St, City
                  lat: 25.123456
                  lng: 55.123456
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: integer
                    example: 1
                  data:
                    $ref: '#/components/schemas/Booking'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
        '500':
          $ref: '#/components/responses/ServerError'
      security:
        - apiToken: []
components:
  schemas:
    CreateBookingRequest:
      type: object
      required:
        - activity_id
        - variation_id
        - customer_details
        - booking_details
      properties:
        activity_id:
          type: string
          example: 60d21b4667d0d8992e610c85
        variation_id:
          type: string
          example: 60d21b4667d0d8992e610c86
        promoCode:
          type: string
          example: SUMMER10
        customer_details:
          type: object
          required:
            - name
            - email
            - phone
          properties:
            name:
              type: string
              example: John Doe
            email:
              type: string
              example: john@example.com
            phone:
              type: string
              example: '+1234567890'
        booking_details:
          type: object
          required:
            - booking_date
            - booking_time
            - currency
            - guests
          properties:
            booking_date:
              type: string
              format: date
              example: '2023-07-15'
            booking_time:
              type: string
              example: '10:00'
            currency:
              type: string
              example: USD
            guests:
              type: object
              properties:
                adult:
                  type: integer
                  example: 2
                child:
                  type: integer
                  example: 1
                infant:
                  type: integer
                  example: 0
                senior:
                  type: integer
                  example: 0
            pickup_address:
              type: object
              properties:
                address:
                  type: string
                  example: 123 Main St, City
                lat:
                  type: number
                  format: float
                  example: 25.123456
                lng:
                  type: number
                  format: float
                  example: 55.123456
    Booking:
      type: object
      properties:
        _id:
          type: string
          example: 60d21b4667d0d8992e610c87
        activity_id:
          type: string
          example: 60d21b4667d0d8992e610c85
        variation_id:
          type: string
          example: 60d21b4667d0d8992e610c86
        reseller_id:
          type: string
          example: 60d21b4667d0d8992e610c82
        status:
          type: string
          enum:
            - Booking Attempt
            - Paid by Customer
            - Cancelled
          example: Paid by Customer
        partnerConfirmation:
          type: string
          enum:
            - Pending
            - Confirmed
            - Rejected
            - Not Required
          example: Confirmed
        bookingDate:
          type: string
          example: '2023-07-15'
        bookingTime:
          type: string
          example: '10:00'
        price:
          type: object
          properties:
            totalPrice:
              type: number
              example: 150
            affiliateDeservedAmount:
              type: number
              example: 15
        external_payment_id:
          type: string
          example: pay_1N9dvSLkdIwHu2QOxgMtN9dE
  responses:
    ValidationError:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: integer
                example: 0
              error:
                type: array
                items:
                  type: string
                example:
                  - validation error details
              message:
                type: string
                example: Validation Error
              code:
                type: integer
                example: 400
    Unauthorized:
      description: Unauthorized access
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: integer
                example: 0
              error:
                type: array
                items:
                  type: string
                example:
                  - unauthorized access
              message:
                type: string
                example: unauthorized access
              code:
                type: integer
                example: 401
    RateLimitExceeded:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: integer
                example: 0
              error:
                type: array
                items:
                  type: string
                example:
                  - rate limit exceeded
              message:
                type: string
                example: rate limit exceeded
              code:
                type: integer
                example: 429
    ServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: integer
                example: 0
              error:
                type: array
                items:
                  type: string
                example:
                  - unexpected error
              message:
                type: string
                example: unexpected error
              code:
                type: integer
                example: 500
  securitySchemes:
    apiToken:
      type: apiKey
      in: header
      name: x-api-token

````