Edit and resubmit a purchase invoice
Updates and resubmits a specific purchase invoice after fixing validation issues.
Rate limit
60 requests/minute per authenticated account. See Rate limiting for response headers (X-RateLimit-*) and retry guidance.
Path parameters
Request body
Resubmit requires the complete purchase invoice JSON — send the full document payload again, 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.
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
Response 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
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.
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-MARMIN-VERSION: 20260507Response
Status code: 201 Created
Returns the created 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"
}
}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
Resubmit is allowed only when:
meta_info.peppol_status.overall_status = VALIDATION_FAILED
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 create-only 8MB payload limit does not apply to this PUT endpoint.
Error responses
{
"errors": {
"document_status": "document status is still pending state you cannot resubmit"
}
}{
"errors": {
"message": "Business profile not found with id: {business_profile_id}"
}
}