MarminDeveloper Docs

Download purchase invoice PDF


Downloads the purchase invoice as a PDF file.

GET /api/purchase-invoices/{id}/download-pdf
Path parameters

ParameterTypeRequiredDescription
idstring
Required
The ID of the purchase invoice to download.
Response

Status code: 200 OK

Response headers:

  • Content-Type: application/pdf

  • Content-Disposition: attachment; filename="INV-2024-001.pdf"

Response body:

Returns the PDF file data in bytes.

Error responses

401 Unauthorized

Authentication required or invalid token.

{
  "errors": {
    "message": "Authentication required or invalid token"
  }
}
403 Forbidden

User not authorized to access this purchase invoice.

{
  "errors": {
    "message": "Not authorized to perform this operation"
  }
}
404 Not Found

Purchase invoice not found.

{
  "errors": {
    "message": "Purchase invoice not found"
  }
}
500 Internal Server Error

An error occurred while processing the request.

{
  "errors": {
    "message": "An error occurred"
  }
}
Next