> For the complete documentation index, see [llms.txt](https://docs.gem-suite.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gem-suite.com/api-reference/resources/resources-2.md).

# Branches

## List all branches

<mark style="color:blue;">`GET`</mark> `https://app.gem-books.com/api/branches`

This endpoint allows you to get the list of your branches.\
The branches are returned, sorted by name (A-Z).

#### Query Parameters

| Name      | Type   | Description                                                              |
| --------- | ------ | ------------------------------------------------------------------------ |
| page      | string | The number of page you wish to see. Default is 1.                        |
| per\_page | string | The number of the desired result per page. Default is 20. Maximum is 100 |

#### Headers

| Name                                             | Type   | Description                   |
| ------------------------------------------------ | ------ | ----------------------------- |
| Authentication<mark style="color:red;">\*</mark> | string | Bearer token.                 |
| Accept<mark style="color:red;">\*</mark>         | string | Should be `application/json`. |

{% tabs %}
{% tab title="200 " %}

```
{
    "data": [
        {
            "id": 2,
            "name": "Branch 2",
            "status": 1
        },
        {
            "id": 1,
            "name": "Logiciel Actif Inc",
            "status": 1
        }
    ],
    "meta": {
        "current_page": 1,
        "last_page": 1,
        "per_page": 25,
        "total": 2
    },
    "success": true
}
```

{% endtab %}
{% endtabs %}

## Retrieve a branch

<mark style="color:blue;">`GET`</mark> `https://app.gem-books.com/api/branches/:id`

This endpoint allows you to get the details of the resource.

#### Path Parameters

| Name | Type   | Description                        |
| ---- | ------ | ---------------------------------- |
| id   | string | The ID of the resource to retrieve |

#### Headers

| Name           | Type   | Description                   |
| -------------- | ------ | ----------------------------- |
| Authentication | string | Bearer token.                 |
| Accept         | string | Should be `application/json`. |

{% tabs %}
{% tab title="200 " %}

```
{
    "data": {
        "id": 1,
        "name": "Logiciel Actif Inc",
        "status": 1
    },
    "success": true
}
```

{% endtab %}
{% endtabs %}
