openapi: 3.0.0
info:
  title: ZOHO CRM Integration
  description: API handling for modules specific to  Zoho ERP - Zoho CRM integration.
  contact: {}
  version: 1.0.0
servers:
  - url: https://www.zohoapis.in/erp/v3
    description: API Endpoint
tags:
  - name: integration
    description: integration Module
paths:
  /crm/account/{crm_account_id}/import:
    x-mcp-group:
      - ZOHO CRM Integration
    post:
      tags:
        - integration
      operationId: import_customer_using_crm_account_id
      summary: Import a customer using the CRM account ID
      description: 'Zoho ERP must be integrated with Zoho CRM using Accounts and Contacts sync or using Accounts only sync to import a customer from CRM with its CRM account ID. <br/> Note: You can get a contact by CRM account ID by using this <a href=/erp/api/v3/contacts/#list-contacts/zcrm_account_id>API Endpoint</a>'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/import-a-customer-using-the-crm-account-id-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.contacts.CREATE
    parameters:
      - name: crm_account_id
        in: path
        required: true
        description: Unique identifier of the zoho crm account.
        schema:
          type: string
        example: '460000000026041'
      - $ref: '#/components/parameters/organization_id'
  /crm/contact/{crm_contact_id}/import:
    x-mcp-group:
      - ZOHO CRM Integration
    post:
      tags:
        - integration
      operationId: import_customer_using_crm_contact_id
      summary: Import a customer using CRM contact ID
      description: 'Zoho ERP must be integrated with Zoho CRM using <code>Contacts only sync</code> or <code>Accounts & their Contacts and Include contacts that are not associated to any accounts </code> sync type contacts that are not associated to any accounts in Zoho CRM to import a customer from CRM with its CRM contact ID. <br/> Note: You can get a contact by CRM contact ID by using this <a href=/erp/api/v3/contacts/#list-contacts/zcrm_contact_id>API Endpoint</a>'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/import-a-customer-using-crm-contact-id-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.contacts.CREATE
    parameters:
      - name: crm_contact_id
        in: path
        required: true
        description: Unique identifier of the zoho crm contact.
        schema:
          type: string
        example: '460000000026042'
      - $ref: '#/components/parameters/organization_id'
  /crm/vendor/{crm_vendor_id}/import:
    x-mcp-group:
      - ZOHO CRM Integration
    post:
      tags:
        - integration
      operationId: import_vendor_using_crm_vendor_id
      summary: Import a vendor using the CRM vendor ID
      description: Zoho ERP must be integrated with Zoho CRM using Vendor only sync to import a vendor from CRM with its CRM vendor ID.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/import-a-vendor-using-the-crm-vendor-id-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.contacts.CREATE
    parameters:
      - name: crm_vendor_id
        in: path
        required: true
        description: Unique identifier of the zoho crm vendor.
        schema:
          type: string
        example: '460000000026043'
      - $ref: '#/components/parameters/organization_id'
  /crm/item/{crm_product_id}/import:
    x-mcp-group:
      - ZOHO CRM Integration
    post:
      tags:
        - integration
      operationId: import_item_using_crm_product_id
      summary: Import an item using the CRM product ID
      description: Zoho ERP must be integrated with Zoho CRM using Products only sync to import an item from CRM with its CRM product ID.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/import-an-item-using-the-crm-product-id-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.settings.CREATE
    parameters:
      - name: crm_product_id
        in: path
        required: true
        description: Unique identifier of the zoho crm product.
        schema:
          type: string
        example: '460000000026055'
      - $ref: '#/components/parameters/organization_id'
components:
  parameters:
    organization_id:
      name: organization_id
      description: ID of the organization
      in: query
      required: true
      schema:
        type: string
      example: '10234695'
  schemas:
    gendoc-attributes-schema:
      $ref: '#/components/schemas/data'
    contact_id:
      description: Contact ID of the contact.
      type: string
      example: 460000000026049
    item_id:
      description: Item ID of the product.
      type: string
      example: 460000000000108
    data:
      type: object
      properties:
        contact_id:
          $ref: '#/components/schemas/contact_id'
    product_data:
      type: object
      properties:
        item_id:
          $ref: '#/components/schemas/item_id'
    import-a-customer-using-the-crm-account-id-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        data:
          $ref: '#/components/schemas/data'
    import-a-customer-using-crm-contact-id-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        data:
          $ref: '#/components/schemas/data'
    import-a-vendor-using-the-crm-vendor-id-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        data:
          $ref: '#/components/schemas/data'
    import-an-item-using-the-crm-product-id-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        data:
          $ref: '#/components/schemas/product_data'
  securitySchemes:
    Zoho_Auth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://accounts.zoho.in/oauth/v2/auth
          scopes:
            ERP.contacts.READ: Read Contacts
            ERP.contacts.CREATE: Create Contacts
            ERP.estimates.READ: Read Estimates
            ERP.salesorders.READ: Read Salesorders
