> ## 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.

# Create Sync

> Initialise a single sync



## OpenAPI

````yaml POST /core/syncs
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/syncs:
    post:
      tags:
        - CoreSyncs
      summary: Create Sync
      description: Initialise a single sync
      operationId: core_syncs_create
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/corecreateSyncReqBody'
            examples:
              Example1:
                value:
                  company_id: 1
                  integration_type: XERO
                  full_sync: true
                  data_models_to_sync:
                    - ACCOUNTS
                    - CONTACTS
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/coregetSyncObject'
              examples:
                Example1:
                  value:
                    data:
                      rootfi_id: 1
                      rootfi_company_id: 8422
                      rootfi_updated_at: '2024-06-21T08:07:05.750Z'
                      rootfi_created_at: '2024-06-21T08:07:05.750Z'
                      start_time: '2024-06-21T08:07:05.000Z'
                      end_time: '2024-06-21T08:07:40.382Z'
                      integration_type: ZOHO_BOOKS
                      full_sync: true
                      sync_type: AUTO_SYNC
                      config_mode: READ
                      sync_data_models:
                        - CUSTOM_ACCOUNT_TRANSACTIONS
                      sync_id: hjmm4d2HDHB60a2
                      total_count: 3
                      success_count: 3
                      failed_count: 0
                      running_count: 0
                      pending_count: 0
                      status: SUCCESS
        '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:
    corecreateSyncReqBody:
      title: corecreateSyncReqBody
      type: object
      description: The data of the invite link endpoint
      properties:
        company_id:
          type: integer
          description: The ID of the company
          example: 1
        integration_type:
          $ref: '#/components/schemas/IntegrationType'
          description: The type of integration
        full_sync:
          type: boolean
          description: Whether the sync is a full sync
          example: true
        data_models_to_sync:
          type: array
          items:
            $ref: '#/components/schemas/DataModels'
          description: The sync data models of the sync.
      required:
        - company_id
        - integration_type
        - full_sync
        - data_models_to_sync
    coregetSyncObject:
      title: coregetSyncObject
      type: object
      description: The data of the sync endpoint
      properties:
        data:
          $ref: '#/components/schemas/coreSyncData'
          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
    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
    coreSyncData:
      title: coreSyncData
      type: object
      description: The data of the invite link endpoint
      properties:
        rootfi_id:
          type: integer
          description: The ID of the sync
          example: 1
        rootfi_created_at:
          type: string
          description: The created time of the sync
          example: '2024-06-21T08:07:05.750Z'
        rootfi_updated_at:
          type: string
          description: The updated time of the sync
          example: '2024-06-21T08:07:05.750Z'
        rootfi_company_id:
          type: integer
          description: The ID of the company
          example: 8422
        start_time:
          type: string
          description: The start time of the sync
          example: '2024-06-21T08:07:05.000Z'
        end_time:
          type: string
          description: The end time of the sync
          example: '2024-06-21T08:07:40.382Z'
        integration_type:
          $ref: '#/components/schemas/IntegrationType'
          description: The type of integration
        full_sync:
          type: boolean
          description: Whether the sync was a full sync
          example: true
        sync_type:
          $ref: '#/components/schemas/SyncType'
          description: The type of sync.
        config_mode:
          $ref: '#/components/schemas/ConfigMode'
          description: The config mode of the sync.
        sync_data_models:
          type: array
          items:
            type: string
          description: The sync data models of the sync.
          example:
            - CUSTOM_ACCOUNT_TRANSACTIONS
        sync_id:
          type: string
          description: The ID of the sync
          example: hjmm4d2HDHB60a2
        total_count:
          type: integer
          description: The total count of the sync
          example: 3
        success_count:
          type: integer
          description: The success count of the sync
          example: 3
        failed_count:
          type: integer
          description: The failed count of the sync
          example: 0
        running_count:
          type: integer
          description: The running count of the sync
          example: 0
        pending_count:
          type: integer
          description: The pending count of the sync
          example: 0
        status:
          $ref: '#/components/schemas/JobStatus'
          description: The status of the sync
      required:
        - rootfi_id
        - rootfi_created_at
        - rootfi_updated_at
        - rootfi_company_id
        - start_time
        - end_time
        - integration_type
        - full_sync
        - sync_type
        - config_mode
        - sync_data_models
        - sync_id
        - total_count
        - success_count
        - failed_count
        - running_count
        - pending_count
        - status
    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
    SyncType:
      title: SyncType
      type: string
      enum:
        - MANUAL
        - AUTO_SYNC
    ConfigMode:
      title: ConfigMode
      type: string
      enum:
        - CREATE
        - READ
        - UPDATE
        - DELETE
        - DOWNLOAD
        - CUSTOM
    JobStatus:
      title: JobStatus
      type: string
      enum:
        - CREATED
        - RUNNING
        - SUCCESS
        - FAILED
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key

````