> ## Documentation Index
> Fetch the complete documentation index at: https://developers.pleo.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Returns all tag groups for given company in an aggregated format

> You need to supply either the company_id or the organization_id query parameter. If you supply both, the company_id will be used. If you supply neither, the request will fail. If you supply the company_id, the response will contain only the tag groups for that company. If you supply the organization_id, the response will contain the tag groups for all companies in the organization. If you supply the company_id and the organization_id, the response will contain only the tag groups for the company.



## OpenAPI

````yaml get /v0/aggregations/tag-groups
openapi: 3.0.1
info:
  title: Gjoll API
  description: Gjoll OpenAPI definitions
  termsOfService: https://pleo.io/terms/
  contact:
    email: team-accounting-core@pleo.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: 84.1.2
servers:
  - url: https://external.pleo.io
    description: Production server
  - url: https://external.staging.pleo.io
    description: Staging server
security:
  - bearerAuth: []
  - basicAuth: []
tags:
  - name: reconciliation
    description: Reconciliation API
  - name: accounts
    description: Accounts API
  - name: categories
    description: Categories API
  - name: tax-codes
    description: Tax Codes API
  - name: accounting-entries
    description: |-
      The Accounting Entries API endpoints enable you to perform the following:
        - Apply filters and search for accounting entries and accounting receipts.
        - Retrieve list of accounting entries and accounting receipts.
        - Retrieve details of a specific accounting entry.
paths:
  /v0/aggregations/tag-groups:
    get:
      tags:
        - tag-groups
      summary: >-
        Retrieve the tag groups for a company or an organisation in aggregated
        format
      description: |2-

                    ⚠️ Attention: either the `company_id` or the `organization_id` query parameter MUST be provided. 
                    If you supply both, the `company_id` will be used. If you supply neither, the request will fail. 
                    If you supply the `company_id`, the response will contain only the tag groups for that company.
                    If you supply the `organization_id`, the response will contain the tag groups for all companies in the organization.
                    If you supply the `company_id` and the `organization_id`, the response will contain only the tag groups for the company. 
                    If you supply the `tag_group_ids` query parameter, the response will contain only the tag groups with the given ids, including archived ones.
                    
      operationId: getAggregatedTagGroups
      parameters:
        - name: company_id
          in: query
          required: false
          style: form
          explode: true
          schema:
            type: string
            description: >-
              Enter the company ID whose tag groups you are searching for.
              Required if organization_id is not provided. If you enter both
              company_id and organization_id, the company_id is used to filter
              the tag groups.
            format: uuid
        - name: organization_id
          in: query
          required: false
          style: form
          explode: true
          schema:
            type: string
            description: >-
              Enter the organization ID whose tag groups you are searching for.
              Required if company_id is not provided. If you enter both
              company_id and organization_id, the company_id is used to filter
              the tag groups.
            format: uuid
        - name: tag_group_ids
          in: query
          required: false
          style: form
          explode: true
          schema:
            type: array
            description: Enter the list of tag groups IDs that you are searching for.
            items:
              type: string
              description: Enter the list of tag groups IDs that you are searching for.
              format: uuid
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/DataResponseListAggregatedTagGroupModel'
components:
  schemas:
    DataResponseListAggregatedTagGroupModel:
      required:
        - data
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/AggregatedTagGroupModel'
    AggregatedTagGroupModel:
      required:
        - archived
        - code
        - companyId
        - createdAt
        - dimensions
        - id
        - name
        - updatedAt
      type: object
      properties:
        archived:
          type: boolean
          description: Boolean flag used to determine whether the tag group is archived.
          example: false
        code:
          type: string
          description: >-
            Code used in the external ERP/accounting system to identify the tag
            group.
          example: 5524f270-6c21-11ee-b962-0242ac120002
        companyId:
          type: string
          description: Unique identifier of the company the tag group belongs to.
          format: uuid
          example: c04c7e9e-6c15-11ee-b962-0242ac120003
        createdAt:
          type: string
          description: Creation date and time.
          format: date-time
          example: '2023-08-23T03:11:48Z'
        dimensions:
          type: array
          description: List of all the dimensions associated with this tag group.
          items:
            $ref: '#/components/schemas/AggregatedTagGroupDimensionModel'
        id:
          type: string
          description: Unique identifier of the tag group.
          format: uuid
          example: c04c7e9e-6c15-11ee-b962-0242ac120002
        name:
          type: string
          description: User readable name of the tag group.
          example: Projects
        updatedAt:
          type: string
          description: Date and time of the last update.
          format: date-time
          example: '2023-08-23T03:11:48Z'
    AggregatedTagGroupDimensionModel:
      required:
        - code
        - createdAt
        - displayOrder
        - id
        - name
        - updatedAt
        - visible
      type: object
      properties:
        code:
          type: string
          description: >-
            Code used in the external ERP/accounting system to identify the tag
            group dimension.
          example: 5524f270-6c21-11ee-b962-0242ac120002
        createdAt:
          type: string
          description: Creation date and time.
          format: date-time
          example: '2023-08-23T03:11:48Z'
        displayOrder:
          type: integer
          description: >-
            Numerical value assigned to the tag group dimension to determine the
            display position.
          format: int32
        id:
          type: string
          description: Unique identifier of the tag group dimension.
          format: uuid
          example: c04c7e9e-6c15-11ee-b962-0242ac120002
        name:
          type: string
          description: User readable name of the tag group dimension.
          example: Project
        updatedAt:
          type: string
          description: Date and time of the last update.
          format: date-time
          example: '2023-08-23T03:11:48Z'
        visible:
          type: boolean
          description: Determines if this dimension is displayed in the UI.
          example: false
      description: List of all the dimensions associated with this tag group.
  securitySchemes:
    bearerAuth:
      type: http
      description: >-
        JWT Bearer token authentication. Include the token in the Authorization
        header as: `Bearer <token>`
      scheme: bearer
      bearerFormat: JWT
    basicAuth:
      type: http
      description: >-
        Basic HTTP authentication using API key. Use your API key as the
        username and leave the password empty. The credentials will be Base64
        encoded automatically.
      scheme: basic

````