> For the complete documentation index, see [llms.txt](https://invoice4u.gitbook.io/invoice4u-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://invoice4u.gitbook.io/invoice4u-docs/he/branches/get-branches.md).

# שליפת סניפים

‫מחזיר את כל הסניפים של הארגון המאומת.‬

## ‫מתודה‬

|             |                                        |
| ----------- | -------------------------------------- |
| ‫**מתודה**‬ | `POST`                                 |
| ‫**נתיב**‬  | `/GetBranches`                         |
| ‫**תשובה**‬ | `Branch[]`, או `null` בשגיאת אימות/שרת |

## ‫סכימת הבקשה‬

| ‫שדה‬   | ‫טיפוס‬ | ‫חובה‬ | ‫תיאור‬       |
| ------- | ------- | ------ | ------------- |
| `token` | string  | ‫כן‬   | ‫טוקן אימות.‬ |

## ‫דוגמת בקשה‬

```http
POST /Services/ApiService.svc/GetBranches HTTP/1.1
Host: apiqa.invoice4u.co.il
Content-Type: application/json

{
  "token": "<token>"
}
```

## ‫דוגמת תשובה‬

```json
{
  "GetBranchesResult": [
    {
      "ID": 101,
      "Name": "Head Office",
      "Description": "Main branch",
      "Enabled": true,
      "IsDefault": true,
      "IsMain": true,
      "Email": "office@acme.example"
    },
    {
      "ID": 102,
      "Name": "North Branch",
      "Enabled": true,
      "IsDefault": false,
      "IsMain": false
    }
  ]
}
```

## ‫שגיאות‬

‫מחזיר `null` כאשר הטוקן אינו תקין או בשגיאת שרת. השתמשו בערכי ה-`ID` המוחזרים כ-`BranchID` בעת [יצירת מסמכים](/invoice4u-docs/he/documents/create-document.md).‬

## ‫נסו את זה‬

## Get branches

> Returns all branches for the authenticated organization. Returns null on auth/server error.

```json
{"openapi":"3.0.3","info":{"title":"Invoice4U API","version":"1.0.0"},"tags":[{"name":"Branches","description":"Organization branches."}],"servers":[{"url":"https://api.invoice4u.co.il/Services/ApiService.svc","description":"Production"},{"url":"https://apiqa.invoice4u.co.il/Services/ApiService.svc","description":"QA (staging)"}],"paths":{"/GetBranches":{"post":{"tags":["Branches"],"operationId":"GetBranches","summary":"Get branches","description":"Returns all branches for the authenticated organization. Returns null on auth/server error.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["token"],"properties":{"token":{"type":"string"}}}}}},"responses":{"200":{"description":"Branch list.","content":{"application/json":{"schema":{"type":"object","properties":{"GetBranchesResult":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/Branch"}}}}}}}}}}},"components":{"schemas":{"Branch":{"type":"object","properties":{"ID":{"type":"integer"},"Name":{"type":"string"},"Description":{"type":"string","nullable":true},"Enabled":{"type":"boolean"},"IsDefault":{"type":"boolean"},"IsMain":{"type":"boolean"},"Email":{"type":"string","nullable":true}}}}}}
```
