openapi: 3.1.0 info: version: '1.0' title: Zendesk Account Account Settings Lookup Relationships API description: Needs a description. tags: - name: Lookup Relationships paths: /api/v2/relationships/definitions/{target_type}: get: operationId: GetRelationshipFilterDefinitions tags: - Lookup Relationships summary: Zendesk Get Api V2 Relationships Definitions Target_type description: 'Returns filter definitions based on the given target type. Target types include users (zen:user), tickets (zen:ticket), organizations (zen:organization), or custom objects (zen:custom_object:CUSTOM_OBJECT_KEY). The returned filter definitions are the options that you can use to build a custom field or ticket field''s `relationship_filter`. ' parameters: - name: target_type in: path description: 'The target type for which you would like to see filter definitions. The options are "zen:user", "zen:ticket", "zen:organization", and "zen:custom_object:CUSTOM_OBJECT_KEY" ' required: true schema: type: string example: zen:custom_object:apartment - name: source_type in: query description: 'The source type for which you would like to see filter definitions. The options are "zen:user", "zen:ticket", and "zen:organization" ' schema: type: string example: zen:user responses: '200': description: Success response content: application/json: schema: $ref: '#/components/schemas/RelationshipFilterDefinitionResponse' examples: default: $ref: '#/components/examples/RelationshipFilterDefinitionExample' /api/v2/{target_type}/{target_id}/relationship_fields/{field_id}/{source_type}: get: operationId: GetSourcesByTarget tags: - Lookup Relationships summary: Zendesk Get Api V2 Target_type Target_id Relationship_fields Field_id Source_type description: 'Returns a list of source objects whose values are populated with the id of a related target object. For example, if you have a lookup field called "Success Manager" on a ticket, this endpoint can answer the question, "What tickets (sources) is this user (found by `target_type` and `target_id`) assigned as the ''Success Manager'' (field referenced by `field_id`)?" #### Allowed For * Agents #### Pagination * Cursor pagination (recommended) * Offset pagination See [Pagination](/api-reference/introduction/pagination/). ' parameters: - name: target_type in: path description: 'The type of object the relationship field is targeting. The options are "zen:user", "zen:ticket", "zen:organization", and "zen:custom_object:CUSTOM_OBJECT_KEY" ' required: true schema: type: string example: zen:custom_object:apartment - name: target_id in: path description: 'The id of the object the relationship field is targeting ' required: true schema: type: integer example: 1234 - name: field_id in: path description: 'The id of the lookup relationship field ' required: true schema: type: integer example: 1234 - name: source_type in: path description: 'The type of object the relationship field belongs to (example. ticket field belongs to a ticket object). The options are "zen:user", "zen:ticket", "zen:organization", and "zen:custom_object:CUSTOM_OBJECT_KEY" ' required: true schema: type: string example: zen:custom_object:apartment responses: '200': description: Success response content: application/json: schema: $ref: '#/components/schemas/ReverseLookupResponse' examples: default: $ref: '#/components/examples/ReverseLookupUsersResponseExample' components: schemas: RelationshipFilterDefinitionResponse: type: object properties: definitions: $ref: '#/components/schemas/RelationshipFilterDefinition' ReverseLookupResponse: type: object anyOf: - $ref: '#/components/schemas/UsersResponse'