Search customers by phone (fuzzy or exact)
GET
/api/v1/customers/search
const url = 'https://api.dokanmazad.com/api/v1/customers/search?phone=%2B971501234567&exact=true';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.dokanmazad.com/api/v1/customers/search?phone=%2B971501234567&exact=true' \ --header 'X-API-Key: <X-API-Key>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”phone
required
string
Customer phone number. When called via API key, exact match is automatically enforced regardless of the exact param.
Example
+971501234567exact
string
Pass “true” for exact phone match. IMPORTANT: When called via API key, exact match is automatically enforced regardless of this parameter to prevent customer enumeration.
Example
trueResponses
Section titled “Responses”Success
Media typeapplication/json
object
success
required
boolean
data
required
meta
object
page
integer
limit
integer
total
integer
totalPages
integer
data
required
object
id
required
Customer CUID (use as customerId in POST /orders)
string
name
required
Customer name
string
mobileNumber
Customer phone
string
tenantId
Tenant identifier (when applicable)
string
Examples
Examplesuccess
{ "success": true, "data": [ { "id": "cmoabcde000001ny11aabbcc0", "name": "Ahmed Ali", "mobileNumber": "+971501234567", "tenantId": "haragkora" } ]}Unauthorized — missing or invalid API key
Media typeapplication/json
object
success
required
boolean
error
required
string
statusCode
required
integer
Example
{ "success": false}Forbidden — route not in this key’s allowedRoutes
Media typeapplication/json
object
success
required
boolean
error
required
string
statusCode
required
integer
Example
{ "success": false}Rate limit exceeded
Media typeapplication/json
object
success
required
boolean
error
required
string
statusCode
required
integer
Example
{ "success": false}Headers
Section titled “Headers”Retry-After
integer
Seconds to wait before retrying
