# Retrieve Contract’s Balances
source: https://developer.mastercard.com/mastercard-processing-core/documentation/use-cases/data-management/query-cms-get-particular-data/retrieve-con-balances/index.md

## Overview {#overview}

The use case describes how you retrieve the information about the balances for the contract (account contract or card contract).

## Sequence diagram {#sequence-diagram}

Diagram retrieve-con-balances

### Explanation {#explanation}

1. The server sends a `GET` request to the `/contracts/{contract_id}/balances` endpoint. To retrieve balances for the account contract or card contract, the server must put `accountContractId` or `cardContractId`, respectively, in place of `contract_id` in the path. The server must pass a list of balance codes to be be returned by the API in the `balance_codes` query parameter. Note: The balance codes are preconfigured in the Mastercard Processing CMS system. A list of possible `balanceCode` values is defined during the onboarding process. In the generic solution, some default `balanceCode` values are `AVAILABLE` or `BLOCKED`. Tip: The `balance_codes` is serialized with the `explode: false`; hence, it must be separated with a comma. For example, `/contracts/{contract_id}/balances?balance_codes=AVAILABLE,BLOCKED`
2. The API returns a list of `balanceCode` containing details, such as balance ID in the CMS, currency, and the current amount available on balance. Refer to [Endpoint](https://developer.mastercard.com/mastercard-processing-core/documentation/use-cases/data-management/query-cms-get-particular-data/retrieve-con-balances/index.md#endpoint) to check the complete list of data returned by the endpoint.

Refer to [Sandbox testing](https://developer.mastercard.com/mastercard-processing-core/documentation/sandbox-testing/data-management/query-cms-to-get-particular-data/retrieve-con-balances/index.md) for information on how to execute the use case in the Sandbox environment.

## Endpoint {#endpoint}


API Reference: `GET /contracts/{contract_id}/balances`

