# Query Collections

### **Request** URL <a href="#payin-by-creditcard" id="payin-by-creditcard"></a>

`POST` `/remittance/collection/query-collections`

### **Request Body**

&#x20;**Refer to :** [**common**](https://docs.pagsmile.com/remittance-api/common)

&#x20;**Biz\_data**&#x20;

<table><thead><tr><th width="234.59375">Name</th><th width="175.515625">Type</th><th>Description</th></tr></thead><tbody><tr><td>merchant_id<mark style="color:red;">*</mark></td><td>long</td><td>Merchant ID</td></tr><tr><td>collection_account_no</td><td>string</td><td>Collection Account Number</td></tr><tr><td>collection_unique_no</td><td>string</td><td>Collection Unique Number</td></tr><tr><td>start_date<mark style="color:red;">*</mark></td><td>string</td><td><p>Begin time</p><p>Format: yyyy-MM-dd HH:mm:ss</p></td></tr><tr><td>end_date<mark style="color:red;">*</mark></td><td>string</td><td>End time<br>Format: yyyy-MM-dd HH:mm:ss</td></tr><tr><td>page_num</td><td>integer</td><td><p>Page Number</p><p>Default value:1</p></td></tr><tr><td>page_size</td><td>integer</td><td><p>Page Size</p><p>Default value:10, </p><p>Max value is 30</p></td></tr></tbody></table>

### Response <a href="#example" id="example"></a>

{% tabs %}
{% tab title="200:submit successfully" %}

```
{
    "code": "10000",
    "msg": "Success",
    "data":[],
    "total":8,
    "random_key":"abssdddd2wdw==",
    "sign_type": "RSA",
    "app_id": "2017051914172236111"
}
```

{% endtab %}

{% tab title="400: invalid-signature" %}

```
{
    "code": "40002",
    "msg": "Business Failed",
    "sub_code": "invalid-signature",
    "sub_msg": "invalid signature"
}
```

{% endtab %}
{% endtabs %}

<table><thead><tr><th width="232.51171875">Name</th><th width="168.93359375">Type</th><th>Description</th></tr></thead><tbody><tr><td>collection_id<mark style="color:red;">*</mark></td><td>long</td><td>Collection ID</td></tr><tr><td>merchant_id<mark style="color:red;">*</mark></td><td>long</td><td>Merchant ID</td></tr><tr><td>material_id</td><td>long</td><td>Material ID</td></tr><tr><td>collection_account_no<mark style="color:red;">*</mark></td><td>string</td><td>Collection Account Number</td></tr><tr><td>receive_amount<mark style="color:red;">*</mark></td><td>string</td><td>Receive Amount</td></tr><tr><td>receive_currency<mark style="color:red;">*</mark></td><td>string</td><td>Receive Currency</td></tr><tr><td>fee</td><td>string</td><td>Service Fee</td></tr><tr><td>arrived_at<mark style="color:red;">*</mark></td><td>string</td><td><p>Arrived At</p><p>Format:yyyy-MM-dd HH:mm:ss</p></td></tr><tr><td>collection_unique_no<mark style="color:red;">*</mark></td><td>string</td><td><p>Collection Unique Number</p><p>Globally unique.</p></td></tr><tr><td>status<mark style="color:red;">*</mark></td><td>integer</td><td><p>Status</p><p>Refer to <a href="../../data/dictionary-item/all-audit-status">Status</a></p></td></tr><tr><td>comments</td><td>string</td><td>Reason description</td></tr><tr><td>sender.name</td><td>string</td><td>Sender Name</td></tr><tr><td>sender.account_no</td><td>string</td><td>Sender Account Num</td></tr><tr><td>sender.account_type</td><td>string</td><td>Sender Account Type</td></tr><tr><td>sender.descriptor</td><td>string</td><td>Sender Descriptor</td></tr><tr><td>sender.id_type</td><td>string</td><td>Sender ID Type</td></tr><tr><td>sender.id_number</td><td>string</td><td>Sender ID Number</td></tr><tr><td>transaction_id</td><td>long</td><td>Transaction ID</td></tr></tbody></table>

### Example <a href="#example" id="example"></a>

<pre><code><strong>
</strong><strong>curl --location --request POST 'https://rem-api-sandbox.pagsmile.com/remittance/collection/query-collections' \
</strong>--header 'Content-Type: application/json' \
--data-raw '
{
    "partner_id": "000000000000001",
    "app_id": "162051914172236138",
    "timestamp": "2011-09-23 04:24:03",
    "format": "JSON",
    "version": "2.0",
    "random_key": "jJT3+PR9CSowcR2QOK5OzMjVmTSjGoectzYbO8lENHnboElE",
    "request_id": "F6bEd39c-EecF-C1a2-AFcb-bA9BAeC8",
    "sign_type": "RSA",
    "biz_data": "jJT3+PR9CSowcR2QOK5OzMjVmTSjGoectzYbO8lENHnboElEjJT3+PR9CSowcR2QOK5OzMjVmTSjGoectzYbO8lENHnboElE"
}'
</code></pre>

```
```

Note: **162\*\*\*\*\*\*\*\*\*\*\*\*38** is pagsmile's test app id for sandbox

Please use your own **app\_id** when testing.
