Pular para o conteúdo principal
POST
/
api
/
v1
/
loan-applications
/
{id}
/
withdraw
Retirar solicitação de empréstimo
curl --request POST \
  --url https://lender.sandbox.lerian.net/api/v1/loan-applications/{id}/withdraw \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "decisionAt": "<string>",
  "reason": "<string>"
}
'
import requests

url = "https://lender.sandbox.lerian.net/api/v1/loan-applications/{id}/withdraw"

payload = {
"decisionAt": "<string>",
"reason": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({decisionAt: '<string>', reason: '<string>'})
};

fetch('https://lender.sandbox.lerian.net/api/v1/loan-applications/{id}/withdraw', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://lender.sandbox.lerian.net/api/v1/loan-applications/{id}/withdraw",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'decisionAt' => '<string>',
'reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://lender.sandbox.lerian.net/api/v1/loan-applications/{id}/withdraw"

payload := strings.NewReader("{\n \"decisionAt\": \"<string>\",\n \"reason\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://lender.sandbox.lerian.net/api/v1/loan-applications/{id}/withdraw")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"decisionAt\": \"<string>\",\n \"reason\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://lender.sandbox.lerian.net/api/v1/loan-applications/{id}/withdraw")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"decisionAt\": \"<string>\",\n \"reason\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "assignedOfficerId": "<string>",
  "borrowerId": "<string>",
  "expectedDisbursementDate": "<string>",
  "id": "<string>",
  "loanProductVersionId": "<string>",
  "previewJurisdictionCode": "<string>",
  "previewProfileVersion": "<string>",
  "previewScheduleSnapshotId": "<string>",
  "requestedInstallments": 123,
  "requestedInterestRate": "<string>",
  "requestedPrincipalAmount": "<string>",
  "status": "<string>",
  "approvalDecision": {
    "approvedAmount": "<string>",
    "decidedBy": "<string>",
    "decisionAt": "<string>",
    "id": "<string>",
    "note": "<string>"
  },
  "disbursementEvent": {
    "disbursedAt": "<string>",
    "grossRequestedAmount": "<string>",
    "id": "<string>",
    "loanAccountId": "<string>",
    "netDeliveredAmount": "<string>",
    "profileVersion": "<string>"
  },
  "rejectionDecision": {
    "decidedBy": "<string>",
    "decisionAt": "<string>",
    "id": "<string>",
    "reason": "<string>"
  },
  "withdrawalDecision": {
    "decidedBy": "<string>",
    "decisionAt": "<string>",
    "id": "<string>",
    "reason": "<string>"
  }
}
{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}

Autorizações

Authorization
string
header
obrigatório

JWT bearer token issued by the identity provider.

Parâmetros de caminho

id
string<uuid>
obrigatório

Loan application identifier.

Exemplo:

"3fa85f64-5717-4562-b3fc-2c963f66afa6"

Corpo

application/json
decisionAt
string
obrigatório

Decision timestamp (RFC3339).

Exemplo:

"2026-06-14T12:00:00Z"

reason
string
obrigatório

Withdrawal reason.

Resposta

OK

assignedOfficerId
string
obrigatório

Authenticated officer who created the application (request subject).

borrowerId
string
obrigatório

Borrower identifier.

expectedDisbursementDate
string
obrigatório

Expected disbursement date (RFC3339, UTC).

Exemplo:

"2026-06-14T12:00:00Z"

id
string
obrigatório

Loan application identifier (UUID).

Exemplo:

"3fa85f64-5717-4562-b3fc-2c963f66afa6"

loanProductVersionId
string
obrigatório

Loan product version this application was created against (UUID).

Exemplo:

"550e8400-e29b-41d4-a716-446655440000"

previewJurisdictionCode
string
obrigatório

ISO-2 jurisdiction code resolved at preview time.

Exemplo:

"BR"

previewProfileVersion
string
obrigatório

Jurisdiction profile version resolved at preview time.

Exemplo:

"1.0.0"

previewScheduleSnapshotId
string
obrigatório

Preview schedule snapshot this application was created from (UUID).

Exemplo:

"6ba7b810-9dad-11d1-80b4-00c04fd430c8"

requestedInstallments
integer<int64>
obrigatório

Number of installments requested.

Exemplo:

24

requestedInterestRate
string
obrigatório

Requested monthly interest rate as a decimal string, scale 8 (e.g. "0.00000100").

Exemplo:

"0.00000100"

requestedPrincipalAmount
string
obrigatório

Requested principal amount as a decimal string, minor-unit precision scale 2 (e.g. "50000.00").

Exemplo:

"50000.00"

status
string
obrigatório

Lifecycle status: one of pending_approval, approved, rejected, withdrawn, disbursed.

Exemplo:

"pending_approval"

approvalDecision
object

Approval facts; present only when the application is approved or disbursed.

disbursementEvent
object

Disbursement facts; present only when the application is disbursed.

rejectionDecision
object

Rejection facts; present only when the application is rejected.

withdrawalDecision
object

Withdrawal facts; present only when the application is withdrawn.