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

# Create Booking for Client

> Creates a new booking for a client by an artist. This endpoint allows artists to create bookings on behalf of their clients, optionally including session details. If the client doesn't exist, a new client account will be created.



## OpenAPI

````yaml POST /bookings/create-for-client
openapi: 3.1.0
info:
  title: Tatu API
  description: API documentation for Tatu's booking and artist management system
  version: 1.0.0
servers:
  - url: http://localhost:3000/api
    description: Development server
security: []
paths:
  /bookings/create-for-client:
    post:
      summary: Create Booking for Client
      description: >-
        Creates a new booking for a client by an artist. This endpoint allows
        artists to create bookings on behalf of their clients, optionally
        including session details. If the client doesn't exist, a new client
        account will be created.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBookingForClientRequest'
      responses:
        '200':
          description: Booking created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateBookingForClientResponse'
        '400':
          description: Bad request - Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden - User is not an artist or artist profile is incomplete
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CreateBookingForClientRequest:
      type: object
      required:
        - clientEmail
        - clientFirstName
        - includeSession
      properties:
        clientEmail:
          type: string
          format: email
          description: Email address of the client
        clientFirstName:
          type: string
          minLength: 1
          description: First name of the client
        clientLastName:
          type: string
          description: Last name of the client (optional)
        clientPhoneNumber:
          type: object
          properties:
            countryCode:
              type: string
              description: Country code (e.g., '+1')
            number:
              type: string
              description: Phone number without country code
          nullable: true
          description: Phone number of the client (optional)
        notes:
          type: string
          description: Description or notes for the booking (optional)
        includeSession:
          type: boolean
          description: Whether to include a session with the booking
        sessionType:
          $ref: '#/components/schemas/SessionTypeEnum'
          description: Type of session (required if includeSession is true)
        sessionDate:
          type: number
          description: Timestamp for the session date (required if includeSession is true)
        sessionStartTime:
          type: number
          description: >-
            Timestamp for session start time (required if includeSession is
            true)
        sessionEndTime:
          type: number
          description: Timestamp for session end time (required if includeSession is true)
        sessionLocation:
          $ref: '#/components/schemas/Location'
          description: >-
            Location for the session (optional, defaults to artist's primary
            location)
        sessionPrice:
          type: string
          description: Price for the session (optional)
        sessionDepositFee:
          type: string
          description: >-
            Deposit fee for the session (optional, must be less than
            sessionPrice)
    CreateBookingForClientResponse:
      type: object
      required:
        - success
        - bookingId
        - clientCreated
      properties:
        success:
          type: boolean
          description: Whether the booking was created successfully
        bookingId:
          type: string
          description: ID of the created booking
        clientCreated:
          type: boolean
          description: Whether a new client account was created
    Error:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    SessionTypeEnum:
      type: string
      enum:
        - CONSULTATION
        - TATTOO
      description: Type of session
    Location:
      type: object
      required:
        - address
        - city
        - state
        - country
        - latitude
        - longitude
      properties:
        address:
          type: string
          description: Street address
        city:
          type: string
          description: City name
        state:
          type: string
          description: State/province
        country:
          type: string
          description: Country
        latitude:
          type: number
          description: Location latitude
        longitude:
          type: number
          description: Location longitude

````