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

# Read a week

> The household's week: its seven days, the ISO ids of the weeks before and after, the items on each day, and the trips and vacations that cross it. A suppressed item stays and says what suppressed it. Without `week`, the current week in America/Sao_Paulo.



## OpenAPI

````yaml /openapi.json get /v1/week
openapi: 3.0.0
info:
  title: onosso
  version: 0.0.0
  description: >-
    The household's API: the week, the people and the sessions the web app reads
    and changes.
servers: []
security: []
tags:
  - name: Week
    description: The household's week, day by day.
  - name: People
    description: The people who make up the household.
  - name: Pets
    description: The pets of the house.
  - name: Invites
    description: Links that let someone join.
  - name: Sessions
    description: Where you are signed in.
  - name: Tokens
    description: Your personal API tokens.
  - name: Address
    description: Where the household lives.
  - name: Messages
    description: What each person receives from the product, and when.
  - name: Questions
    description: 'What needs a person: one queue, the same in the app and on WhatsApp.'
  - name: Shopping
    description: 'The household''s one list: places, items and marks.'
  - name: Conversation
    description: >-
      Each person's one conversation with the assistant, the same in the app and
      on WhatsApp.
  - name: MCP
    description: The house for an MCP client such as Claude Desktop, with a personal token.
paths:
  /v1/week:
    get:
      tags:
        - Week
      summary: Read a week
      description: >-
        The household's week: its seven days, the ISO ids of the weeks before
        and after, the items on each day, and the trips and vacations that cross
        it. A suppressed item stays and says what suppressed it. Without `week`,
        the current week in America/Sao_Paulo.
      parameters:
        - schema:
            type: string
            maxLength: 8
            pattern: ^\d{4}-W(0[1-9]|[1-4]\d|5[0-3])$
          required: false
          name: week
          in: query
      responses:
        '200':
          description: The current household's week.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Week'
        '400':
          description: The requested ISO week is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainError'
        '401':
          description: The session is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/RequestTimeout'
      security:
        - session: []
        - token: []
components:
  schemas:
    Week:
      type: object
      properties:
        household:
          type: object
          properties:
            name:
              type: string
          required:
            - name
        week:
          type: object
          properties:
            id:
              type: string
            days:
              type: array
              items:
                type: object
                properties:
                  date:
                    type: string
                  weekday:
                    type: string
                    enum:
                      - seg
                      - ter
                      - qua
                      - qui
                      - sex
                      - sáb
                      - dom
                  weather:
                    $ref: '#/components/schemas/DayWeather'
                required:
                  - date
                  - weekday
            previous:
              type: string
            next:
              type: string
            isCurrent:
              type: boolean
          required:
            - id
            - days
            - previous
            - next
            - isCurrent
        items:
          type: array
          items:
            $ref: '#/components/schemas/WeekItem'
        bands:
          type: array
          items:
            $ref: '#/components/schemas/WeekBand'
      required:
        - household
        - week
        - items
        - bands
    DomainError:
      type: object
      properties:
        code:
          type: string
        details:
          type: object
          additionalProperties:
            nullable: true
      required:
        - code
        - details
    Unauthorized:
      type: object
      properties:
        message:
          type: string
          enum:
            - Unauthorized
        statusCode:
          type: number
          enum:
            - 401
      required:
        - message
        - statusCode
    DayWeather:
      type: object
      properties:
        condition:
          type: string
          enum:
            - sun
            - cloud
            - rain
        minC:
          type: integer
        maxC:
          type: integer
      required:
        - condition
        - minC
        - maxC
    WeekItem:
      oneOf:
        - type: object
          properties:
            id:
              type: string
            activityId:
              type: string
            scheduleId:
              type: string
            date:
              type: string
            title:
              type: string
            subjects:
              type: array
              items:
                type: object
                properties:
                  personId:
                    type: string
                  displayName:
                    type: string
                required:
                  - personId
                  - displayName
            assignee:
              type: object
              nullable: true
              properties:
                personId:
                  type: string
                displayName:
                  type: string
              required:
                - personId
                - displayName
            mine:
              type: boolean
            confidence:
              type: string
              enum:
                - confirmed
                - assumed
            provenance:
              type: object
              properties:
                sourceKind:
                  type: string
                  enum:
                    - text
                    - app
                sourceRef:
                  type: string
                authorId:
                  type: string
                  nullable: true
                appliedAt:
                  type: string
                  format: date-time
                quote:
                  type: string
                  nullable: true
              required:
                - sourceKind
                - sourceRef
                - authorId
                - appliedAt
                - quote
            suppressedBy:
              type: string
              enum:
                - exception
                - trip
                - vacation
                - holiday
                - school-calendar
            place:
              type: object
              properties:
                name:
                  type: string
                address:
                  type: string
                  nullable: true
                mapUrl:
                  type: string
                  format: uri
              required:
                - name
                - address
                - mapUrl
            leaveAt:
              type: string
            reassignedFrom:
              type: object
              properties:
                personId:
                  type: string
                displayName:
                  type: string
              required:
                - personId
                - displayName
            reassignedBy:
              type: string
            kind:
              type: string
              enum:
                - event
            start:
              type: string
          required:
            - id
            - activityId
            - scheduleId
            - date
            - title
            - subjects
            - assignee
            - mine
            - confidence
            - provenance
            - kind
            - start
        - type: object
          properties:
            id:
              type: string
            activityId:
              type: string
            scheduleId:
              type: string
            date:
              type: string
            title:
              type: string
            subjects:
              type: array
              items:
                type: object
                properties:
                  personId:
                    type: string
                  displayName:
                    type: string
                required:
                  - personId
                  - displayName
            assignee:
              type: object
              nullable: true
              properties:
                personId:
                  type: string
                displayName:
                  type: string
              required:
                - personId
                - displayName
            mine:
              type: boolean
            confidence:
              type: string
              enum:
                - confirmed
                - assumed
            provenance:
              type: object
              properties:
                sourceKind:
                  type: string
                  enum:
                    - text
                    - app
                sourceRef:
                  type: string
                authorId:
                  type: string
                  nullable: true
                appliedAt:
                  type: string
                  format: date-time
                quote:
                  type: string
                  nullable: true
              required:
                - sourceKind
                - sourceRef
                - authorId
                - appliedAt
                - quote
            suppressedBy:
              type: string
              enum:
                - exception
                - trip
                - vacation
                - holiday
                - school-calendar
            place:
              type: object
              properties:
                name:
                  type: string
                address:
                  type: string
                  nullable: true
                mapUrl:
                  type: string
                  format: uri
              required:
                - name
                - address
                - mapUrl
            leaveAt:
              type: string
            reassignedFrom:
              type: object
              properties:
                personId:
                  type: string
                displayName:
                  type: string
              required:
                - personId
                - displayName
            reassignedBy:
              type: string
            kind:
              type: string
              enum:
                - untimed
          required:
            - id
            - activityId
            - scheduleId
            - date
            - title
            - subjects
            - assignee
            - mine
            - confidence
            - provenance
            - kind
    WeekBand:
      type: object
      properties:
        id:
          type: string
        kind:
          type: string
          enum:
            - trip
            - vacation
            - unavailable
        label:
          type: string
        start:
          type: object
          properties:
            date:
              type: string
            time:
              type: string
              nullable: true
          required:
            - date
            - time
        end:
          type: object
          nullable: true
          properties:
            date:
              type: string
            time:
              type: string
              nullable: true
          required:
            - date
            - time
        who:
          type: array
          items:
            type: object
            properties:
              personId:
                type: string
              displayName:
                type: string
            required:
              - personId
              - displayName
        confidence:
          type: string
          enum:
            - confirmed
            - assumed
        provenance:
          type: object
          properties:
            sourceKind:
              type: string
              enum:
                - text
                - app
            sourceRef:
              type: string
            authorId:
              type: string
              nullable: true
            appliedAt:
              type: string
              format: date-time
            quote:
              type: string
              nullable: true
          required:
            - sourceKind
            - sourceRef
            - authorId
            - appliedAt
            - quote
      required:
        - id
        - kind
        - label
        - start
        - end
        - who
        - confidence
        - provenance
    Degraded:
      type: object
      properties:
        code:
          type: string
          enum:
            - request.timeout
            - service.unavailable
        correlationId:
          type: string
      required:
        - code
        - correlationId
  responses:
    ServiceUnavailable:
      description: A dependency is unavailable; retry after Retry-After seconds.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Degraded'
    RequestTimeout:
      description: The request outlived its deadline.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Degraded'
  securitySchemes:
    session:
      type: apiKey
      in: cookie
      name: __Secure-better-auth.session_token
      description: The session cookie set when you sign in to the web app.
    token:
      type: http
      scheme: bearer
      description: >-
        A personal API token (`onss_live_…`), created in Ajustes › Integrações.
        It acts as the person who created it, in the household it was created
        in, on the read routes that list it.

````

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