cURL
curl --request POST \
--url https://service-sandbox.tazapay.com/v3/metadata/doc/upload \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"file_name": "<string>"
}
'import requests
url = "https://service-sandbox.tazapay.com/v3/metadata/doc/upload"
payload = { "file_name": "<string>" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({file_name: '<string>'})
};
fetch('https://service-sandbox.tazapay.com/v3/metadata/doc/upload', 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://service-sandbox.tazapay.com/v3/metadata/doc/upload",
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([
'file_name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://service-sandbox.tazapay.com/v3/metadata/doc/upload"
payload := strings.NewReader("{\n \"file_name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://service-sandbox.tazapay.com/v3/metadata/doc/upload")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"file_name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://service-sandbox.tazapay.com/v3/metadata/doc/upload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file_name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body""
Document
Upload Document to Tazapay
This lets you generate a temporary pre-signed URL to upload your document
POST
/
v3
/
metadata
/
doc
/
upload
cURL
curl --request POST \
--url https://service-sandbox.tazapay.com/v3/metadata/doc/upload \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"file_name": "<string>"
}
'import requests
url = "https://service-sandbox.tazapay.com/v3/metadata/doc/upload"
payload = { "file_name": "<string>" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({file_name: '<string>'})
};
fetch('https://service-sandbox.tazapay.com/v3/metadata/doc/upload', 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://service-sandbox.tazapay.com/v3/metadata/doc/upload",
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([
'file_name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://service-sandbox.tazapay.com/v3/metadata/doc/upload"
payload := strings.NewReader("{\n \"file_name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://service-sandbox.tazapay.com/v3/metadata/doc/upload")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"file_name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://service-sandbox.tazapay.com/v3/metadata/doc/upload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file_name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body""
Uploading to the Pre-signed URL
After calling this endpoint, you will receive a pre-signed URL in the response. Use this URL to upload your document via a PUT request.Maximum file size is 50 MB.
curl -X PUT "https://your-presigned-url.s3.amazonaws.com/path?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=..." \
-H "Content-Type: application/pdf" \
--upload-file /path/to/document.pdf
Content-Type header to match your file type (e.g., application/pdf, image/png, image/jpeg).Was this page helpful?
⌘I