openapi: 3.1.0 info: title: Accounting subpackage_groups API version: 1.0.0 servers: - url: https://api.merge.dev/api - url: https://api-eu.merge.dev/api - url: https://api-ap.merge.dev/api tags: - name: subpackage_groups paths: /groups: get: operationId: list summary: List description: Returns a list of `Group` objects.{/* BEGIN_CHAT_GROUP_FETCH_SUPPORTED_FIELDS */}{/* END_CHAT_GROUP_FETCH_SUPPORTED_FIELDS */} tags: - subpackage_groups parameters: - name: created_after in: query description: If provided, will only return objects created after this datetime. required: false schema: type: string format: date-time - name: created_before in: query description: If provided, will only return objects created before this datetime. required: false schema: type: string format: date-time - name: cursor in: query description: The pagination cursor value. required: false schema: type: string - name: expand in: query description: Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. required: false schema: type: array items: $ref: '#/components/schemas/GroupsGetParametersExpandSchemaItems' - name: include_deleted_data in: query description: Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). required: false schema: type: boolean - name: include_remote_data in: query description: Whether to include the original data Merge fetched from the third-party to produce these models. required: false schema: type: boolean - name: include_shell_data in: query description: Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). required: false schema: type: boolean - name: modified_after in: query description: If provided, only objects synced by Merge after this date time will be returned. required: false schema: type: string format: date-time - name: modified_before in: query description: If provided, only objects synced by Merge before this date time will be returned. required: false schema: type: string format: date-time - name: page_size in: query description: Number of results to return per page. The maximum limit is 100. required: false schema: type: integer - name: remote_id in: query description: The API provider's ID for the given object. required: false schema: type: string - name: Authorization in: header description: Token-based authentication with required prefix "Bearer" required: true schema: type: string - name: X-Account-Token in: header description: Token identifying the end user. required: true schema: type: string responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/PaginatedGroupList' /groups/{id}: get: operationId: retrieve summary: Retrieve description: Returns a `Group` object with the given `id`.{/* BEGIN_CHAT_GROUP_FETCH_SUPPORTED_FIELDS */}{/* END_CHAT_GROUP_FETCH_SUPPORTED_FIELDS */} tags: - subpackage_groups parameters: - name: id in: path required: true schema: type: string format: uuid - name: expand in: query description: Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. required: false schema: type: array items: $ref: '#/components/schemas/GroupsIdGetParametersExpandSchemaItems' - name: include_remote_data in: query description: Whether to include the original data Merge fetched from the third-party to produce these models. required: false schema: type: boolean - name: include_shell_data in: query description: Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). required: false schema: type: boolean - name: Authorization in: header description: Token-based authentication with required prefix "Bearer" required: true schema: type: string - name: X-Account-Token in: header description: Token identifying the end user. required: true schema: type: string responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/Group' /filestorage/v1/groups: get: operationId: list summary: List description: Returns a list of `Group` objects.{/* BEGIN_FILESTORAGE_GROUP_FETCH_SUPPORTED_FIELDS */}{/* END_FILESTORAGE_GROUP_FETCH_SUPPORTED_FIELDS */} tags: - subpackage_groups parameters: - name: created_after in: query description: If provided, will only return objects created after this datetime. required: false schema: type: string format: date-time - name: created_before in: query description: If provided, will only return objects created before this datetime. required: false schema: type: string format: date-time - name: cursor in: query description: The pagination cursor value. required: false schema: type: string - name: expand in: query description: Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. required: false schema: type: array items: $ref: '#/components/schemas/GroupsGetParametersExpandSchemaItems_2' - name: include_deleted_data in: query description: Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). required: false schema: type: boolean - name: include_remote_data in: query description: Whether to include the original data Merge fetched from the third-party to produce these models. required: false schema: type: boolean - name: include_shell_data in: query description: Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). required: false schema: type: boolean - name: modified_after in: query description: If provided, only objects synced by Merge after this date time will be returned. required: false schema: type: string format: date-time - name: modified_before in: query description: If provided, only objects synced by Merge before this date time will be returned. required: false schema: type: string format: date-time - name: page_size in: query description: Number of results to return per page. The maximum limit is 100. required: false schema: type: integer - name: remote_id in: query description: The API provider's ID for the given object. required: false schema: type: string - name: Authorization in: header description: Token-based authentication with required prefix "Bearer" required: true schema: type: string - name: X-Account-Token in: header description: Token identifying the end user. required: true schema: type: string responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/PaginatedGroupList' /filestorage/v1/groups/{id}: get: operationId: retrieve summary: Retrieve description: Returns a `Group` object with the given `id`.{/* BEGIN_FILESTORAGE_GROUP_FETCH_SUPPORTED_FIELDS */}{/* END_FILESTORAGE_GROUP_FETCH_SUPPORTED_FIELDS */} tags: - subpackage_groups parameters: - name: id in: path required: true schema: type: string format: uuid - name: expand in: query description: Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. required: false schema: type: array items: $ref: '#/components/schemas/GroupsIdGetParametersExpandSchemaItems_2' - name: include_remote_data in: query description: Whether to include the original data Merge fetched from the third-party to produce these models. required: false schema: type: boolean - name: include_shell_data in: query description: Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). required: false schema: type: boolean - name: Authorization in: header description: Token-based authentication with required prefix "Bearer" required: true schema: type: string - name: X-Account-Token in: header description: Token identifying the end user. required: true schema: type: string responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/Group_2' /hris/v1/groups: get: operationId: list summary: List description: Returns a list of `Group` objects.{/* BEGIN_HRIS_GROUP_FETCH_SUPPORTED_FIELDS */}{/* END_HRIS_GROUP_FETCH_SUPPORTED_FIELDS */} tags: - subpackage_groups parameters: - name: created_after in: query description: If provided, will only return objects created after this datetime. required: false schema: type: string format: date-time - name: created_before in: query description: If provided, will only return objects created before this datetime. required: false schema: type: string format: date-time - name: cursor in: query description: The pagination cursor value. required: false schema: type: string - name: expand in: query description: Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. required: false schema: type: array items: $ref: '#/components/schemas/GroupsGetParametersExpandSchemaItems_3' - name: include_deleted_data in: query description: Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). required: false schema: type: boolean - name: include_remote_data in: query description: Whether to include the original data Merge fetched from the third-party to produce these models. required: false schema: type: boolean - name: include_shell_data in: query description: Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). required: false schema: type: boolean - name: is_commonly_used_as_team in: query description: If provided, specifies whether to return only Group objects which refer to a team in the third party platform. Note that this is an opinionated view based on how a team may be represented in the third party platform. required: false schema: type: string - name: modified_after in: query description: If provided, only objects synced by Merge after this date time will be returned. required: false schema: type: string format: date-time - name: modified_before in: query description: If provided, only objects synced by Merge before this date time will be returned. required: false schema: type: string format: date-time - name: names in: query description: If provided, will only return groups with these names. Multiple values can be separated by commas. required: false schema: type: string - name: page_size in: query description: Number of results to return per page. The maximum limit is 100. required: false schema: type: integer - name: remote_fields in: query description: Deprecated. Use show_enum_origins. required: false schema: $ref: '#/components/schemas/GroupsGetParametersRemoteFields' - name: remote_id in: query description: The API provider's ID for the given object. required: false schema: type: string - name: show_enum_origins in: query description: A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) required: false schema: $ref: '#/components/schemas/GroupsGetParametersShowEnumOrigins' - name: types in: query description: If provided, will only return groups of these types. Multiple values can be separated by commas. required: false schema: type: string - name: Authorization in: header description: Token-based authentication with required prefix "Bearer" required: true schema: type: string - name: X-Account-Token in: header description: Token identifying the end user. required: true schema: type: string responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/PaginatedGroupList' /hris/v1/groups/{id}: get: operationId: retrieve summary: Retrieve description: Returns a `Group` object with the given `id`.{/* BEGIN_HRIS_GROUP_FETCH_SUPPORTED_FIELDS */}{/* END_HRIS_GROUP_FETCH_SUPPORTED_FIELDS */} tags: - subpackage_groups parameters: - name: id in: path required: true schema: type: string format: uuid - name: expand in: query description: Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. required: false schema: type: array items: $ref: '#/components/schemas/GroupsIdGetParametersExpandSchemaItems_3' - name: include_remote_data in: query description: Whether to include the original data Merge fetched from the third-party to produce these models. required: false schema: type: boolean - name: include_shell_data in: query description: Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). required: false schema: type: boolean - name: remote_fields in: query description: Deprecated. Use show_enum_origins. required: false schema: $ref: '#/components/schemas/GroupsIdGetParametersRemoteFields' - name: show_enum_origins in: query description: A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) required: false schema: $ref: '#/components/schemas/GroupsIdGetParametersShowEnumOrigins' - name: Authorization in: header description: Token-based authentication with required prefix "Bearer" required: true schema: type: string - name: X-Account-Token in: header description: Token identifying the end user. required: true schema: type: string responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/Group_3' /hris/v1/groups/types: get: operationId: types-list summary: Get group types description: Returns a list of distinct group type values from the Groups common model.{/* BEGIN_HRIS_GROUP_FETCH_SUPPORTED_FIELDS */}{/* END_HRIS_GROUP_FETCH_SUPPORTED_FIELDS */} tags: - subpackage_groups parameters: - name: include_deleted_data in: query description: Whether to include data that was marked as deleted by third party webhooks. required: false schema: type: boolean - name: show_enum_origins in: query description: A comma separated list of enum field names for which you'd like the original values instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/articles/8950958-show-enum-origins-query-parameter) required: false schema: type: string - name: Authorization in: header description: Token-based authentication with required prefix "Bearer" required: true schema: type: string responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/groups_typesList_Response_200' /knowledgebase/v1/groups: get: operationId: list summary: List description: Returns a list of `Group` objects. tags: - subpackage_groups parameters: - name: created_after in: query description: If provided, will only return objects created after this datetime. required: false schema: type: string format: date-time - name: created_before in: query description: If provided, will only return objects created before this datetime. required: false schema: type: string format: date-time - name: cursor in: query description: The pagination cursor value. required: false schema: type: string - name: expand in: query description: Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. required: false schema: $ref: '#/components/schemas/GroupsGetParametersExpand' - name: include_deleted_data in: query description: Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). required: false schema: type: boolean - name: include_remote_data in: query description: Whether to include the original data Merge fetched from the third-party to produce these models. required: false schema: type: boolean - name: include_shell_data in: query description: Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). required: false schema: type: boolean - name: modified_after in: query description: If provided, only objects synced by Merge after this date time will be returned. required: false schema: type: string format: date-time - name: modified_before in: query description: If provided, only objects synced by Merge before this date time will be returned. required: false schema: type: string format: date-time - name: page_size in: query description: Number of results to return per page. The maximum limit is 100. required: false schema: type: integer - name: remote_id in: query description: The API provider's ID for the given object. required: false schema: type: string - name: Authorization in: header description: Token-based authentication with required prefix "Bearer" required: true schema: type: string - name: X-Account-Token in: header description: Token identifying the end user. required: true schema: type: string responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/PaginatedGroupList' /knowledgebase/v1/groups/{id}: get: operationId: retrieve summary: Retrieve description: Returns a `Group` object with the given `id`. tags: - subpackage_groups parameters: - name: id in: path required: true schema: type: string format: uuid - name: expand in: query description: Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. required: false schema: $ref: '#/components/schemas/GroupsIdGetParametersExpand' - name: include_remote_data in: query description: Whether to include the original data Merge fetched from the third-party to produce these models. required: false schema: type: boolean - name: include_shell_data in: query description: Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). required: false schema: type: boolean - name: Authorization in: header description: Token-based authentication with required prefix "Bearer" required: true schema: type: string - name: X-Account-Token in: header description: Token identifying the end user. required: true schema: type: string responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/Group_4' components: schemas: GroupTypeEnum: type: string enum: - TEAM - DEPARTMENT - COST_CENTER - BUSINESS_UNIT - GROUP title: GroupTypeEnum GroupsGetParametersExpandSchemaItems_2: type: string enum: - child_groups - users title: GroupsGetParametersExpandSchemaItems Group_2: type: object properties: id: type: string format: uuid remote_id: type: - string - 'null' description: The third-party API ID of the matching object. created_at: type: string format: date-time description: The datetime that this object was created by Merge. modified_at: type: string format: date-time description: The datetime that this object was modified by Merge. name: type: - string - 'null' description: The group's name. users: type: array items: type: string format: uuid description: The users that belong in the group. If null, this typically means it's either a domain or the third-party platform does not surface this information. child_groups: type: array items: type: string format: uuid description: Groups that inherit the permissions of the parent group. remote_was_deleted: type: boolean description: Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). field_mappings: oneOf: - $ref: '#/components/schemas/GroupFieldMappings' - type: 'null' remote_data: type: - array - 'null' items: $ref: '#/components/schemas/RemoteData' required: - users description: '# The Group Object ### Description The `Group` object is used to represent any subset of `Users`. This can extend to company domains as well. ### Usage Example Fetch from the `GET /api/filestorage/v1/groups` endpoint and view their groups.' title: Group User: type: object properties: id: type: string format: uuid remote_id: type: - string - 'null' description: The third-party API ID of the matching object. created_at: type: string format: date-time description: The datetime that this object was created by Merge. modified_at: type: string format: date-time description: The datetime that this object was modified by Merge. name: type: - string - 'null' description: The user's name. email_address: type: - string - 'null' description: The user's email address. remote_was_deleted: type: boolean description: Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). field_mappings: oneOf: - $ref: '#/components/schemas/UserFieldMappings' - type: 'null' description: '# The User Object ### Description The `User` object is used to represent a user within the Knowledge Base account. ### Usage Example Fetch from the `GET /api/knowledgebase/users` endpoint and view their users.' title: User GroupsGetParametersRemoteFields: type: string enum: - type title: GroupsGetParametersRemoteFields GroupFieldMappings_2: type: object properties: {} title: GroupFieldMappings GroupsGetParametersExpand: type: string enum: - parent_group - users - users,parent_group title: GroupsGetParametersExpand Group_4: type: object properties: id: type: string format: uuid remote_id: type: - string - 'null' description: The third-party API ID of the matching object. created_at: type: string format: date-time description: The datetime that this object was created by Merge. modified_at: type: string format: date-time description: The datetime that this object was modified by Merge. name: type: - string - 'null' description: The group's name. parent_group: type: - string - 'null' format: uuid description: The parent group for this group. users: type: array items: $ref: '#/components/schemas/User' remote_was_deleted: type: boolean description: Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). field_mappings: oneOf: - $ref: '#/components/schemas/GroupFieldMappings_2' - type: 'null' remote_data: type: - array - 'null' items: $ref: '#/components/schemas/RemoteData' description: '# The Group Object ### Description The `Group` object is used to represent any subset of `Users`. This can extend to company domains as well. ### Usage Example Fetch from the `GET /api/knowledgebase/groups` endpoint and view their groups.' title: Group GroupsIdGetParametersExpandSchemaItems: type: string enum: - users title: GroupsIdGetParametersExpandSchemaItems Group: type: object properties: id: type: string format: uuid remote_id: type: - string - 'null' description: The third-party API ID of the matching object. created_at: type: string format: date-time description: The datetime that this object was created by Merge. modified_at: type: string format: date-time description: The datetime that this object was modified by Merge. name: type: - string - 'null' description: The name of the Group users: type: array items: type: string format: uuid remote_created_at: type: - string - 'null' format: date-time description: When the third party's group was created. remote_updated_at: type: - string - 'null' format: date-time description: When the third party's group was updated. remote_was_deleted: type: boolean description: Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). field_mappings: oneOf: - $ref: '#/components/schemas/GroupFieldMappings' - type: 'null' remote_data: type: - array - 'null' items: $ref: '#/components/schemas/RemoteData' description: '# The Group Object ### Description The `Group` object is used to represent any subset of `Users`. ### Usage Example Fetch from the `GET /api/chat/v1/groups` endpoint and view their groups.' title: Group Group_3: type: object properties: id: type: string format: uuid remote_id: type: - string - 'null' description: The third-party API ID of the matching object. created_at: type: string format: date-time description: The datetime that this object was created by Merge. modified_at: type: string format: date-time description: The datetime that this object was modified by Merge. parent_group: type: - string - 'null' format: uuid description: The parent group for this group. name: type: - string - 'null' description: The group name. type: oneOf: - $ref: '#/components/schemas/GroupTypeEnum' - type: 'null' description: The Group type returned directly from the third-party. is_commonly_used_as_team: type: - boolean - 'null' description: Indicates whether the Group refers to a team in the third party platform. Note that this is an opinionated view based on how Merge observes most organizations representing teams in each third party platform. If your customer uses a platform different from most, there is a chance this will not be correct. remote_was_deleted: type: boolean description: Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). field_mappings: oneOf: - $ref: '#/components/schemas/GroupFieldMappings' - type: 'null' remote_data: type: - array - 'null' items: $ref: '#/components/schemas/RemoteData' description: '# The Group Object ### Description The `Group` object is used to represent any subset of employees across, for example, `DEPARTMENT` or `TEAM`. Employees can be in multiple Groups. ### Usage Example Fetch from the `LIST Employee` endpoint and expand groups to view an employee''s groups.' title: Group GroupFieldMappings: type: object properties: organization_defined_targets: type: object additionalProperties: description: Any type linked_account_defined_targets: type: object additionalProperties: description: Any type title: GroupFieldMappings GroupsIdGetParametersExpand: type: string enum: - parent_group - users - users,parent_group title: GroupsIdGetParametersExpand GroupsIdGetParametersShowEnumOrigins: type: string enum: - type title: GroupsIdGetParametersShowEnumOrigins RemoteData: type: object properties: path: type: string description: The third-party API path that is being called. data: description: The data returned from the third-party for this object in its original, unnormalized format. required: - path description: '# The RemoteData Object ### Description The `RemoteData` object is used to represent the full data pulled from the third-party API for an object. ### Usage Example TODO' title: RemoteData UserFieldMappings: type: object properties: {} title: UserFieldMappings GroupsGetParametersExpandSchemaItems_3: type: string enum: - parent_group title: GroupsGetParametersExpandSchemaItems GroupsIdGetParametersExpandSchemaItems_3: type: string enum: - parent_group title: GroupsIdGetParametersExpandSchemaItems GroupsGetParametersShowEnumOrigins: type: string enum: - type title: GroupsGetParametersShowEnumOrigins GroupsIdGetParametersRemoteFields: type: string enum: - type title: GroupsIdGetParametersRemoteFields GroupsGetParametersExpandSchemaItems: type: string enum: - users title: GroupsGetParametersExpandSchemaItems GroupsIdGetParametersExpandSchemaItems_2: type: string enum: - child_groups - users title: GroupsIdGetParametersExpandSchemaItems PaginatedGroupList: type: object properties: next: type: - string - 'null' previous: type: - string - 'null' results: type: array items: $ref: '#/components/schemas/Group' title: PaginatedGroupList groups_typesList_Response_200: type: object properties: types: type: array items: type: string description: List of distinct group types title: groups_typesList_Response_200 securitySchemes: tokenAuth: type: http scheme: bearer description: Token-based authentication with required prefix "Bearer"