openapi: 3.2.0 info: title: Karbonhq Client Groups API version: v3 contact: name: API Support url: https://developers.karbonhq.com/issues/ license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html termsOfService: https://karbonhq.com/terms-of-use/ description: 'Operations tagged Client Groups across 2 of this provider''s published API definitions: KarbonAPI.json, karbonhq-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://api.karbonhq.com description: The production API server security: - ApiKeyAuth: [] BearerAuth: [] tags: - name: Client Groups description: Create a client group to manage related contacts, create work for them, and see all related jobs in a single view. Read more paths: /v3/ClientGroups: get: tags: - Client Groups summary: Gets a list of Client Groups parameters: - in: query name: $filter schema: type: string pattern: ^FullName example: FullName eq 'Sample Management Team' description: 'When this parameter is combined with the URI, this endpoint will return a subset of the Client Groups that satisfy the `$filter` expression. ' - in: query name: $orderby schema: type: string default: ClientGroupKey examples: fullName: value: FullName summary: Order by Full name in ascending (A-Z) order fullNameDesc: value: FullName desc summary: Order by Full name in descending (Z-A) order description: 'When this parameter is combined with the URI, this endpoint will return a list of Client Groups, sorted by the available properties. ' - $ref: '#/components/parameters/SkipRecords' - $ref: '#/components/parameters/TopRecords' description: 'Use the `GET` method on this endpoint to receive a paginated list of Client Groups from your tenant. Using the query parameters available to this endpoint, you can also filter the list of Client Groups by their full name. **Notes** * This endpoint returns a maximum of 100 Client Groups at once. * If the query results in more than 100 Client Groups, a link to the next set of the results will be given in the `@odata.nextLink` field of the response. * The `$filter` query parameter supports a logical operator - `eq` and a property to help you form an expression.' operationId: getClientGroups responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/GetClientGroup' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Unsupported Property: $ref: '#/components/examples/Unsupported_Property_Filter' Unsupported Orderby Property: $ref: '#/components/examples/Orderby_Unsupported_Property' $top limit exceeded: $ref: '#/components/examples/Limit_Exceeded_Top' Unsupported Option: $ref: '#/components/examples/Unsupported_option' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ResourceNotFound' examples: Unauthorized Access: $ref: '#/components/examples/UnauthorizedAccess' '429': description: Rate Limit Exceeded content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorMessage' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Undefined Error: $ref: '#/components/examples/elongated_5001' post: tags: - Client Groups summary: Creates a new Client Group description: Use the `POST` method on this endpoint to create a new Client Group in your tenant. operationId: createClientGroup responses: '200': description: Successful operation content: application/json: schema: allOf: - $ref: '#/components/schemas/ResponseCreateClientGroup' - type: object properties: AccountingDetails: type: - string - 'null' description: The accounting details associated with the Client Group. This property will be `null`. - type: object properties: BusinessCard: $ref: '#/components/schemas/BusinessCard' - type: object properties: ClientTeam: $ref: '#/components/schemas/ClientTeam' example: '@odata.context': https://api.karbonhq.com/v3/$metadata#ClientGroups/$entity '@odata.type': '#KarbonService.ClientGroupDTO' ClientGroupKey: 38zlxNyJSr8y FullName: Abigail Silvers ClientOwner: rodney.muller@samplecompany.com ClientManager: jessica.tse@samplecompany.com ContactType: Client UserDefinedIdentifier: SILVERS RestrictionLevel: Public PrimaryContact: Duncan Moore LastModifiedDateTime: '2022-07-05T07:30:13.7188114Z' Members: - ContactKey: null OrganizationKey: X6Hm1D2Jvxf - ContactKey: CFbcmM5Lvzc OrganizationKey: null EntityDescription: Text: Bicycle rental service in the New jersey area. AccountingDetails: null headers: Location: description: The endpoint URL to the newly created Client Group. schema: type: string example: https://api.karbonhq.com/v3/ClientGroups('4t8LbR1QcbGS') '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Incorrect or Missing Data: $ref: '#/components/examples/Missing_Create_Data' Unsupported Option: $ref: '#/components/examples/Unsupported_option' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ResourceNotFound' examples: Unauthorized Access: $ref: '#/components/examples/UnauthorizedAccess' '429': description: Rate Limit Exceeded content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorMessage' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Duplicate UDI: $ref: '#/components/examples/Duplicate_UDI' Undefined Error: $ref: '#/components/examples/elongated_5001' requestBody: description: Refer to the table below for more information on each field in the request body. required: true content: application/json: schema: allOf: - $ref: '#/components/schemas/CreateClientGroup' - type: object properties: AccountingDetails: type: - string - 'null' description: The accounting details associated with the Client Group. This property will be `null`. - type: object properties: BusinessCard: $ref: '#/components/schemas/BusinessCard' - type: object properties: ClientTeam: $ref: '#/components/schemas/ClientTeam' example: FullName: Abigail Silvers ClientOwner: rodney.muller@samplecompany.com ClientManager: jessica.tse@samplecompany.com ContactType: Client UserDefinedIdentifier: SILVERS RestrictionLevel: Public PrimaryContact: Duncan Moore EntityDescription: Text: Bicycle rental service in the New jersey area. Members: - ContactKey: null OrganizationKey: X6Hm1D2Jvxf - ContactKey: CFbcmM5Lvzc OrganizationKey: null ClientTeam: - MemberKey: 2q2wx44pTBNh MemberType: User RoleType: ClientManager servers: - url: https://api.karbonhq.com description: The production API server /v3/ClientGroups/GetClientGroupByUserDefinedIdentifier(UserDefinedIdentifier='{UserDefinedIdentifier}'): get: tags: - Client Groups summary: Gets a Client Group using UserDefinedIdentifier parameters: - required: true in: path name: UserDefinedIdentifier schema: type: string example: SILVERS description: A unique identifier that you had created to identify this Client Group. This parameter is **not** case sensitive. - in: query name: $expand schema: type: string enum: - BusinessCard example: BusinessCard description: 'When this parameter is combined with the URI, this endpoint will also return the Business Card of the Client Group. ' description: 'Use the `GET` method on this endpoint to receive the details of a Client Group specified using the UserDefinedIdentifier. Using the query parameter available to this endpoint, you can also include Business Card details of the Client Group in the response.' operationId: getClientGroupByUDI responses: '200': description: Successful operation content: application/json: schema: allOf: - $ref: '#/components/schemas/ResponseCreateClientGroup' - type: object properties: AccountingDetails: type: - string - 'null' description: The accounting details associated with the Client Group. This property will be `null`. - type: object properties: BusinessCard: $ref: '#/components/schemas/BusinessCard' - type: object properties: ClientTeam: $ref: '#/components/schemas/ClientTeam' example: '@odata.context': https://api.karbonhq.com/v3/$metadata#ClientGroups/$entity '@odata.type': '#KarbonService.ClientGroupDTO' ClientGroupKey: 38zlxNyJSr8y FullName: Abigail Silvers ClientOwner: rodney.muller@samplecompany.com ClientManager: jessica.tse@samplecompany.com ContactType: Client UserDefinedIdentifier: SILVERS RestrictionLevel: Public PrimaryContact: Duncan Moore LastModifiedDateTime: '2022-07-05T07:30:13.7188114Z' Members: - ContactKey: 34yxkY51knn7 OrganizationKey: null - ContactKey: null OrganizationKey: 4ncPZ7q96SGc EntityDescription: Text: Bicycle rental service in the New jersey area. AccountingDetails: null BusinessCard: BusinessCardKey: 2tBHyXtJBxBy EntityType: ClientGroup EntityKey: 38zlxNyJSr8y IsPrimaryCard: true WebSites: - www.website.one - www.website.two EmailAddresses: - sample@example.com - sample.two@example.com OrganizationKey: ZGNmtYyLm4z RoleOrTitle: COO FacebookLink: facebook.com/sampleName LinkedInLink: linkedin.com/sampleName TwitterLink: twitter.com/sampleName SkypeLink: skype.com/sampleName Addresses: - AddressKey: e150a05a-2dea-4292-8bc8-03398c9384e4 AddressLines: 45 Sample Street City: Alexandria StateProvinceCounty: NSW ZipCode: '2015' CountryCode: AU Label: Physical PhoneNumbers: - PhoneNumberKey: 6e0b9ace-24b1-4328-a922-3b8be5ef5052 Number: '1234567890' CountryCode: AU Label: Work '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: UDI Is Empty: $ref: '#/components/examples/UDI_Is_Empty' Unsupported Option: $ref: '#/components/examples/Unsupported_option' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ResourceNotFound' examples: Unauthorized Access: $ref: '#/components/examples/UnauthorizedAccess' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: UDI Not Found: $ref: '#/components/examples/UDI_Not_Found' '429': description: Rate Limit Exceeded content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorMessage' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Undefined Error: $ref: '#/components/examples/elongated_5001' servers: - url: https://api.karbonhq.com description: The production API server /v3/ClientGroups/{ClientGroupkey}: get: tags: - Client Groups summary: Gets a Client Group using ClientGroupkey parameters: - required: true in: path name: ClientGroupkey schema: type: string example: 4t8LbR1QcbGS description: The Karbon-generated Client Group key - in: query name: $expand schema: type: string examples: BusinessCard: value: BusinessCard summary: Include the Business Card for the Client Group the API response ClientTeam: value: ClientTeam summary: Include the Client Team assigned to the Client Group in the API response BusinessCardAndClientTeam: value: BusinessCard,ClientTeam summary: Include the Business Card and the Client Team assigned to the Client Group in the API response description: 'When this parameter is specified in the query string this endpoint will also return the Business Card and/or Client Team of the Client Group. ' description: 'Use the `GET` method on this endpoint to receive the details of a Client Group specified using the `ClientGroupKey`. Using the query parameter available to this endpoint, you can also include the Business Card details of the Client Group in the response.' operationId: getClientGroupByID responses: '200': description: Successful operation content: application/json: schema: allOf: - $ref: '#/components/schemas/ResponseCreateClientGroup' - type: object properties: AccountingDetails: type: - string - 'null' description: The accounting details associated with the Client Group. This property will be `null`. - type: object properties: BusinessCard: $ref: '#/components/schemas/BusinessCard' - type: object properties: ClientTeam: $ref: '#/components/schemas/ClientTeam' example: '@odata.context': https://api.karbonhq.com/v3/$metadata#ClientGroups/$entity '@odata.type': '#KarbonService.ClientGroupDTO' ClientGroupKey: 38zlxNyJSr8y FullName: Abigail Silvers ClientOwner: rodney.muller@samplecompany.com ClientManager: jessica.tse@samplecompany.com ContactType: Client UserDefinedIdentifier: SILVERS RestrictionLevel: Public PrimaryContact: Duncan Moore LastModifiedDateTime: '2022-07-05T07:30:13.7188114Z' Members: - ContactKey: 34yxkY51knn7 OrganizationKey: null - ContactKey: null OrganizationKey: 4ncPZ7q96SGc EntityDescription: Text: Bicycle rental service in the New jersey area. AccountingDetails: null BusinessCard: BusinessCardKey: 2tBHyXtJBxBy EntityType: ClientGroup EntityKey: 38zlxNyJSr8y IsPrimaryCard: true WebSites: - www.website.one - www.website.two EmailAddresses: - sample@example.com - sample.two@example.com OrganizationKey: ZGNmtYyLm4z RoleOrTitle: COO FacebookLink: facebook.com/sampleName LinkedInLink: linkedin.com/sampleName TwitterLink: twitter.com/sampleName SkypeLink: skype.com/sampleName Addresses: - AddressKey: e150a05a-2dea-4292-8bc8-03398c9384e4 AddressLines: 45 Sample Street City: Alexandria StateProvinceCounty: NSW ZipCode: '2015' CountryCode: AU Label: Physical PhoneNumbers: - PhoneNumberKey: 6e0b9ace-24b1-4328-a922-3b8be5ef5052 Number: '1234567890' CountryCode: AU Label: Work ClientTeam: - MemberKey: JTphCpQqQYg MemberType: User RoleType: ClientOwner - MemberKey: nRML2ngs7WJ MemberType: User RoleType: ClientManager - MemberKey: 3fv7lflmd1Z7 MemberType: User RoleType: UserDefinedRole2 - MemberKey: 3v9YJmt55hLY MemberType: User RoleType: UserDefinedRole1 - MemberKey: 3zdQh89xCmZM MemberType: User RoleType: null '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Unsupported Option: $ref: '#/components/examples/Unsupported_option' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ResourceNotFound' examples: Unauthorized Access: $ref: '#/components/examples/UnauthorizedAccess' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Key Not Found: $ref: '#/components/examples/Key_Not_Found' '429': description: Rate Limit Exceeded content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorMessage' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Undefined Error: $ref: '#/components/examples/elongated_5001' put: tags: - Client Groups summary: Updates a Client Group (Full) parameters: - required: true in: path name: ClientGroupkey schema: type: string example: 4t8LbR1QcbGS description: The Karbon-generated Client Group key description: 'Use the `PUT` method on this endpoint to update full details of a Client Group specified using the `ClientGroupkey`. Using the query parameter available to this endpoint, you can also update the Business Card details of the Client Group.' operationId: putClientGroupByID responses: '204': description: No Content '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Incorrect or Missing Data: $ref: '#/components/examples/Missing_Update_Data' Unsupported Option: $ref: '#/components/examples/Unsupported_option' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ResourceNotFound' examples: Unauthorized Access: $ref: '#/components/examples/UnauthorizedAccess' '404': description: Resource Not Found content: application/json: schema: $ref: '#/components/schemas/ResourceNotFound' examples: Key Not Found: $ref: '#/components/examples/ResourceNotFound' '429': description: Rate Limit Exceeded content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorMessage' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Non existent Key: $ref: '#/components/examples/Shortened_5001' Undefined Error: $ref: '#/components/examples/elongated_5001' '409': description: Conflict — the resource was modified by another request. Refetch the latest version and retry. content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Stale Object State: $ref: '#/components/examples/Conflict_StaleObjectState' requestBody: description: Refer to the table below for more information on each field in the request body. required: true content: application/json: schema: allOf: - $ref: '#/components/schemas/CreateClientGroup' - type: object properties: BusinessCard: $ref: '#/components/schemas/BusinessCardRequest' example: FullName: Abigail Silvers ClientOwner: rodney.muller@samplecompany.com ClientManager: jessica.tse@samplecompany.com ContactType: Client UserDefinedIdentifier: SILVERS RestrictionLevel: Public PrimaryContact: Duncan Moore EntityDescription: Text: Bicycle rental service in the New jersey area. BusinessCard: IsPrimaryCard: true WebSites: - www.website.one - www.website.two EmailAddresses: - sample@example.com - sample.two@example.com RoleOrTitle: COO FacebookLink: facebook.com/sampleName LinkedInLink: linkedin.com/sampleName TwitterLink: twitter.com/sampleName SkypeLink: skype.com/sampleName Addresses: - AddressLines: 45 Sample Street City: Alexandria StateProvinceCounty: NSW ZipCode: '2015' CountryCode: AU Label: Physical PhoneNumbers: - Number: '1234567890' CountryCode: AU Label: Work patch: tags: - Client Groups summary: Updates a Client Group (Partial) parameters: - required: true in: path name: ClientGroupkey schema: type: string example: 4t8LbR1QcbGS description: The Karbon-generated Client Group key description: 'Use the `PATCH` method on this endpoint to update partial details of a Client Group specified using the `ClientGroupkey`. This method **only supports** editing the `FullName` property.' operationId: patchClientGroupByID responses: '204': description: No Content '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Unsupported Property: $ref: '#/components/examples/Update_Unsupported_Property' Unsupported Option: $ref: '#/components/examples/Unsupported_option' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ResourceNotFound' examples: Unauthorized Access: $ref: '#/components/examples/UnauthorizedAccess' '404': description: Resource Not Found content: application/json: schema: $ref: '#/components/schemas/ResourceNotFound' examples: Key Not Found: $ref: '#/components/examples/ResourceNotFound' '429': description: Rate Limit Exceeded content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorMessage' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Non existent Key: $ref: '#/components/examples/Shortened_5001' Undefined Error: $ref: '#/components/examples/elongated_5001' '409': description: Conflict — the resource was modified by another request. Refetch the latest version and retry. content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Stale Object State: $ref: '#/components/examples/Conflict_StaleObjectState' requestBody: description: Refer to the table below for more information on each field in the request body. required: true content: application/json: schema: type: object properties: FullName: type: string description: The full name of the Client Group example: Abigail Silvers example: FullName: Abigail Silvers servers: - url: https://api.karbonhq.com description: The production API server components: examples: Unsupported_option: description: The error returned when the query option in a request is not allowed for by the API value: error: code: '4002' message: Query option '