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

# Change your viewing schedule

> Only the fields you send change; the others stay as they were. `null` brings back the default, and `hours`, when sent, replaces the whole week (a day left out is closed). With `confirmation: auto` and `confirm_pending: true`, the requests waiting on the listings that follow your setting are confirmed too, at most 100 at a time. The new hours reach the listings within moments; the answer does not wait for them.



## OpenAPI

````yaml en/openapi.json PATCH /account/viewing-schedule
openapi: 3.1.2
info:
  title: Housera API
  version: 1.0.0
  description: >-
    Publish and manage real estate listings on Housera from your CRM or your own
    application, under the same rules as the form on the Housera portal.
servers:
  - url: https://staging.housera.ro/api/v1
    description: 'Sandbox (staging): test data, same rules as production.'
  - url: https://housera.ro/api/v1
    description: 'Production: the real listings on housera.ro.'
security:
  - bearer: []
tags:
  - name: Your listings
  - name: Photos
  - name: Events
  - name: Vocabulary
  - name: Connect with Housera
  - name: Client requests
  - name: The company and its team
  - name: Marketing mandates
  - name: Viewings
  - name: Projects
  - name: Partnerships
  - name: API key
  - name: Statistics
paths:
  /account/viewing-schedule:
    patch:
      tags:
        - Viewings
      summary: Change your viewing schedule
      description: >-
        Only the fields you send change; the others stay as they were. `null`
        brings back the default, and `hours`, when sent, replaces the whole week
        (a day left out is closed). With `confirmation: auto` and
        `confirm_pending: true`, the requests waiting on the listings that
        follow your setting are confirmed too, at most 100 at a time. The new
        hours reach the listings within moments; the answer does not wait for
        them.
      operationId: v1.viewing_schedule.update
      parameters:
        - name: locale
          in: query
          required: false
          schema:
            type: string
            enum:
              - ro
              - en
            default: en
          example: en
          description: >-
            The response language, `ro` or `en`. It changes error messages
            (`title`, `detail`), labels and, when the listing has an approved
            translation in that language, its title and description. Codes are
            the same in every language. It takes precedence over
            `Accept-Language` and over the account's language.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateViewingScheduleRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ViewingScheduleApiResource'
                    description: The result of the request.
                required:
                  - data
          description: The request succeeded.
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request body is not valid JSON (`malformed_json`).
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The key is missing, revoked or expired (`unauthenticated`).
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: >-
            The key lacks the required permission (`missing_ability`) or access
            is denied (`forbidden`).
        '413':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request body is larger than 1 MB (`payload_too_large`).
        '415':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: >-
            The request body isn't declared as JSON (`unsupported_media_type`).
            Send it with `Content-Type: application/json`.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ValidationProblem'
          description: >-
            The data fails the rules: one entry per field in `errors[]`, each
            with a stable `code`.
        '429':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: >-
            Too many requests. Try again after the number of seconds in
            `Retry-After`.
        '503':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: >-
            Housera has temporarily paused writes through the API
            (`api_writes_paused`). Try again after the number of seconds in
            `Retry-After`.
components:
  schemas:
    UpdateViewingScheduleRequest:
      type: object
      properties:
        hours:
          type:
            - object
            - 'null'
          additionalProperties:
            type: array
            items:
              type: object
              properties:
                from:
                  type: string
                  description: The start time, `HH:MM`.
                to:
                  type: string
                  description: The end time, `HH:MM`. `24:00` is the end of the day.
              required:
                - from
                - to
          description: Hours.
        duration_min:
          type:
            - integer
            - 'null'
          enum:
            - '15'
            - '30'
            - '45'
            - '60'
            - '90'
            - null
          description: 'How long a viewing lasts, in minutes: 15, 30, 45, 60 or 90.'
        buffer_min:
          type:
            - integer
            - 'null'
          enum:
            - '0'
            - '15'
            - '30'
            - null
          description: Break between viewings.
        notice_min:
          type:
            - integer
            - 'null'
          enum:
            - '0'
            - '60'
            - '120'
            - '240'
            - '1440'
            - '2880'
            - null
          description: Booking notice.
        horizon_days:
          type:
            - integer
            - 'null'
          enum:
            - '7'
            - '14'
            - '21'
            - '28'
            - null
          description: How far ahead hours show.
        confirmation:
          type: string
          enum:
            - auto
            - manual
          description: >-
            `auto`: a booking is confirmed at once. `manual`: the visitor sends
            a request, and you accept or decline it.
        confirm_pending:
          type: boolean
          description: Confirming the waiting requests.
        blocked_dates:
          type:
            - array
            - 'null'
          items:
            type: object
            properties:
              from:
                type: string
                format: date
                description: The first day or the start time of the range.
              to:
                type:
                  - string
                  - 'null'
                format: date
                description: The last day of the period.
            required:
              - from
          maxItems: 50
          description: The days off, as `{from, to}` date ranges (`Y-m-d`), at most 50.
      title: UpdateViewingScheduleRequest
    ViewingScheduleApiResource:
      type: object
      properties:
        saved:
          type: boolean
          description: >-
            Whether you ever saved the schedule. When not, `effective` gives the
            values it starts from.
        hours:
          type: object
          additionalProperties:
            type: array
            items:
              type: object
              properties:
                from:
                  type: string
                  description: The start time, `HH:MM`.
                to:
                  type: string
                  description: The end time, `HH:MM`. `24:00` is the end of the day.
              required:
                - from
                - to
          description: Hours.
        duration_min:
          type:
            - integer
            - 'null'
          description: 'How long a viewing lasts, in minutes: 15, 30, 45, 60 or 90.'
        buffer_min:
          type:
            - integer
            - 'null'
          description: Break between viewings.
        notice_min:
          type:
            - integer
            - 'null'
          description: Booking notice.
        horizon_days:
          type:
            - integer
            - 'null'
          description: How far ahead hours show.
        confirmation:
          type: string
          description: >-
            `auto`: a booking is confirmed at once. `manual`: the visitor sends
            a request, and you accept or decline it.
        blocked_dates:
          type: array
          items:
            type: object
            properties:
              from:
                type: string
                description: The first day or the start time of the range.
              to:
                type: string
                description: The last day of the period.
            required:
              - from
              - to
          description: The days off, as `{from, to}` date ranges (`Y-m-d`), at most 50.
        effective:
          type: object
          properties:
            duration_min:
              type: integer
              description: 'How long a viewing lasts, in minutes: 15, 30, 45, 60 or 90.'
            buffer_min:
              type: integer
              description: Break between viewings.
            notice_min:
              type: integer
              description: Booking notice.
            horizon_days:
              type: integer
              description: How far ahead hours show.
          required:
            - duration_min
            - buffer_min
            - notice_min
            - horizon_days
          description: >-
            The values the schedule applies now: the ones you chose or, where
            you chose nothing, the defaults.
        options:
          type: object
          properties:
            duration_min:
              type: array
              items:
                type: integer
              description: 'How long a viewing lasts, in minutes: 15, 30, 45, 60 or 90.'
            buffer_min:
              type: array
              items:
                type: integer
              description: Break between viewings.
            notice_min:
              type: array
              items:
                type: integer
              description: Booking notice.
            horizon_days:
              type: array
              items:
                type: integer
              description: How far ahead hours show.
          required:
            - duration_min
            - buffer_min
            - notice_min
            - horizon_days
          description: >-
            The values allowed for `duration_min`, `buffer_min`, `notice_min`
            and `horizon_days`.
        listings_following:
          type: integer
          description: >-
            How many public listings follow your schedule: those whose viewings
            you run and that have no hours of their own.
        confirmed_pending:
          type: object
          properties:
            confirmed:
              type: integer
              description: How many requests were confirmed now.
            still_waiting:
              type: integer
              description: >-
                How many requests still wait after the save (past the cap of
                100, or answered meanwhile).
          required:
            - confirmed
            - still_waiting
          description: >-
            What the save confirmed along, when you asked for `confirm_pending`:
            `confirmed` and `still_waiting`.
      required:
        - saved
        - hours
        - duration_min
        - buffer_min
        - notice_min
        - horizon_days
        - confirmation
        - blocked_dates
        - effective
        - options
        - listings_following
      title: ViewingScheduleApiResource
    Problem:
      type: object
      title: Problem
      properties:
        type:
          type: string
          format: uri
          description: The URL of the problem type (RFC 9457).
        title:
          type: string
          description: A short summary of the problem, in the request's language.
        status:
          type: integer
          description: The HTTP status code.
        code:
          type: string
          description: >-
            The stable code of the refusal, the one to handle the error by (the
            list is on the Errors page).
        detail:
          type: string
          description: The explanation, in the request's language.
        existing:
          type: object
          properties:
            code:
              type: string
              description: The existing listing's public code.
            external_ref:
              type:
                - string
                - 'null'
              description: >-
                Your ID for the existing listing, if you set it with `PUT
                /listings/ref/{ref}`. Otherwise `null`.
          required:
            - code
            - external_ref
          description: >-
            Only on `409 duplicate_listing`: the listing you already have for
            the same property.
      required:
        - type
        - title
        - status
        - code
        - detail
    ValidationProblem:
      type: object
      title: ValidationProblem
      properties:
        type:
          type: string
          format: uri
          description: The URL of the problem type (RFC 9457).
        title:
          type: string
          description: A short summary of the problem, in the request's language.
        status:
          type: integer
          description: 'The HTTP status code: `422`.'
        errors:
          type: array
          items:
            type: object
            properties:
              pointer:
                type: string
                description: The field it refers to, as a JSON Pointer (`/features/2`).
              code:
                type: string
                description: >-
                  The rule that failed, as a stable code (the list is on the
                  Errors page).
              detail:
                type: string
                description: >-
                  The explanation, in the request's language. The wording can
                  change, so handle the error by `code`.
            required:
              - pointer
              - code
              - detail
          description: One entry for each field that fails the rules.
      required:
        - type
        - title
        - status
        - errors
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: 'Authorization: Bearer <key>'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.