Download an invoice as a PDF
Renders a single invoice into a PDF, generated fresh on every request, for an invoiceId from GET /invoices. A malformed invoiceId and an invoice that no longer exists (deleted, or belonging to a different organization than the caller) both return the same generic 404 — the response never reveals which of those happened.
GET
/{invoiceId}/pdfAuthorization
AuthorizationBearer token · headerrequiredA Sibi Public API token or access token, sent as `Authorization: Bearer <token>`. Resolved by the API Gateway authorizer in front of every route on this API.
Path parameters
invoiceIdstringrequiredmin length 1
Responses
200The rendered single-invoice PDF.
string400Missing `invoiceId` (VALIDATION_ERROR).
codestringrequiredAllowed:
VALIDATION_ERRORmessagestringrequireddetailsobject[]requiredPer-field validation errors
Show propertiesHide properties
Array of
objectfieldstringrequirederrorstringrequiredrequestIdstringAWS request id for this call — quote it when contacting support
401Missing Authorization header.
messagestringrequired403The bearer token could not be resolved (invalid, expired, or revoked).
messagestringrequired404The invoiceId is malformed, or the invoice it names no longer exists or belongs to a different organization. These cases are deliberately indistinguishable.
codestringrequiredMachine-readable error code
Allowed:
NOT_FOUNDmessagestringrequiredrequestIdstringAWS request id for this call — quote it when contacting support
500Internal server error
codestringrequiredMachine-readable error code
Allowed:
INTERNAL_SERVER_ERRORmessagestringrequiredrequestIdstringAWS request id for this call — quote it when contacting support
Request
curl -X GET "https://api.sibipro.com/invoices/in_V1StGXR8_Z5jdHi6BmyT/pdf" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://api.sibipro.com/invoices/in_V1StGXR8_Z5jdHi6BmyT/pdf", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});Response
"string"{
"code": "VALIDATION_ERROR",
"message": "Invalid input parameters",
"details": [
{
"field": "string",
"error": "string"
}
],
"requestId": "string"
}{
"message": "Unauthorized"
}{
"message": "Forbidden"
}{
"code": "NOT_FOUND",
"message": "string",
"requestId": "string"
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "string",
"requestId": "string"
}