# List departments

> A list of departments.

GET

/departments/

Returns a paginated list of all departments within the organization.

#### Helpful resources

-   [Create and manage departments](https://developer.rippling.com/documentation/rest-api/guides/departments)
-   [Introduction to Departments](https://help.rippling.com/article?articleId=1500002734321)

### Required Scopes

-   departments.read
    

### Request

Query Parameters

**expand** string

**order\_by** string

**limit** integer required

**Possible values:** `>= 1` and `<= 100`

**Default value:** `50`

The maximum number of results to return. Defaults to 50. Maximum is 100.

**cursor** string

#### Expanding objects

Include one or more of these fields in the [expand parameter](https://developer.rippling.com/documentation/rest-api/essentials/query-parameters#sort-expand) to return nested data.

Fields:parent, department\_hierarchy

#### Sorting results

Include one or more of these fields in the [sort parameter](https://developer.rippling.com/documentation/rest-api/essentials/query-parameters#sort-order_by) to control result order.

Fields:id, created\_at, updated\_at

## Responses

-   200
-   400
-   401
-   403

Successful response

-   application/json

-   Schema
-   Example (from schema)

**Schema**

**\_\_meta** object

A list of redacted fields.

**redacted\_fields** object\[\]

Array \[

**name** string

The name for the redacted field

**reason** string

The reason for the redaction

\]

**results** object\[\]

Array \[

**id** string required

Identifier field

**created\_at** string required

Record creation date

**updated\_at** string required

Record update date

**name** string required

The name of the department.

**parent\_id** string

The parent department.

**parent** object nullable

The parent department.

-   Matches one or more of these formats:
    
    1.  **Format 1**
        
    2.  **Format 2**
        
        **value** object nullable
        
        **Possible values:** \[null\]
        

**reference\_code** string

Reference code of the department.

**department\_hierarchy\_id** string\[\]

The identifier of departments in the department hierarchy ordered from parent department to child department.

**department\_hierarchy** object\[\] nullable

List of departments in the department hierarchy. Refer department\_hierarchy\_ids for department hierarchy order.

Expandable field

\]

**next\_link** string nullable

A link to the next page of responses, or null if there are no more pages.

```json
{
  "__meta": {
    "redacted_fields": [
      {
        "name": "date_of_birth",
        "reason": "Insufficient entitlements"
      }
    ]
  },
  "results": [
    {
      "id": "string",
      "created_at": "string",
      "updated_at": "string",
      "name": "string",
      "parent_id": "string",
      "parent": {},
      "reference_code": "string",
      "department_hierarchy_id": [
        "string"
      ],
      "department_hierarchy": [
        "string"
      ]
    }
  ],
  "next_link": "string"
}
```

The request failed validation. The response body describes the error.

-   application/json

-   Schema
-   Example (from schema)

**Schema**

**detail** string

A human-readable explanation of why the request failed.

```json
{
  "detail": "string"
}
```

Authentication is required or the supplied credentials are invalid.

-   application/json

-   Schema
-   Example (from schema)

**Schema**

-   Matches one or more of these formats:
    
    1.  **Format 1**
        
        **ok** boolean required
        
        Whether the request succeeded. Always false for an authentication error.
        
        **Possible values:** \[false\]
        
        **error** string required
        
        A human-readable explanation of why authentication failed.
        
    2.  **Format 2**
        
        **detail** string required
        
        A human-readable explanation of the authentication error.
        

**Format 1**

```json
{
  "ok": false,
  "error": "Incorrect authentication credentials."
}
```

**Format 2**

```json
{
  "detail": "string"
}
```

The caller is not authorized to perform this action.

-   application/json

-   Schema
-   Example (from schema)

**Schema**

**detail** string

A human-readable explanation of why the request failed.

```json
{
  "detail": "string"
}
```

Source: https://developer.rippling.com/documentation/rest-api/reference/list-departments

> For the complete documentation index, see [llms.txt](https://developer.rippling.com/llms.txt). Public pages have a Markdown version at the same URL with .md added.
