Fetch disbursement items by ID API


The following endpoint retrieves the details of disbursement items created

/disbursements/:id/items

Path parameters

Fieldis required?Description
idmandatorystring Unique identifier of the disbursement to be retrieved.

Example

curl -u [Base64({Your_Server_Key}:)] \
-X GET https://api.durianpay.id/v1/disbursements/dis_XXXXXXX/items \
-H "content-type: application/json"'

Response Code : 200

Here is an example of success response

{
    "data": {
        "submission_status": "completed",
        "disbursement_batch_items": [
            {
                "id": "dis_item_XXXXX",
                "disbursement_batch_id": "dis_XXXXX",
                "account_owner_name": "John Doe",
                "real_name": "Dummy Name",
                "bank_code": "bca",
                "amount": "10000.00",
                "account_number": "8422647",
                "email_recipient": "john@nomail.com",
                "phone_number": "85609873209",
                "invalid_fields": [
                    {
                        "key": "bank_code",
                        "message": "Invalid BankCode/AccountNumber"
                    },
                    {
                        "key": "account_number",
                        "message": "Invalid BankCode/AccountNumber"
                    }
                ],
                "status": "invalid",
                "notes": "salary",
                "is_deleted": false,
                "created_at": "2021-05-03T13:54:28.842634Z",
                "updated_at": "2021-05-03T13:54:28.842635Z"
            },
            {
                "id": "dis_item_XXXXX",
                "disbursement_batch_id": "dis_XXXXX",
                "account_owner_name": "Jake",
                "real_name": "Dummy Name",
                "bank_code": "bca",
                "amount": "10000.00",
                "account_number": "235464",
                "email_recipient": "jake@nomail.com",
                "phone_number": "85609873209",
                "status": "valid",
                "notes": "salary",
                "is_deleted": false,
                "created_at": "2021-05-03T13:54:28.842637Z",
                "updated_at": "2021-05-03T13:54:28.842637Z"
            }
        ],
        "count": 2,
    }
}

Error Response Code : 401

Here is an example error response for unauthorized access

{
    "error": "invalid Authorization header in request",
    "error_code": "DPAY_UNAUTHORIZED_ACCESS"
}

Error Response Code : 500

Here is an example error response for internal server error

{
    "error": "error getting disbursement batch",
    "error_code": "DPAY_INTERNAL_ERROR"
}