Puzzle Company API

The Company API from Puzzle — 10 operation(s) for company.

OpenAPI Specification

puzzle-company-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Puzzle Api Accounts Company API
  description: Puzzle Api
  version: '0'
servers:
- url: https://staging.southparkdata.com/rest/v0
tags:
- name: Company
paths:
  /company:
    post:
      operationId: createCompanyApi
      summary: Initiate Creating a Company
      description: Call this endpoint to pass some company information that is usually asked for during Puzzle's onboarding flow. A URL will be returned. When you redirect your user to this URL, the company information that was passed the original request will be prefilled for them in Puzzle's UI, allowing them to skip a few steps and create their Puzzle account more quickly.
      tags:
      - Company
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                user:
                  type: object
                  properties:
                    email:
                      type: string
                      minLength: 1
                    firstName:
                      type: string
                      minLength: 1
                    lastName:
                      type: string
                      minLength: 1
                  required:
                  - email
                  - firstName
                  - lastName
                company:
                  type: object
                  properties:
                    name:
                      type: string
                      minLength: 1
                    type:
                      type: string
                      enum:
                      - SAAS
                      - ECOMMERCE
                      - MARKETPLACE
                      - ADVERTISING
                      - SERVICES
                      - ENTERPRISE
                      - FINTECH
                      - FINTECH_CRYPTO
                      - VIRTUAL_GOODS
                      - CONSUMER
                      - NOT_SURE
                      - OTHER
                      - AGRICULTURE_AND_FARMING
                      - CONSTRUCTION
                      - HEALTHCARE
                      - HOME_SERVICES
                      - LEGAL
                      - MANUFACTURING
                      - MEDIA_AND_ENTERTAINMENT
                      - PROFESSIONAL_SERVICES
                      - RETAIL
                      - REAL_ESTATE
                      - RESTAURANT
                      - TRANSPORTATION
                      - WHOLESALE_TRADE
                      description: The value is normalized before matching, so any casing that maps onto a listed value is accepted.
                    revenueModel:
                      type: string
                      enum:
                      - AnnualSubscription
                      - MonthlySubscription
                      - MultipleRevenueModels
                      - NotSure
                      - PreRevenue
                      - ServiceBased
                      - TransactionBased
                      - UsageBased
                      - Subscription
                      - AddOns
                      - TransactionBasedPhysical
                      - TransactionBasedOther
                      - Contracts
                      - HourlyBilling
                      - Marketplace
                      - Commission
                    timeZone:
                      type: string
                      minLength: 1
                    currentUserRole:
                      type: string
                      enum:
                      - Founder
                      - CompanyEmployee
                      - OutsourcedAccountantOrCFO
                    coaType:
                      type: string
                      enum:
                      - saas
                      - ecommerce
                      - fondo
                      - every
                      - decimal
                      - custom
                    orgType:
                      type: string
                      enum:
                      - CCorporation
                      - LLC
                      - Partnership
                      - SCorporation
                      - SoleProprietorship
                    hasHistoricalData:
                      type: boolean
                    isFreshStart:
                      type: boolean
                    phoneNumber:
                      type: string
                    website:
                      type: string
                  required:
                  - name
                  - type
                  - revenueModel
                  - timeZone
                  - currentUserRole
                  - orgType
                integration:
                  type: object
                  properties:
                    nativeCompanyId:
                      type: string
                      minLength: 1
                    authForwardToken:
                      type: string
                    createPushIntegrationConnection:
                      type: boolean
                  required:
                  - nativeCompanyId
              required:
              - user
              - company
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  userId:
                    type: string
                    minLength: 1
                    description: Partner-facing external identifier
                  companyId:
                    type: string
                    minLength: 1
                    description: Partner-facing external identifier
                  setPasswordUrl:
                    type: string
                    nullable: true
                required:
                - userId
                - companyId
                - setPasswordUrl
  /companies:
    get:
      operationId: companiesApi
      summary: Get companies
      description: 'Returns a list of companies the calling user has access to.


        Required scope: read:company'
      tags:
      - Company
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  companies:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                        name:
                          type: string
                        connectedAt:
                          type: string
                          minLength: 1
                          description: ISO 8601 timestamp
                        status:
                          type: string
                          enum:
                          - Ready
                          - Syncing
                          - NoData
                        financialYearStartDate:
                          type: string
                        reportingCurrency:
                          type: string
                          minLength: 3
                          maxLength: 3
                          description: ISO 4217 currency code
                      required:
                      - id
                      - name
                      - connectedAt
                      - status
                      - financialYearStartDate
                      - reportingCurrency
                required:
                - companies
  /company/{id}:
    get:
      operationId: company
      summary: Get Company
      tags:
      - Company
      parameters:
      - name: id
        in: path
        required: true
        description: The company ID
        schema:
          type: string
          minLength: 1
          description: Partner-facing external identifier
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    description: Partner-facing external identifier
                  name:
                    type: string
                  institutionConnections:
                    type: array
                    items:
                      type: object
                      properties:
                        institution:
                          type: object
                          properties:
                            name:
                              type: string
                          required:
                          - name
                        status:
                          type: string
                          enum:
                          - OK
                          - TemporaryOutage
                          - Disconnected
                        accounts:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                                description: Partner-facing external identifier
                              nativeId:
                                type: string
                                nullable: true
                              type:
                                type: string
                                enum:
                                - Investment
                                - Invoice
                                - Credit
                                - Depository
                                - Loan
                                - Other
                                - PaymentProcessing
                                - Payroll
                                - Fintech
                                - Sweep
                              name:
                                type: string
                              mask:
                                type: string
                                nullable: true
                              currentBalance:
                                type: object
                                properties:
                                  amount:
                                    type: string
                                    minLength: 1
                                    description: Arbitrary-precision decimal, serialized as a string
                                  currency:
                                    type: string
                                    minLength: 3
                                    maxLength: 3
                                    description: ISO 4217 currency code
                                required:
                                - amount
                                - currency
                                description: A monetary amount with its currency
                              status:
                                type: string
                                enum:
                                - Syncing
                                - Ready
                              ingestStatus:
                                type: string
                                enum:
                                - Syncing
                                - Ready
                              connectionStatus:
                                type: string
                                enum:
                                - OK
                                - TemporaryOutage
                                - Disconnected
                              lastUpdatedAt:
                                type: string
                                minLength: 1
                                description: ISO 8601 timestamp
                                nullable: true
                            required:
                            - id
                            - nativeId
                            - type
                            - name
                            - mask
                            - currentBalance
                            - status
                            - ingestStatus
                            - connectionStatus
                            - lastUpdatedAt
                        lastSyncedAt:
                          type: string
                          minLength: 1
                          description: ISO 8601 timestamp
                          nullable: true
                        createdAt:
                          type: string
                          minLength: 1
                          description: ISO 8601 timestamp
                        updatedAt:
                          type: string
                          minLength: 1
                          description: ISO 8601 timestamp
                        fdicCoverage:
                          type: object
                          properties:
                            status:
                              type: string
                              enum:
                              - AtRisk
                              - Review
                              - Covered
                            depositoryTotal:
                              type: object
                              properties:
                                amount:
                                  type: string
                                  minLength: 1
                                  description: Arbitrary-precision decimal, serialized as a string
                                currency:
                                  type: string
                                  minLength: 3
                                  maxLength: 3
                                  description: ISO 4217 currency code
                              required:
                              - amount
                              - currency
                              description: A monetary amount with its currency
                            estimatedInsuranceCoverage:
                              type: object
                              properties:
                                amount:
                                  type: string
                                  minLength: 1
                                  description: Arbitrary-precision decimal, serialized as a string
                                currency:
                                  type: string
                                  minLength: 3
                                  maxLength: 3
                                  description: ISO 4217 currency code
                              required:
                              - amount
                              - currency
                              description: A monetary amount with its currency
                          required:
                          - status
                          - depositoryTotal
                          - estimatedInsuranceCoverage
                          nullable: true
                      required:
                      - institution
                      - status
                      - accounts
                      - lastSyncedAt
                      - createdAt
                      - updatedAt
                      - fdicCoverage
                  status:
                    type: string
                    enum:
                    - Ready
                    - Syncing
                    - NoData
                  financialSummary:
                    type: object
                    properties:
                      status:
                        type: string
                        enum:
                        - InProgress
                        - Failed
                        - Ready
                      metrics:
                        type: object
                        properties:
                          annualAvgFullyLoadedSalaryCostPerEmployee:
                            type: object
                            properties:
                              amount:
                                type: string
                                minLength: 1
                                description: Arbitrary-precision decimal, serialized as a string
                              currency:
                                type: string
                                minLength: 3
                                maxLength: 3
                                description: ISO 4217 currency code
                            required:
                            - amount
                            - currency
                            description: A monetary amount with its currency
                          annualAvgSalaryCostPerEmployee:
                            type: object
                            properties:
                              amount:
                                type: string
                                minLength: 1
                                description: Arbitrary-precision decimal, serialized as a string
                              currency:
                                type: string
                                minLength: 3
                                maxLength: 3
                                description: ISO 4217 currency code
                            required:
                            - amount
                            - currency
                            description: A monetary amount with its currency
                          lastMonthAvgFullyLoadedSalaryCostPerEmployee:
                            type: object
                            properties:
                              amount:
                                type: string
                                minLength: 1
                                description: Arbitrary-precision decimal, serialized as a string
                              currency:
                                type: string
                                minLength: 3
                                maxLength: 3
                                description: ISO 4217 currency code
                            required:
                            - amount
                            - currency
                            description: A monetary amount with its currency
                          lastMonthAvgSalaryCostPerEmployee:
                            type: object
                            properties:
                              amount:
                                type: string
                                minLength: 1
                                description: Arbitrary-precision decimal, serialized as a string
                              currency:
                                type: string
                                minLength: 3
                                maxLength: 3
                                description: ISO 4217 currency code
                            required:
                            - amount
                            - currency
                            description: A monetary amount with its currency
                          totalCash:
                            type: object
                            properties:
                              amount:
                                type: string
                                minLength: 1
                                description: Arbitrary-precision decimal, serialized as a string
                              currency:
                                type: string
                                minLength: 3
                                maxLength: 3
                                description: ISO 4217 currency code
                            required:
                            - amount
                            - currency
                            description: A monetary amount with its currency
                          runway:
                            type: integer
                            nullable: true
                          fundraiseDate:
                            type: string
                            minLength: 1
                            description: Calendar date, YYYY-MM-DD
                            nullable: true
                          cashOutDate:
                            type: string
                            minLength: 1
                            description: Calendar date, YYYY-MM-DD
                            nullable: true
                          lastMonthOperatingBurn:
                            type: object
                            properties:
                              amount:
                                type: string
                                minLength: 1
                                description: Arbitrary-precision decimal, serialized as a string
                              currency:
                                type: string
                                minLength: 3
                                maxLength: 3
                                description: ISO 4217 currency code
                            required:
                            - amount
                            - currency
                            description: A monetary amount with its currency
                          lastMonthTotalBurn:
                            type: object
                            properties:
                              amount:
                                type: string
                                minLength: 1
                                description: Arbitrary-precision decimal, serialized as a string
                              currency:
                                type: string
                                minLength: 3
                                maxLength: 3
                                description: ISO 4217 currency code
                            required:
                            - amount
                            - currency
                            description: A monetary amount with its currency
                          lastMonthBankBurn:
                            type: object
                            properties:
                              amount:
                                type: string
                                minLength: 1
                                description: Arbitrary-precision decimal, serialized as a string
                              currency:
                                type: string
                                minLength: 3
                                maxLength: 3
                                description: ISO 4217 currency code
                            required:
                            - amount
                            - currency
                            description: A monetary amount with its currency
                        required:
                        - annualAvgFullyLoadedSalaryCostPerEmployee
                        - annualAvgSalaryCostPerEmployee
                        - lastMonthAvgFullyLoadedSalaryCostPerEmployee
                        - lastMonthAvgSalaryCostPerEmployee
                        - totalCash
                        - runway
                        - fundraiseDate
                        - cashOutDate
                        - lastMonthOperatingBurn
                        - lastMonthTotalBurn
                        - lastMonthBankBurn
                        nullable: true
                      updatedAt:
                        type: string
                        minLength: 1
                        description: ISO 8601 timestamp
                        nullable: true
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            message:
                              type: string
                          required:
                          - message
                    required:
                    - status
                    - metrics
                    - updatedAt
                    - errors
                    nullable: true
                  metadata:
                    type: object
                    properties:
                      dataCompletenessLevel:
                        type: string
                        enum:
                        - Complete
                        - High
                        - Medium
                        - Low
                      categorization:
                        type: object
                        properties:
                          percentDollarVolumeCategorized:
                            type: number
                        required:
                        - percentDollarVolumeCategorized
                    required:
                    - dataCompletenessLevel
                    - categorization
                    nullable: true
                required:
                - id
                - name
                - institutionConnections
                - status
                - financialSummary
                - metadata
  /company/{id}/integrationConnection:
    post:
      operationId: createIntegrationConnection
      summary: Create Integration Connection
      description: 'Creates an integration connection for the company that you can use to push data into Puzzle.


        Required scope: write:integration_connection'
      tags:
      - Company
      parameters:
      - name: id
        in: path
        required: true
        description: The company ID
        schema:
          type: string
          minLength: 1
          description: Partner-facing external identifier
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                - message
  /company/{id}/disconnect:
    post:
      operationId: disconnect
      summary: Disconnect Company
      tags:
      - Company
      parameters:
      - name: id
        in: path
        required: true
        description: The company ID
        schema:
          type: string
          minLength: 1
          description: Partner-facing external identifier
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  disconnect:
                    type: boolean
                required:
                - disconnect
  /company/{id}/chartOfAccounts:
    get:
      operationId: chartOfAccounts
      summary: Get Chart of Accounts
      description: 'Retrieves the company''s chart of accounts (COA), which defines the financial statement categories used for accounting purposes.


        By default, all accounts are returned and the balances are calculated using cash basis.


        Required scope: read:company'
      tags:
      - Company
      parameters:
      - name: id
        in: path
        required: true
        description: The company ID
        schema:
          type: string
          minLength: 1
          description: Partner-facing external identifier
      - name: basis
        in: query
        required: false
        schema:
          type: string
          enum:
          - cash
          - accrual
      - name: startDate
        in: query
        required: false
        schema:
          type: string
          minLength: 1
      - name: effectiveDate
        in: query
        required: false
        schema:
          type: string
          minLength: 1
          description: Calendar date, YYYY-MM-DD
      - name: nominalCode
        in: query
        required: false
        schema:
          type: string
      - name: getRestricted
        in: query
        required: false
        schema:
          type: string
          description: Boolean flag; "true" enables, any other value disables
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  accounts:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                        name:
                          type: string
                        coaKeys:
                          type: array
                          items:
                            type: string
                            minLength: 1
                            description: Chart-of-accounts key
                        restrictedCoaKeys:
                          type: array
                          items:
                            type: string
                            minLength: 1
                            description: Chart-of-accounts key
                        nominalCode:
                          type: string
                        description:
                          type: string
                          nullable: true
                        keywords:
                          type: array
                          items:
                            type: string
                        type:
                          type: string
                        tags:
                          type: array
                          items:
                            type: string
                        category:
                          type: string
                        subCategory:
                          type: string
                          nullable: true
                        tertiaryCategory:
                          type: string
                          nullable: true
                        parentCode:
                          type: string
                          nullable: true
                        currentBalance:
                          type: object
                          properties:
                            amount:
                              type: string
                              minLength: 1
                              description: Arbitrary-precision decimal, serialized as a string
                            currency:
                              type: string
                              minLength: 3
                              maxLength: 3
                              description: ISO 4217 currency code
                          required:
                          - amount
                          - currency
                          description: A monetary amount with its currency
                        currentBalanceWithoutSubAccounts:
                          type: object
                          properties:
                            amount:
                              type: string
                              minLength: 1
                              description: Arbitrary-precision decimal, serialized as a string
                            currency:
                              type: string
                              minLength: 3
                              maxLength: 3
                              description: ISO 4217 currency code
                          required:
                          - amount
                          - currency
                          description: A monetary amount with its currency
                        isBankAccount:
                          type: boolean
                        accountId:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                          nullable: true
                        views:
                          type: array
                          items:
                            type: string
                        currentness:
                          type: string
                          nullable: true
                      required:
                      - id
                      - name
                      - coaKeys
                      - restrictedCoaKeys
             

# --- truncated at 32 KB (45 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/puzzle/refs/heads/main/openapi/puzzle-company-api-openapi.yml