# Accounts

Guru Pay allows you to fetch account information for customers via two endpoints:

* One for listing all accounts tied to a specific customer.
* One for retrieving detailed data about a single account.

{% hint style="warning" %}
You must include your **Bearer token** in the request header.
{% endhint %}

## Get Customer Accounts List

> Retrieves a paginated list of accounts associated with the given customer UUID.

```json
{"openapi":"3.0.0","info":{"title":"GURUPAY API","version":"0.2.0"},"tags":[{"name":"Accounts","description":"Services intended to work with customer accounts."}],"servers":[{"url":"https://public-api.gurupay.eu","description":"Production API Server"},{"url":"https://public-api-dev.gurupay.eu","description":"Sandbox API Server"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","description":"Authentication using a Bearer token.","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"}},"schemas":{"UUID":{"description":"Universally Unique Identifier (UUID) as defined by RFC 4122.","type":"string","format":"uuid","pattern":"^[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12}$"},"perPage":{"description":"Number of items to return per page in a paginated response.","type":"integer","default":15,"maximum":100,"minimum":1},"page":{"description":"The current page number for paginated results.","type":"integer","default":1,"minimum":1},"API.Resources.AccountResource":{"properties":{"uuid":{"description":"The unique identifier (UUID) of the account.","type":"string","format":"uuid"},"status":{"description":"The current status of the account.","type":"string","enum":["created","disabled"]},"customer_uuid":{"description":"The unique identifier (UUID) of the customer who owns this account.","type":"string","format":"uuid"},"account_name":{"description":"The name associated with the account.","type":"string","nullable":true},"account_number":{"description":"The unique account number.","type":"string"},"currency":{"description":"The currency code of the account","type":"string","enum":["EUR","GBP","USD"]},"opening_date":{"description":"The date when the account was opened (ISO 8601 format).","type":"string","format":"date"},"opening_date_unix":{"$ref":"#/components/schemas/Timestamp"},"balance":{"description":"The current ledger balance of the account.","type":"number","format":"float"},"balance_national":{"description":"The current ledger balance of the account in the national currency.","type":"number","format":"float"},"book_balance":{"description":"The available book balance of the account. **Not used**","type":"number","format":"float"},"book_balance_national":{"description":"The available book balance of the account in the national currency. **Not used**","type":"number","format":"float"},"available_balance":{"description":"The current available balance of the account.","type":"number","format":"float"},"available_balance_national":{"description":"The current available balance of the account in the national currency.","type":"number","format":"float"},"hold":{"description":"The total amount of funds currently on hold in the account's currency. **Not used**","type":"number","format":"float"},"cards_reserved_amount":{"description":"The total amount reserved for card transactions in the account's currency. **Not used**","type":"number","format":"float"},"cards_reserved_amount_national":{"description":"The total amount reserved for card transactions in the national currency. **Not used**","type":"number","format":"float"},"created_at":{"$ref":"#/components/schemas/Timestamp"},"updated_at":{"$ref":"#/components/schemas/Timestamp"},"account_type":{"description":"The type of the account.","type":"string","enum":["current","virtual","virtual_parent"]},"virtual_account_holder":{"description":"Details of the virtual account holder, if applicable.","properties":{"name":{"description":"The name of the virtual account holder.","type":"string","nullable":true},"person_type":{"description":"The type of person (e.g., natural, company).","type":"string","nullable":true},"external_id":{"description":"The external ID provided when creating IBAN","type":"string","nullable":true},"citizenship":{"description":"The citizenship of the virtual account holder.","type":"string","nullable":true},"address":{"description":"The address of the virtual account holder.","type":"string","nullable":true},"parent_uuid":{"description":"The uuid of parent account","type":"string","nullable":true},"parent_iban":{"description":"The IBAN of the parent account.","type":"string","nullable":true}},"type":"object","nullable":true}},"type":"object"},"Timestamp":{"description":"A Unix timestamp in seconds.","type":"integer","format":"int64"},"UnauthenticatedResponse":{"properties":{"status":{"type":"boolean"},"status_code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"type":"string"}}},"type":"object"},"ValidationResponse":{"title":"Validation Error Response","description":"Standard response format for validation errors (HTTP 422).","required":["status","status_code","message","errors"],"properties":{"status":{"type":"boolean"},"status_code":{"type":"integer"},"message":{"type":"string"},"errors":{"description":"An object containing validation errors. Keys are field names, values are arrays of error messages for that field.","type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"type":"object"}}},"paths":{"/api/v1/customers/{customer_uuid}/accounts":{"get":{"tags":["Accounts"],"summary":"Get Customer Accounts List","description":"Retrieves a paginated list of accounts associated with the given customer UUID.","operationId":"API.Accounts.Get","parameters":[{"name":"customer_uuid","in":"path","description":"The unique identifier (UUID) of the customer.","required":true,"schema":{"$ref":"#/components/schemas/UUID"}},{"name":"per_page","in":"query","description":"The maximum number of accounts to return per page. Defaults to a predefined value (e.g., 15) if not specified.","required":false,"schema":{"$ref":"#/components/schemas/perPage"}},{"name":"page","in":"query","description":"The page number to retrieve, based on the per_page limit. Starts from 1. Defaults to 1 if not specified.","required":false,"schema":{"$ref":"#/components/schemas/page"}}],"responses":{"200":{"description":"Successful retrieval of customer accounts.","headers":{"X-RateLimit-Limit":{"description":"The maximum number of requests allowed per minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current window.","schema":{"type":"integer"}},"X-Api-Total":{"description":"Total number of records matching the filter criteria.","schema":{"type":"integer"}},"X-Api-Per-Page":{"description":"Number of records returned on the current page.","schema":{"type":"integer"}},"X-Api-Has-More-Pages":{"description":"Indicates if there are more pages available.","schema":{"type":"boolean"}},"X-Api-Has-Has-Page":{"description":"The current page number being returned.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/API.Resources.AccountResource"}}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"422":{"description":"Unprocessable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationResponse"}}}}}}}}}
```

## Get Specific Account Details

> Retrieves the full details for a single account identified by its UUID, scoped to a specific customer.

```json
{"openapi":"3.0.0","info":{"title":"GURUPAY API","version":"0.2.0"},"tags":[{"name":"Accounts","description":"Services intended to work with customer accounts."}],"servers":[{"url":"https://public-api.gurupay.eu","description":"Production API Server"},{"url":"https://public-api-dev.gurupay.eu","description":"Sandbox API Server"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","description":"Authentication using a Bearer token.","name":"Authorization","in":"header","bearerFormat":"JWT","scheme":"bearer"}},"schemas":{"UUID":{"description":"Universally Unique Identifier (UUID) as defined by RFC 4122.","type":"string","format":"uuid","pattern":"^[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12}$"},"API.Resources.AccountResource":{"properties":{"uuid":{"description":"The unique identifier (UUID) of the account.","type":"string","format":"uuid"},"status":{"description":"The current status of the account.","type":"string","enum":["created","disabled"]},"customer_uuid":{"description":"The unique identifier (UUID) of the customer who owns this account.","type":"string","format":"uuid"},"account_name":{"description":"The name associated with the account.","type":"string","nullable":true},"account_number":{"description":"The unique account number.","type":"string"},"currency":{"description":"The currency code of the account","type":"string","enum":["EUR","GBP","USD"]},"opening_date":{"description":"The date when the account was opened (ISO 8601 format).","type":"string","format":"date"},"opening_date_unix":{"$ref":"#/components/schemas/Timestamp"},"balance":{"description":"The current ledger balance of the account.","type":"number","format":"float"},"balance_national":{"description":"The current ledger balance of the account in the national currency.","type":"number","format":"float"},"book_balance":{"description":"The available book balance of the account. **Not used**","type":"number","format":"float"},"book_balance_national":{"description":"The available book balance of the account in the national currency. **Not used**","type":"number","format":"float"},"available_balance":{"description":"The current available balance of the account.","type":"number","format":"float"},"available_balance_national":{"description":"The current available balance of the account in the national currency.","type":"number","format":"float"},"hold":{"description":"The total amount of funds currently on hold in the account's currency. **Not used**","type":"number","format":"float"},"cards_reserved_amount":{"description":"The total amount reserved for card transactions in the account's currency. **Not used**","type":"number","format":"float"},"cards_reserved_amount_national":{"description":"The total amount reserved for card transactions in the national currency. **Not used**","type":"number","format":"float"},"created_at":{"$ref":"#/components/schemas/Timestamp"},"updated_at":{"$ref":"#/components/schemas/Timestamp"},"account_type":{"description":"The type of the account.","type":"string","enum":["current","virtual","virtual_parent"]},"virtual_account_holder":{"description":"Details of the virtual account holder, if applicable.","properties":{"name":{"description":"The name of the virtual account holder.","type":"string","nullable":true},"person_type":{"description":"The type of person (e.g., natural, company).","type":"string","nullable":true},"external_id":{"description":"The external ID provided when creating IBAN","type":"string","nullable":true},"citizenship":{"description":"The citizenship of the virtual account holder.","type":"string","nullable":true},"address":{"description":"The address of the virtual account holder.","type":"string","nullable":true},"parent_uuid":{"description":"The uuid of parent account","type":"string","nullable":true},"parent_iban":{"description":"The IBAN of the parent account.","type":"string","nullable":true}},"type":"object","nullable":true}},"type":"object"},"Timestamp":{"description":"A Unix timestamp in seconds.","type":"integer","format":"int64"},"UnauthenticatedResponse":{"properties":{"status":{"type":"boolean"},"status_code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"type":"string"}}},"type":"object"},"ValidationResponse":{"title":"Validation Error Response","description":"Standard response format for validation errors (HTTP 422).","required":["status","status_code","message","errors"],"properties":{"status":{"type":"boolean"},"status_code":{"type":"integer"},"message":{"type":"string"},"errors":{"description":"An object containing validation errors. Keys are field names, values are arrays of error messages for that field.","type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"type":"object"}}},"paths":{"/api/v1/customers/{customer_uuid}/accounts/{account_uuid}":{"get":{"tags":["Accounts"],"summary":"Get Specific Account Details","description":"Retrieves the full details for a single account identified by its UUID, scoped to a specific customer.","operationId":"API.Accounts.Show","parameters":[{"name":"customer_uuid","in":"path","description":"The unique identifier (UUID) of the customer.","required":true,"schema":{"$ref":"#/components/schemas/UUID"}},{"name":"account_uuid","in":"path","description":"The unique identifier (UUID) of the account to retrieve.","required":true,"schema":{"$ref":"#/components/schemas/UUID"}}],"responses":{"200":{"description":"Successful retrieval of account details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API.Resources.AccountResource"}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"422":{"description":"Unprocessable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationResponse"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.gurupay.eu/api-reference/accounts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
