---
updatedAt: 2025-06-05T01:13:09.000Z
agentTools:
  projectIndex: https://developers.7shifts.com/v2.2023.0501/llms.txt
---

# List Departments

**[Minimum Plan Required](/docs/plan-requirements):** Comp

#### Sample Response

```json
{
    "data": [
        {
            "id": 7890,
            "company_id": 1234,
            "location_id": 4569,
            "name": "FOH",
            "default": false,
            "deleted": null,
            "created": "2021-10-19T22:59:15+00:00",
            "modified": "2021-10-20T17:06:12+00:00"
        },
        {
            "id": 7891,
            "company_id": 1234,
            "location_id": 4569,
            "name": "Kitchen",
            "default": false,
            "deleted": null,
            "created": "2021-10-19T22:59:15+00:00",
            "modified": "2021-10-19T22:59:15+00:00"
        }
    ],
    "meta": {
        "cursor": {
            "current": "eyJsaW1pdCI6MTAwLCJvZmZzZXQiOjB9",
            "prev": null,
            "next": null,
            "count": 2
        }
    },
    "object": "departments"
}
```

# OpenAPI definition

```json
{
  "openapi": "3.0.2",
  "info": {
    "title": "7shifts API",
    "contact": {
      "email": "api-support@7shifts.com"
    },
    "version": "2023-05-01"
  },
  "servers": [
    {
      "url": "https://api.7shifts.com",
      "description": "Production server"
    }
  ],
  "paths": {
    "/v2/company/{company_id}/departments": {
      "get": {
        "tags": [
          "Departments"
        ],
        "summary": "List Departments",
        "operationId": "listDepartments",
        "x-public-api": true,
        "parameters": [
          {
            "name": "x-api-version",
            "in": "header",
            "description": "7shifts API version",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "description": "An API version",
              "example": "2022-05-01"
            }
          },
          {
            "name": "x-company-guid",
            "in": "header",
            "description": "Company GUID",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "1310bfe1-cb3f-4f24-98a2-fde2bc504108"
          },
          {
            "name": "company_id",
            "in": "path",
            "description": "Company ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "example": 1234
          },
          {
            "name": "modified_since",
            "in": "query",
            "description": "Return departments that have been modified since the specified date. Format YYYY-MM-DD",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "example": "2020-01-01"
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Cursor for the next or previous page of results.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The number of results desired per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "location_id",
            "in": "query",
            "description": "Return departments that match the provided location ID",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "example": 1234
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "departments"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "number",
                            "description": "Department ID",
                            "nullable": false
                          },
                          "company_id": {
                            "type": "number",
                            "description": "Company ID",
                            "nullable": false
                          },
                          "location_id": {
                            "type": "number",
                            "description": "Location ID",
                            "nullable": false
                          },
                          "name": {
                            "type": "string",
                            "description": "Department name",
                            "nullable": false
                          },
                          "default": {
                            "type": "boolean",
                            "description": "If true department is set as the default for the location",
                            "nullable": false
                          },
                          "deleted": {
                            "type": "string",
                            "description": "If true the location is deleted",
                            "nullable": true
                          },
                          "created": {
                            "type": "string",
                            "nullable": false
                          },
                          "modified": {
                            "type": "string",
                            "nullable": false
                          }
                        },
                        "required": [
                          "id",
                          "company_id",
                          "location_id",
                          "name",
                          "default",
                          "deleted",
                          "created",
                          "modified"
                        ]
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "cursor": {
                          "type": "object",
                          "properties": {
                            "current": {
                              "type": "string",
                              "description": "The current cursor.",
                              "nullable": true
                            },
                            "prev": {
                              "type": "string",
                              "description": "A cursor for navigating to the previous page.",
                              "nullable": true
                            },
                            "next": {
                              "type": "string",
                              "description": "A cursor for navigating to the next page.",
                              "nullable": true
                            },
                            "count": {
                              "type": "integer",
                              "description": "The total items in the current cursor.",
                              "nullable": true
                            }
                          },
                          "required": [
                            "current",
                            "prev",
                            "next",
                            "count"
                          ]
                        }
                      },
                      "required": [
                        "cursor"
                      ]
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "The primary identifier for the problem type (URI reference)."
                    },
                    "title": {
                      "type": "string",
                      "description": "A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization."
                    },
                    "status": {
                      "type": "integer",
                      "description": "The HTTP status code."
                    },
                    "detail": {
                      "type": "string",
                      "description": "A human-readable explanation specific to this occurrence of the problem."
                    },
                    "code": {
                      "type": "integer",
                      "description": "The error code can be used to look up the reason why the request failed."
                    },
                    "param": {
                      "type": "string",
                      "description": "The request parameter that this error is related to."
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "detail"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "The primary identifier for the problem type (URI reference)."
                    },
                    "title": {
                      "type": "string",
                      "description": "A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization."
                    },
                    "status": {
                      "type": "integer",
                      "description": "The HTTP status code."
                    },
                    "detail": {
                      "type": "string",
                      "description": "A human-readable explanation specific to this occurrence of the problem."
                    },
                    "code": {
                      "type": "integer",
                      "description": "The error code can be used to look up the reason why the request failed."
                    },
                    "param": {
                      "type": "string",
                      "description": "The request parameter that this error is related to."
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "detail"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Server Error",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "The primary identifier for the problem type (URI reference)."
                    },
                    "title": {
                      "type": "string",
                      "description": "A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization."
                    },
                    "status": {
                      "type": "integer",
                      "description": "The HTTP status code."
                    },
                    "detail": {
                      "type": "string",
                      "description": "A human-readable explanation specific to this occurrence of the problem."
                    },
                    "code": {
                      "type": "integer",
                      "description": "The error code can be used to look up the reason why the request failed."
                    },
                    "param": {
                      "type": "string",
                      "description": "The request parameter that this error is related to."
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "detail"
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "OAuth2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://app.7shifts.com/oauth2/token",
            "refreshUrl": "https://app.7shifts.com/oauth2/token",
            "scopes": {
              "v1_access": "Required to access APIv1 endpoints."
            }
          },
          "password": {
            "tokenUrl": "https://app.7shifts.com/oauth2/token",
            "refreshUrl": "https://app.7shifts.com/oauth2/token",
            "scopes": {
              "v1_access": "Required to access APIv1 endpoints."
            }
          },
          "authorizationCode": {
            "authorizationUrl": "https://app.7shifts.com/oauth2/authorize",
            "tokenUrl": "https://app.7shifts.com/oauth2/token",
            "refreshUrl": "https://app.7shifts.com/oauth2/token",
            "scopes": {
              "v1_access": "Required to access APIv1 endpoints."
            }
          }
        }
      },
      "cookieAuth": {
        "type": "apiKey",
        "in": "cookie",
        "name": "7session"
      }
    }
  },
  "security": [
    {
      "OAuth2": []
    },
    {
      "cookieAuth": []
    }
  ],
  "tags": [
    {
      "name": "Departments"
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```