Sandbox & testing
You build and test against a sandbox company of your own that holds only generated data. You create it yourself with one button; nobody at Ahlan Hamad has to do anything.
Create a sandbox
- Sign in to Ahlan Hamad, or create a free account.
- Open Integrations → API keys and press Create sandbox company.
- Pick the country: Kuwait, Saudi Arabia, UAE, Qatar, Bahrain or Oman. Currency, timezone, weekend and social-insurance rules follow the country you pick.
- You become the sandbox's CEO by membership only — your current company does not change. Use Switch to sandbox when you want to work in it.
- In the sandbox, create an API key and choose its scopes. It starts with
ah_test_and is shown once — copy it straight away.
curl https://actions.ahlanhamad.com/v1/company \
-H "Authorization: Bearer ah_test_…"Each user can have one sandbox company. Resetting or deleting a sandbox is not available yet.
What the sandbox contains
- A company named Sandbox Trading Co. (شركة التجربة للتجارة) with one legal entity in the country you picked, and
"sandbox": trueonGET /v1/company. - Ten generated employees with obviously fictional names, staff numbers
SBX-001toSBX-010: three nationals and seven expatriates; eight full-time, one part-time and one on contract. - One finalized payroll run for last month, priced with the product's own payroll and social-insurance engine and with its journal posted — what you read is what a real company's run looks like.
- Generated bank and ID details exist only for the in-app screens. The API never returns those fields, in a sandbox or in production.
| Staff number | Job title | Department | Nationality | employment_type |
|---|---|---|---|---|
SBX-001 | General Manager | Management | National of the sandbox country | full_time |
SBX-002 | Finance Manager | Finance | National of the sandbox country | full_time |
SBX-003 | HR Officer | Human Resources | National of the sandbox country | full_time |
SBX-004 | Store Manager | Retail | Indian | full_time |
SBX-005 | Cashier | Retail | Filipino | full_time |
SBX-006 | Cashier | Retail | Egyptian | full_time |
SBX-007 | Cashier | Retail | Indian | part_time |
SBX-008 | Stock Associate | Retail | Filipino | full_time |
SBX-009 | Driver | Operations | Pakistani | full_time |
SBX-010 | Accountant | Finance | Jordanian | contract |
How test keys behave
ah_test_keys work only with sandbox companies, andah_live_keys only with real ones. The wrong kind returns401 unauthenticated.- Same endpoints, same scopes, same rate limit (600 requests per minute per key by default).
- Webhook events from a sandbox carry
"livemode": false. - A sandbox is not treated as a customer: no subscription, no invoices, no marketing email or reminders.
- Don't put real people's data into a sandbox. It is a test space and everything in it should stay fictional.
What you can call today
Generated from openapi.yaml: the operations that are live now, and the ones published in the contract that have not shipped yet.
| Operation | Release | Status |
|---|---|---|
GET /v1/company | v1.0 | Live |
GET /v1/employees | v1.0 | Not yet live |
GET /v1/employees/{employee_id} | v1.0 | Not yet live |
GET /v1/payroll-runs | v1.0 | Not yet live |
GET /v1/payroll-runs/{payroll_run_id} | v1.0 | Not yet live |
POST /v1/attendance/events | v1.1 | Not yet live |
GET /v1/attendance | v1.1 | Not yet live |
GET /v1/webhooks | v1.2 | Not yet live |
POST /v1/webhooks | v1.2 | Not yet live |
GET /v1/webhooks/{webhook_id} | v1.2 | Not yet live |
PATCH /v1/webhooks/{webhook_id} | v1.2 | Not yet live |
DELETE /v1/webhooks/{webhook_id} | v1.2 | Not yet live |
POST /v1/webhooks/{webhook_id}/test | v1.2 | Not yet live |
GET /v1/webhooks/{webhook_id}/deliveries | v1.2 | Not yet live |
POST /v1/webhooks/{webhook_id}/deliveries/{delivery_id}/redeliver | v1.2 | Not yet live |
Follow the changelog for what ships next. To try every endpoint quickly, import the Postman collection and set its apiKey variable to your ah_test_ key.