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

## Test case -- Success {#test-case--success}

This test case describes retrieving balances for a specified contract (account contract or card contract) stored in the CMS.

For this test case, use the following information in the request:

| Query parameter | Available value |
|-----------------|-----------------|
| `balance_codes` | AVAILABLE       |
|                 | BLOCKED         |

**Sample request**

`GET /contracts/70001/balances?balance_codes=AVAILABLE,BLOCKED`

**Sample response**

`200`

```JSON
{
    "contractBalances": [
        {
            "balanceCode": "AVAILABLE",
            "balanceCurrency": "EUR",
            "balanceId": 89516416,
            "balanceValue": 9811.31
        },
        {
            "balanceCode": "BLOCKED",
            "balanceCurrency": "EUR",
            "balanceId": 89516417,
            "balanceValue": 9811.31
        }
    ]
}
```

## Test case -- Success -- Invalid balance code {#test-case--success--invalid-balance-code}

This test case describes retrieving balances for a specified contract (account contract or card contract) stored in the CMS by sending invalid `balance_codes` value in the request.

For this test case, use the following information in the request:

| Query parameter |          Available value          |
|-----------------|-----------------------------------|
| `balance_codes` | Any other than: AVAILABLE BLOCKED |

**Sample request**

`GET /contracts/70001/balances?balance_codes=INVALID`

**Sample response**

`200`

```JSON
{
    "contractBalances": []
}
```

