Upload documents
curl --request PATCH \
--url https://app.kenekt.com.au/v1/{agency_uid}/attachments/upload_documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data model_name=Build \
--data id=BP-1234 \
--data 'attachment_urls={
"0": {
"url": "http://public.example.com/brochure.pdf"
}
}'import requests
url = "https://app.kenekt.com.au/v1/{agency_uid}/attachments/upload_documents"
payload = {
"model_name": "Build",
"id": "BP-1234",
"attachment_urls": "{
\"0\": {
\"url\": \"http://public.example.com/brochure.pdf\"
}
}"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.patch(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
model_name: 'Build',
id: 'BP-1234',
attachment_urls: '{\n "0": {\n "url": "http://public.example.com/brochure.pdf"\n }\n}'
})
};
fetch('https://app.kenekt.com.au/v1/{agency_uid}/attachments/upload_documents', 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.kenekt.com.au/v1/{agency_uid}/attachments/upload_documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => "model_name=Build&id=BP-1234&attachment_urls=%7B%0A%20%20%220%22%3A%20%7B%0A%20%20%20%20%22url%22%3A%20%22http%3A%2F%2Fpublic.example.com%2Fbrochure.pdf%22%0A%20%20%7D%0A%7D",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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.kenekt.com.au/v1/{agency_uid}/attachments/upload_documents"
payload := strings.NewReader("model_name=Build&id=BP-1234&attachment_urls=%7B%0A%20%20%220%22%3A%20%7B%0A%20%20%20%20%22url%22%3A%20%22http%3A%2F%2Fpublic.example.com%2Fbrochure.pdf%22%0A%20%20%7D%0A%7D")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.kenekt.com.au/v1/{agency_uid}/attachments/upload_documents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("model_name=Build&id=BP-1234&attachment_urls=%7B%0A%20%20%220%22%3A%20%7B%0A%20%20%20%20%22url%22%3A%20%22http%3A%2F%2Fpublic.example.com%2Fbrochure.pdf%22%0A%20%20%7D%0A%7D")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.kenekt.com.au/v1/{agency_uid}/attachments/upload_documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "model_name=Build&id=BP-1234&attachment_urls=%7B%0A%20%20%220%22%3A%20%7B%0A%20%20%20%20%22url%22%3A%20%22http%3A%2F%2Fpublic.example.com%2Fbrochure.pdf%22%0A%20%20%7D%0A%7D"
response = http.request(request)
puts response.read_body{
"success": true
}Stock / Attachments
Upload documents
Attaches a file, or up to 20 files fetched from public URLs. Limited to 10 requests a minute per key.
PATCH
/
{agency_uid}
/
attachments
/
upload_documents
Upload documents
curl --request PATCH \
--url https://app.kenekt.com.au/v1/{agency_uid}/attachments/upload_documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data model_name=Build \
--data id=BP-1234 \
--data 'attachment_urls={
"0": {
"url": "http://public.example.com/brochure.pdf"
}
}'import requests
url = "https://app.kenekt.com.au/v1/{agency_uid}/attachments/upload_documents"
payload = {
"model_name": "Build",
"id": "BP-1234",
"attachment_urls": "{
\"0\": {
\"url\": \"http://public.example.com/brochure.pdf\"
}
}"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.patch(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
model_name: 'Build',
id: 'BP-1234',
attachment_urls: '{\n "0": {\n "url": "http://public.example.com/brochure.pdf"\n }\n}'
})
};
fetch('https://app.kenekt.com.au/v1/{agency_uid}/attachments/upload_documents', 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.kenekt.com.au/v1/{agency_uid}/attachments/upload_documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => "model_name=Build&id=BP-1234&attachment_urls=%7B%0A%20%20%220%22%3A%20%7B%0A%20%20%20%20%22url%22%3A%20%22http%3A%2F%2Fpublic.example.com%2Fbrochure.pdf%22%0A%20%20%7D%0A%7D",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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.kenekt.com.au/v1/{agency_uid}/attachments/upload_documents"
payload := strings.NewReader("model_name=Build&id=BP-1234&attachment_urls=%7B%0A%20%20%220%22%3A%20%7B%0A%20%20%20%20%22url%22%3A%20%22http%3A%2F%2Fpublic.example.com%2Fbrochure.pdf%22%0A%20%20%7D%0A%7D")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.kenekt.com.au/v1/{agency_uid}/attachments/upload_documents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("model_name=Build&id=BP-1234&attachment_urls=%7B%0A%20%20%220%22%3A%20%7B%0A%20%20%20%20%22url%22%3A%20%22http%3A%2F%2Fpublic.example.com%2Fbrochure.pdf%22%0A%20%20%7D%0A%7D")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.kenekt.com.au/v1/{agency_uid}/attachments/upload_documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "model_name=Build&id=BP-1234&attachment_urls=%7B%0A%20%20%220%22%3A%20%7B%0A%20%20%20%20%22url%22%3A%20%22http%3A%2F%2Fpublic.example.com%2Fbrochure.pdf%22%0A%20%20%7D%0A%7D"
response = http.request(request)
puts response.read_body{
"success": true
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Agency public_uid
Body
application/x-www-form-urlencodedmultipart/form-data
Response
OK