HomeUser GuidesAPI Reference
Get Started
HomeAPI Reference
Authentication
Branches
Contact Groups
Contacts
Conversations
Error HandlingInvoices
Messages
Orders
Rate LimitingSDKs & Code ExamplesTemplatesTicketsAPI VersioningWABA NumbersWebhooks
User GuideAPI ReferenceCreate BranchList Branches

List Branches

Display all branches with search and pagination support

Reading time: 1 minute

List Branches

Display all branches with search and pagination support.

GET{{base_url}}/branches

Query Parameters

ParameterTypeRequiredDescriptionDefault
phone_number_idstringYesPhone number ID-
pageintegerNoPage number1
limitintegerNoNumber of results per page10
searchTermstringNoSearch in branches (name, phone, address)-

Tip: Use the searchTerm parameter to search in branch name, phone number, or address.

Example Request

Example Requestbash
curl -X GET "{{base_url}}/branches?page=1&limit=10&phone_number_id=123456" \
-H "Accept: application/json" \
-H "X-Awal-Signature-256: sha256=abc..." \
-H "X-Timestamp: 1704124800" \
-H "X-Domain: your-workspace" \
-H "X-Client-ID: your-client-id"

Example Response

Response200 OK
{
"status": true,
"data": [
  {
    "id": 1,
    "name": "Main Branch",
    "phone": "966500000000",
    "email": "main@example.com",
    "address": "King Fahd Road, Riyadh, Saudi Arabia",
    "description": "Main branch in Riyadh",
    "is_favorite": true,
    "contact_group_id": 5,
    "created_at": "2025-01-01T10:00:00Z",
    "updated_at": "2025-01-08T14:30:00Z"
  },
  {
    "id": 2,
    "name": "Jeddah Branch",
    "phone": "966500000001",
    "email": "jeddah@example.com",
    "address": "Tahlia Street, Jeddah, Saudi Arabia",
    "description": "Jeddah branch",
    "is_favorite": false,
    "contact_group_id": null,
    "created_at": "2025-01-02T11:00:00Z",
    "updated_at": "2025-01-07T09:15:00Z"
  }
],
"meta": {
  "current_page": 1,
  "per_page": 10,
  "total": 2,
  "last_page": 1
}
}

Use Cases

Search for Specific Branch

Searchbash
GET /branches?searchTerm=Jeddah&phone_number_id=123456

Get Favorite Branches Only

Filter Favoritesjavascript
const response = await fetch('/branches?phone_number_id=123456');
const data = await response.json();
const favorites = data.data.filter(branch => branch.is_favorite);

Related

← Back to Branches
View Guide
View