Pipedrive OrganizationRelationships API

Organization relationships represent how different organizations are related to each other. The relationship can be hierarchical (parent-child companies) or lateral as defined by the `type` field - either `parent` or `related`.

Documentation

📖
Documentation
https://developers.pipedrive.com/
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Deals
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Leads
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Persons
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Organizations
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Activities
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Pipelines
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Stages
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Products
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Notes
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Files
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Mailbox
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/CallLogs
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Users
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Roles
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Filters
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Goals
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Subscriptions
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Projects
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/DealFields
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Webhooks
📖
Documentation
https://pipedrive.readme.io/docs/guide-for-webhooks-v2
📖
Documentation
https://developers.pipedrive.com/docs/api/v1/oauth2

Specifications

Other Resources

OpenAPI Specification

pipedrive-organizationrelationships-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Pipedrive API v1 Activities OrganizationRelationships API
  version: 1.0.0
  description: 'Activities are appointments/tasks/events on a calendar that can be associated with a deal, a lead, a person and an organization. Activities can be of different type (such as call, meeting, lunch or a custom type - see ActivityTypes object) and can be assigned to a particular user. Note that activities can also be created without a specific date/time.

    '
servers:
- url: https://api.pipedrive.com/v1
tags:
- name: OrganizationRelationships
  description: 'Organization relationships represent how different organizations are related to each other. The relationship can be hierarchical (parent-child companies) or lateral as defined by the `type` field - either `parent` or `related`.

    '
paths:
  /organizationRelationships:
    get:
      summary: Get all relationships for organization
      description: Gets all of the relationships for a supplied organization ID.
      x-token-cost: 20
      operationId: getOrganizationRelationships
      tags:
      - OrganizationRelationships
      security:
      - api_key: []
      - oauth2:
        - contacts:read
        - contacts:full
      parameters:
      - in: query
        name: org_id
        required: true
        schema:
          type: integer
        description: The ID of the organization to get relationships for
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                title: GetOrganizationRelationshipsResponse
                allOf:
                - title: baseResponse
                  type: object
                  properties:
                    success:
                      type: boolean
                      description: If the response is successful or not
                - type: object
                  properties:
                    data:
                      type: array
                      description: The array of organization relationships
                      items:
                        title: organizationRelationshipDetails
                        allOf:
                        - title: organizationRelationshipWithCalculatedFields
                          allOf:
                          - type: object
                            properties:
                              id:
                                type: integer
                                description: The ID of the organization relationship
                              type:
                                type: string
                                description: The type of the relationship
                              rel_owner_org_id:
                                title: relationshipOrganizationInfoItem
                                allOf:
                                - type: object
                                  properties:
                                    name:
                                      type: string
                                      description: The name of the organization associated with the item
                                    people_count:
                                      type: integer
                                      description: The number of people connected with the organization that is associated with the item
                                    owner_id:
                                      type: integer
                                      description: The ID of the owner of the organization that is associated with the item
                                    address:
                                      type: string
                                      nullable: true
                                      description: The address of the organization
                                    cc_email:
                                      type: string
                                      nullable: true
                                      description: The BCC email of the organization associated with the item
                                - type: object
                                  properties:
                                    value:
                                      type: integer
                                      description: The ID of the organization
                              rel_linked_org_id:
                                title: relationshipOrganizationInfoItem
                                allOf:
                                - type: object
                                  properties:
                                    name:
                                      type: string
                                      description: The name of the organization associated with the item
                                    people_count:
                                      type: integer
                                      description: The number of people connected with the organization that is associated with the item
                                    owner_id:
                                      type: integer
                                      description: The ID of the owner of the organization that is associated with the item
                                    address:
                                      type: string
                                      nullable: true
                                      description: The address of the organization
                                    cc_email:
                                      type: string
                                      nullable: true
                                      description: The BCC email of the organization associated with the item
                                - type: object
                                  properties:
                                    value:
                                      type: integer
                                      description: The ID of the organization
                              add_time:
                                type: string
                                description: The creation date and time of the relationship
                              update_time:
                                type: string
                                description: The last updated date and time of the relationship
                              active_flag:
                                type: string
                                description: Whether the relationship is active or not
                          - type: object
                            properties:
                              calculated_type:
                                type: string
                                description: The calculated type of the relationship with the linked organization
                              calculated_related_org_id:
                                type: integer
                                description: The ID of the linked organization
                        - type: object
                          properties:
                            related_organization_name:
                              type: string
                              description: The name of the linked organization
                    additional_data:
                      description: The additional data of the list
                      type: object
                      properties:
                        start:
                          type: integer
                          description: Pagination start
                        limit:
                          type: integer
                          description: Items shown per page
                        more_items_in_collection:
                          type: boolean
                          description: If there are more list items in the collection than displayed or not
                    related_objects:
                      type: object
                      properties:
                        organization:
                          type: object
                          title: RelatedOrganizationData
                          properties:
                            ORGANIZATION_ID:
                              type: object
                              title: OrganizationDataWithId
                              description: The ID of the organization associated with the item
                              allOf:
                              - type: object
                                properties:
                                  id:
                                    type: integer
                                    description: The ID of the organization associated with the item
                              - type: object
                                properties:
                                  name:
                                    type: string
                                    description: The name of the organization associated with the item
                                  people_count:
                                    type: integer
                                    description: The number of people connected with the organization that is associated with the item
                                  owner_id:
                                    type: integer
                                    description: The ID of the owner of the organization that is associated with the item
                                  address:
                                    type: string
                                    nullable: true
                                    description: The address of the organization
                                  cc_email:
                                    type: string
                                    nullable: true
                                    description: The BCC email of the organization associated with the item
              example:
                success: true
                data:
                - related_organization_name: Telia
                  calculated_type: daughter
                  calculated_related_org_id: 1480
                  id: 1
                  type: parent
                  rel_owner_org_id:
                    name: Pipedrive Inc.
                    people_count: 1
                    owner_id: 925000
                    address: Mustamäe tee 3a, 10615 Tallinn
                    active_flag: true
                    cc_email: company@pipedrivemail.com
                    value: 1481
                  rel_linked_org_id:
                    name: Telia
                    people_count: 2
                    owner_id: 925000
                    address: USA
                    active_flag: true
                    cc_email: company@pipedrivemail.com
                    value: 1480
                  add_time: '2020-09-22 08:58:28'
                  update_time: '2020-09-22 08:58:28'
                  active_flag: 'true'
                additional_data:
                  pagination:
                    start: 0
                    limit: 100
                    more_items_in_collection: true
                related_objects:
                  organization:
                    '1482':
                      id: 457
                      name: Yandex
                      people_count: 2
                      owner_id: 9271535
                      address: Mustamäe tee 4b, 10615 Tallinn
                      active_flag: true
                      cc_email: org@pipedrivemail.com
    post:
      summary: Create an organization relationship
      description: Creates and returns an organization relationship.
      x-token-cost: 10
      operationId: addOrganizationRelationship
      tags:
      - OrganizationRelationships
      security:
      - api_key: []
      - oauth2:
        - contacts:full
      requestBody:
        content:
          application/json:
            schema:
              title: addOrganizationRelationshipRequest
              type: object
              required:
              - type
              - rel_owner_org_id
              - rel_linked_org_id
              properties:
                org_id:
                  type: integer
                  description: The ID of the base organization for the returned calculated values
                type:
                  type: string
                  enum:
                  - parent
                  - related
                  description: The type of organization relationship
                rel_owner_org_id:
                  type: integer
                  description: The owner of the relationship. If type is `parent`, then the owner is the parent and the linked organization is the daughter.
                rel_linked_org_id:
                  type: integer
                  description: The linked organization in the relationship. If type is `parent`, then the linked organization is the daughter.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                title: AddOrganizationRelationshipResponse
                allOf:
                - title: baseResponse
                  type: object
                  properties:
                    success:
                      type: boolean
                      description: If the response is successful or not
                - type: object
                  properties:
                    data:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: The ID of the organization relationship
                        type:
                          type: string
                          description: The type of the relationship
                        rel_owner_org_id:
                          title: relationshipOrganizationInfoItem
                          allOf:
                          - type: object
                            properties:
                              name:
                                type: string
                                description: The name of the organization associated with the item
                              people_count:
                                type: integer
                                description: The number of people connected with the organization that is associated with the item
                              owner_id:
                                type: integer
                                description: The ID of the owner of the organization that is associated with the item
                              address:
                                type: string
                                nullable: true
                                description: The address of the organization
                              cc_email:
                                type: string
                                nullable: true
                                description: The BCC email of the organization associated with the item
                          - type: object
                            properties:
                              value:
                                type: integer
                                description: The ID of the organization
                        rel_linked_org_id:
                          title: relationshipOrganizationInfoItem
                          allOf:
                          - type: object
                            properties:
                              name:
                                type: string
                                description: The name of the organization associated with the item
                              people_count:
                                type: integer
                                description: The number of people connected with the organization that is associated with the item
                              owner_id:
                                type: integer
                                description: The ID of the owner of the organization that is associated with the item
                              address:
                                type: string
                                nullable: true
                                description: The address of the organization
                              cc_email:
                                type: string
                                nullable: true
                                description: The BCC email of the organization associated with the item
                          - type: object
                            properties:
                              value:
                                type: integer
                                description: The ID of the organization
                        add_time:
                          type: string
                          description: The creation date and time of the relationship
                        update_time:
                          type: string
                          description: The last updated date and time of the relationship
                        active_flag:
                          type: string
                          description: Whether the relationship is active or not
                    related_objects:
                      type: object
                      properties:
                        organization:
                          type: object
                          title: RelatedOrganizationData
                          properties:
                            ORGANIZATION_ID:
                              type: object
                              title: OrganizationDataWithId
                              description: The ID of the organization associated with the item
                              allOf:
                              - type: object
                                properties:
                                  id:
                                    type: integer
                                    description: The ID of the organization associated with the item
                              - type: object
                                properties:
                                  name:
                                    type: string
                                    description: The name of the organization associated with the item
                                  people_count:
                                    type: integer
                                    description: The number of people connected with the organization that is associated with the item
                                  owner_id:
                                    type: integer
                                    description: The ID of the owner of the organization that is associated with the item
                                  address:
                                    type: string
                                    nullable: true
                                    description: The address of the organization
                                  cc_email:
                                    type: string
                                    nullable: true
                                    description: The BCC email of the organization associated with the item
              example:
                success: true
                data:
                  id: 1
                  type: parent
                  rel_owner_org_id:
                    name: Pipedrive Inc.
                    people_count: 1
                    owner_id: 925000
                    address: Mustamäe tee 3a, 10615 Tallinn
                    active_flag: true
                    cc_email: company@pipedrivemail.com
                    value: 1481
                  rel_linked_org_id:
                    name: Telia
                    people_count: 2
                    owner_id: 925000
                    address: USA
                    active_flag: true
                    cc_email: company@pipedrivemail.com
                    value: 1480
                  add_time: '2020-09-22 08:58:28'
                  update_time: '2020-09-22 08:58:28'
                  active_flag: 'true'
                related_objects:
                  organization:
                    '1482':
                      id: 457
                      name: Yandex
                      people_count: 2
                      owner_id: 9271535
                      address: Mustamäe tee 4b, 10615 Tallinn
                      active_flag: true
                      cc_email: org@pipedrivemail.com
  /organizationRelationships/{id}:
    delete:
      summary: Delete an organization relationship
      description: Deletes an organization relationship and returns the deleted ID.
      x-token-cost: 6
      operationId: deleteOrganizationRelationship
      tags:
      - OrganizationRelationships
      security:
      - api_key: []
      - oauth2:
        - contacts:full
      parameters:
      - in: path
        name: id
        description: The ID of the organization relationship
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                title: DeleteOrganizationRelationshipResponse
                allOf:
                - title: baseResponse
                  type: object
                  properties:
                    success:
                      type: boolean
                      description: If the response is successful or not
                - type: object
                  properties:
                    data:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: The ID of the deleted organization relationship
              example:
                success: true
                data:
                  id: 10
    get:
      summary: Get one organization relationship
      description: Finds and returns an organization relationship from its ID.
      x-token-cost: 2
      operationId: getOrganizationRelationship
      tags:
      - OrganizationRelationships
      security:
      - api_key: []
      - oauth2:
        - contacts:read
        - contacts:full
      parameters:
      - in: path
        name: id
        description: The ID of the organization relationship
        required: true
        schema:
          type: integer
      - in: query
        name: org_id
        required: false
        schema:
          type: integer
        description: The ID of the base organization for the returned calculated values
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                title: GetOrganizationRelationshipResponse
                allOf:
                - title: baseResponse
                  type: object
                  properties:
                    success:
                      type: boolean
                      description: If the response is successful or not
                - type: object
                  properties:
                    data:
                      title: organizationRelationshipWithCalculatedFields
                      allOf:
                      - type: object
                        properties:
                          id:
                            type: integer
                            description: The ID of the organization relationship
                          type:
                            type: string
                            description: The type of the relationship
                          rel_owner_org_id:
                            title: relationshipOrganizationInfoItem
                            allOf:
                            - type: object
                              properties:
                                name:
                                  type: string
                                  description: The name of the organization associated with the item
                                people_count:
                                  type: integer
                                  description: The number of people connected with the organization that is associated with the item
                                owner_id:
                                  type: integer
                                  description: The ID of the owner of the organization that is associated with the item
                                address:
                                  type: string
                                  nullable: true
                                  description: The address of the organization
                                cc_email:
                                  type: string
                                  nullable: true
                                  description: The BCC email of the organization associated with the item
                            - type: object
                              properties:
                                value:
                                  type: integer
                                  description: The ID of the organization
                          rel_linked_org_id:
                            title: relationshipOrganizationInfoItem
                            allOf:
                            - type: object
                              properties:
                                name:
                                  type: string
                                  description: The name of the organization associated with the item
                                people_count:
                                  type: integer
                                  description: The number of people connected with the organization that is associated with the item
                                owner_id:
                                  type: integer
                                  description: The ID of the owner of the organization that is associated with the item
                                address:
                                  type: string
                                  nullable: true
                                  description: The address of the organization
                                cc_email:
                                  type: string
                                  nullable: true
                                  description: The BCC email of the organization associated with the item
                            - type: object
                              properties:
                                value:
                                  type: integer
                                  description: The ID of the organization
                          add_time:
                            type: string
                            description: The creation date and time of the relationship
                          update_time:
                            type: string
                            description: The last updated date and time of the relationship
                          active_flag:
                            type: string
                            description: Whether the relationship is active or not
                      - type: object
                        properties:
                          calculated_type:
                            type: string
                            description: The calculated type of the relationship with the linked organization
                          calculated_related_org_id:
                            type: integer
                            description: The ID of the linked organization
                    related_objects:
                      type: object
                      properties:
                        organization:
                          type: object
                          title: RelatedOrganizationData
                          properties:
                            ORGANIZATION_ID:
                              type: object
                              title: OrganizationDataWithId
                              description: The ID of the organization associated with the item
                              allOf:
                              - type: object
                                properties:
                                  id:
                                    type: integer
                                    description: The ID of the organization associated with the item
                              - type: object
                                properties:
                                  name:
                                    type: string
                                    description: The name of the organization associated with the item
                                  people_count:
                                    type: integer
                                    description: The number of people connected with the organization that is associated with the item
                                  owner_id:
                                    type: integer
                                    description: The ID of the owner of the organization that is associated with the item
                                  address:
                                    type: string
                                    nullable: true
                                    description: The address of the organization
                                  cc_email:
                                    type: string
                                    nullable: true
                                    description: The BCC email of the organization associated with the item
              example:
                success: true
                data:
                  id: 1
                  type: parent
                  rel_owner_org_id:
                    name: Pipedrive Inc.
                    people_count: 1
                    owner_id: 925000
                    address: Mustamäe tee 3a, 10615 Tallinn
                    active_flag: true
                    cc_email: company@pipedrivemail.com
                    value: 1481
                  rel_linked_org_id:
                    name: Telia
                    people_count: 2
                    owner_id: 925000
                    address: USA
                    active_flag: true
                    cc_email: company@pipedrivemail.com
                    value: 1480
                  add_time: '2020-09-22 08:58:28'
                  update_time: '2020-09-22 08:58:28'
                  active_flag: 'true'
                  calculated_type: daughter
                  calculated_related_org_id: 1480
                related_objects:
                  organization:
                    '1482':
                      id: 457
                      name: Yandex
                      people_count: 2
                      owner_id: 9271535
                      address: Mustamäe tee 4b, 10615 Tallinn
                      active_flag: true
                      cc_email: org@pipedrivemail.com
    put:
      summary: Update an organization relationship
      description: Updates and returns an organization relationship.
      x-token-cost: 10
      operationId: updateOrganizationRelationship
      tags:
      - OrganizationRelationships
      security:
      - api_key: []
      - oauth2:
        - contacts:full
      parameters:
      - in: path
        name: id
        description: The ID of the organization relationship
        required: true
        schema:
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              title: organizationRelationship
              type: object
              properties:
                org_id:
                  type: integer
                  description: The ID of the base organization for the returned calculated values
                type:
                  type: string
                  enum:
                  - parent
                  - related
                  description: The type of organization relationship
                rel_owner_org_id:
                  type: integer
                  description: The owner of this relationship. If type is `parent`, then the owner is the parent and the linked organization is the daughter.
                rel_linked_org_id:
                  type: integer
                  description: The linked organization in this 

# --- truncated at 32 KB (43 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/pipedrive/refs/heads/main/openapi/pipedrive-organizationrelationships-api-openapi.yml