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

# Get Company

> Retrieve a single company from the database.



## OpenAPI

````yaml GET /core/companies/{company_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/companies/{company_id}:
    get:
      tags:
        - CoreCompanies
      summary: Get Company
      description: Retrieve a single company from the database.
      operationId: core_companies_get
      parameters:
        - name: company_id
          in: path
          description: The ID of the company to retrieve
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/coregetCompanyObject'
        '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:
    coregetCompanyObject:
      title: coregetCompanyObject
      type: object
      description: The data of the company endpoint
      properties:
        data:
          $ref: '#/components/schemas/coreCompanyData'
          description: The data of the company endpoint
      required:
        - data
    RootFiAPIResponseType:
      title: RootFiAPIResponseType
      type: object
      properties:
        error:
          $ref: '#/components/schemas/RootFiAPIResponseErrorType'
          description: The error message
      required:
        - error
    coreCompanyData:
      title: coreCompanyData
      type: object
      description: The data of the company endpoint
      properties:
        name:
          type: string
          description: Name of the company
          example: Rootfi
        partner_id:
          type: string
          nullable: true
          description: Unique identifier in your system.
        invite_link:
          $ref: '#/components/schemas/coreCompanyInviteLinkData'
          nullable: true
          description: ID of the invite link in the platform database
        connections:
          type: array
          items:
            $ref: '#/components/schemas/coreConnectionsData'
          nullable: true
          description: Connection details of the company
        activity_log:
          type: array
          items:
            $ref: '#/components/schemas/coreActivityLogData'
          nullable: true
          description: Activity log of the company
      required:
        - name
      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
    coreCompanyInviteLinkData:
      title: coreCompanyInviteLinkData
      type: object
      properties:
        invite_link_id:
          type: string
          description: ID of the invite link in the platform database
          example: '1'
        integrations:
          type: array
          items:
            $ref: '#/components/schemas/IntegrationType'
          description: The integration type of the invite link
        integration_categories:
          type: array
          items:
            $ref: '#/components/schemas/IntegrationCategory'
          description: The integration category of the invite link
      required:
        - invite_link_id
        - integrations
        - integration_categories
      allOf:
        - $ref: '#/components/schemas/RootfiFields'
    coreConnectionsData:
      title: coreConnectionsData
      type: object
      properties:
        integration_type:
          $ref: '#/components/schemas/IntegrationType'
          description: The integration type of the connection
        category:
          $ref: '#/components/schemas/IntegrationCategory'
          description: The integration category of the connection
        connection_status:
          $ref: '#/components/schemas/ConnectionStatus'
          description: The status of the connection
        sync_status:
          $ref: '#/components/schemas/SyncStatus'
          description: The status of the sync
        sync_resume_at:
          type: string
          format: date-time
          nullable: true
          description: The date and time the sync will resume
        last_synced:
          type: string
          format: date-time
          nullable: true
          description: The date and time the connection was last synced
        rate_limits:
          $ref: '#/components/schemas/RateLimitData'
          description: The rate limits of the connection
        tally_last_active_at:
          type: string
          format: date-time
          nullable: true
          description: The date and time the Tally connection was last active
        zoho_sub_calls_enabled:
          type: boolean
          description: The status to indicate if zoho sub calls should be enabled
          example: false
        sync_config:
          $ref: '#/components/schemas/SyncConfigData'
          nullable: true
          description: The sync configuration of the connection
      required:
        - integration_type
        - category
        - connection_status
        - sync_status
        - rate_limits
        - zoho_sub_calls_enabled
      allOf:
        - $ref: '#/components/schemas/RootfiFields'
    coreActivityLogData:
      title: coreActivityLogData
      type: object
      properties:
        activity_type:
          $ref: '#/components/schemas/ActivityType'
          description: The type of activity
      required:
        - activity_type
      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
    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
    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
    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
    ActivityType:
      title: ActivityType
      type: string
      enum:
        - ORG_CREATED
        - USER_CREATED
        - INVITE_LINK_CREATED
        - COMPANY_CREATED
        - CONNECTION_CREATED
        - CONNECTION_EXPIRED
        - CONNECTION_DISCONNECTED
        - USER_DELETED
        - COMPANY_DELETED
        - CONNECTION_DELETED
    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
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key

````