Get fresh upload links for assets that are already initialized
curl --request POST \
--url https://api.occtoo.com/v1/assets/{dataSourceId}/uploadLinks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assets": [
{
"entryKey": "sku-1",
"filename": "front.jpg"
}
]
}
'import requests
url = "https://api.occtoo.com/v1/assets/{dataSourceId}/uploadLinks"
payload = { "assets": [
{
"entryKey": "sku-1",
"filename": "front.jpg"
}
] }
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({assets: [{entryKey: 'sku-1', filename: 'front.jpg'}]})
};
fetch('https://api.occtoo.com/v1/assets/{dataSourceId}/uploadLinks', 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.occtoo.com/v1/assets/{dataSourceId}/uploadLinks",
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([
'assets' => [
[
'entryKey' => 'sku-1',
'filename' => 'front.jpg'
]
]
]),
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://api.occtoo.com/v1/assets/{dataSourceId}/uploadLinks"
payload := strings.NewReader("{\n \"assets\": [\n {\n \"entryKey\": \"sku-1\",\n \"filename\": \"front.jpg\"\n }\n ]\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://api.occtoo.com/v1/assets/{dataSourceId}/uploadLinks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"assets\": [\n {\n \"entryKey\": \"sku-1\",\n \"filename\": \"front.jpg\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.occtoo.com/v1/assets/{dataSourceId}/uploadLinks")
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 \"assets\": [\n {\n \"entryKey\": \"sku-1\",\n \"filename\": \"front.jpg\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"initialized": {
"sku-1": {
"uploadUrl": "https://occtoomedia.blob.core.windows.net/6b1f0b3c/9c2a7d18/front.jpg?sv=2024-11-04&se=...&sig=...",
"expiresAt": "2026-09-25T13:30:00+00:00"
}
},
"failed": {
"sku-2": "Asset is not initialized"
}
}Assets API
Get fresh upload links for assets that are already initialized
Signs a fresh upload link for already-initialized assets, for a caller whose link expired or never arrived. At most 50 assets per call.
An entry key that was never initialized, or that’s already completed, comes back under failed. Use PUT to replace a completed file.
POST
/
v1
/
assets
/
{dataSourceId}
/
uploadLinks
Get fresh upload links for assets that are already initialized
curl --request POST \
--url https://api.occtoo.com/v1/assets/{dataSourceId}/uploadLinks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assets": [
{
"entryKey": "sku-1",
"filename": "front.jpg"
}
]
}
'import requests
url = "https://api.occtoo.com/v1/assets/{dataSourceId}/uploadLinks"
payload = { "assets": [
{
"entryKey": "sku-1",
"filename": "front.jpg"
}
] }
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({assets: [{entryKey: 'sku-1', filename: 'front.jpg'}]})
};
fetch('https://api.occtoo.com/v1/assets/{dataSourceId}/uploadLinks', 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.occtoo.com/v1/assets/{dataSourceId}/uploadLinks",
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([
'assets' => [
[
'entryKey' => 'sku-1',
'filename' => 'front.jpg'
]
]
]),
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://api.occtoo.com/v1/assets/{dataSourceId}/uploadLinks"
payload := strings.NewReader("{\n \"assets\": [\n {\n \"entryKey\": \"sku-1\",\n \"filename\": \"front.jpg\"\n }\n ]\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://api.occtoo.com/v1/assets/{dataSourceId}/uploadLinks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"assets\": [\n {\n \"entryKey\": \"sku-1\",\n \"filename\": \"front.jpg\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.occtoo.com/v1/assets/{dataSourceId}/uploadLinks")
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 \"assets\": [\n {\n \"entryKey\": \"sku-1\",\n \"filename\": \"front.jpg\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"initialized": {
"sku-1": {
"uploadUrl": "https://occtoomedia.blob.core.windows.net/6b1f0b3c/9c2a7d18/front.jpg?sv=2024-11-04&se=...&sig=...",
"expiresAt": "2026-09-25T13:30:00+00:00"
}
},
"failed": {
"sku-2": "Asset is not initialized"
}
}Authorizations
kindeOAuthbearerAuthapiKey
Path Parameters
Was this page helpful?