Skip to main content

Get Recipients Count

This API allows you to retrieve the count of recipients based on various filters such as birth year, province, county, city

📍 Endpoint

GET {base_url}/v2/api/send/banks/counts

🧾 Headers

KeyValue
AuthorizationYOUR_TOKEN_HERE
Content-Typeapplication/json

📝 Parameters

ParameterTypeRequiredDescription
from_ageintegerNoThe minimum age of the recipients
to_ageintegerNoThe maximum age of the recipients
province_idintegerYesThe ID of the province to filter recipients
county_idintegerNoThe ID of the county to filter recipients
city_idintegerNoThe ID of the city to filter recipients
genderintegerNoThe gender to filter recipients (1 for male, 2 for female)
prestringNoThe prefix of the phone numbers to filter recipients

✅ Success Response

{
"data": {
"mci_count": 256171,
"irancell_count": 134380,
"other_count": 10425
},
"meta": {
"status": true,
"message": "count",
"message_parameters": [],
"message_code": "200-1"
}
}

❌ Error Response — Invalid or Expired Token (401)

{
"data": null,
"meta": {
"status": false,
"message": "اطلاعات وارد شده صحیح نمی باشد",
"message_parameters": [],
"message_code": "400-1",
"errors": {}
}
}

❌ Error Response — Invalid Request (422)

{
"data": null,
"meta": {
"status": false,
"message": "گزینه انتخاب شده county id صحیح نمی باشد",
"message_parameters": [],
"message_code": "400-2",
"errors": {
"county_id": [
"گزینه انتخاب شده county id صحیح نمی باشد"
]
}
}
}

🧪 Example Request

curl --location '{base_url}/v2/api/send/banks/counts?province_id=1&city_id=1&from_age=1304&to_age=1404&gender=1&pre=912' \
--header 'Content-Type: application/json' \
--header 'Authorization: API TOKEN'