# Pending Transfers

## Pending Transfers Resource Overview

| HTTP Method | Resource                                                                                                                                                                                                                                                           | Description                                               |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------- |
| GET         | [`/api/<version>/pending_transfers`](#all-incomplete-transfers)                                                                                                                                                                                                    | All incomplete transfers                                  |
| GET         | [`/api/<version>/pending_transfers/<token_address>`](#all-incomplete-transfers-for-a-specific-token)                                                                                                                                                               | All incomplete transfers for a specific token             |
| GET         | <p><a href="#all-incomplete-transfers-for-a-specific-token-and-channel"><code>/api/\<version>/pending\_transfers/\<token\_address></code></a></p><p><a href="#all-incomplete-transfers-for-a-specific-token-and-channel"><code>/\<partner\_address></code></a></p> | All incomplete transfers for a specific token and channel |

## Pending Transfers Resource Details

## All Incomplete Transfers

<mark style="color:blue;">`GET`</mark> `http://localhost:5001/api/v1/pending_transfers`

The "role" key in the response can either have the value "initiator", "mediator" or "target".

#### Path Parameters

| Name    | Type   | Description        |
| ------- | ------ | ------------------ |
| version | string | Version of the API |

{% tabs %}
{% tab title="200 Successful query" %}

```bash
[
    {
        "channel_identifier": "255",
        "initiator": "0x5E1a3601538f94c9e6D2B40F7589030ac5885FE7",
        "locked_amount": "119",
        "payment_identifier": "1",
        "role": "initiator",
        "target": "0x00AF5cBfc8dC76cd599aF623E60F763228906F3E",
        "token_address": "0xd0A1E359811322d97991E03f863a0C30C2cF029C",
        "token_network_addrss": "0x111157460c0F41EfD9107239B7864c062aA8B978",
        "transferred_amout": "331"
    }
]
```

{% endtab %}

{% tab title="500 " %}

```
Internal Raiden node error
```

{% endtab %}
{% endtabs %}

## All Incomplete Transfers for a Specific Token

<mark style="color:blue;">`GET`</mark> `http://localhost:5001/api/v1/pending_transfers/0xd0A1...029C`

Limits the response to pending transfers of the specified token.\
\
The "role" key in the response can either have the value "initiator", "mediator" or "target".

#### Path Parameters

| Name           | Type   | Description        |
| -------------- | ------ | ------------------ |
| version        | string | Version of the API |
| token\_address | string | Address of a token |

{% tabs %}
{% tab title="200 Successful query" %}

```bash
[
    {
        "channel_identifier": "255",
        "initiator": "0x5E1a3601538f94c9e6D2B40F7589030ac5885FE7",
        "locked_amount": "119",
        "payment_identifier": "1",
        "role": "initiator",
        "target": "0x00AF5cBfc8dC76cd599aF623E60F763228906F3E",
        "token_address": "0xd0A1E359811322d97991E03f863a0C30C2cF029C",
        "token_network_addrss": "0x111157460c0F41EfD9107239B7864c062aA8B978",
        "transferred_amout": "331"
    }
]
```

{% endtab %}

{% tab title="404 " %}

```
No results found for the token specified in the query
```

{% endtab %}

{% tab title="500 " %}

```
Internal Raiden node error
```

{% endtab %}
{% endtabs %}

## All Incomplete Transfers for a Specific Token and Channel

<mark style="color:blue;">`GET`</mark> `http://localhost:5001/api/v1/pending_transfers/0xd0A1...029C/0x2c4b...C685`

Limits the response to pending transfers of the specified token and channel.\
\
The "role" key in the response can either have the value "initiator", "mediator" or "target".

#### Path Parameters

| Name             | Type   | Description                   |
| ---------------- | ------ | ----------------------------- |
| version          | string | Version of the API            |
| token\_address   | string | Address of a token            |
| partner\_address | string | Address of the receiving node |

{% tabs %}
{% tab title="200 Successful query" %}

```bash
[
    {
        "channel_identifier": "255",
        "initiator": "0x5E1a3601538f94c9e6D2B40F7589030ac5885FE7",
        "locked_amount": "119",
        "payment_identifier": "1",
        "role": "initiator",
        "target": "0x00AF5cBfc8dC76cd599aF623E60F763228906F3E",
        "token_address": "0xd0A1E359811322d97991E03f863a0C30C2cF029C",
        "token_network_addrss": "0x111157460c0F41EfD9107239B7864c062aA8B978",
        "transferred_amout": "331"
    }
]
```

{% endtab %}

{% tab title="404 " %}

```
No result found for the token specified in the query
No result found for the channel specified in the query
```

{% endtab %}

{% tab title="500 " %}

```
Internal Raiden node error
```

{% endtab %}
{% endtabs %}
