curl --request POST \
--url https://coreapi.io/api/offers/{id}/documents/signed \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@example-fileimport requests
url = "https://coreapi.io/api/offers/{id}/documents/signed"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://coreapi.io/api/offers/{id}/documents/signed', 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://coreapi.io/api/offers/{id}/documents/signed",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"signed": {
"id": "<string>",
"filename": "<string>",
"url": "<string>"
},
"auditLog": {
"id": "<string>",
"filename": "<string>",
"url": "<string>"
},
"purchaseOrder": {
"id": "<string>",
"filename": "<string>",
"url": "<string>"
}
}Replace the signed document of an accepted offer
Beta. This endpoint is unstable and may still change without notice. Pin against the dated version and watch the changelog.
Makes the uploaded PDF the signed document of an offer in status awaiting_invoice_details or signed. Use it when the customer signed on your own system and you accepted the offer with POST /api/offers//accept without a file: until then the offer carries the PDF Fynn rendered at acceptance as its signed document. Send the PDF as a multipart form with the field file, as on POST /api/offers//accept.
The status, the acceptance time and the audit log stay as they are. The previous document is kept as an earlier version. Sending the same file again changes nothing; a different file replaces the document again.
curl --request POST \
--url https://coreapi.io/api/offers/{id}/documents/signed \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@example-fileimport requests
url = "https://coreapi.io/api/offers/{id}/documents/signed"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://coreapi.io/api/offers/{id}/documents/signed', 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://coreapi.io/api/offers/{id}/documents/signed",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"signed": {
"id": "<string>",
"filename": "<string>",
"url": "<string>"
},
"auditLog": {
"id": "<string>",
"filename": "<string>",
"url": "<string>"
},
"purchaseOrder": {
"id": "<string>",
"filename": "<string>",
"url": "<string>"
}
}Autorisierungen
Antwort
The documents of the offer. signed is the uploaded PDF.
Grouped offer documents. Each slot is null until the document exists.
War diese Seite hilfreich?