Dallol ERP API Reference
Versioned REST API for invoices, customers, products, Debo Pay checkout links, partner portal embeds, and MoR EIMS registration. Each API key is isolated to one company.
Invoicing
Create and fetch invoices with line items, taxes and totals.
Portal & webhooks
Embed booking panels and receive signed payment callbacks.
MoR EIMS
Register invoices for official e-invoicing after your company is approved — not during registration.
Debo Pay
Generate hosted checkout links and scan-to-pay QR codes.
Quick start
https://dallolerp.com/api/v1Prefer
https://api.dallolerp.com/api/v1 in production once DNS/TLS is live. Responses are JSON; keys are company-scoped.
- Register your company on the public site. After approval you receive App ID, Secret, webhook secret, and portal identifiers by email — not MoR certificate bundles.
- Sign in and open your company mini-site at
/site/{slug}or branded login at/auth?site={slug}. - Create or rotate keys under Settings → API keys. Configure webhook URL and portal embed there.
- Call
GET /ping, then enable only the scopes you need. - Enable EIMS / MoR credentials later under company EIMS settings when you are ready to register fiscal invoices.
Authentication
Send the key and secret on every request. HTTPS is required in production.
Authorization: Bearer <key>:<secret> # Alternative header format X-API-Key: <key> X-API-Secret: <secret>
Webhooks
Payment and status events are delivered to your company webhook URL with an HMAC signature (same pattern as Debo Pay). Verify the signature before trusting the payload.
X-DeboPay-Signature: t=<unix>,v1=<hmac_sha256>
# Verify: HMAC-SHA256 of "{t}.{raw_body}" using your webhook secret
Default ERP callback path: {{SITE_BASE}}/debopay/webhook. Store the per-company webhook secret shown when keys are provisioned.
Scopes
Scopes are checked for every protected operation. Prefer separate keys for separate integrations.
| Scope | Allows |
|---|---|
invoices:read | List invoices and retrieve invoice details. |
invoices:write | Create draft invoices and line items. |
customers:read / customers:write | Partner customer sync (e.g. Zemen). |
products:read / products:write | Catalog sync for EIMS and portals. |
sales:read / sales:write | Sales / order sync. |
integrations | Submit eligible invoices to MoR EIMS (after EIMS is configured). |
payments:write | Create hosted payment links and QR payloads. |
portal:embed | Portal config + server-side order create for embeds. |
Endpoints
| Method | Path | Scope | Description |
|---|---|---|---|
| GET | /ping | Authenticated key | Service, API version, tenant and server time. |
| GET | /invoices | invoices:read | List invoices; supports ?status= and ?limit=1..100. |
| GET | /invoices/{id} | invoices:read | Retrieve one tenant-owned invoice and its lines. |
| POST | /invoices | invoices:write | Create a draft invoice with one or more lines. |
| POST | /invoices/{id}/register | integrations | Register an invoice using the company’s configured EIMS integration. |
| GET | /customers | customers:read | List customers for partner sync (Zemen-style). |
| POST | /customers | customers:write | Create a customer. |
| GET | /products | products:read | List products. |
| POST | /products | products:write | Create a product. |
| GET | /sales | sales:read | List sales orders. |
| POST | /sales | sales:write | Create a sale/order. |
| POST | /payments/link | payments:write | Create a Debo Pay checkout URL and QR image. |
| POST | /payments | payments:write | Record a payment against an invoice. |
| GET | /portal/config | portal:embed | Embed config: company_id, app_id, invoice_id param names + links. |
| POST | /portal/orders | portal:embed | Create an invoice/order from an embedded booking panel (no ERP UI). |
EIMS consumer (MoR portal)
Dallol EIMS is a separate MoR-facing service. It does not own the product catalog — it reads products and invoices from Dallol ERP via this API, then registers fiscal documents with the Ministry of Revenue.
products:read, invoices:read, invoices:write, integrations.
List products from ERP
curl "https://dallolerp.com/api/v1/products?limit=50" \ -H "Authorization: Bearer KEY:SECRET"
Fetch invoice then register with MoR
curl "https://dallolerp.com/api/v1/invoices/123" \ -H "Authorization: Bearer KEY:SECRET" curl -X POST "https://dallolerp.com/api/v1/invoices/123/register" \ -H "Authorization: Bearer KEY:SECRET"
Configure ERP_API_BASE_URL on each EIMS environment to the matching ERP /api/v1 base (production EIMS → production ERP, etc.).
Portal embed (partner sites)
After company registration is approved you receive three identifiers for embedding a booking/order panel (same idea as Zemen Booking):
company_id— tenant idapp_id— API key (dak_…)invoice_id— invoice parameter on create/pay calls
Public script (UI shell only; secrets stay server-side):
<script src="{{SITE_BASE}}/portal/embed.js"
data-company-id="1"
data-app-id="dak_…"
data-invoice-id=""></script>
Server-side order create:
curl -X POST https://dallolerp.com/api/v1/portal/orders \
-H "Authorization: Bearer KEY:SECRET" \
-H "Content-Type: application/json" \
-d '{"customer_id":1,"currency":"ETB","lines":[{"description":"Booking","quantity":1,"unit_price":1000,"tax_rate":15}]}'
Invoice examples
List recent invoices
curl "https://dallolerp.com/api/v1/invoices?status=draft&limit=25" \ -H "Authorization: Bearer KEY:SECRET"
Create a draft invoice
curl -X POST https://dallolerp.com/api/v1/invoices \
-H "Authorization: Bearer KEY:SECRET" \
-H "Content-Type: application/json" \
-d '{
"customer_id": 1,
"invoice_date": "2026-07-15",
"due_date": "2026-07-30",
"currency": "ETB",
"lines": [
{
"description": "Sack of teff (50kg)",
"quantity": 20,
"unit_price": 4500,
"tax_rate": 15
}
]
}'
Register with EIMS
curl -X POST https://dallolerp.com/api/v1/invoices/123/register \ -H "Authorization: Bearer KEY:SECRET"
The company must have EIMS credentials configured. A successful response includes the fiscal IRN.
Create a payment link
curl -X POST https://dallolerp.com/api/v1/payments/link \
-H "Authorization: Bearer KEY:SECRET" \
-H "Content-Type: application/json" \
-d '{
"amount": 108000,
"email": "buyer@example.com",
"phone": "+251900000000",
"purpose": "invoice",
"label": "Order #1042"
}'
The response includes a unique reference, checkout_url, amount, and a base64 QR image suitable for rendering to the buyer.
Responses and errors
Successful responses contain success: true. Errors contain success: false and an explanatory error. Subscription denials can also include a machine-readable code.
| Status | Meaning | Action |
|---|---|---|
200 / 201 | Request succeeded. | Process the returned data. |
401 | Missing, invalid, or revoked credential. | Check the key/secret or issue a replacement. |
403 | Missing scope or disabled subscription feature. | Use the correct scope or contact the tenant administrator. |
404 | Resource does not exist in this tenant. | Verify the identifier. |
422 | Invalid request data. | Correct the JSON payload. |
429 | Request or subscription quota exceeded. | Honor Retry-After and retry with backoff. |
502 / 503 | Payment or fiscal integration is unavailable or not configured. | Retry safely or contact the administrator. |
Limits and security
Tenant isolated Scoped keys Revocable Signed webhooks- Invoice lists return at most 100 records per request.
- POST requests are throttled and may return
429 Too Many Requests. - Failed login IP blocks and Fail2ban protect the admin surface.
- Do not automatically retry invoice creation unless your application has confirmed the previous request did not succeed.
- Log request references and HTTP status codes, but never log credentials or full sensitive payloads.
Production checklist
- Use HTTPS (
api.dallolerp.com/erp.dallolerp.com) and validate the server certificate. - Create a dedicated least-privilege key for each integration.
- Store credentials in a secret manager and establish a rotation process.
- Set connection/read timeouts and exponential retry only for safe operations.
- Test EIMS and payment flows in approved sandbox environments before enabling production.
- Monitor authentication failures, quota responses, fiscal rejections, and payment callbacks.