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

# Create a new export job



## OpenAPI

````yaml post /v1/export-jobs
openapi: 3.0.1
info:
  title: Export API
  description: >
    This API enables you to perform the following:

    - Retrieve a list of accounting entries that have been exported to the
    external ERP/accounting system.

    - Create a new export job event.

    - Retrieve a list of existing export jobs and create a new one.

    - Retrieve details of an export job.

    - Retrieve a list of export job items and update their information.
  termsOfService: https://pleo.io/terms/
  contact:
    email: apiteam@pleo.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: 32.4.0
servers:
  - url: https://external.pleo.io
    description: Production server
  - url: https://external.staging.pleo.io
    description: Staging server
security:
  - bearerAuth: []
  - basicAuth: []
tags:
  - name: health
  - name: export-items
  - name: export-jobs
  - name: admin
  - name: export-job-items
  - name: Export API (v2)
  - name: Export Items (v2)
  - name: Export API (v3)
  - name: Export Items (v3)
paths:
  /v1/export-jobs:
    post:
      tags:
        - Export API (v1)
      summary: Create a new export job
      operationId: createExportJobV1
      requestBody:
        content:
          application/json;charset=UTF-8:
            schema:
              $ref: '#/components/schemas/CreateExportJob'
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/DataResponseExportJob'
      deprecated: true
components:
  schemas:
    CreateExportJob:
      required:
        - accountingEntryIds
        - companyId
      type: object
      properties:
        accountingEntryIds:
          type: array
          description: >-
            The IDs of accounting entries that you want to include in the export
            job for transmission.
          items:
            type: string
            description: >-
              The IDs of accounting entries that you want to include in the
              export job for transmission.
            format: uuid
        companyId:
          type: string
          description: The unique company ID for which you want to create the export job.
          format: uuid
        employeeId:
          type: string
          description: >-
            This is the Pleo unique identifier of the user that initiated the
            export job.
          format: uuid
          nullable: true
        isInteractive:
          type: boolean
          description: >-
            Non-interactive jobs are jobs that are not initiated by a user.
            These jobs are usually triggered in the background and require no
            user interaction. Interactive jobs are the opposite. Set this flag
            to true if the export job is to be initiated by a user. By default,
            this is set to true.
          nullable: true
          default: true
        options:
          $ref: '#/components/schemas/Options'
    DataResponseExportJob:
      required:
        - data
      type: object
      properties:
        data:
          $ref: '#/components/schemas/ExportJob'
    Options:
      type: object
      properties:
        vendorBasedBookkeeping:
          type: boolean
          description: >-
            When enabled, the export items will include vendor and bookkeeping
            data.
          nullable: true
          default: false
      description: Provides additional configurations for the export job.
      nullable: true
    ExportJob:
      required:
        - companyId
        - createdAt
        - expiresIn
        - id
        - isInteractive
        - numberOfItems
        - status
        - vendorBasedBookkeeping
      type: object
      properties:
        companyId:
          type: string
          description: The Pleo unique identifier of the company the export job belongs to.
          format: uuid
        completedAt:
          pattern: YYYY-MM-DDTHH:mi:ssZ
          type: string
          description: Date and time when the export job was completed.
          format: date-time
          nullable: true
        createdAt:
          pattern: YYYY-MM-DDTHH:mi:ssZ
          type: string
          description: >-
            Date and time when the export job was initiated by the user, that
            is, when the user clicked the Export button in the Pleo application.
          format: date-time
        createdBy:
          type: string
          description: >-
            This is the Pleo unique identifier of the user that initiated the
            export job.
          format: uuid
          nullable: true
          default: null
        expiredAt:
          pattern: YYYY-MM-DDTHH:mi:ssZ
          type: string
          description: Date and time when the export job expired.
          format: date-time
          nullable: true
        expiresIn:
          type: integer
          description: >-
            This is the time specified in seconds when the job would expire;
            this is calculated since the last action performed on the job. The
            last time an action was taken on the job is reflected in the
            lastUpdatedAt attribute.
          format: int32
        failureReason:
          type: string
          description: Reason why the job failed in the case of a failure.
          nullable: true
        failureReasonType:
          type: string
          description: >-
            The classification for the failure from a list of described failure
            reason types.
          nullable: true
          enum:
            - invalid_configuration
            - missing_configuration
            - authentication_failure
            - accounting_system_authentication_failure
            - pleo_rate_limit
            - accounting_system_rate_limit
            - service_unreachable
            - accounting_system_unreachable
            - validation_failure
            - authorization_failure
            - integration_unusable
            - job_expired
            - service_timeout
            - accounting_system_timeout
            - canceled_by_user
        id:
          type: string
          description: The unique identifier generated by Pleo for the export job.
          format: uuid
        isInteractive:
          type: boolean
          description: >-
            Indicates whether the export job was initiated by a user or by the
            system.
        lastUpdatedAt:
          pattern: YYYY-MM-DDTHH:mi:ssZ
          type: string
          description: Last time the job was updated or action on the job was taken.
          format: date-time
          nullable: true
        numberOfItems:
          type: integer
          description: Number of accounting entries that were selected for processing.
        startedAt:
          pattern: YYYY-MM-DDTHH:mi:ssZ
          type: string
          description: >-
            Date and time when the export job was started - this indicates the
            time when the export job event was triggered to change the status of
            the export job to in_progress.
          format: date-time
          nullable: true
        status:
          type: string
          description: >-
            Specifies the current execution state of the export job. Some here
            are the definitions of the values that are supported for this field.
          enum:
            - pending
            - in_progress
            - failed
            - completed
            - completed_with_errors
        vendorBasedBookkeeping:
          type: boolean
          description: >-
            When enabled, the export items would include vendor and bookkeeping
            data
  securitySchemes:
    bearerAuth:
      type: http
      description: >-
        JWT Bearer token authentication. Include the token in the Authorization
        header as: `Bearer <token>`
      scheme: bearer
      bearerFormat: JWT
    basicAuth:
      type: http
      description: >-
        Basic HTTP authentication using API key. Use your API key as the
        username and leave the password empty. The credentials will be Base64
        encoded automatically.
      scheme: basic

````