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

# List addresses

> Returns your company's saved addresses, oldest first. The one marked `isDefault` is the address [`POST /programs`](/api-reference/programs/create) uses when you leave out `addressId`.

The key's owner must be an admin of the company.




## OpenAPI

````yaml /openapi.yaml get /addresses
openapi: 3.1.0
info:
  title: Hoppier API
  version: 1.0.0-beta
  summary: Create and read your Hoppier programs, and add and list the people in them.
  description: >
    The Hoppier API is in **closed beta**. Everything in this reference runs in
    production today.


    - A full-access admin creates company API keys in the dashboard, under
    **Developers › API keys**. For a personal key, email
    [support@hoppier.com](mailto:support@hoppier.com).

    - There is no sandbox. Every key works against your live account.

    - We add fields and error codes without notice, so ignore anything you don't
    recognise. We don't rename or remove a documented field without announcing
    it on the [changelog](https://docs.hoppier.com/changelog) first.
  termsOfService: https://www.hoppier.com/terms
  contact:
    name: Hoppier support
    email: support@hoppier.com
servers:
  - url: https://app.hoppier.com/api/v1
    description: Production
security:
  - apiKey: []
tags:
  - name: Account
    description: Check an API key and see which account it belongs to.
  - name: Addresses
    description: Save and list your company's addresses, for new programs.
  - name: Merchants
    description: Look up the merchants and gift-card brands a program can allow.
  - name: Programs
    description: Read and create the reward programs in your account.
  - name: Participants
    description: Add people to a program and list them.
paths:
  /addresses:
    get:
      tags:
        - Addresses
      summary: List addresses
      description: >
        Returns your company's saved addresses, oldest first. The one marked
        `isDefault` is the address [`POST
        /programs`](/api-reference/programs/create) uses when you leave out
        `addressId`.


        The key's owner must be an admin of the company.
      operationId: listAddresses
      responses:
        '200':
          description: The company's addresses. An empty list if it has none.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddressList'
              example:
                addresses:
                  - id: ad_7Ym2p0Lx3Q
                    object: address
                    line1: 350 Fifth Avenue
                    line2: Floor 20
                    city: New York
                    state: New York
                    postalCode: '10118'
                    country: US
                    isDefault: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/NotAdmin'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    AddressList:
      type: object
      required:
        - addresses
      properties:
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/Address'
    Address:
      type: object
      description: One of your company's saved addresses.
      required:
        - id
        - object
        - line1
        - city
        - state
        - postalCode
        - country
        - isDefault
      properties:
        id:
          type: string
          description: The address's id. Starts with `ad_`.
          examples:
            - ad_7Ym2p0Lx3Q
        object:
          type: string
          const: address
        line1:
          type: string
          examples:
            - 350 Fifth Avenue
        line2:
          type: string
          description: Left out when the address has no second line.
          examples:
            - Floor 20
        city:
          type: string
          examples:
            - New York
        state:
          type: string
          description: The state or territory's name.
          examples:
            - New York
        postalCode:
          type: string
          examples:
            - '10118'
        country:
          type: string
          description: Two-letter country code.
          examples:
            - US
        isDefault:
          type: boolean
          description: >
            `true` for the address new programs use when you leave out
            `addressId`: your company's oldest saved address.
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          description: >
            A machine-readable code, such as `unauthorized` or
            `program_not_found`. Act on it and the HTTP status. New codes can
            appear, so handle one you don't recognise by its status. [Every
            code](/guides/errors-and-rate-limits#error-codes).
          examples:
            - program_not_found
        message:
          type: string
          description: What went wrong, in plain words. Don't parse it; it can change.
          examples:
            - Program not found.
        parameter:
          type: string
          description: On some `invalid_request` errors, the field that was refused.
          examples:
            - email
  responses:
    Unauthorized:
      description: >
        `unauthorized`: the API key is missing or malformed, or it's wrong,
        unknown or switched off.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missingKey:
              summary: No API key
              value:
                error: unauthorized
                message: 'API key is missing. Send it as "Authorization: Bearer <key>".'
            invalidKey:
              summary: Malformed, wrong or unknown key
              value:
                error: unauthorized
                message: API key is not valid.
            inactiveKey:
              summary: Key switched off
              value:
                error: unauthorized
                message: API key is inactive.
    NotAdmin:
      description: >
        `insufficient_permission`: the key's owner isn't an admin of the
        company.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: insufficient_permission
            message: This API key's user is not an admin of this account.
    RateLimited:
      description: >
        `rate_limited`: too many requests. Wait the number of seconds in
        `Retry-After`, then retry. See [Errors and rate
        limits](/guides/errors-and-rate-limits#rate-limits).
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            perAccount:
              summary: Per-account limit
              value:
                error: rate_limited
                message: >-
                  Too many requests for this account. Retry after the number of
                  seconds in Retry-After.
            perAddress:
              summary: Per-address limit
              value:
                error: rate_limited
                message: Too Many Requests
    ServerError:
      description: >
        `internal_error`: something went wrong on Hoppier's side. The message
        never contains internal details. Retry with backoff; if it keeps
        happening, email support@hoppier.com.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: internal_error
            message: An unexpected error occurred.
  headers:
    RetryAfter:
      description: Whole seconds to wait before retrying.
      schema:
        type: string
      example: '30'
    RateLimitRemaining:
      description: >-
        Per-address limit only. Requests left in the current 10-second window,
        so `0` on a 429.
      schema:
        type: string
      example: '0'
    RateLimitReset:
      description: >-
        Per-address limit only. When the window refills, as a Unix timestamp in
        seconds.
      schema:
        type: string
      example: '1793491210'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: hk_live.<prefix>.<secret>
      description: >
        Send your key in the `Authorization` header: `Authorization: Bearer
        hk_live.…`. The word `Bearer` is case-sensitive.


        Keys are shown once. Treat them like passwords and never put one in code
        that runs in a browser or an app.

````

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