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}/api/send/jobs/number-count?main_category_id={category_id}

🧾 Headers

KeyValue
AuthorizationYOUR_TOKEN_HERE
Content-Typeapplication/json

📝 Parameters

ParameterTypeRequiredDescription
main_category_idintegerYesID of the main job category
sub_category_idintegerNoID of the sub-category within the main job
operator_idintegerNoID of the mobile operator (1 for MCI, 2 for Irancell, 13 for Others)
startintegerNoStarting index for recipients
sizeintegerNoNumber of recipients to send

✅ Success Response

{
"data": {
"mci_count": 15322,
"irancell_count": 0,
"other_count": 0
},
"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": "گزینه انتخابی شناسه دسته بندی اصلی صحیح نمی باشد",
"message_parameters": [],
"message_code": "400-2",
"errors": {
"main_category_id": [
"گزینه انتخابی شناسه دسته بندی اصلی صحیح نمی باشد"
]
}
}
}

🧪 Example Request

curl --location '{base_url}/api/send/jobs/number-count?main_category_id={category_id}' \
--header 'Content-Type: application/json' \
--header 'Authorization: APIKEY OR TOKEN' '