Request format¶
{ "creditId": 123456, "block": 1 }
Request parameters¶
| Name |
Type |
Purpose |
Description |
| creditId |
int |
Loan ID |
Required |
| block |
int |
Action |
1 — block; 0 — unlock |
Conditions of execution¶
- Access: only the owner of the loan (lender).
- The loan must be in a state of
ready.
- The return date must be in the past (overdue).
- If the borrower is already blocked (for
block=1) — 409 already_blocked.
- If the borrower is not blocked (for
block=0) — 409 not_blocked.
Response format (example)¶
{
"creditId": 123456,
"borrowerWmid": "YYYYYYYYYYYY",
"isBlocked": true,
"status": "blocked"
}
Example call (curl)¶
curl -s -X POST "https://debt.webmoney.com/api/v2/borrowers/block" \
-H "Authorization: Bearer <JWT>" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
--data '{ "creditId": 123456, "block": 1 }'
See also¶
Program Interfaces (API) of Debt Service V2