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

# Get list of perks for a user



## OpenAPI

````yaml openapi.yaml get /perks/users/{userId}
openapi: 3.1.0
info:
  title: Housr API
  version: 1.0.0
  summary: Hourly-expiring bearer token auth with perks browse & redemption.
  description: >
    This API issues an hourly-expiring bearer token via HTTP Basic Auth and
    exposes endpoints

    for browsing, managing, and redeeming perks. Unless otherwise noted, all
    endpoints

    require `Authorization: Bearer <token>` over HTTPS.


    ## Authentication

    - Obtain a token with Basic Auth to /auth/token.

    - Token expires in 1 hour by default.

    - Optional "replicable per-hour" mode can be enabled server-side (see
    `hourly` flag).


    ## Pagination & Sorting

    - Use `page` (default 1) and `per_page` (default 25, max 100).

    - Responses include `X-Total-Count` and RFC5988 `Link` headers where
    applicable.

    - Sorting via `?sort=field,-otherField`.
servers:
  - url: https://v2.api.us.housr.com/partners
    description: Production
  - url: https://v2.staging.api.us.housr.com/partners
    description: Sandbox
security:
  - bearerAuth: []
tags:
  - name: Auth
  - name: Perks
  - name: Health Check
paths:
  /perks/users/{userId}:
    get:
      tags:
        - Perks
      summary: Get list of perks for a user
      parameters:
        - in: path
          name: userId
          required: true
          schema:
            type: string
        - in: query
          name: type
          schema:
            type: string
            enum:
              - available
              - redeemed
            default: available
        - $ref: '#/components/parameters/Page'
        - $ref: '#/components/parameters/PerPage'
        - $ref: '#/components/parameters/Sort'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      oneOf:
                        - $ref: '#/components/schemas/Perk'
                        - $ref: '#/components/schemas/Redemption'
                  meta:
                    $ref: '#/components/schemas/PaginationMeta'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    Page:
      in: query
      name: page
      schema:
        type: integer
        minimum: 1
        default: 1
    PerPage:
      in: query
      name: per_page
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 25
    Sort:
      in: query
      name: sort
      schema:
        type: string
      description: e.g. `sort=title,-created_at`
  schemas:
    Perk:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        description:
          type: string
        category:
          type: string
          nullable: true
        merchant_name:
          type: string
          nullable: true
        image_url:
          type: string
          format: uri
          nullable: true
        discount_text:
          type: string
          nullable: true
        terms:
          type: string
          nullable: true
        valid_from:
          type: string
          format: date-time
          nullable: true
        valid_to:
          type: string
          format: date-time
          nullable: true
        city:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Redemption:
      type: object
      properties:
        id:
          type: string
        perk_id:
          type: string
        user_id:
          type: string
        redeemed_at:
          type: string
          format: date-time
        status:
          type: string
          enum:
            - approved
            - rejected
            - pending
        metadata:
          type: object
          additionalProperties: true
    PaginationMeta:
      type: object
      properties:
        page:
          type: integer
        per_page:
          type: integer
        total:
          type: integer
        total_pages:
          type: integer
    Problem:
      type: object
      properties:
        response:
          type: string
  responses:
    Unauthorized:
      description: Missing or invalid authentication
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    NotFound:
      description: Resource not found
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````