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

# List companies



## OpenAPI

````yaml /openapi.yaml get /contacts/companies
openapi: 3.0.1
info:
  title: GetSpecs REST API
  description: REST API documentation for GetSpecs.
  version: 1.0.0
servers:
  - url: /v1
  - url: https://demo-api.getspecs.io/v1
security: []
paths:
  /contacts/companies:
    get:
      tags:
        - ContactsCompany
      summary: List companies
      operationId: contacts_companies#index
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
        - name: per_page
          in: query
          required: false
          schema:
            type: integer
        - name: filter[name]
          in: query
          required: false
          schema:
            type: string
        - name: filter[tags][]
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/contacts_company'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
        - apiKey: []
          workspaceId: []
components:
  schemas:
    contacts_company:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        website:
          type: string
          nullable: true
        currency:
          type: string
          nullable: true
          description: >-
            3-letter ISO 4217 code; the default currency of the company's
            purchase orders.
          example: EUR
        position:
          type: integer
        tags:
          type: array
          items:
            type: string
        payment_term_ids:
          type: array
          items:
            type: integer
          description: >-
            The company's own payment terms in schedule order (copied onto its
            purchase orders); empty = the workspace default terms apply.
        addresses_count:
          type: integer
          description: >-
            How many addresses the company has. A client can offer to pick
            between them only when this is above one.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        primary_person:
          type: object
          nullable: true
          properties:
            id:
              type: integer
            first_name:
              type: string
              nullable: true
            last_name:
              type: string
              nullable: true
            email:
              type: string
            phone:
              type: string
              nullable: true
        primary_address:
          type: object
          nullable: true
          properties:
            id:
              type: integer
            street:
              type: string
              nullable: true
            city:
              type: string
              nullable: true
            state:
              type: string
              nullable: true
            postal_code:
              type: string
              nullable: true
            country:
              type: string
              nullable: true
    error:
      type: object
      properties:
        error:
          type: string
        errors:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
                nullable: true
              code:
                type: string
                nullable: true
              message:
                type: string
            required:
              - message
  securitySchemes:
    apiKey:
      type: apiKey
      name: authorization
      in: header
    workspaceId:
      type: apiKey
      name: X-Workspace-ID
      in: header

````

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