Get an owner ID-file upload URL
curl --request POST \
--url https://api-prod.blaaiz.com/api/external/customer/{customer}/owner/{owner}/file/presigned-url \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api-prod.blaaiz.com/api/external/customer/{customer}/owner/{owner}/file/presigned-url"
payload = {}
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({})
};
fetch('https://api-prod.blaaiz.com/api/external/customer/{customer}/owner/{owner}/file/presigned-url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://api-prod.blaaiz.com/api/external/customer/{customer}/owner/{owner}/file/presigned-url")
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 = "{}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-prod.blaaiz.com/api/external/customer/{customer}/owner/{owner}/file/presigned-url",
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([
]),
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;
}{
"message": "Upload URL generated successfully",
"data": {
"file_id": "f6c04a3e-3cdb-4b07-87e5-7a7c0d8b1c10",
"url": "https://s3.amazonaws.com/...?X-Amz-Signature=...",
"headers": {
"x-amz-acl": "private"
}
}
}{
"message": "Cannot upload files for an owner that has been approved or is currently under review."
}Owners (business customers)
Get an owner ID-file upload URL
Two-step upload, step one. Returns a file_id, a presigned url, and the headers required to PUT the file directly to S3. URL is valid for 5 minutes and accepts a single PUT.
Step two: call POST /api/external/customer/{customer}/owner/{owner}/files with the same file_id to register the file against the owner.
Max file size 25 MB. Allowed MIME: application/pdf, image/jpeg, image/png. Owner must not be locked (status APPROVED or PROCESSING). Required scope: customer:write.
POST
/
api
/
external
/
customer
/
{customer}
/
owner
/
{owner}
/
file
/
presigned-url
Get an owner ID-file upload URL
curl --request POST \
--url https://api-prod.blaaiz.com/api/external/customer/{customer}/owner/{owner}/file/presigned-url \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api-prod.blaaiz.com/api/external/customer/{customer}/owner/{owner}/file/presigned-url"
payload = {}
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({})
};
fetch('https://api-prod.blaaiz.com/api/external/customer/{customer}/owner/{owner}/file/presigned-url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://api-prod.blaaiz.com/api/external/customer/{customer}/owner/{owner}/file/presigned-url")
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 = "{}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-prod.blaaiz.com/api/external/customer/{customer}/owner/{owner}/file/presigned-url",
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([
]),
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;
}{
"message": "Upload URL generated successfully",
"data": {
"file_id": "f6c04a3e-3cdb-4b07-87e5-7a7c0d8b1c10",
"url": "https://s3.amazonaws.com/...?X-Amz-Signature=...",
"headers": {
"x-amz-acl": "private"
}
}
}{
"message": "Cannot upload files for an owner that has been approved or is currently under review."
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
application/json
Slot the upload will populate. Use id_document_front for the front of any ID, id_document_back for the back of two-sided IDs (e.g. driver's license).
Available options:
id_document_front, id_document_back Response
Presigned URL ready.
Was this page helpful?