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

# Get a company

> Retrieves a single company by its ID (`clt_` prefix) with its billing address, tags, owner and contacts. Custom field values are returned as top-level `cf_*` keys.



## OpenAPI

````yaml /openapi.v2.json get /companies/{id}
openapi: 3.1.1
info:
  title: Heffl API v2 (Beta)
  version: 2.0.0
  description: >-
    Heffl REST API v2 (beta) — resource-oriented endpoints with consistent
    response envelopes. Endpoints, schemas, and behavior may change until GA.
    See Agent workflows and ID prefixes guides for automation.
  contact:
    name: Heffl Support
    url: https://heffl.com/support
    email: support@heffl.com
servers:
  - url: https://api.heffl.com/api/v2
    description: Production API Server
security:
  - ApiKeyAuth: []
paths:
  /companies/{id}:
    get:
      tags:
        - Objects
      summary: Get a company
      description: >-
        Retrieves a single company by its ID (`clt_` prefix) with its billing
        address, tags, owner and contacts. Custom field values are returned as
        top-level `cf_*` keys.
      operationId: objects.companies.read
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Company ID
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompanyDetails'
        '400':
          description: Validation error or bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ApiError'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ApiError'
        '403':
          description: Insufficient permission
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ApiError'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ApiError'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ApiError'
components:
  schemas:
    CompanyDetails:
      type: object
      properties:
        id:
          type: string
          description: Company ID
        name:
          type: string
          description: Company name
        number:
          type: string
          description: Auto-generated company number
        type:
          anyOf:
            - type: string
              enum:
                - contact
                - company
            - type: 'null'
          description: Record type (always company for this endpoint)
        email:
          anyOf:
            - type: string
            - type: 'null'
          description: Email address
        phone:
          anyOf:
            - type: string
            - type: 'null'
          description: Phone number
        taxNumber:
          anyOf:
            - type: string
            - type: 'null'
          description: Tax number
        website:
          anyOf:
            - type: string
            - type: 'null'
          description: Website URL
        description:
          anyOf:
            - type: string
            - type: 'null'
          description: Description
        industries:
          type: array
          items:
            type: string
          description: Industries
        employeesCountRange:
          anyOf:
            - type: string
              enum:
                - 1-10
                - 11-50
                - 51-200
                - 201-500
                - 501-1K
                - 1K-5K
                - 5K-10K
                - over-10K
            - type: 'null'
          description: Employee count bucket
        revenueRange:
          anyOf:
            - type: string
              enum:
                - under-1m
                - 1m-10m
                - 10m-50m
                - 50m-100m
                - 100m-200m
                - 200m-1b
                - over-1b
            - type: 'null'
          description: Annual revenue bucket
        foundedYear:
          anyOf:
            - type: integer
            - type: 'null'
          description: Year the company was founded
        linkedin:
          anyOf:
            - type: string
            - type: 'null'
          description: LinkedIn URL
        twitter:
          anyOf:
            - type: string
            - type: 'null'
          description: X / Twitter URL
        facebook:
          anyOf:
            - type: string
            - type: 'null'
          description: Facebook URL
        instagram:
          anyOf:
            - type: string
            - type: 'null'
          description: Instagram URL
        stageId:
          anyOf:
            - type: string
            - type: 'null'
          description: Client stage ID
        stageName:
          anyOf:
            - type: string
            - type: 'null'
          description: Client stage label
        ownerUserId:
          anyOf:
            - type: string
            - type: 'null'
          description: Owner user ID
        sourceId:
          anyOf:
            - type: string
            - type: 'null'
          description: CRM source ID
        sourceName:
          anyOf:
            - type: string
            - type: 'null'
          description: CRM source name
        currency:
          anyOf:
            - type: string
            - type: 'null'
          description: Currency code
        taxTreatment:
          anyOf:
            - type: string
              enum:
                - vat_registered
                - vat_not_registered
                - gcc_vat_registered
                - gcc_vat_not_registered
                - non_gcc
                - dz_vat_registered
                - dz_vat_not_registered
            - type: 'null'
          description: VAT treatment (GCC)
        openingBalance:
          type: number
          description: Opening balance
        showJobAmountToWorker:
          type: boolean
          description: Whether job amounts are visible to field workers
        isClientPortalEnabled:
          type: boolean
          description: Whether the client portal is enabled
        profileImage:
          anyOf:
            - type: string
            - type: 'null'
          description: Profile image URL
        createdAt:
          type: string
          format: date-time
          description: When the company was created
        updatedAt:
          type: string
          format: date-time
          description: When the company was last updated
        lastActivityAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          description: When the last activity was logged
        lastContactedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          description: When the company was last contacted
        enrichedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          description: When the company was last enriched
        paymentTerm:
          anyOf:
            - type: string
              enum:
                - DUE_ON_RECEIPT
                - NET_7
                - NET_15
                - NET_30
                - NET_45
                - NET_60
                - END_OF_MONTH
                - END_OF_NEXT_MONTH
                - CUSTOM
            - type: 'null'
          description: Default invoice payment term. Null falls back to the team default.
        ownerName:
          anyOf:
            - type: string
            - type: 'null'
          description: Owner's full name
        tags:
          type: array
          description: Tags on the company
          items:
            type: object
            properties:
              id:
                type: string
                description: Tag ID (tag_ prefix)
              name:
                type: string
                description: Tag name
            required:
              - id
              - name
        billingAddress:
          anyOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
          description: Billing address
        contacts:
          type: array
          description: Contacts under this company, primary first
          items:
            type: object
            properties:
              id:
                type: string
                description: Contact ID (clt_ prefix)
              firstName:
                anyOf:
                  - type: string
                  - type: 'null'
                description: First name
              lastName:
                anyOf:
                  - type: string
                  - type: 'null'
                description: Last name
              email:
                anyOf:
                  - type: string
                  - type: 'null'
                description: Email address
              phone:
                anyOf:
                  - type: string
                  - type: 'null'
                description: Phone number
              jobTitle:
                anyOf:
                  - type: string
                  - type: 'null'
                description: Job title
              isPrimary:
                type: boolean
                description: Whether this is the primary contact
            required:
              - id
              - firstName
              - lastName
              - email
              - phone
              - jobTitle
              - isPrimary
      required:
        - id
        - name
        - number
        - openingBalance
        - showJobAmountToWorker
        - isClientPortalEnabled
        - paymentTerm
        - ownerName
        - tags
        - billingAddress
        - contacts
      additionalProperties:
        description: >-
          Custom field values as top-level cf_* keys (for example cf_industry).
          There is no customFields wrapper.
      description: >-
        A company with its billing address, tags, owner and contacts. Returned
        by get, create and update.
    V2ApiError:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: object
    Address:
      type: object
      properties:
        address:
          anyOf:
            - type: string
            - type: 'null'
          description: Street address
        city:
          anyOf:
            - type: string
            - type: 'null'
          description: City
        landmark:
          anyOf:
            - type: string
            - type: 'null'
          description: Nearby landmark
        postalCode:
          anyOf:
            - type: string
            - type: 'null'
          description: Postal code or ZIP code
        state:
          anyOf:
            - type: string
            - type: 'null'
          description: State name
        stateCode:
          anyOf:
            - type: string
            - type: 'null'
          description: State code
        country:
          anyOf:
            - type: string
            - type: 'null'
          description: Country name
        countryCode:
          anyOf:
            - type: string
            - type: 'null'
          description: Country ISO2 code
        latitude:
          anyOf:
            - type: number
            - type: 'null'
          description: Latitude in decimal degrees
        longitude:
          anyOf:
            - type: number
            - type: 'null'
          description: Longitude in decimal degrees
        googleMapsLink:
          anyOf:
            - type: string
            - type: 'null'
          description: Google Maps link
        googleMapsPlaceId:
          anyOf:
            - type: string
            - type: 'null'
          description: Google Maps place ID
      required:
        - address
        - city
        - landmark
        - postalCode
        - state
        - stateCode
        - country
        - countryCode
        - latitude
        - longitude
        - googleMapsLink
        - googleMapsPlaceId
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. Get yours at
        app.heffl.com/settings/developers

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.