# Retrieve Transaction Documents
source: https://developer.mastercard.com/mastercard-processing-core/documentation/use-cases/transactions-and-fees-management/retrieve-trans-docs/index.md

## Overview {#overview}

The use case describes how you retrieve the transactions for the contract in a defined period. Refer to [Transactions and Documents](https://developer.mastercard.com/mastercard-processing-core/documentation/guides/transactions-and-documents/index.md) for more information. Use additional filtering to retrieve only the transaction documents:

* of the specified type (query parameter `transaction_type_codes`)
* which are authorized (query parameter `authorized`)
* containing information about authorization documents (query parameter `collect_authorizations`)
* with different impacts on the contract's balance (query parameter `authorization_filter_mode`)
* of the specified direction -- credit or debit (query parameter `direction`)
* with the contract's hierarchy analysis (query parameter `contract_hierarchy`)

## Sequence diagram {#sequence-diagram}

Diagram retrieve-trans-docs

### Explanation {#explanation}

1. The server sends a `GET` request to the `/contracts/{contract_id}/transaction-documents` endpoint. To retrieve data for the account contract or card contract, the server must put the `accountContractId` or `cardContractId`, respectively, in place of the `contract_id` in the path. The server must also define the posting date period for which transaction documents must be retrieved using the required path parameters `date_from` and `date_to` in the request. Tip: The `transaction_type_codes` is serialized with `explode: false`, so if you want to define more than one transaction type code, they must be separated by a comma. For example, `/contracts/{contract_id}/transaction-documents?transaction_type_codes=0515,0700`
2. The API returns a list of transaction documents. Refer to [Endpoint](https://developer.mastercard.com/mastercard-processing-core/documentation/use-cases/transactions-and-fees-management/retrieve-trans-docs/index.md#endpoint) to check the complete list of data returned by the endpoint. Tip: The operation supports [pagination](https://developer.mastercard.com/mastercard-processing-core/documentation/api-basics-section/pagination-filtering/index.md). Refer to [Sandbox testing](https://developer.mastercard.com/mastercard-processing-core/documentation/sandbox-testing/transactions-and-fees-management/retrieve-trans-docs/index.md) for information on how to execute the use case in the Sandbox environment.

## Endpoint {#endpoint}


API Reference: `GET /contracts/{contract_id}/transaction-documents`

