curl --request PUT \
--url https://{host}/cleemy-procurement/api/documents/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"owner": {
"id": 123
},
"context": {
"purchase": {
"id": 123
}
},
"documentBreakdown": {
"id": 2,
"href": "<string>",
"name": "<string>"
},
"documentDate": "2023-12-25",
"documentNumber": "<string>",
"amountIncludingTaxes": {
"excludingTaxes": {
"value": 123
},
"taxes": [
{
"rateTypeId": 123,
"value": 123
}
],
"includingTaxes": {
"value": 123
}
},
"accountingLabel": "<string>",
"comment": "<string>",
"intraCommunityTaxes": true,
"attachments": [
{
"id": 123,
"file": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"href": "<string>",
"name": "<string>",
"displayHref": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"pages": {
"displayHrefTemplate": "<string>",
"count": 123
}
}
],
"dueDate": "2023-12-25",
"paymentDetails": {
"bankAccount": {
"iban": "<string>",
"bic": "<string>"
}
},
"author": {
"id": 123
},
"modifier": {
"id": 123
}
}
'import requests
url = "https://{host}/cleemy-procurement/api/documents/{id}"
payload = {
"owner": { "id": 123 },
"context": { "purchase": { "id": 123 } },
"documentBreakdown": {
"id": 2,
"href": "<string>",
"name": "<string>"
},
"documentDate": "2023-12-25",
"documentNumber": "<string>",
"amountIncludingTaxes": {
"excludingTaxes": { "value": 123 },
"taxes": [
{
"rateTypeId": 123,
"value": 123
}
],
"includingTaxes": { "value": 123 }
},
"accountingLabel": "<string>",
"comment": "<string>",
"intraCommunityTaxes": True,
"attachments": [
{
"id": 123,
"file": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"href": "<string>",
"name": "<string>",
"displayHref": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"pages": {
"displayHrefTemplate": "<string>",
"count": 123
}
}
],
"dueDate": "2023-12-25",
"paymentDetails": { "bankAccount": {
"iban": "<string>",
"bic": "<string>"
} },
"author": { "id": 123 },
"modifier": { "id": 123 }
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
owner: {id: 123},
context: {purchase: {id: 123}},
documentBreakdown: {id: 2, href: '<string>', name: '<string>'},
documentDate: '2023-12-25',
documentNumber: '<string>',
amountIncludingTaxes: {
excludingTaxes: {value: 123},
taxes: [{rateTypeId: 123, value: 123}],
includingTaxes: {value: 123}
},
accountingLabel: '<string>',
comment: '<string>',
intraCommunityTaxes: true,
attachments: [
{
id: 123,
file: {
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
href: '<string>',
name: '<string>',
displayHref: '<string>'
},
createdAt: '2023-11-07T05:31:56Z',
pages: {displayHrefTemplate: '<string>', count: 123}
}
],
dueDate: '2023-12-25',
paymentDetails: {bankAccount: {iban: '<string>', bic: '<string>'}},
author: {id: 123},
modifier: {id: 123}
})
};
fetch('https://{host}/cleemy-procurement/api/documents/{id}', 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://{host}/cleemy-procurement/api/documents/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'owner' => [
'id' => 123
],
'context' => [
'purchase' => [
'id' => 123
]
],
'documentBreakdown' => [
'id' => 2,
'href' => '<string>',
'name' => '<string>'
],
'documentDate' => '2023-12-25',
'documentNumber' => '<string>',
'amountIncludingTaxes' => [
'excludingTaxes' => [
'value' => 123
],
'taxes' => [
[
'rateTypeId' => 123,
'value' => 123
]
],
'includingTaxes' => [
'value' => 123
]
],
'accountingLabel' => '<string>',
'comment' => '<string>',
'intraCommunityTaxes' => true,
'attachments' => [
[
'id' => 123,
'file' => [
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'href' => '<string>',
'name' => '<string>',
'displayHref' => '<string>'
],
'createdAt' => '2023-11-07T05:31:56Z',
'pages' => [
'displayHrefTemplate' => '<string>',
'count' => 123
]
]
],
'dueDate' => '2023-12-25',
'paymentDetails' => [
'bankAccount' => [
'iban' => '<string>',
'bic' => '<string>'
]
],
'author' => [
'id' => 123
],
'modifier' => [
'id' => 123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://{host}/cleemy-procurement/api/documents/{id}"
payload := strings.NewReader("{\n \"owner\": {\n \"id\": 123\n },\n \"context\": {\n \"purchase\": {\n \"id\": 123\n }\n },\n \"documentBreakdown\": {\n \"id\": 2,\n \"href\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"documentDate\": \"2023-12-25\",\n \"documentNumber\": \"<string>\",\n \"amountIncludingTaxes\": {\n \"excludingTaxes\": {\n \"value\": 123\n },\n \"taxes\": [\n {\n \"rateTypeId\": 123,\n \"value\": 123\n }\n ],\n \"includingTaxes\": {\n \"value\": 123\n }\n },\n \"accountingLabel\": \"<string>\",\n \"comment\": \"<string>\",\n \"intraCommunityTaxes\": true,\n \"attachments\": [\n {\n \"id\": 123,\n \"file\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"href\": \"<string>\",\n \"name\": \"<string>\",\n \"displayHref\": \"<string>\"\n },\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"pages\": {\n \"displayHrefTemplate\": \"<string>\",\n \"count\": 123\n }\n }\n ],\n \"dueDate\": \"2023-12-25\",\n \"paymentDetails\": {\n \"bankAccount\": {\n \"iban\": \"<string>\",\n \"bic\": \"<string>\"\n }\n },\n \"author\": {\n \"id\": 123\n },\n \"modifier\": {\n \"id\": 123\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.put("https://{host}/cleemy-procurement/api/documents/{id}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"owner\": {\n \"id\": 123\n },\n \"context\": {\n \"purchase\": {\n \"id\": 123\n }\n },\n \"documentBreakdown\": {\n \"id\": 2,\n \"href\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"documentDate\": \"2023-12-25\",\n \"documentNumber\": \"<string>\",\n \"amountIncludingTaxes\": {\n \"excludingTaxes\": {\n \"value\": 123\n },\n \"taxes\": [\n {\n \"rateTypeId\": 123,\n \"value\": 123\n }\n ],\n \"includingTaxes\": {\n \"value\": 123\n }\n },\n \"accountingLabel\": \"<string>\",\n \"comment\": \"<string>\",\n \"intraCommunityTaxes\": true,\n \"attachments\": [\n {\n \"id\": 123,\n \"file\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"href\": \"<string>\",\n \"name\": \"<string>\",\n \"displayHref\": \"<string>\"\n },\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"pages\": {\n \"displayHrefTemplate\": \"<string>\",\n \"count\": 123\n }\n }\n ],\n \"dueDate\": \"2023-12-25\",\n \"paymentDetails\": {\n \"bankAccount\": {\n \"iban\": \"<string>\",\n \"bic\": \"<string>\"\n }\n },\n \"author\": {\n \"id\": 123\n },\n \"modifier\": {\n \"id\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/cleemy-procurement/api/documents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"owner\": {\n \"id\": 123\n },\n \"context\": {\n \"purchase\": {\n \"id\": 123\n }\n },\n \"documentBreakdown\": {\n \"id\": 2,\n \"href\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"documentDate\": \"2023-12-25\",\n \"documentNumber\": \"<string>\",\n \"amountIncludingTaxes\": {\n \"excludingTaxes\": {\n \"value\": 123\n },\n \"taxes\": [\n {\n \"rateTypeId\": 123,\n \"value\": 123\n }\n ],\n \"includingTaxes\": {\n \"value\": 123\n }\n },\n \"accountingLabel\": \"<string>\",\n \"comment\": \"<string>\",\n \"intraCommunityTaxes\": true,\n \"attachments\": [\n {\n \"id\": 123,\n \"file\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"href\": \"<string>\",\n \"name\": \"<string>\",\n \"displayHref\": \"<string>\"\n },\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"pages\": {\n \"displayHrefTemplate\": \"<string>\",\n \"count\": 123\n }\n }\n ],\n \"dueDate\": \"2023-12-25\",\n \"paymentDetails\": {\n \"bankAccount\": {\n \"iban\": \"<string>\",\n \"bic\": \"<string>\"\n }\n },\n \"author\": {\n \"id\": 123\n },\n \"modifier\": {\n \"id\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"owner": {
"id": 123,
"href": "<string>",
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"pictureHref": "<string>"
},
"context": {
"purchase": {
"id": 123,
"href": "<string>",
"name": "<string>"
}
},
"documentBreakdown": {
"id": 2,
"href": "<string>",
"name": "<string>"
},
"documentDate": "2023-12-25",
"documentNumber": "<string>",
"amountIncludingTaxes": {
"excludingTaxes": {
"value": 123
},
"taxes": [
{
"rateTypeId": 123,
"value": 123
}
],
"includingTaxes": {
"value": 123
}
},
"accountingLabel": "<string>",
"comment": "<string>",
"intraCommunityTaxes": true,
"attachments": [
{
"id": 123,
"file": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"href": "<string>",
"name": "<string>",
"displayHref": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"pages": {
"displayHrefTemplate": "<string>",
"count": 123
}
}
],
"dueDate": "2023-12-25",
"paymentDetails": {
"bankAccount": {
"iban": "<string>",
"bic": "<string>"
}
},
"createdAt": "2023-11-07T05:31:56Z",
"modifiedAt": "2023-11-07T05:31:56Z",
"author": {
"id": 123,
"href": "<string>",
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"pictureHref": "<string>"
},
"modifier": {
"id": 123,
"href": "<string>",
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"pictureHref": "<string>"
}
}Update Document
Update a document’s information (e.g. accounting fields, amounts, supplier details) before booking it.
Warning: This is a PUT request — the entire resource must be provided. Any field omitted from the payload may be reset to its default value.
curl --request PUT \
--url https://{host}/cleemy-procurement/api/documents/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"owner": {
"id": 123
},
"context": {
"purchase": {
"id": 123
}
},
"documentBreakdown": {
"id": 2,
"href": "<string>",
"name": "<string>"
},
"documentDate": "2023-12-25",
"documentNumber": "<string>",
"amountIncludingTaxes": {
"excludingTaxes": {
"value": 123
},
"taxes": [
{
"rateTypeId": 123,
"value": 123
}
],
"includingTaxes": {
"value": 123
}
},
"accountingLabel": "<string>",
"comment": "<string>",
"intraCommunityTaxes": true,
"attachments": [
{
"id": 123,
"file": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"href": "<string>",
"name": "<string>",
"displayHref": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"pages": {
"displayHrefTemplate": "<string>",
"count": 123
}
}
],
"dueDate": "2023-12-25",
"paymentDetails": {
"bankAccount": {
"iban": "<string>",
"bic": "<string>"
}
},
"author": {
"id": 123
},
"modifier": {
"id": 123
}
}
'import requests
url = "https://{host}/cleemy-procurement/api/documents/{id}"
payload = {
"owner": { "id": 123 },
"context": { "purchase": { "id": 123 } },
"documentBreakdown": {
"id": 2,
"href": "<string>",
"name": "<string>"
},
"documentDate": "2023-12-25",
"documentNumber": "<string>",
"amountIncludingTaxes": {
"excludingTaxes": { "value": 123 },
"taxes": [
{
"rateTypeId": 123,
"value": 123
}
],
"includingTaxes": { "value": 123 }
},
"accountingLabel": "<string>",
"comment": "<string>",
"intraCommunityTaxes": True,
"attachments": [
{
"id": 123,
"file": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"href": "<string>",
"name": "<string>",
"displayHref": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"pages": {
"displayHrefTemplate": "<string>",
"count": 123
}
}
],
"dueDate": "2023-12-25",
"paymentDetails": { "bankAccount": {
"iban": "<string>",
"bic": "<string>"
} },
"author": { "id": 123 },
"modifier": { "id": 123 }
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
owner: {id: 123},
context: {purchase: {id: 123}},
documentBreakdown: {id: 2, href: '<string>', name: '<string>'},
documentDate: '2023-12-25',
documentNumber: '<string>',
amountIncludingTaxes: {
excludingTaxes: {value: 123},
taxes: [{rateTypeId: 123, value: 123}],
includingTaxes: {value: 123}
},
accountingLabel: '<string>',
comment: '<string>',
intraCommunityTaxes: true,
attachments: [
{
id: 123,
file: {
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
href: '<string>',
name: '<string>',
displayHref: '<string>'
},
createdAt: '2023-11-07T05:31:56Z',
pages: {displayHrefTemplate: '<string>', count: 123}
}
],
dueDate: '2023-12-25',
paymentDetails: {bankAccount: {iban: '<string>', bic: '<string>'}},
author: {id: 123},
modifier: {id: 123}
})
};
fetch('https://{host}/cleemy-procurement/api/documents/{id}', 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://{host}/cleemy-procurement/api/documents/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'owner' => [
'id' => 123
],
'context' => [
'purchase' => [
'id' => 123
]
],
'documentBreakdown' => [
'id' => 2,
'href' => '<string>',
'name' => '<string>'
],
'documentDate' => '2023-12-25',
'documentNumber' => '<string>',
'amountIncludingTaxes' => [
'excludingTaxes' => [
'value' => 123
],
'taxes' => [
[
'rateTypeId' => 123,
'value' => 123
]
],
'includingTaxes' => [
'value' => 123
]
],
'accountingLabel' => '<string>',
'comment' => '<string>',
'intraCommunityTaxes' => true,
'attachments' => [
[
'id' => 123,
'file' => [
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'href' => '<string>',
'name' => '<string>',
'displayHref' => '<string>'
],
'createdAt' => '2023-11-07T05:31:56Z',
'pages' => [
'displayHrefTemplate' => '<string>',
'count' => 123
]
]
],
'dueDate' => '2023-12-25',
'paymentDetails' => [
'bankAccount' => [
'iban' => '<string>',
'bic' => '<string>'
]
],
'author' => [
'id' => 123
],
'modifier' => [
'id' => 123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://{host}/cleemy-procurement/api/documents/{id}"
payload := strings.NewReader("{\n \"owner\": {\n \"id\": 123\n },\n \"context\": {\n \"purchase\": {\n \"id\": 123\n }\n },\n \"documentBreakdown\": {\n \"id\": 2,\n \"href\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"documentDate\": \"2023-12-25\",\n \"documentNumber\": \"<string>\",\n \"amountIncludingTaxes\": {\n \"excludingTaxes\": {\n \"value\": 123\n },\n \"taxes\": [\n {\n \"rateTypeId\": 123,\n \"value\": 123\n }\n ],\n \"includingTaxes\": {\n \"value\": 123\n }\n },\n \"accountingLabel\": \"<string>\",\n \"comment\": \"<string>\",\n \"intraCommunityTaxes\": true,\n \"attachments\": [\n {\n \"id\": 123,\n \"file\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"href\": \"<string>\",\n \"name\": \"<string>\",\n \"displayHref\": \"<string>\"\n },\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"pages\": {\n \"displayHrefTemplate\": \"<string>\",\n \"count\": 123\n }\n }\n ],\n \"dueDate\": \"2023-12-25\",\n \"paymentDetails\": {\n \"bankAccount\": {\n \"iban\": \"<string>\",\n \"bic\": \"<string>\"\n }\n },\n \"author\": {\n \"id\": 123\n },\n \"modifier\": {\n \"id\": 123\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.put("https://{host}/cleemy-procurement/api/documents/{id}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"owner\": {\n \"id\": 123\n },\n \"context\": {\n \"purchase\": {\n \"id\": 123\n }\n },\n \"documentBreakdown\": {\n \"id\": 2,\n \"href\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"documentDate\": \"2023-12-25\",\n \"documentNumber\": \"<string>\",\n \"amountIncludingTaxes\": {\n \"excludingTaxes\": {\n \"value\": 123\n },\n \"taxes\": [\n {\n \"rateTypeId\": 123,\n \"value\": 123\n }\n ],\n \"includingTaxes\": {\n \"value\": 123\n }\n },\n \"accountingLabel\": \"<string>\",\n \"comment\": \"<string>\",\n \"intraCommunityTaxes\": true,\n \"attachments\": [\n {\n \"id\": 123,\n \"file\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"href\": \"<string>\",\n \"name\": \"<string>\",\n \"displayHref\": \"<string>\"\n },\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"pages\": {\n \"displayHrefTemplate\": \"<string>\",\n \"count\": 123\n }\n }\n ],\n \"dueDate\": \"2023-12-25\",\n \"paymentDetails\": {\n \"bankAccount\": {\n \"iban\": \"<string>\",\n \"bic\": \"<string>\"\n }\n },\n \"author\": {\n \"id\": 123\n },\n \"modifier\": {\n \"id\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/cleemy-procurement/api/documents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"owner\": {\n \"id\": 123\n },\n \"context\": {\n \"purchase\": {\n \"id\": 123\n }\n },\n \"documentBreakdown\": {\n \"id\": 2,\n \"href\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"documentDate\": \"2023-12-25\",\n \"documentNumber\": \"<string>\",\n \"amountIncludingTaxes\": {\n \"excludingTaxes\": {\n \"value\": 123\n },\n \"taxes\": [\n {\n \"rateTypeId\": 123,\n \"value\": 123\n }\n ],\n \"includingTaxes\": {\n \"value\": 123\n }\n },\n \"accountingLabel\": \"<string>\",\n \"comment\": \"<string>\",\n \"intraCommunityTaxes\": true,\n \"attachments\": [\n {\n \"id\": 123,\n \"file\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"href\": \"<string>\",\n \"name\": \"<string>\",\n \"displayHref\": \"<string>\"\n },\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"pages\": {\n \"displayHrefTemplate\": \"<string>\",\n \"count\": 123\n }\n }\n ],\n \"dueDate\": \"2023-12-25\",\n \"paymentDetails\": {\n \"bankAccount\": {\n \"iban\": \"<string>\",\n \"bic\": \"<string>\"\n }\n },\n \"author\": {\n \"id\": 123\n },\n \"modifier\": {\n \"id\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"owner": {
"id": 123,
"href": "<string>",
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"pictureHref": "<string>"
},
"context": {
"purchase": {
"id": 123,
"href": "<string>",
"name": "<string>"
}
},
"documentBreakdown": {
"id": 2,
"href": "<string>",
"name": "<string>"
},
"documentDate": "2023-12-25",
"documentNumber": "<string>",
"amountIncludingTaxes": {
"excludingTaxes": {
"value": 123
},
"taxes": [
{
"rateTypeId": 123,
"value": 123
}
],
"includingTaxes": {
"value": 123
}
},
"accountingLabel": "<string>",
"comment": "<string>",
"intraCommunityTaxes": true,
"attachments": [
{
"id": 123,
"file": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"href": "<string>",
"name": "<string>",
"displayHref": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"pages": {
"displayHrefTemplate": "<string>",
"count": 123
}
}
],
"dueDate": "2023-12-25",
"paymentDetails": {
"bankAccount": {
"iban": "<string>",
"bic": "<string>"
}
},
"createdAt": "2023-11-07T05:31:56Z",
"modifiedAt": "2023-11-07T05:31:56Z",
"author": {
"id": 123,
"href": "<string>",
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"pictureHref": "<string>"
},
"modifier": {
"id": 123,
"href": "<string>",
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"pictureHref": "<string>"
}
}Headers
API key. Value must be formatted like so: lucca application={api_key}.
Path Parameters
ID of the document.
Body
Document to update.
An invoice document (before booking).
Reference to a user.
Show child attributes
Show child attributes
Type of document: Invoice or CreditNote.
Invoice, CreditNote Context data for the document.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Represents an amount of money with VAT taxes.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Reference to a user.
Show child attributes
Show child attributes
Reference to a user.
Show child attributes
Show child attributes
Response
OK
An invoice document (before booking).
Reference to a user.
Show child attributes
Show child attributes
Type of document: Invoice or CreditNote.
Invoice, CreditNote Context data for the document.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Represents an amount of money with VAT taxes.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Status of OCR processing.
Pending, Processing, Processed, Failed, NotApplicable Show child attributes
Show child attributes
Reference to a user.
Show child attributes
Show child attributes
Reference to a user.
Show child attributes
Show child attributes
Was this page helpful?