# Retrieve the accounts

Retrieve the accounts associated with the client.

Endpoint: GET /accounts
Version: 1.0.0
Security: bearer-jwt

## Security:

  - `bearer-jwt` (unknown)
    http bearer JWT

## Header parameters:

  - `API-Version` (string)

## Response 200:

  - `200` (unknown)
    Successful stream of accounts. IMPORTANT: The accounts are returned in NDJSON format (one account json object per line), not as an array.

## Response 200 fields (application/x-ndjson):

  - `accountIdentification` (object, required)

  - `accountIdentification.id` (string, required)
    The 64 characters account identifier.
    Example: f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2

  - `accountIdentification.number` (string, required)
    The 16 digit account number.
    Example: 1234567890123456

  - `status` (string, required)
    The account status.
    Enum: "AuthorizationProhibited", "Bankrupt", "ChargeOff", "Closed", "Frozen", "InterestAccrualProhibited", "Lost", "Normal", "Revoked", "Stolen"

  - `internalStatus` (string, required)
    The account internal status.
    Enum: "CreditBalance", "Delinquent", "DelinquentAndOverLimit", "Normal", "OverLimit"

  - `currentBalance` (number, required)
    The account current balance.
    Example: 1000

  - `creditLimit` (number, required)
    The account credit limit.
    Example: 10000

  - `annualRates` (object, required)

  - `annualRates.cash` (number, required)
    The cash rate in percent.
    Example: 19.99

  - `annualRates.merchandise` (number, required)
    The merchandise rate in percent.
    Example: 12.99

  - `openingDate` (string, required)
    The account opening date.
    Example: 2022-01-31

  - `paymentDueDate` (string | null)
    The account payment due date.
    Example: 2022-02-01

  - `nextCycleDate` (string, required)
    The account next cycle date.
    Example: 2022-03-01

  - `cycleToDatePaymentPosted` (number, required)
    The account cycle to date payment amount posted.
    Example: 1000

  - `lastStatementPaymentAmount` (number, required)
    The account last statement payment amount.
    Example: 1000

  - `primaryCardholder` (object, required)

  - `primaryCardholder.ssnId` (string, required)
    The individual social security number identifier.
    Example: b2ce1ee6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2

  - `primaryCardholder.ssn` (string, required)
    The 9 digit social security number.
    Example: 123456789

  - `primaryCardholder.name` (string, required)
    The individual name.
    Example: Doe, John

  - `primaryCardholder.dob` (string, required)
    The individual date of birth.
    Example: 1970-01-01

  - `secondaryCardholder` (any)
    The account optional secondary cardholder.

## Response 400:

  - `400` (unknown)
    Bad request.

## Response 400 fields (application/x-ndjson):

  - `type` (string)
    The URI of the problem type
    Example: urn:raipartners:api

  - `title` (string)
    The title of the problem
    Example: Bad Request

  - `status` (integer)
    The status code of the problem
    Example: 400

  - `detail` (string)
    The details of the problem
    Example: One or more required fields are missing.

  - `instance` (string)
    The instance of the problem
    Example: /account/12345/errors/abc-987

  - `properties` (object)
    extra properties to enhance information about the problem

## Response 401:

  - `401` (unknown)
    Unauthorized.

## Response 401 fields (application/x-ndjson):

  - `type` (string)
    The URI of the problem type
    Example: urn:raipartners:api

  - `title` (string)
    The title of the problem
    Example: Bad Request

  - `status` (integer)
    The status code of the problem
    Example: 400

  - `detail` (string)
    The details of the problem
    Example: One or more required fields are missing.

  - `instance` (string)
    The instance of the problem
    Example: /account/12345/errors/abc-987

  - `properties` (object)
    extra properties to enhance information about the problem

## Response 403:

  - `403` (unknown)
    Forbidden.

## Response 403 fields (application/x-ndjson):

  - `type` (string)
    The URI of the problem type
    Example: urn:raipartners:api

  - `title` (string)
    The title of the problem
    Example: Bad Request

  - `status` (integer)
    The status code of the problem
    Example: 400

  - `detail` (string)
    The details of the problem
    Example: One or more required fields are missing.

  - `instance` (string)
    The instance of the problem
    Example: /account/12345/errors/abc-987

  - `properties` (object)
    extra properties to enhance information about the problem

## Response 404:

  - `404` (unknown)
    not found.

## Response 404 fields (application/x-ndjson):

  - `type` (string)
    The URI of the problem type
    Example: urn:raipartners:api

  - `title` (string)
    The title of the problem
    Example: Bad Request

  - `status` (integer)
    The status code of the problem
    Example: 400

  - `detail` (string)
    The details of the problem
    Example: One or more required fields are missing.

  - `instance` (string)
    The instance of the problem
    Example: /account/12345/errors/abc-987

  - `properties` (object)
    extra properties to enhance information about the problem

## Response 500:

  - `500` (unknown)
    Internal Server Error.

## Response 500 fields (application/x-ndjson):

  - `type` (string)
    The URI of the problem type
    Example: urn:raipartners:api

  - `title` (string)
    The title of the problem
    Example: Bad Request

  - `status` (integer)
    The status code of the problem
    Example: 400

  - `detail` (string)
    The details of the problem
    Example: One or more required fields are missing.

  - `instance` (string)
    The instance of the problem
    Example: /account/12345/errors/abc-987

  - `properties` (object)
    extra properties to enhance information about the problem

## Response 503:

  - `503` (unknown)
    Service unavailable.

## Response 503 fields (application/x-ndjson):

  - `type` (string)
    The URI of the problem type
    Example: urn:raipartners:api

  - `title` (string)
    The title of the problem
    Example: Bad Request

  - `status` (integer)
    The status code of the problem
    Example: 400

  - `detail` (string)
    The details of the problem
    Example: One or more required fields are missing.

  - `instance` (string)
    The instance of the problem
    Example: /account/12345/errors/abc-987

  - `properties` (object)
    extra properties to enhance information about the problem

## Response 400 examples:

  - `Generic invalid data` (unknown)
    Generic invalid data

  - `Generic missing data` (unknown)
    Generic missing data

## Response 401 examples:

  - `Unauthorized` (unknown)
    Unauthorized

## Response 403 examples:

  - `Forbidden` (unknown)
    Forbidden

## Response 404 examples:

  - `Not found` (unknown)
    Not found

## Response 500 examples:

  - `Internal server error` (unknown)
    Internal server error

## Response 503 examples:

  - `Service unavailable` (unknown)
    Service unavailable

