Generate purchase credit note XML
Downloads the OMN e-invoicing XML for the purchase credit note. Default type=document returns UBL 2.1 (generated, or archived after Peppol transmission). type=tdd and type=mls return Peppol archive files when they exist.
GET /api/purchase-credit-notes/{id}/xmlPath parameters
Query parameters
Examples:
GET /api/purchase-credit-notes/{id}/xml
GET /api/purchase-credit-notes/{id}/xml?type=document
GET /api/purchase-credit-notes/{id}/xml?type=tdd
GET /api/purchase-credit-notes/{id}/xml?type=mls&mls_for=document
GET /api/purchase-credit-notes/{id}/xml?type=mls&mls_for=tddResponse
Status code: 200 OK
Response headers:
Content-Type: application/xmlContent-Disposition: attachment; filename="<name>"— see the filename convention belowx-suggested-filename: <name>— same filename, readable by browser clients
Filename convention: <kind>-<document uuid>.xml, where <kind> depends on the requested variant.
Response body:
XML content. For type=document, UBL 2.1 XML. For tdd / mls, the corresponding Peppol archive XML.
Error responses
400 Bad Request
Invalid type or missing/invalid mls_for when type=mls.
{
"errors": {
"message": "Invalid type. Allowed values are document, tdd, mls"
}
}401 Unauthorized
Authentication required or invalid token.
{
"errors": {
"message": "Authentication required or invalid token"
}
}403 Forbidden
User not authorized to access this purchase credit note.
{
"errors": {
"message": "Not authorized to perform this operation"
}
}404 Not Found
Purchase credit note not found, or TDD/MLS XML is not available yet.
{
"errors": {
"message": "Purchase credit note not found"
}
}500 Internal Server Error
An error occurred while processing the request.
{
"errors": {
"message": "An error occurred"
}
}