Skip to main content

Introduction

The Export APIs is used to synchronize data from TRAEDE to another system. This means the flow of data is from TRAEDE -> another system. You can use the Export API to export data into multiple systems

Export API Flow

This document will describe how the Export APIs work at a high level. The idea for the Export APIs is that they can be used to export different types of documents (orders, production orders, invoices, etc.) into other systems. In order to do this efficiently there is 2 flows occuring.

Flow 1 is calling the export endpoints, e.g. /v10/orders/export or /v10/invoices/export. These endpoints are used to fetch a list of documents that have not yet been exported. In order to keep track of what has successfully been exported you also have to implement Flow 2. Flow 2 is sending back a call to TRAEDE with what have been successfully imported into the receiving system. It's important that you only call these endpoints once a document is successfully imported. This will ensure that if something goes wrong in the import, then you can call the export endpoints again to retry.

So at a high level the flow can be described as

  1. Call GET /v10/orders/export to get a list of orders that have not yet been exported
  2. Import these into the receiving system
  3. If an error occurs you can simply try again. Since these orders were not marked as exported they will still appear when calling GET /v10/orders/export
  4. Once the orders have been successfully imported call POST /v10/orders/mark-as-exported to inform TRAEDE that these orders have now been imported
  5. If you call GET /v10/orders/export again then these orders will not be part of the list. If needed you can include the not_exported_since parameter to re-export old exported orders. Read more further down

Re-exporting already exported documents

TODO