> ## Documentation Index
> Fetch the complete documentation index at: https://integrations.docs.commenda.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Invite Link

> Update a single invite link from the database.

An **invite link** contains API requests for generating and managing invite links, which can be used to connect end users to their preferred accounting platforms.

You can update the invite link if you need to:

1. Change the company name.
2. Update the sync config for this company (includes specific scopes, custom fields or sync frequency).


## OpenAPI

````yaml PUT /core/invite_links/{invite_link_id}
openapi: 3.0.1
info:
  title: rootfi
  version: v3
servers:
  - url: https://api.rootfi.dev/v3
    description: global
  - url: https://api.sa.rootfi.dev/v3
    description: saudi
security: []
paths:
  /core/invite_links/{invite_link_id}:
    put:
      tags:
        - CoreInviteLinks
      summary: Update Invite Link
      description: Update a single invite link from the database.
      operationId: core_inviteLinks_update
      parameters:
        - name: invite_link_id
          in: path
          description: The ID of the invite link to update
          required: true
          schema:
            type: string
          examples:
            Example1:
              value: '1102'
      requestBody:
        description: The body of the invite link to update
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/coreupdateInviteLinkReqBody'
            examples:
              Example1:
                value:
                  company_name: RootFi
                  integrations:
                    - XERO
                  integration_categories:
                    - ACCOUNTING
                  sync_config:
                    - data_model: ACCOUNTS
                      category: ACCOUNTING
                      enabled: true
                      frequency: DAILY
                      interval: 1
                      scope_access:
                        READ: true
                        CREATE: true
                        UPDATE: true
                        DELETE: true
                      sync_from: '2023-01-01T00:00:00Z'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/coregetInviteLinkObject'
              examples:
                Example1:
                  value:
                    data:
                      rootfi_id: 1
                      rootfi_created_at: '2021-08-10T12:00:00Z'
                      rootfi_updated_at: '2021-08-10T12:00:00Z'
                      invite_link_id: '1'
                      integrations:
                        - XERO
                      integration_categories:
                        - ACCOUNTING
                      company:
                        rootfi_id: 1
                        rootfi_created_at: '2021-08-10T12:00:00Z'
                        rootfi_updated_at: '2021-08-10T12:00:00Z'
                        name: RootFi
                      connections:
                        - rootfi_id: 1
                          rootfi_created_at: '2021-08-10T12:00:00Z'
                          rootfi_updated_at: '2021-08-10T12:00:00Z'
                          integration_type: XERO
                          status: HEALTHY
                          sync_status: IDLE
                          rate_limits:
                            counters:
                              day: 4
                              hour: 1
                              minute: 1
                              concurrent: 0
                            lastReset:
                              day: '2024-01-28T11:00:17.087Z'
                              hour: '2024-01-29T05:10:40.896Z'
                              minute: '2024-01-29T05:10:40.896Z'
                            maxLimits:
                              per_minute: 500
                              concurrent_calls: 10
                          sync_config:
                            - data_model: ACCOUNTS
                              enabled: true
                              frequency: DAILY
                              interval: 1
                              scope_access:
                                READ: true
                                CREATE: true
                                UPDATE: true
                                DELETE: true
                              category: ACCOUNTING
                              sync_from: '2023-01-01T00:00:00Z'
                          category: ACCOUNTING
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RootFiAPIResponseType'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RootFiAPIResponseType'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RootFiAPIResponseType'
        '500':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RootFiAPIResponseType'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    coreupdateInviteLinkReqBody:
      title: coreupdateInviteLinkReqBody
      type: object
      description: The data of the invite link endpoint
      properties:
        company_name:
          type: string
          nullable: true
          description: The name of the company
        integrations:
          type: array
          items:
            $ref: '#/components/schemas/IntegrationType'
          nullable: true
          description: The integrations of the invite link
        integration_categories:
          type: array
          items:
            $ref: '#/components/schemas/IntegrationCategory'
          description: The integration categories of the invite link
        sync_config:
          type: array
          items:
            $ref: '#/components/schemas/SyncConfigData'
          nullable: true
          description: The sync configuration of the connection
        partner_id:
          type: string
          nullable: true
          description: A custom ID which can be used to identify the invite link or Company
      required:
        - integration_categories
    coregetInviteLinkObject:
      title: coregetInviteLinkObject
      type: object
      description: The data of the invite link endpoint
      properties:
        data:
          $ref: '#/components/schemas/coreInviteLinkData'
          description: The data of the invite link endpoint
      required:
        - data
    RootFiAPIResponseType:
      title: RootFiAPIResponseType
      type: object
      properties:
        error:
          $ref: '#/components/schemas/RootFiAPIResponseErrorType'
          description: The error message
      required:
        - error
    IntegrationType:
      title: IntegrationType
      type: string
      enum:
        - ZOHO_BOOKS
        - QUICKBOOKS_SANDBOX
        - QUICKBOOKS
        - XERO
        - TALLY
        - ROOTFI_SANDBOX
        - SAGE_CLOUD_ACCOUNTING
        - MS_DYNAMICS_365
        - SAGE_ZA_CLOUD_ACCOUNTING
        - MYOB_BUSINESS
        - NETSUITE
        - WAVE
        - ODOO_ACCOUNTING
        - WAFEQ
        - MEKARI_JURNAL
        - BUSY
        - QOYOD
        - STRIPE
        - RAZORPAY
        - PAYPAL
        - SHOPIFY
        - BIG_COMMERCE
        - WOO_COMMERCE
        - HUBSPOT
        - SALESFORCE
        - PIPEDRIVE
        - ZOHO_CRM
    IntegrationCategory:
      title: IntegrationCategory
      type: string
      enum:
        - ACCOUNTING
        - PAYMENTS
        - CRM
        - ECOMMERCE
        - CUSTOM
    SyncConfigData:
      title: SyncConfigData
      type: object
      properties:
        enabled:
          type: boolean
          description: The status of the sync configuration
          example: true
        interval:
          type: integer
          description: The interval of the sync configuration
          example: 1
        frequency:
          $ref: '#/components/schemas/SyncFrequency'
          description: The frequency of the sync configuration
        data_model:
          $ref: '#/components/schemas/DataModels'
          description: The data model of the sync configuration
        category:
          $ref: '#/components/schemas/IntegrationCategory'
          description: The category of the datamodel
        scope_access:
          $ref: '#/components/schemas/ScopeAccess'
          description: The scope access of the sync configuration
        sync_from:
          type: string
          format: date-time
          nullable: true
          description: >-
            The date from which the data should be synced. If not provided, it
            will sync all historical data.
        custom_fields:
          type: array
          items:
            type: string
          nullable: true
          description: >-
            The custom field names to fetch during syncing (for Netsuite,
            Hubspot only)
      required:
        - enabled
        - interval
        - frequency
        - data_model
        - category
        - scope_access
    coreInviteLinkData:
      title: coreInviteLinkData
      type: object
      description: The data of the invite link endpoint
      properties:
        invite_link_id:
          type: string
          description: The ID of the invite link
          example: '1'
        integrations:
          type: array
          items:
            $ref: '#/components/schemas/IntegrationType'
          description: The integrations of the invite link
        integration_categories:
          type: array
          items:
            $ref: '#/components/schemas/IntegrationCategory'
          description: The integration categories of the invite link
        company:
          $ref: '#/components/schemas/coreInviteLinkCompanyData'
          description: The company of the invite link
        connections:
          type: array
          items:
            $ref: '#/components/schemas/coreConnectionData'
          nullable: true
          description: The connections of the invite link
      required:
        - invite_link_id
        - integrations
        - integration_categories
        - company
      allOf:
        - $ref: '#/components/schemas/RootfiFields'
    RootFiAPIResponseErrorType:
      title: RootFiAPIResponseErrorType
      type: object
      properties:
        message:
          type: string
          description: The error message
        code:
          type: string
          description: The error code
        field:
          type: string
          description: The status of the error
      required:
        - message
        - code
        - field
    SyncFrequency:
      title: SyncFrequency
      type: string
      enum:
        - DAILY
        - WEEKLY
        - MONTHLY
        - YEARLY
    DataModels:
      title: DataModels
      type: string
      enum:
        - ACCOUNTS
        - BANK_ACCOUNTS
        - BILLS
        - BILL_PAYMENTS
        - COMPANY_INFO
        - CONTACTS
        - BILL_CREDIT_NOTES
        - INVOICE_CREDIT_NOTES
        - DOCUMENTS
        - EXPENSES
        - INVOICES
        - INVOICE_PAYMENTS
        - ITEMS
        - LINE_ITEMS
        - TAX_RATES
        - JOURNAL_ENTRIES
        - BANK_TRANSACTIONS
        - JOURNAL_LINES
        - PURCHASE_ORDERS
        - SALES_ORDERS
        - PHONE_NUMBERS
        - ADDRESSES
        - EXTERNAL_LINKS
        - CONTACT_PERSONS
        - INCOME_STATEMENT
        - BALANCE_SHEET
        - TRACKING_CATEGORIES
        - CASH_FLOW_STATEMENT
        - CURRENCIES
        - PAYMENT_CUSTOMERS
        - PAYMENT_INVOICES
        - PAYMENT_LINE_ITEMS
        - PAYMENT_ITEMS
        - PAYMENT_ORDERS
        - PAYMENT_TAX_RATES
        - PAYMENT_DISPUTES
        - PAYMENT_PAYMENTS
        - PAYMENT_REFUNDS
        - PAYMENT_PAYMENT_LINKS
        - PAYMENT_PAYOUTS
        - PAYMENT_ADDRESSES
        - PAYMENT_PHONE_NUMBERS
        - PAYMENT_EXTERNAL_LINKS
        - PAYMENT_TRANSACTIONS
        - PAYMENT_BALANCES
        - ECOMMERCE_ORDERS
        - ECOMMERCE_CUSTOMERS
        - ECOMMERCE_PRODUCTS
        - ECOMMERCE_LINE_ITEMS
        - CRM_CONTACTS
        - CRM_COMPANIES
        - CRM_DEALS
        - CRM_LEADS
        - CRM_NOTES
        - CRM_PIPELINES
        - CRM_STAGES
        - CRM_ACTIVITIES
        - CRM_TASKS
        - CRM_USERS
        - CRM_EXTERNAL_LINKS
        - CRM_PHONE_NUMBERS
        - CRM_ADDRESSES
    ScopeAccess:
      title: ScopeAccess
      type: object
      properties:
        READ:
          type: boolean
          nullable: true
          description: The access of the scope
        CREATE:
          type: boolean
          nullable: true
          description: The access of the scope
        UPDATE:
          type: boolean
          nullable: true
          description: The access of the scope
        DELETE:
          type: boolean
          nullable: true
          description: The access of the scope
    coreInviteLinkCompanyData:
      title: coreInviteLinkCompanyData
      type: object
      description: The data of the company endpoint
      properties:
        name:
          type: string
          description: The name of the company
          example: RootFi
      required:
        - name
      allOf:
        - $ref: '#/components/schemas/RootfiFields'
    coreConnectionData:
      title: coreConnectionData
      type: object
      description: The data of the connection endpoint
      properties:
        integration_type:
          $ref: '#/components/schemas/IntegrationType'
          description: The integration type of the connection
        status:
          $ref: '#/components/schemas/ConnectionStatus'
          description: The status of the connection
        sync_status:
          $ref: '#/components/schemas/SyncStatus'
          description: The sync status of the connection
        rate_limits:
          $ref: '#/components/schemas/RateLimitData'
          description: The rate limits of the connection
        category:
          $ref: '#/components/schemas/IntegrationCategory'
          description: The category of the connection
        sync_config:
          type: array
          items:
            $ref: '#/components/schemas/SyncConfigData'
          nullable: true
          description: The sync configuration of the connection
      required:
        - integration_type
        - status
        - sync_status
        - rate_limits
        - category
      allOf:
        - $ref: '#/components/schemas/RootfiFields'
    RootfiFields:
      title: RootfiFields
      type: object
      properties:
        rootfi_id:
          type: integer
          description: The unique ID we assign for that data's information
        rootfi_created_at:
          type: string
          format: date-time
          description: The date at which RootFi first synced this data
        rootfi_updated_at:
          type: string
          format: date-time
          description: The latest date at which RootFi updated this data
      required:
        - rootfi_id
        - rootfi_created_at
        - rootfi_updated_at
    ConnectionStatus:
      title: ConnectionStatus
      type: string
      enum:
        - HEALTHY
        - DISCONNECTED
        - EXPIRED
        - PENDING
    SyncStatus:
      title: SyncStatus
      type: string
      enum:
        - IDLE
        - FETCHING
        - SLEEPING
        - PARSING
        - RUNNING
    RateLimitData:
      title: RateLimitData
      type: object
      properties:
        counters:
          type: object
          additionalProperties: true
          description: The counters of the rate limit
        lastReset:
          type: object
          additionalProperties: true
          description: The date and time the rate limit was last reset
        maxLimits:
          type: object
          additionalProperties: true
          description: The max limits of the rate limit
      required:
        - counters
        - lastReset
        - maxLimits
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key

````