Edit and resubmit a purchase invoice
Posts the corrected purchase invoice to POST /api/purchase-invoices/{business_profile_id} after a validation failure (VALIDATION_FAILED) or a receiving-ASP rejection (REJECTED). Send the full create payload with the same document_number. The API marks the previous document obsolete and returns 201 Created with a new document id.
Rate limit
60 requests/minute per authenticated account. See Rate limiting for response headers (X-RateLimit-*) and retry guidance.
Path parameters
Request body
Resubmit uses POST /api/purchase-invoices/{business_profile_id} — the same endpoint as create. There is no document UUID in the path. Send the complete purchase invoice JSON, not a partial patch. Include every root-level field you would send on create; corrected values replace the stored document. Omitting fields may clear or reset them.
document_number is required and must equal the number on the failed document. If you omit it, the API creates a new invoice instead of resubmitting.
Request fields
Fields in the request JSON. Rows are ordered Required → Conditional → Optional. The Required column shows whether each field is always needed, sometimes needed, or optional. Object fields have dedicated sections further down this page.
Do not send: accounting_customer_party — the API sets the customer from {profileId}. Do not send calculated or system fields (id, org_id, document_sequence, totals, meta_info, etc.) — those appear in the response only.
Conditional field rules
Meta info object
The meta_info field is an object with the following attributes:
Peppol status object
The meta_info.peppol_status field is an object with the following attributes:
Status values
VALIDATION_FAILED applies only to overall_status.
Client processing guidance:
Treat
overall_statusas the primary state for workflow decisions.Use
participant_statusandfta_statusas stage-specific diagnostics for UI and support logs.If
overall_statusisPENDING, keep the invoice in a processing state and poll/re-fetch later.If
overall_statusisAPPROVED, mark the Peppol flow as successful and continue normal downstream actions.If
overall_statusisREJECTEDorVALIDATION_FAILED, stop submission-dependent actions and surface the failure to users.When
validation_resultsis not empty, display user-friendly error summaries fromtext, and retainflag,reasonCode,location, andtestfor troubleshooting.participant_statusorfta_statuscan benullin early/failed validation stages; do not treatnullalone as success or failure.
Example `meta_info` values
Typical meta_info.peppol_status shapes:
APPROVED
{
"meta_info": {
"peppol_status": {
"participant_status": "APPROVED",
"fta_status": "APPROVED",
"overall_status": "APPROVED",
"validation_results": []
}
}
}REJECTED
{
"meta_info": {
"peppol_status": {
"participant_status": "REJECTED",
"fta_status": "APPROVED",
"overall_status": "REJECTED",
"validation_results": []
}
}
}VALIDATION_FAILED
VALIDATION_FAILED applies only to overall_status. participant_status and fta_status can be null.
{
"meta_info": {
"peppol_status": {
"participant_status": null,
"fta_status": null,
"overall_status": "VALIDATION_FAILED",
"validation_results": [
{
"flag": "fatal",
"reasonCode": "IBR-128-AE",
"text": "Country subentity must be a valid UAE subdivision code",
"location": "/Invoice/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:CountrySubentity",
"test": "normalize-space(.) = 'AUH' or normalize-space(.) = 'DXB' or normalize-space(.) = 'SHJ' or normalize-space(.) = 'UAQ' or normalize-space(.) = 'FUJ' or normalize-space(.) = 'AJM' or normalize-space(.) = 'RAK'"
}
]
}
}
}Invoice type codes
Profile execution ID
profile_execution_id is an 8-character binary flag string (each character 0 or 1) that encodes UAE special transaction types. Use 00000000 for a standard purchase invoice with no special types.
payment_means is optional and may be omitted or null.
Transaction scenarios follow PINT AE. Set the corresponding position to 1 when the supply matches that scenario; leave it 0 otherwise. Multiple flags may be 1 when more than one scenario applies.
Ready-to-use payloads for each scenario are on the purchase invoice Examples page.
*Each position X is 0 or 1 depending on your scenario.*
Related examples
System behavior
VAT rules are applied according to UAE VAT law
Invoice status and transmission events are tracked
Party VAT and registration validation
See The Supplier party object section for details.
Request
POST /api/purchase-invoices/{business_profile_id}
Authorization: Bearer {jwt_token}
X-API-Version: 20260507Response
Status code: 201 Created
The API marks the previous document obsolete and returns a new document. id is a new UUID. Use that id for later retrieve, PDF, and XML calls. document_number stays the same.
Returns the new purchase invoice with all request fields echoed plus system-generated and calculated fields.
Response body fields
Document lines in response
Each line includes calculated fields: base_amount, net_amount, total_amount, tax_amount. The price object in the response contains price_amount (instead of base_amount in the request).
Charges and allowances
Document-level charges and allowances are applied after line item totals
Line-level charges and allowances are applied per line item
All charges and allowances require a
tax_categoryfor proper VAT calculation
See the right panel for complete response JSON.
Attachments
You may include an optional attachments array in the create request. Each item must include file_name, file_type, and Base64-encoded file_content. Allowed MIME types and validation rules are documented under Attachment object (request) on the Create a purchase invoice page.
Error responses
400 Bad Request
Invalid request parameters or validation failed.
{
"errors": {
"message": "Business profile not found with id: {business_profile_id}"
}
}For validation errors, the response includes field-specific errors:
{
"errors": {
"profile_execution_id": "Profile execution ID is mandatory",
"issue_date": "Issue date is mandatory"
}
}401 Unauthorized
Authentication required or invalid token.
{
"errors": {
"message": "Authentication required or invalid token"
}
}409 Conflict
document_number already belongs to an active document that is not VALIDATION_FAILED or REJECTED.
{
"errors": {
"document_number": "Invoice number 'PINV-0001' already exists.",
"uuid": "550e8400-e29b-41d4-a716-446655440000"
}
}413 Request Entity Too Large
The request payload size exceeds the allowed limit of 8MB.
{
"errors": {
"message": "Payload size should not exceed 8MB"
}
}500 Internal Server Error
An error occurred while processing the request.
{
"errors": {
"message": "An error occurred"
}
}Resubmit condition
Send POST /api/purchase-invoices/{business_profile_id} with the same document_number. The API resubmits when that number matches a non-obsolete, non-Peppol purchase invoice in your organization for the customer TIN on {business_profile_id}, and meta_info.peppol_status.overall_status is VALIDATION_FAILED or REJECTED.
VALIDATION_FAILED: correct the payload usingvalidation_results, then post the full document again with the samedocument_number.REJECTED: the receiving ASP (C3) rejected the document. Correct the source data and post the full document again with the samedocument_number. Do not post it to the ledger.
If document_number matches a document whose overall_status is not VALIDATION_FAILED or REJECTED, the call is treated as create and returns 409 when an active duplicate exists. A document that is PENDING or APPROVED cannot be resubmitted this way.
Attachments
Each attachments item requires file_name, file_type, and Base64 file_content. On resubmit:
Omit
attachmentsto keep the existing attachment set unchanged.Send
attachmentsto replace the full set (client uploads are re-persisted).
The response attachments array includes id, file_name, and file_type only. The entire POST body must not exceed 8 MB.
