JSR Tax Advisors logoAPI
Developer APIsReference documentation

Edit and resubmit a purchase credit note


Updates and resubmits a specific purchase credit note after fixing validation or transmission issues. See the right panel for request samples and response JSON.

Rate limit

See Rate limiting for response headers (X-RateLimit-*) and retry guidance.

Path parameters

ParameterTypeRequiredDescription
uuidstring
Required
The UUID of the purchase credit note to resubmit.
customer_profile_idstring
Required
The business profile ID of the customer issuing the credit note. Must exist in your organization.
Request body

Resubmit requires the complete purchase credit note 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.

See Request payload for the full UBL-aligned field catalogue.

Do not send: calculated or system fields (id, org_id, document_sequence, status, totals, meta_info, etc.) — those appear in the response only. The buyer party is derived from {customer_profile_id} when omitted.

Resubmit condition

Resubmit is allowed only when all of the following are true:

  • The document lifecycle status is ACTIVE (obsolete documents cannot be resubmitted)

  • The document was not received over Peppol (document_source is not PEPPOL)

  • meta_info.peppol_status is present (if missing or still pending, the API returns 400)

  • At least one of:

  • meta_info.peppol_status.overall_status is VALIDATION_FAILED or REJECTED

  • meta_info.peppol_status.participant_status is REJECTED

  • meta_info.peppol_status.validation_results is a non-empty array

System behavior

On successful resubmit:

  1. The existing document is marked OBSOLETE

  2. A new document is created with status ACTIVE, a new `uuid`, the same document_number, and cleared meta_info

  3. Validation, QR generation, and Peppol submission restart for the new document

  4. List endpoints return only active documents; the obsolete version remains retrievable by its original UUID

Response

Status code: 200 OK

Returns the new credit note object (not the obsolete original). System-generated and calculated fields match create, including seller_uuid and qr_code_base64. The response status is ACTIVE.

Attachments

If you include attachments, each item requires file_name, file_type, and Base64 file_content. On resubmit, omit attachments to keep the existing set, or send a new array to replace it.

Error responses

StatusDescription
400 Bad RequestResubmit is not allowed (for example still pending, obsolete, or not in a resubmittable Peppol state).
401 UnauthorizedAuthentication required or invalid token.
404 Not FoundCredit note not found, or business profile not found.
500 Internal Server ErrorAn error occurred while processing the request.
{
  "errors": {
    "document_status": "document status is still pending state you cannot resubmit"
  }
}
{
  "errors": {
    "document_status": "Obsolete documents cannot be resubmitted"
  }
}