Quick Start
Quick Start
Get from zero to a live OTA-compliant invoice submission in under 5 minutes.
Prerequisites
- A Sahalah account (sign up free →)
- Your API key from the Settings → API Keys dashboard page
- An HTTP client (
curl, Postman, or any SDK)
Step 1 — Authenticate
All requests require a Bearer token in the Authorization header.
# Test your API keycurl https://sandbox.api.sahalah.om/v1/ping \ -H "Authorization: Bearer YOUR_API_KEY"Expected response:
{ "status": "ok", "environment": "sandbox", "account": "your-company-name"}Step 2 — Create an Invoice
curl -X POST https://sandbox.api.sahalah.om/v1/invoices \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "invoice_number": "INV-2026-00001", "invoice_type": "STANDARD", "issue_date": "2026-08-01", "seller": { "crn": "1234567890", "name": "Acme Trading LLC", "vat_number": "OM1234567890000", "address": { "country": "OM", "city": "Muscat" } }, "buyer": { "name": "Gulf Supplies Co.", "vat_number": "OM9876543210000" }, "line_items": [ { "description": "Professional Services", "quantity": 1, "unit_price": 1000.00, "vat_rate": 5 } ] }'Step 3 — Submit to OTA
Once the invoice is created and validated, submit it:
curl -X POST https://sandbox.api.sahalah.om/v1/invoices/INV-2026-00001/submit \ -H "Authorization: Bearer YOUR_API_KEY"Success response:
{ "irn": "SHL-2026-OTA-00001", "status": "OTA_ACCEPTED", "submitted_at": "2026-08-01T10:32:45Z", "pdf_url": "https://files.sahalah.om/invoices/INV-2026-00001.pdf", "xml_url": "https://files.sahalah.om/invoices/INV-2026-00001.xml"}What’s Next?
- Authentication — rotate keys, manage scopes
- API Reference — full endpoint documentation (coming soon)
- Webhooks — receive real-time OTA status updates