curl --request POST \
--url https://app.polygon-one.com/api/v1/evidence/upload-url \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fileName": "harvest-licence-2025.pdf",
"contentType": "application/pdf",
"fileSize": 482113
}
'import requests
url = "https://app.polygon-one.com/api/v1/evidence/upload-url"
payload = {
"fileName": "harvest-licence-2025.pdf",
"contentType": "application/pdf",
"fileSize": 482113
}
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({
fileName: 'harvest-licence-2025.pdf',
contentType: 'application/pdf',
fileSize: 482113
})
};
fetch('https://app.polygon-one.com/api/v1/evidence/upload-url', 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://app.polygon-one.com/api/v1/evidence/upload-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([
'fileName' => 'harvest-licence-2025.pdf',
'contentType' => 'application/pdf',
'fileSize' => 482113
]),
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://app.polygon-one.com/api/v1/evidence/upload-url"
payload := strings.NewReader("{\n \"fileName\": \"harvest-licence-2025.pdf\",\n \"contentType\": \"application/pdf\",\n \"fileSize\": 482113\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://app.polygon-one.com/api/v1/evidence/upload-url")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fileName\": \"harvest-licence-2025.pdf\",\n \"contentType\": \"application/pdf\",\n \"fileSize\": 482113\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.polygon-one.com/api/v1/evidence/upload-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 = "{\n \"fileName\": \"harvest-licence-2025.pdf\",\n \"contentType\": \"application/pdf\",\n \"fileSize\": 482113\n}"
response = http.request(request)
puts response.read_body{
"uploadUrl": "https://example-bucket.s3.eu-central-1.amazonaws.com/pending/operator/3f6c2a8e-5b1d-4c7e-9a2f-6d8b1e4c0a17/6a0e4c8f-2b57-4d93-8b1f-0e6c4a2d9f85-harvest-licence-2025.pdf?X-Amz-…",
"s3Key": "pending/operator/3f6c2a8e-5b1d-4c7e-9a2f-6d8b1e4c0a17/6a0e4c8f-2b57-4d93-8b1f-0e6c4a2d9f85-harvest-licence-2025.pdf"
}{
"error": "Validation failed",
"details": [
{
"origin": "string",
"code": "too_small",
"minimum": 1,
"inclusive": true,
"path": [
"address",
"street"
],
"message": "Address is required."
}
]
}{
"error": "Invalid or expired API key"
}{
"error": "Forbidden"
}{
"error": {
"code": "rate_limited",
"message": "…"
}
}{
"error": "Internal server error"
}Create Evidence Upload URL
Step 1 of uploading an evidence document (e.g. a legal or origin document) to a supplier article: get a presigned URL, then PUT the file bytes to uploadUrl with the same Content-Type within 10 minutes. Pass the returned s3Key as uploadedS3Key to POST /api/v1/evidence. Accepts the files the in-app evidence upload accepts, at most 10 MB — a wrong type or a larger fileSize is a 400. fileSize is signed into uploadUrl: a PUT of any other length is refused by storage. Requires evidence:write.
curl --request POST \
--url https://app.polygon-one.com/api/v1/evidence/upload-url \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fileName": "harvest-licence-2025.pdf",
"contentType": "application/pdf",
"fileSize": 482113
}
'import requests
url = "https://app.polygon-one.com/api/v1/evidence/upload-url"
payload = {
"fileName": "harvest-licence-2025.pdf",
"contentType": "application/pdf",
"fileSize": 482113
}
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({
fileName: 'harvest-licence-2025.pdf',
contentType: 'application/pdf',
fileSize: 482113
})
};
fetch('https://app.polygon-one.com/api/v1/evidence/upload-url', 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://app.polygon-one.com/api/v1/evidence/upload-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([
'fileName' => 'harvest-licence-2025.pdf',
'contentType' => 'application/pdf',
'fileSize' => 482113
]),
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://app.polygon-one.com/api/v1/evidence/upload-url"
payload := strings.NewReader("{\n \"fileName\": \"harvest-licence-2025.pdf\",\n \"contentType\": \"application/pdf\",\n \"fileSize\": 482113\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://app.polygon-one.com/api/v1/evidence/upload-url")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fileName\": \"harvest-licence-2025.pdf\",\n \"contentType\": \"application/pdf\",\n \"fileSize\": 482113\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.polygon-one.com/api/v1/evidence/upload-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 = "{\n \"fileName\": \"harvest-licence-2025.pdf\",\n \"contentType\": \"application/pdf\",\n \"fileSize\": 482113\n}"
response = http.request(request)
puts response.read_body{
"uploadUrl": "https://example-bucket.s3.eu-central-1.amazonaws.com/pending/operator/3f6c2a8e-5b1d-4c7e-9a2f-6d8b1e4c0a17/6a0e4c8f-2b57-4d93-8b1f-0e6c4a2d9f85-harvest-licence-2025.pdf?X-Amz-…",
"s3Key": "pending/operator/3f6c2a8e-5b1d-4c7e-9a2f-6d8b1e4c0a17/6a0e4c8f-2b57-4d93-8b1f-0e6c4a2d9f85-harvest-licence-2025.pdf"
}{
"error": "Validation failed",
"details": [
{
"origin": "string",
"code": "too_small",
"minimum": 1,
"inclusive": true,
"path": [
"address",
"street"
],
"message": "Address is required."
}
]
}{
"error": "Invalid or expired API key"
}{
"error": "Forbidden"
}{
"error": {
"code": "rate_limited",
"message": "…"
}
}{
"error": "Internal server error"
}Authorizations
API key generated in Settings > API Keys. Include as Authorization: Bearer <key>.
Body
The file to upload: name, MIME type and size in bytes.
Name of the file to upload, including its extension.
1MIME type of the file (e.g. application/pdf). Send the same value as Content-Type when uploading to uploadUrl.
1Size of the file in bytes. It is signed into uploadUrl: the PUT must send exactly this many bytes.