Create outbound transfer
curl --request POST \
--url https://sta.sandbox.lerian.net/v1/transfers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"credentialId": "<string>",
"documentType": "<string>",
"fileName": "<string>",
"fileRef": "<string>",
"sourceProduct": "<string>"
}
'import requests
url = "https://sta.sandbox.lerian.net/v1/transfers"
payload = {
"credentialId": "<string>",
"documentType": "<string>",
"fileName": "<string>",
"fileRef": "<string>",
"sourceProduct": "<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({
credentialId: '<string>',
documentType: '<string>',
fileName: '<string>',
fileRef: '<string>',
sourceProduct: '<string>'
})
};
fetch('https://sta.sandbox.lerian.net/v1/transfers', 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://sta.sandbox.lerian.net/v1/transfers",
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([
'credentialId' => '<string>',
'documentType' => '<string>',
'fileName' => '<string>',
'fileRef' => '<string>',
'sourceProduct' => '<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://sta.sandbox.lerian.net/v1/transfers"
payload := strings.NewReader("{\n \"credentialId\": \"<string>\",\n \"documentType\": \"<string>\",\n \"fileName\": \"<string>\",\n \"fileRef\": \"<string>\",\n \"sourceProduct\": \"<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://sta.sandbox.lerian.net/v1/transfers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"credentialId\": \"<string>\",\n \"documentType\": \"<string>\",\n \"fileName\": \"<string>\",\n \"fileRef\": \"<string>\",\n \"sourceProduct\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sta.sandbox.lerian.net/v1/transfers")
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 \"credentialId\": \"<string>\",\n \"documentType\": \"<string>\",\n \"fileName\": \"<string>\",\n \"fileRef\": \"<string>\",\n \"sourceProduct\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"bytesDownloaded": 123,
"bytesUploaded": 123,
"createdAt": "2023-11-07T05:31:56Z",
"credentialId": "<string>",
"currentState": "<string>",
"currentStateCode": 123,
"direction": "<string>",
"documentType": "<string>",
"downloadAttempts": 123,
"expired": true,
"fileName": "<string>",
"fileSizeBytes": 123,
"hashMismatchAttempts": 123,
"id": "<string>",
"secondsRemaining": 123,
"transmissionAttempts": 123,
"updatedAt": "2023-11-07T05:31:56Z",
"uploadAttempts": 123,
"errorCode": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"fileRef": "<string>",
"lastTransitError": "<string>",
"protocolGeneratedAt": "2023-11-07T05:31:56Z",
"protocolNumber": "<string>",
"sourceProduct": "<string>",
"urgentRequestedAt": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}Create outbound transfer
Creates a new outbound transfer. The worker streams the referenced object to BACEN STA asynchronously.
POST
/
v1
/
transfers
Create outbound transfer
curl --request POST \
--url https://sta.sandbox.lerian.net/v1/transfers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"credentialId": "<string>",
"documentType": "<string>",
"fileName": "<string>",
"fileRef": "<string>",
"sourceProduct": "<string>"
}
'import requests
url = "https://sta.sandbox.lerian.net/v1/transfers"
payload = {
"credentialId": "<string>",
"documentType": "<string>",
"fileName": "<string>",
"fileRef": "<string>",
"sourceProduct": "<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({
credentialId: '<string>',
documentType: '<string>',
fileName: '<string>',
fileRef: '<string>',
sourceProduct: '<string>'
})
};
fetch('https://sta.sandbox.lerian.net/v1/transfers', 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://sta.sandbox.lerian.net/v1/transfers",
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([
'credentialId' => '<string>',
'documentType' => '<string>',
'fileName' => '<string>',
'fileRef' => '<string>',
'sourceProduct' => '<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://sta.sandbox.lerian.net/v1/transfers"
payload := strings.NewReader("{\n \"credentialId\": \"<string>\",\n \"documentType\": \"<string>\",\n \"fileName\": \"<string>\",\n \"fileRef\": \"<string>\",\n \"sourceProduct\": \"<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://sta.sandbox.lerian.net/v1/transfers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"credentialId\": \"<string>\",\n \"documentType\": \"<string>\",\n \"fileName\": \"<string>\",\n \"fileRef\": \"<string>\",\n \"sourceProduct\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sta.sandbox.lerian.net/v1/transfers")
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 \"credentialId\": \"<string>\",\n \"documentType\": \"<string>\",\n \"fileName\": \"<string>\",\n \"fileRef\": \"<string>\",\n \"sourceProduct\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"bytesDownloaded": 123,
"bytesUploaded": 123,
"createdAt": "2023-11-07T05:31:56Z",
"credentialId": "<string>",
"currentState": "<string>",
"currentStateCode": 123,
"direction": "<string>",
"documentType": "<string>",
"downloadAttempts": 123,
"expired": true,
"fileName": "<string>",
"fileSizeBytes": 123,
"hashMismatchAttempts": 123,
"id": "<string>",
"secondsRemaining": 123,
"transmissionAttempts": 123,
"updatedAt": "2023-11-07T05:31:56Z",
"uploadAttempts": 123,
"errorCode": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"fileRef": "<string>",
"lastTransitError": "<string>",
"protocolGeneratedAt": "2023-11-07T05:31:56Z",
"protocolNumber": "<string>",
"sourceProduct": "<string>",
"urgentRequestedAt": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}Authorizations
JWT bearer token issued by the identity provider.
Headers
Idempotency key. A repeat with the same key within the dedup window replays the original 201 outcome.
Body
application/json
Response
Created
Was this page helpful?
⌘I

