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

# Export Invoice to Xero/QB/FB

> Export an invoice to a connected external accounting system.

Supports Xero, QuickBooks, and FreshBooks integrations — the destination must be linked to the team beforehand. An invoice can only be exported once; subsequent calls return an error.



## OpenAPI

````yaml /openapi.json post /invoices/{invoice_id}/export
openapi: 3.1.1
info:
  title: Everhour API
  version: 1.0.0
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
servers:
  - url: https://api.everhour.com
security:
  - ApiKeyAuth: []
tags:
  - name: Clients
  - name: Custom Fields
  - name: Expenses
  - name: Invoices
  - name: Projects
  - name: Reports
  - name: Schedule
  - name: Tasks
  - name: Time Off
  - name: Time Records
  - name: Timecards
  - name: Timers
  - name: Timesheets
  - name: Users
  - name: Webhooks
paths:
  /invoices/{invoice_id}/export:
    post:
      tags:
        - Invoices
      summary: Export Invoice to Xero/QB/FB
      description: >-
        Export an invoice to a connected external accounting system.


        Supports Xero, QuickBooks, and FreshBooks integrations — the destination
        must be linked to the team beforehand. An invoice can only be exported
        once; subsequent calls return an error.
      operationId: exportInvoiceToXeroQbFb
      parameters:
        - name: invoice_id
          in: path
          required: true
          description: Invoice ID
          schema:
            type: number
            example: 11903
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
        '401':
          description: Unauthorized
components:
  schemas:
    Invoice:
      type: object
      properties:
        id:
          type: number
          description: Invoice ID
          example: 2660155
        client:
          $ref: '#/components/schemas/Client'
        createdAt:
          type: string
          example: '2018-01-16 12:42:59'
        createdBy:
          $ref: '#/components/schemas/User'
        dateFrom:
          type: string
        dateTill:
          type: string
        dueDate:
          type: string
        discount:
          type: object
          properties:
            amount:
              type: number
              example: 4581
            rate:
              type: number
              example: 25
        expenseMask:
          type: string
          example: '%PROJECT% :: %CATEGORY%'
        includeExpenses:
          type: boolean
          example: true
        includeTime:
          type: boolean
          example: true
        invoiceItems:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceItem'
        issueDate:
          type: string
          example: '2019-03-22'
        limitDateFrom:
          type: string
        limitDateTill:
          type: string
        listAmount:
          type: number
          description: List amount in cents (without discount and taxes)
          example: 18325
        netAmount:
          type: number
          description: Net amount in cents (without taxes but with discount applied)
          example: 13744
        projects:
          type: array
          items:
            type: string
          example:
            - gh:63301595
        publicId:
          type: string
          example: '1020'
        status:
          type: string
          enum:
            - draft
            - sent
            - paid
            - deleted
            - partial
          example: draft
        tax:
          type: object
          properties:
            id:
              type: integer
              description: >-
                Tax ID from a connected accounting integration (external
                invoices).
            rate:
              type: number
              example: 11
            amount:
              type: number
              example: 1512
        timeMask:
          type: string
          example: '%PROJECT%'
        totalAmount:
          type: number
          description: Total invoice amount in cents (with discount and taxes applied)
          example: 15256
        totalTime:
          type: number
          description: Total invoice time in seconds
          example: 43980
        valid:
          type: boolean
          example: true
      required:
        - id
        - client
        - createdAt
        - createdBy
        - status
    Client:
      type: object
      properties:
        id:
          type: number
          example: 4567
        name:
          type: string
          example: Client Name
        projects:
          type: array
          description: List of projects ID
          items:
            type: string
          example:
            - ev:1234567890
        businessDetails:
          type:
            - string
            - 'null'
        budget:
          $ref: '#/components/schemas/ClientBudget'
      required:
        - id
        - name
        - projects
    User:
      type: object
      description: >-
        A team member. `GET /team/users` and `GET /users/me` return the full
        object; `user` objects nested in other resources may contain a subset of
        these fields.
      properties:
        id:
          type: number
          example: 1304
        email:
          type: string
          example: john.bender@example.com
        name:
          type: string
          example: John Bender
        headline:
          type:
            - string
            - 'null'
          description: Job title. Empty string when not set.
          example: CEO
        phone:
          type: string
          description: Omitted when not set.
          example: +1 555 0100
        externalId:
          type: string
          description: >-
            Employee ID from your own system, set on the member profile. Omitted
            when not set.
          example: M-3490
        avatarUrl:
          type:
            - string
            - 'null'
          description: Omitted when the member has no avatar.
          example: https://d36887svjhykt4.cloudfront.net/users/1304-15ea197d07ca81.jpg
        avatarUrlLarge:
          type:
            - string
            - 'null'
          description: Omitted when the member has no avatar.
          example: https://d36887svjhykt4.cloudfront.net/users/1304-15ea197d10830c.jpg
        role:
          type: string
          enum:
            - admin
            - supervisor
            - member
            - member_limited
          example: admin
        status:
          type: string
          enum:
            - active
            - invited
            - pending
            - removed
          example: active
        type:
          type: string
          enum:
            - employee
            - contractor
          example: employee
        createdAt:
          type: string
          description: 'Format: Y-m-d H:i:s'
          example: '2016-08-13 15:27:30'
        isEmailVerified:
          type: boolean
          example: true
        capacity:
          type:
            - integer
            - 'null'
          description: Weekly capacity in seconds.
          example: 144000
        cost:
          type: integer
          description: >-
            Hourly cost in cents. Returns `0` when you lack the `costs`
            permission.
          example: 2500
        costHistory:
          type:
            - array
            - 'null'
          description: >-
            Past hourly cost values. `null` when the member has no cost history
            or you lack the `costs` permission.
          example: null
        groups:
          type: array
          description: >-
            Groups the member belongs to. Empty array when the member is in no
            group.
          items:
            $ref: '#/components/schemas/UserGroup'
        permissions:
          $ref: '#/components/schemas/UserPermissions'
        timeTrackingPolicy:
          $ref: '#/components/schemas/TimeTrackingPolicy'
        resourcePlannerAccess:
          $ref: '#/components/schemas/ResourcePlannerAccess'
        favorite:
          type: boolean
          description: Whether you marked this member as a favorite.
          example: false
      required:
        - id
        - email
        - name
        - role
        - status
        - type
        - createdAt
        - isEmailVerified
        - groups
        - permissions
        - timeTrackingPolicy
        - favorite
    InvoiceItem:
      type: object
      properties:
        billedTime:
          type: number
          description: Time in seconds
          example: 415860
        createdAt:
          type: string
          example: '2017-02-22 16:11:33'
        custom:
          type: boolean
          example: false
        id:
          type: number
          example: 52
        listAmount:
          type: number
          description: Amount in cents
          example: 288793
        name:
          type: string
          example: Software Development
        netAmount:
          type: number
          description: Amount in cents
          example: 288793
        position:
          type: number
          example: 1
        taxable:
          type: number
          example: 1
        totalAmount:
          type: number
          example: 288793
    ClientBudget:
      type: object
      properties:
        type:
          type: string
          description: Budget Type
          enum:
            - money
            - time
            - costs
          example: money
        budget:
          type: number
          description: Budget value in cents (for money) or seconds (for time)
          example: 100000
        period:
          type: string
          description: Budget periodicity (overall, monthly, weekly, daily)
          enum:
            - general
            - monthly
            - weekly
            - daily
            - quarterly
            - yearly
          example: general
        appliedFrom:
          type:
            - string
            - 'null'
          description: Start budget from (available only for non-recurrent budgets)
        disallowOverbudget:
          type: boolean
        excludeUnbillableTime:
          type: boolean
        excludeExpenses:
          type: boolean
        threshold:
          type: number
          description: >-
            Email admins when threshold reached. Threshold is percentage 1 -
            100.
        progress:
          type: number
          description: Current budget usage in cents (for money) or seconds (for time)
          readOnly: true
          example: 0
      required:
        - type
        - budget
        - period
    UserGroup:
      type: object
      description: A group the user belongs to.
      properties:
        id:
          type: number
          example: 1
        name:
          type: string
          example: Admins
      required:
        - id
        - name
    UserPermissions:
      type: object
      description: >-
        Areas the user can access beyond the base role. A key is present only
        when the user has access to that area. Users with no elevated access
        return an empty array (`[]`) instead of an object — treat both as "no
        permissions".
      properties:
        billingBudgets:
          type: string
          enum:
            - read
            - write
          example: write
        userLimits:
          type: string
          enum:
            - read
            - write
          example: write
        costs:
          type: string
          enum:
            - read
            - write
          example: write
        invoices:
          type: string
          enum:
            - read
            - write
          example: write
        expenses:
          type: string
          enum:
            - read
            - write
          example: write
    TimeTrackingPolicy:
      type: object
      description: >-
        Time tracking rules that apply to the user. Team defaults unless the
        team overrides them for this member.
      properties:
        allowTimeWithoutTask:
          type: boolean
          example: true
        allowManualTimeInput:
          type: boolean
          example: true
        allowFutureTime:
          type: boolean
          example: false
        allowCompletedTaskTime:
          type: boolean
          example: true
        allowTimeWithoutEstimate:
          type: boolean
          example: true
        allowExceedEstimate:
          type: boolean
          example: false
        allowManageEstimates:
          type: boolean
          example: true
        lockTimeAfter:
          type: integer
          description: >-
            Number of `lockTimePeriod` units after which time entries lock.
            Present only when the team locks time for this member.
          example: 2
        lockTimePeriod:
          type: string
          description: >-
            Unit used by `lockTimeAfter`. Present only when the team locks time
            for this member.
          example: days
    ResourcePlannerAccess:
      type: object
      description: Resource planner access flags. Returned for the authenticated user.
      properties:
        viewMine:
          type: boolean
          example: false
        editMine:
          type: boolean
          example: false
        viewAll:
          type: boolean
          example: false
        editAll:
          type: boolean
          example: false
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````

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