> ## 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 an Export Job Event

> 
            The Export Job Events imply the different status of an Export Job through the export lifecycle.
            Use this endpoint to create a new status.
            For example, started event implies the export job is initiated.
            The existing Export Job Events are as follows:
            - started: An export job is initiated. This allows the integration
                service to start processing the export job items.
            - failed: The export job has failed when an irrecoverable error happens and this could have happened while processing the export job items.
            - completed: The export job items have been successfully exported.
            - completed_with_errors: The export job items have been processed, although some of them could not be exported.
            



## OpenAPI

````yaml post /v1/export-job-events
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-job-events:
    post:
      tags:
        - Export API (v1)
      summary: Create an Export Job Event
      description: |2-

                    The Export Job Events imply the different status of an Export Job through the export lifecycle.
                    Use this endpoint to create a new status.
                    For example, started event implies the export job is initiated.
                    The existing Export Job Events are as follows:
                    - started: An export job is initiated. This allows the integration
                        service to start processing the export job items.
                    - failed: The export job has failed when an irrecoverable error happens and this could have happened while processing the export job items.
                    - completed: The export job items have been successfully exported.
                    - completed_with_errors: The export job items have been processed, although some of them could not be exported.
                    
      operationId: createExportJobEventV1
      requestBody:
        content:
          application/json;charset=UTF-8:
            schema:
              $ref: '#/components/schemas/CreateExportJobEvent'
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8: {}
      deprecated: true
components:
  schemas:
    CreateExportJobEvent:
      required:
        - event
        - jobId
      type: object
      properties:
        event:
          $ref: '#/components/schemas/ExportJobEventType'
        failureReason:
          type: string
          description: >-
            Reason why the job failed in the case of a failure. Include this
            only when the export job event has a `failed` status.
        failureReasonType:
          $ref: '#/components/schemas/ExportJobFailureReasonType'
        jobId:
          type: string
          description: Identifier of the job the event is to be processed for.
          format: uuid
    ExportJobEventType:
      type: string
      description: >-

        | Value  | Description |

        | ------ | ----------- |

        | started | The integration has started processing the job. |

        | failed | The job has failed due to a connection error, authentication
        failure, or similar issue. |

        | completed | The job has been successfully processed. |

        | completed_with_errors | The job has been completed, but only some
        accounting entries were exported successfully. |
      enum:
        - started
        - failed
        - completed
        - completed_with_errors
    ExportJobFailureReasonType:
      type: string
      description: >-

        | Value  | Description |

        | ------ | ----------- |

        | invalid_configuration | This would define a failure reason pertaining
        to invalid configuration needed to complete the export job or interact
        with the accounting system. |

        | missing_configuration | This would define a failure reason pertaining
        to incomplete configuration needed to complete the export job or
        interact with the accounting system. |

        | authentication_failure | Pleo API failed to authenticate with the
        integration service when sending off a WebHook API call. |

        | accounting_system_authentication_failure | Integration service could
        not authenticate with the accounting system. |

        | pleo_rate_limit | Irrecoverable rate limit issue with Pleo API. |

        | accounting_system_rate_limit | Irrecoverable rate limit issue with the
        accounting system. |

        | service_unreachable | Integration service unreachable. |

        | accounting_system_unreachable | Integration service unable to reach
        accounting system. |

        | validation_failure | Irrecoverable validation error making the job
        unprocessable. |

        | authorization_failure | Authorisation revoked or user no longer has
        access in the accounting system. |

        | integration_unusable | Integration service blocked or unusable for the
        customer. |

        | job_expired | Job not updated within expiry time limit. |

        | service_timeout | Irrecoverable timeout communicating with integration
        service. |

        | accounting_system_timeout | Irrecoverable timeout communicating with
        accounting system. |

        | canceled_by_user | Job was canceled by user. |
      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
  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

````