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

# Update Availability

> Updates an artist's availability schedule



## OpenAPI

````yaml POST /availability/update-availability
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:
  /availability/update-availability:
    post:
      summary: Update Availability
      description: Updates an artist's availability schedule
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Availability'
      responses:
        '200':
          description: Availability updated successfully
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                properties:
                  success:
                    type: boolean
                    description: Whether the operation was successful
        '400':
          description: Bad request - not authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Availability:
      type: object
      required:
        - artistId
        - availabilityId
        - isActive
        - weeklySlots
        - dateRangeType
        - effectiveFrom
        - createdAt
        - updatedAt
      properties:
        artistId:
          type: string
          description: ID of the artist this availability belongs to
        availabilityId:
          type: string
          description: Unique identifier for this availability
        isActive:
          type: boolean
          description: Whether this availability is currently active
        weeklySlots:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/DaySlots'
          description: Weekly schedule with days as keys (e.g., 'Sunday', 'Monday')
        dateRangeType:
          $ref: '#/components/schemas/AvailabilityDateRangeTypeEnum'
          description: Type of date range for this availability
        effectiveFrom:
          type: number
          description: >-
            UTC timestamp in milliseconds when this availability becomes
            effective
        effectiveUntil:
          type: number
          description: Optional UTC timestamp in milliseconds when this availability ends
        rollingDays:
          type: string
          description: Optional number of days to roll over when dateRangeType is 'rolling'
        createdAt:
          type: number
          description: UTC timestamp in milliseconds when this availability was created
        updatedAt:
          type: number
          description: >-
            UTC timestamp in milliseconds when this availability was last
            updated
    Error:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    DaySlots:
      type: object
      required:
        - timeSlots
      properties:
        timeSlots:
          type: array
          items:
            $ref: '#/components/schemas/TimeSlot'
          description: List of time slots for this day
    AvailabilityDateRangeTypeEnum:
      type: string
      enum:
        - indefinitely
        - specific
        - rolling
      description: Type of date range for availability
    TimeSlot:
      type: object
      required:
        - startTime
        - endTime
      properties:
        startTime:
          type: string
          format: date-time
          description: Start time of the slot
        endTime:
          type: string
          format: date-time
          description: End time of the slot

````