# Statements

Manages generation and retrieval of account statement resources for a given customer. \
\
Use the **Generate** endpoint to create a statement asynchronously and receive its **UUID**.\
Once processing is complete, the **Get** endpoint can be used to fetch full details including a `file_url` for downloading the report. \
The List endpoint returns a paginated collection of statements for the specified customer and account.

## Get Account Statement Details

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

```json
{"openapi":"3.0.0","info":{"title":"GURUPAY API","version":"0.2.0"},"tags":[{"name":"AccountsStatements","description":"AccountsStatements"}],"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.AccountStatementResource.Details":{"type":"object","allOf":[{"$ref":"#/components/schemas/API.Resources.AccountStatementResource.Base"},{"properties":{"original_name":{"type":"string"},"mime_type":{"type":"string"},"file_url":{"type":"string","format":"uri"}},"type":"object"}]},"API.Resources.AccountStatementResource.Base":{"properties":{"id":{"type":"integer"},"status":{"type":"string"},"type":{"type":"string"},"balance_type":{"type":"string"},"date_from":{"type":"string","format":"date"},"date_to":{"type":"string","format":"date"},"account_id":{"type":"integer"},"account_iban":{"type":"string"},"account_name":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"},"UnauthenticatedResponse":{"properties":{"status":{"type":"boolean"},"status_code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"type":"string"}}},"type":"object"},"NotFoundResponse":{"properties":{"status":{"type":"boolean"},"status_code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"type":"string"}}},"type":"object"}}},"paths":{"/api/v1/customers/{customer_uuid}/accounts/{account_uuid}/statements/{account_statement_uuid}":{"get":{"tags":["AccountsStatements"],"summary":"Get Account Statement Details","description":"Retrieves the full details for a single account statement by its UUID, scoped to a specific customer.","operationId":"API.AccountStatements.Details","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 of the account.","required":true,"schema":{"$ref":"#/components/schemas/UUID"}}],"responses":{"200":{"description":"Successful retrieval of single customer account statement.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/API.Resources.AccountStatementResource.Details"}}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}}}}}}}
```

## List Account Statements

> Retrieves a paginated list of accounts statements with the given customer UUID and account ID.

```json
{"openapi":"3.0.0","info":{"title":"GURUPAY API","version":"0.2.0"},"tags":[{"name":"AccountsStatements","description":"AccountsStatements"}],"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.AccountStatementResource.Base":{"properties":{"id":{"type":"integer"},"status":{"type":"string"},"type":{"type":"string"},"balance_type":{"type":"string"},"date_from":{"type":"string","format":"date"},"date_to":{"type":"string","format":"date"},"account_id":{"type":"integer"},"account_iban":{"type":"string"},"account_name":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"},"UnauthenticatedResponse":{"properties":{"status":{"type":"boolean"},"status_code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"type":"string"}}},"type":"object"},"NotFoundResponse":{"properties":{"status":{"type":"boolean"},"status_code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"type":"string"}}},"type":"object"}}},"paths":{"/api/v1/customers/{customer_uuid}/statements":{"get":{"tags":["AccountsStatements"],"summary":"List Account Statements","description":"Retrieves a paginated list of accounts statements with the given customer UUID and account ID.","operationId":"API.AccountStatements.List","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 of the account.","required":true,"schema":{"$ref":"#/components/schemas/UUID"}}],"responses":{"200":{"description":"Successful retrieval of customer account statements.","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.AccountStatementResource.Base"}}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}}}}}}}
```

## Generate Account Statement

> Generate account statement in async way

```json
{"openapi":"3.0.0","info":{"title":"GURUPAY API","version":"0.2.0"},"tags":[{"name":"AccountsStatements","description":"AccountsStatements"}],"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.Requests.GenerateAccountStatement":{"title":"Generate Account Statement","description":"Data required to generate an account statement.","required":["type","balance_type","from","to"],"properties":{"type":{"description":"Type of report","type":"string","enum":["csv","pdf","xlsx","xml"]},"balance_type":{"description":"Indicates whether we use available balance or balance (legacy) way to calculate the balance","type":"string","enum":["available_balance","balance"]},"from":{"description":"Start date of the reporting period (YYYY-MM-DD)","type":"string","format":"date"},"to":{"description":"End date of the reporting period (YYYY-MM-DD)","type":"string","format":"date"}},"type":"object"},"API.Resources.IdResource":{"title":"ID Resource","description":"ID from newly created resource","properties":{"id":{"description":"The ID resource which has been created.","type":"string","format":"uuid"}},"type":"object"},"BadRequestResponse":{"properties":{"status":{"type":"boolean"},"status_code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{}}},"type":"object"},"UnauthenticatedResponse":{"properties":{"status":{"type":"boolean"},"status_code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"type":"string"}}},"type":"object"},"NotFoundResponse":{"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}/generate-statement":{"post":{"tags":["AccountsStatements"],"summary":"Generate Account Statement","description":"Generate account statement in async way","operationId":"API.AccountStatements.GenerateStatement","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.","required":true,"schema":{"$ref":"#/components/schemas/UUID"}}],"requestBody":{"description":"Account details necessary to close a virtual account","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/API.Requests.GenerateAccountStatement"}}}},"responses":{"201":{"description":"Generating account statement has been initiated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/API.Resources.IdResource"}}}},"400":{"description":"Max limit transactions per statement reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}},"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/statements.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.
