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.
Rate limit
60 requests/minute per authenticated account. See Rate limiting for response headers (X-RateLimit-*) and retry guidance.
Path parameters
Request body
Send the full sales credit note JSON in the request body. See the right panel for a complete request example.
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_supplier_party — the API sets the supplier 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
Request party object
The accounting_customer_party field on create and resubmit requests. The supplier (accounting_supplier_party) is set automatically from the {profileId} business profile—do not send it.
Field requirements depend on whether the party is the buyer or seller. See The Customer party object and The Supplier party object.
Response party fields
Address object
Postal and delivery addresses use the shared address object structure.
Tax category object
Tax categories share the same structure on line items (classified_tax_category), document-level charges[].tax_category, and allowances[].tax_category.
Buyer customer party object
The buyer_customer_party field carries the Beneficiary ID (UBL BTAE-01). It is not a full party reference—only the beneficiary identifier is sent in the API.
Seller supplier party object
The seller_supplier_party field carries the Principle ID (UBL BTAE-14). It is not a full party reference—only the Principle ID TRN is sent in the API.
Payee party object
The payee_party field is an object with the following attributes:
Tax representative party object
The tax_representative_party field is an object with the following attributes:
Delivery object
The delivery field is an object with the following attributes. JSON property names use snake_case as shown.
Delivery location object
The delivery_location object has the following attributes.
Order reference object
The order_reference field is an object with the following attributes:
Billing reference object
Each element of the billing_reference array is an object with the following attributes:
Despatch document reference object
The despatch_document_reference field is an object with the following attributes:
Receipt document reference object
The receipt_document_reference field is an object with the following attributes:
Statement document reference object
The statement_document_reference field is an object with the following attributes:
Originator document reference object
The originator_document_reference field is an object with the following attributes:
Contract document reference object
The contract_document_reference field is an object with the following attributes:
Project reference object
The project_reference field is an object with the following attributes:
Price object
The price object on each document_lines[] entry carries the item net price and price base quantity.
Document line object
Each element of the document_lines array represents one invoice line (UBL InvoiceLine). Nested item fields map to the UBL Item group. For Item Type, HSN, and SAC mappings from your ERP or Marmin UI, see Line item classification (UI to API).
Invoice period object
Used on document lines (document_lines[].invoice_period) and at document level (invoice_period).
Order line reference object
Despatch line reference object
Line document reference object
Buyer item identification object
The buyer_item_identification field is an object with the following attributes:
Seller item identification object
The seller_item_identification field is an object with the following attributes:
Standard item identification object
The standard_item_identification field is an object with the following attributes:
Additional item identification object
Use this array for Service Accounting Code (SAC) when the line Item Type is Services (S) or Both (B). In Marmin UI this is the Service Accounting Code field—not the Item Type dropdown.
Each element of the additional_item_identification array is an object with the following attributes:
Line item classification (UI to API)
The tables below map common ERP/UI labels on a document line to the API fields on document_lines[]. Use them when building create payloads from your source system.
#### Item type
#### Item classification identifier (HSN)
Applies when Item Type is Goods (`G`) or Both (`B`).
#### Service accounting code (SAC)
Applies when Item Type is Services (`S`) or Both (`B`).
#### Related fields
Commodity classification object
The commodity_classification object carries Item Type, HSN (for goods), and reverse-charge metadata. See Line item classification (UI to API) for UI mappings.
Origin country object
Additional item property object
Charge object
Each element of the charges array is an object with the following attributes:
Allowance object
Each element of the allowances array is an object with the following attributes:
Attachment object (request)
Use these fields when sending attachments on create or update requests.
Attachment object (response)
Each element of attachments in document JSON responses (create, retrieve, list) includes metadata only. File bytes are not returned; use the Download attachment endpoint with attachments[].id.
file_content is request-only and is never included in responses.
Payment means array
The payment_means field is an array; each element is an object with the following attributes:
Card account object
The card_account field is an object with the following attributes:
Payee financial account object
The payee_financial_account field is an object with the following attributes:
Payment mandate object
The payment_mandate field is an object with the following attributes:
Payment terms object
The payment_terms field is an object with the following attributes:
Tax exchange rate object
The tax_exchange_rate field is an object with the following attributes:
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 credit note 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.
Non-AED credit notes
When document_currency_code is not AED, the following rules apply (enforced at API validation):
See Non-AED invoice example for a sample exchange-rate block.
Tax point date (UAE VAT)
tax_point_date (UBL IBT-007) is the date when VAT liability arises per UAE VAT Law.
Implementation notes
Differences between documentation, API validation, and Peppol transmission rules:
See also Implementation notes for cross-document gaps.
Required data
Original sales invoice reference — Include the original invoice in
billing_referenceBusiness 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 reason —
discrepancy_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
See The Customer party object section for details.
Response
Status code: 201 Created
Returns the created sales credit note 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) above.
