/v2/api/entity/branch path as create; the record to update is identified by the id in the request body. If id is omitted a new branch is created instead./v2/api/entity base and authenticated with a Bearer token. Requires the Branches plugin to be enabled on the account.name, code, and status. Only these fields can be updated — id, name, status, created, modified, and code. Other branch attributes (phone numbers, address, city, state, country, assigned staff, SMTP account, map location) are not available through this endpoint.{ "message": <localized text>, "id": <id> }. The success message is the same text returned by create, so it does not distinguish an update from an insert.status value is one of:| Value | Meaning |
|---|---|
1 | Active |
2 | Inactive |
3 | Suspended |
curl --location --globoff 'https://.daftara.com/v2/api/entity/branch' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--header 'apikey: ' \
--header 'Content-Type: application/json' \
--data '{
"id": 1,
"name": "Riyadh Branch (Main)",
"status": 1
}'{
"message": "Branch added successfully",
"id": 0
}