Cotar antecipação
curl --request POST \
--url https://api.korbit.com.br/v1/advance/quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'idempotency-key: <idempotency-key>' \
--data '
{
"scheduleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 4503599627370496
}
'import requests
url = "https://api.korbit.com.br/v1/advance/quotes"
payload = {
"scheduleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 4503599627370496
}
headers = {
"idempotency-key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'idempotency-key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({scheduleId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', amount: 4503599627370496})
};
fetch('https://api.korbit.com.br/v1/advance/quotes', 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://api.korbit.com.br/v1/advance/quotes",
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([
'scheduleId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => 4503599627370496
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"idempotency-key: <idempotency-key>"
],
]);
$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://api.korbit.com.br/v1/advance/quotes"
payload := strings.NewReader("{\n \"scheduleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 4503599627370496\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("idempotency-key", "<idempotency-key>")
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://api.korbit.com.br/v1/advance/quotes")
.header("idempotency-key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"scheduleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 4503599627370496\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.korbit.com.br/v1/advance/quotes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["idempotency-key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"scheduleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 4503599627370496\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scheduleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 4503599627370496,
"feeAmount": 4503599627370496,
"netAmount": 4503599627370496,
"pricingPolicyCode": "<string>",
"pricingPolicyVersion": 2,
"pricingModel": "FLAT_PERCENT",
"rateBps": 5000,
"chargeableDays": 183,
"riskScore": 500,
"scheduledReleaseAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z"
}{
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"code": "<string>"
}Antecipações
Cotar antecipação
Gera a cotação: valor bruto, taxa de desconto e valor líquido a receber. A cotação tem validade própria — usar depois de expirar retorna 409 ADVANCE_QUOTE_EXPIRED.
POST
/
v1
/
advance
/
quotes
Cotar antecipação
curl --request POST \
--url https://api.korbit.com.br/v1/advance/quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'idempotency-key: <idempotency-key>' \
--data '
{
"scheduleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 4503599627370496
}
'import requests
url = "https://api.korbit.com.br/v1/advance/quotes"
payload = {
"scheduleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 4503599627370496
}
headers = {
"idempotency-key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'idempotency-key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({scheduleId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', amount: 4503599627370496})
};
fetch('https://api.korbit.com.br/v1/advance/quotes', 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://api.korbit.com.br/v1/advance/quotes",
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([
'scheduleId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => 4503599627370496
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"idempotency-key: <idempotency-key>"
],
]);
$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://api.korbit.com.br/v1/advance/quotes"
payload := strings.NewReader("{\n \"scheduleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 4503599627370496\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("idempotency-key", "<idempotency-key>")
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://api.korbit.com.br/v1/advance/quotes")
.header("idempotency-key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"scheduleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 4503599627370496\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.korbit.com.br/v1/advance/quotes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["idempotency-key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"scheduleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 4503599627370496\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scheduleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 4503599627370496,
"feeAmount": 4503599627370496,
"netAmount": 4503599627370496,
"pricingPolicyCode": "<string>",
"pricingPolicyVersion": 2,
"pricingModel": "FLAT_PERCENT",
"rateBps": 5000,
"chargeableDays": 183,
"riskScore": 500,
"scheduledReleaseAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z"
}{
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 499,
"title": "<string>",
"type": "<string>",
"code": "<string>"
}A taxa depende do tempo restante até a liberação: antecipar mais perto da data custa menos. Compare cotações em datas diferentes antes de decidir.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Required string length:
1 - 255Pattern:
^[A-Za-z0-9_-]{43}$Body
application/json
Response
Default Response
Required range:
1 <= x <= 9007199254740991Required range:
1 <= x <= 9007199254740991Required range:
1 <= x <= 9007199254740991Required range:
x >= 1Available options:
FLAT_PERCENT, DAILY_RATE Required range:
1 <= x <= 10000Required range:
1 <= x <= 365Required range:
0 <= x <= 1000Was this page helpful?