> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.tabs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.tabs.com/_mcp/server.

# List departments

GET https://integrators.prod.api.tabsplatform.com/v3/departments

Departments synced from the connected ERP (QuickBooks, NetSuite, or Sage Intacct). Can be populated on an obligation or billing term.

Reference: https://docs.tabs.com/api-reference/departments/getDepartments

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Tabs External API
  version: 1.0.0
paths:
  /v3/departments:
    get:
      operationId: integrators-api-departments-controller-get-departments
      summary: List departments
      description: >-
        Departments synced from the connected ERP (QuickBooks, NetSuite, or Sage
        Intacct). Can be populated on an obligation or billing term.
      tags:
        - departments
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Get departments
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Departments_IntegratorsApiDepartmentsController_getDepartments_Response_200
servers:
  - url: https://integrators.prod.api.tabsplatform.com
    description: https://integrators.prod.api.tabsplatform.com
components:
  schemas:
    DepartmentModelDto:
      type: object
      properties:
        id:
          type: string
          description: The ID of the department
        name:
          type: string
          description: The name of the department
        fullName:
          type: string
          description: The fully qualified name of the department
        externalId:
          type: string
          description: The external ID of the department in the source ERP
      required:
        - id
        - name
        - fullName
        - externalId
      title: DepartmentModelDto
    V3DepartmentsGetResponsesContentApplicationJsonSchemaPayload:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/DepartmentModelDto'
      description: Response payload, will be empty when success is false
      title: V3DepartmentsGetResponsesContentApplicationJsonSchemaPayload
    IntegratorsApiErrorDetails:
      type: object
      properties: {}
      description: Additional details about the error
      title: IntegratorsApiErrorDetails
    IntegratorsApiError:
      type: object
      properties:
        code:
          type: number
          format: double
          description: API response code
        message:
          type: string
          description: API response message
        details:
          $ref: '#/components/schemas/IntegratorsApiErrorDetails'
          description: Additional details about the error
      required:
        - code
        - message
      title: IntegratorsApiError
    Departments_IntegratorsApiDepartmentsController_getDepartments_Response_200:
      type: object
      properties:
        payload:
          $ref: >-
            #/components/schemas/V3DepartmentsGetResponsesContentApplicationJsonSchemaPayload
          description: Response payload, will be empty when success is false
        success:
          type: boolean
          description: Boolean with true=success, false=failure
        message:
          type: string
          description: Plain-text description of the result
        error:
          $ref: '#/components/schemas/IntegratorsApiError'
          description: json element with any error messages or warnings
      required:
        - payload
        - success
        - message
        - error
      title: >-
        Departments_IntegratorsApiDepartmentsController_getDepartments_Response_200
  securitySchemes:
    custom-header:
      type: apiKey
      in: header
      name: Authorization

```

## Examples



**Request**

```json
{}
```

**Response**

```json
{
  "payload": {
    "data": [
      {
        "id": "a3f1c9d2-4b7e-4f8a-9c2d-5e7b3f1a9d8c",
        "name": "Finance",
        "fullName": "Corporate:Finance",
        "externalId": "FIN-001"
      },
      {
        "id": "b7d2e3f4-9a1c-4d5e-8f7b-2c3a4e6d7f8b",
        "name": "Human Resources",
        "fullName": "Corporate:Human Resources",
        "externalId": "HR-002"
      },
      {
        "id": "c9e4f5a6-7b8c-4d9e-8f1a-3b2c4d5e6f7a",
        "name": "Sales",
        "fullName": "Operations:Sales",
        "externalId": "SAL-003"
      }
    ]
  },
  "success": true,
  "message": "Departments retrieved successfully",
  "error": {
    "code": 0,
    "message": "",
    "details": {}
  }
}
```

**SDK Code**

```python
import requests

url = "https://integrators.prod.api.tabsplatform.com/v3/departments"

payload = {}
headers = {
    "Authorization": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.get(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://integrators.prod.api.tabsplatform.com/v3/departments';
const options = {
  method: 'GET',
  headers: {Authorization: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://integrators.prod.api.tabsplatform.com/v3/departments"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", url, payload)

	req.Header.Add("Authorization", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://integrators.prod.api.tabsplatform.com/v3/departments")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://integrators.prod.api.tabsplatform.com/v3/departments")
  .header("Authorization", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://integrators.prod.api.tabsplatform.com/v3/departments', [
  'body' => '{}',
  'headers' => [
    'Authorization' => '<apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://integrators.prod.api.tabsplatform.com/v3/departments");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://integrators.prod.api.tabsplatform.com/v3/departments")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```