Open API

Mahjoz Open API

Integrate your systems with Mahjoz. Manage orders, customers, services, staff, and availability programmatically.

https://api.mahjoz.io/api/open/v1

Authentication

The Open API uses OAuth2 Client Credentials flow. Get your credentials from the Mahjoz dashboard.

1

Get Your Credentials

Create an API client from your Mahjoz dashboard. Save the client_id and client_secret β€” the secret is only shown once.

Open API Settings
2

Get Access Token

POST /oauth/token
Content-Type: application/json

{
  "grant_type": "client_credentials",
  "client_id": "<client_id>",
  "client_secret": "<client_secret>",
  "scope": ""
}
3

Use the Token

Authorization: Bearer <access_token>

Rate Limiting

Requests are rate-limited per client. Default: 60 requests/minute. When exceeded, the API returns 429 Too Many Requests with a Retry-After header.

Scopes

ScopeDescription
orders:readRead orders
orders:writeCreate orders and check availability
customers:readRead customers
customers:writeCreate customers
items:readRead items (services and products)
staff:readRead staff and their services
branches:readRead branches
categories:readRead categories
*All scopes

Pagination

List endpoints return paginated results. Use per_page (default 25, max 100) and page parameters.

{
  "data": [...],
  "links": { "first": "...", "last": "...", "prev": null, "next": "..." },
  "meta": { "current_page": 1, "last_page": 5, "per_page": 25, "total": 120 }
}

Error Handling

HTTP CodeError CodeDescription
401authentication_failedMissing, invalid, or expired token
403insufficient_scopeToken lacks required scope
403feature_disabledOpen API not available on current plan
422validation_errorInvalid request data
422timeslot_unavailableRequested time slot is not available
429β€”Rate limit exceeded
502availability_check_failedBooking service unreachable

API Endpoints

MethodEndpointScope
GET/ordersorders:read
GET/orders/{uuid}orders:read
POST/ordersorders:write
POST/availabilityorders:write
GET/customerscustomers:read
GET/customers/{uuid}customers:read
GET/customers/phonecustomers:read
POST/customerscustomers:write
GET/itemsitems:read
GET/items/{uuid}items:read
GET/staffstaff:read
GET/staff/{uuid}staff:read
GET/branchesbranches:read
GET/categoriescategories:read

Ready to integrate?

Create your API client and start building with the Mahjoz Open API today.

Get API Credentials