import requests
url = "https://api.paywise.de/mahnservice/v1/invoices/{uuid}/documents/{document_uuid}/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.paywise.de/mahnservice/v1/invoices/{uuid}/documents/{document_uuid}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://api.paywise.de/mahnservice/v1/invoices/{uuid}/documents/{document_uuid}/")
.header("Authorization", "Bearer <token>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.paywise.de/mahnservice/v1/invoices/{uuid}/documents/{document_uuid}/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
curl --request GET \
--url https://api.paywise.de/mahnservice/v1/invoices/{uuid}/documents/{document_uuid}/ \
--header 'Authorization: Bearer <token>'{
"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>"
}
]
}Get an invoice document
Poll this to track ingestion: status moves pending -> ready, or to rejected on malware detection, or to failed when the scan could not complete or the content was invalid/oversized. A rejected or failed document is replaced by posting new bytes to …/documents/.
import requests
url = "https://api.paywise.de/mahnservice/v1/invoices/{uuid}/documents/{document_uuid}/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.paywise.de/mahnservice/v1/invoices/{uuid}/documents/{document_uuid}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://api.paywise.de/mahnservice/v1/invoices/{uuid}/documents/{document_uuid}/")
.header("Authorization", "Bearer <token>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.paywise.de/mahnservice/v1/invoices/{uuid}/documents/{document_uuid}/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
curl --request GET \
--url https://api.paywise.de/mahnservice/v1/invoices/{uuid}/documents/{document_uuid}/ \
--header 'Authorization: Bearer <token>'{
"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>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
UUID of the invoice document in this request.
^[^/]+$UUID of the invoice in this request.
Response
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.
