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

# List a customer's accounts

> Lists the accounts a customer holds with your program, each with the
`account_id` needed to read it in detail and the type of product it is.

Scoped to the product your API key is issued for, so it never returns an
account a customer holds with another program. A customer who has no
account with your program returns `404`.

**Required scope:** `ACCOUNT_READ`




## OpenAPI

````yaml /api-reference/openapi.yaml get /v2/customers/{customer_id}/accounts
openapi: 3.1.0
info:
  title: Public Imprint API
  version: '2.0'
servers:
  - url: https://dev.sbx.imprint.co
    description: Imprint public api sandbox
security:
  - basicAuth: []
  - bearerAuth: []
paths:
  /v2/customers/{customer_id}/accounts:
    get:
      tags:
        - Customers
      summary: List a customer's accounts
      description: |
        Lists the accounts a customer holds with your program, each with the
        `account_id` needed to read it in detail and the type of product it is.

        Scoped to the product your API key is issued for, so it never returns an
        account a customer holds with another program. A customer who has no
        account with your program returns `404`.

        **Required scope:** `ACCOUNT_READ`
      operationId: listAccounts
      parameters:
        - $ref: '#/components/parameters/customerIdParam'
          name: customer_id
          in: path
      responses:
        '200':
          description: The customer's accounts
          content:
            application/json:
              schema:
                type: object
                required:
                  - accounts
                properties:
                  accounts:
                    type: array
                    items:
                      $ref: '#/components/schemas/AccountSummary'
        '403':
          description: API key is missing the required `ACCOUNT_READ` scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Customer not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerNotFoundError'
components:
  parameters:
    customerIdParam:
      name: customer_id
      in: path
      required: true
      description: The unique identifier for the Imprint customer
      schema:
        type: string
        example: 2EE24580-B97B-4949-A65C-929CCB9B9B8D
  schemas:
    AccountSummary:
      type: object
      description: |
        One account a customer holds with your program, identifying it and the
        type of product it is. Read the full servicing snapshot with
        `GET /v2/customers/{customer_id}/accounts/{account_id}`.
      required:
        - account_id
      properties:
        account_id:
          type: string
          description: The unique identifier for the account
          example: 7C1F9A34-2D6B-4E58-8A03-B15E7D9C4620
        account_type:
          $ref: '#/components/schemas/AccountType'
    ApiError:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - type
            - message
          properties:
            type:
              type: string
              description: The category of error being returned
              example: BAD_REQUEST_ERROR
            message:
              type: string
              description: A message describing the cause of the error
              example: 'unsupported reward_type: INVALID, must be STATEMENT or DELAYED'
    CustomerNotFoundError:
      type: object
      required:
        - type
        - message
      properties:
        type:
          type: string
          description: The category of error being returned
          example: CUSTOMER_NOT_FOUND_ERROR
        message:
          type: string
          description: A message describing the cause of the error
          example: 'Customer not found for provided ID: CSMR-v1-123'
        param:
          type: string
          description: The param causing the error
          example: customer_id
    AccountType:
      type: string
      description: |
        The type of product the account is. Absent when the product's type could
        not be determined.
      enum:
        - CREDITCARD
        - SECUREDCREDITCARD
        - INSTALLMENT_LOAN
        - SPENDCARD
      example: CREDITCARD
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        Basic HTTP authentication. Allowed headers-- Authorization: Basic
        <base64(api_key_id:api_key_secret)>
    bearerAuth:
      bearerFormat: auth-scheme
      description: >-
        Bearer HTTP authentication. Allowed headers-- Authorization: Bearer
        <api_key>
      scheme: bearer
      type: http

````