Marmin

Create a sales credit note


Creates a sales credit note conforming to UBL 2.1 specification. See the right panel for request samples and response JSON.

Path parameters

ParameterTypeRequiredDescription
business_profile_idstring
Required
The business profile ID of the supplier issuing the credit note.
Required data

  • Original sales invoice reference — Include the original invoice in billing_reference

  • Business profile identifier — Business profile ID of the supplier (in path)

  • Buyer party details — Customer party fields (name, address, tax scheme)

  • Line items being credited — At least one document line

  • Discrepancy reasondiscrepancy_response (DL8.61.1 codes)

  • VAT information — Tax category and scheme per line and for charges/allowances as applicable

System behavior

  • VAT is recalculated according to UAE VAT law

  • Credit note status and transmission events are tracked

Party VAT and registration validation

RuleDescription
Time fieldsWhen sending issue_time or delivery_time, use Gulf Standard Time (GST, UTC+4). Format HH:mm:ss.
Party VAT (party_tax_scheme)Optional for UAE parties. If either company_id or tax_scheme is provided, both are required with UAE VAT format
VAT/TRN format15 numeric characters; must start with 1 and end with 01 or 03 (pattern ^1\d{12}0(01\|3)$)
Customer registrationOptional. If scheme_agency_id is sent, company_id is required and type-specific rules apply. See The Customer party object.
UAE business customer TINRequired for UAE business customers. Exactly 10 characters, must start with 1

See The Customer party object.

Response

Status code: 201 Created

Returns the created credit note object with all calculated fields populated.

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 Sale credit note object page.

ConcernBehavior
Payload sizeEntire POST body must not exceed 8MB (see 413 below).
Create responseEach attachment in the 201 body includes id, file_name, and file_type only.
System PDFOn successful create, the API adds credit-note.pdf (application/pdf) for the rendered document in addition to any attachments you send.
DownloadUse Download attachment with the id from the response to fetch file bytes.
Error responses

StatusDescription
400 Bad RequestInvalid request parameters or validation failed. For validation errors, the response includes field-specific errors.
401 UnauthorizedAuthentication required or invalid token.
413 Request Entity Too LargeThe request payload size exceeds the allowed limit of 8MB.
500 Internal Server ErrorAn error occurred while processing the request.
Next