SUMU
Sending

Dry run

Check a JSON invoice payload, or preview its UBL, without sending it.

Two endpoints, same body — the exact JSON Create an invoice accepts. Neither sends anything, and neither costs an invoice number.

POST/v1/api/invoices/validate
synchronous

Runs everything a real send would check: the business rules only your company record can settle (e.g. whether the seller is Omani), invoice number uniqueness — this reports the same conflict a send would, so a dry run genuinely predicts whether a send will succeed — and the full Oman schematron set, fatal errors and warnings both. Answers 200 either way; valid carries the verdict, not the status code.

FieldType Description
(body)objectrequiredSame shape as Create an invoice, sender_id included — it's used to prove ownership before validating, same as a real send

Response fields

FieldType Description
validboolean—true when there are no errors. Warnings don't make a payload invalid
profilestring—Always om-pint here — this validates the JSON payload, not a resolved UBL profile the way /documents/validate does
issues[].codestring—Same value as rule_id on a schematron issue; a field-level check may leave it null
issues[].rule_idstring—The Oman rule identifier, e.g. IBR-019-OM, when the issue came from a schematron
sender_idnull—Always null on this endpoint — parties aren't resolved from a JSON payload the way they are from XML
receiver_idnull—Always null, same reason
document_idstring—Echoes invoice_number from the request

The same issues[] shape Validate and Create an invoice's 400 VALIDATION_ERROR both use — one handler for all three.

Preview the UBL

POST/v1/api/invoices/preview-xml
synchronous

Same request body. Returns the raw UBL XML a send would transmit — Content-Type: application/xml, not the JSON envelope — so you can diff it or feed it to your own tooling. Unlike /validate, this doesn't check invoice number uniqueness; it only builds the document. A payload that can't be built at all fails the same way a send would — 400 VALIDATION_ERROR, see Errors.

SUMU

Sumu — an e-invoicing platform owned and operated by OceanGate for Smart Technologies LLC, a FinTech and SaaS solutions company. All rights reserved © 2026.

joinsumu.com ↗