import requests
url = "https://api.paywise.de/mahnservice/v1/invoices/{uuid}/documents/"
payload = {
"base64": "<string>",
"file": "<string>"
}
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({base64: '<string>', file: '<string>'})
};
fetch('https://api.paywise.de/mahnservice/v1/invoices/{uuid}/documents/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.paywise.de/mahnservice/v1/invoices/{uuid}/documents/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base64\": \"<string>\",\n \"file\": \"<string>\"\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.paywise.de/mahnservice/v1/invoices/{uuid}/documents/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"base64\": \"<string>\",\n \"file\": \"<string>\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
curl --request POST \
--url https://api.paywise.de/mahnservice/v1/invoices/{uuid}/documents/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base64": "<string>",
"file": "<string>"
}
'{
"created_at": "2023-11-07T05:31:56Z",
"download_url": "<string>",
"filename": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mime_type": "<string>",
"size": 123,
"status": "pending",
"updated_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}Attach the invoice PDF
Exactly one of multipart file or JSON . PDF only, 10 MB. Replaces the current document while the invoice is held; the response is the pending document. Re-post to replace a rejected or failed document. 409 (codes: already_released after release; invoice_paid / invoice_cancelled / invoice_written_off; invoice_in_inkasso; invoice_archived; not_api_invoice).
import requests
url = "https://api.paywise.de/mahnservice/v1/invoices/{uuid}/documents/"
payload = {
"base64": "<string>",
"file": "<string>"
}
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({base64: '<string>', file: '<string>'})
};
fetch('https://api.paywise.de/mahnservice/v1/invoices/{uuid}/documents/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.paywise.de/mahnservice/v1/invoices/{uuid}/documents/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base64\": \"<string>\",\n \"file\": \"<string>\"\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.paywise.de/mahnservice/v1/invoices/{uuid}/documents/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"base64\": \"<string>\",\n \"file\": \"<string>\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
curl --request POST \
--url https://api.paywise.de/mahnservice/v1/invoices/{uuid}/documents/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base64": "<string>",
"file": "<string>"
}
'{
"created_at": "2023-11-07T05:31:56Z",
"download_url": "<string>",
"filename": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mime_type": "<string>",
"size": 123,
"status": "pending",
"updated_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
UUID of the invoice in this request.
Body
- Base64 document
- Multipart file
A JSON body carries the document as base64 content; the file part is accepted only with multipart/form-data.
Base64-encoded complete PDF; a data: prefix is accepted. Provide exactly one of base64 or file. Maximum decoded document size: 10 MiB (10,485,760 bytes); maximum PDF length: 100 pages. Each invoice holds one PDF; uploading again replaces it while the invoice is held. Oversized files are rejected during upload; processing failures appear as status failed.
1 - 15029589Invoice PDF supplied as multipart form-data. Provide exactly one of file or base64. Maximum file size: 10 MiB (10,485,760 bytes); maximum PDF length: 100 pages. Each invoice holds one PDF; uploading again replaces it while the invoice is held. Oversized files are rejected during upload; processing failures appear as status failed.
Optional filename override. Defaults to the uploaded file's name for multipart or document.pdf for base64.
1 - 255Response
Read shape of an invoice document.
Creation time of the stable document resource; unchanged when its contents are replaced.
Authenticated API URL for downloading the invoice PDF; null unless the document is ready.
Stored document filename, or null when no filename is available.
Stable identifier of the invoice document.
Document media type (application/pdf for an accepted PDF), or null when unavailable.
Document size in bytes. Null before ready, and may remain null if the size of a legacy document cannot be retrieved.
Document ingestion state: pending while processing, ready after acceptance, rejected when content is rejected, or failed when ingestion/scanning cannot complete. Replace a rejected or failed document while the invoice is held to try again.
pending, ready, rejected, failed Time at which the document was last updated.
