General Ledger API
API endpoints for general ledger (Gl_*) operations
Gl greentree createExportBatch
Creates an Greentree export batch for the given ledger (Sales/Purchases), equivalent to running the menu option Accounts / Export / Greentree / General Ledger / New - Create. The export batch file data is generated, and cached in the gb_exports table to greatly improve performance whenever the export file is generated.
Greentree export batches are created with a "Status" of 'exported-ok'.
All other General Ledger) 'createExportBatch' jobs apply a standard behaviour which creates export batches with a "Status" of 'pending'.
If there is a lock on the 'gl_transaction' table the scheduled job will fail to complete. To give it the best chance of completing, the scheduler will keep trying every 15 seconds, for 5 minutes. If the lock is not released in this time, the scheduler queue will show a status of 'failed' for that attempted run, with a message of 'Locked by user: '
Parameters
These are the different parameter settings that you can set up on the Job Screen screen:
Gl greentree createExportFile
Creates and emails a Greentree export file for the given Ledger Type (Sales/Purchases). The most recent export batch that is at 'pending' status is selected for export. It then sets the status to 'exported_ok'.
Parameters
These are the different parameter settings that you can set up on the Job Screen screen:
Warning: Sending the file as an email attachment is generally not as secure as downloading it via the Catch-e menu.
Gl jde createExportBatch
Create a JDE export batch for the chosen ledger: Purchases, Sales or Journals.
This job performs the same function as navigating to Accounts / Export / JDE → General Ledger and clicking on the Create button to generate a new export batch.
Like the menu option, this job stores a data file in the field and saves the new batch at 'pending' status.
But you can also place another copy of the file in a DMZ folder for later use.
Create a child job using gb / system / dmzUploadSpool to transfer these stored files from your DMZ folder via SFTP to an external site.
Or use gl / jde / createExportFile to email the file instead.
File Naming
The files created by this job use the following file naming format. This is the same format that happens if you click on the Export button from the menu option.
Purchases - gltojde#pl_######.csv
Sales - gltojde#sl_######.csv
Journals - gltojde#jnl_######.csv
Legend # = and ###### = *
*
Parameters
The following parameters are displayed when this method has been selected.
Gl jde createExportFile
This job performs the same function as navigating to Accounts / Export → JDE, selecting a batch and clicking on Export to get the file.
This job can do one or both of the following;
- Send an email with an attached JDE export batch file
- Store a JDE export batch file in a nominated DMZ folder
The file is copied from the most recently created batch file that is in 'pending' status.
If the field is blank, the file will be re-created in this job.
The job also then updates the batch status to 'exported_ok', (so you know it has been sent).
Make this a child job of gl / jde / createExportBatch) which creates the 'pending' export batch this job needs.
Warning: Catch-e recommends using this job to store the file in a DMZ folder only, or directly downloading files as required from Accounts / Export → JDE. Sending files as email attachments is not secure.
Parameters
The following parameters are displayed when this method has been selected.
Gl myob createExportBatch
Creates an MYOB export batch for the given ledger (Sales/Purchases/Journals), equivalent to running the menu option Accounts / Export / MYOB / General Ledger / New - Create.
The export batch file data is generated, and cached in the gb_exports table to greatly improve performance whenever the export file is generated. The export batch is saved with a status of 'pending'.
Parameters
The following parameters are displayed when this method has been selected.
Gl myob createExportFile
Creates and emails a MYOB export file for the given Ledger Type (Sales/Purchases/Journals), for the most recent export batch that is at 'pending' status. It then sets the status to 'exported_ok'.
Parameters
These are the different parameter settings that you can set up on the Job Screen screen:
Warning: Sending the file as an email attachment is generally not as secure as downloading it via the Catch-e menus.
Gl xero createExportBatch
Create a Xero export batch for the chosen ledger: Purchases, Sales or Journals.
This job performs the same function as navigating to Accounts / Export / Xero → General Ledger and clicking on the Create button to generate a new export batch.
Like the menu option, this job stores a data file in the field and saves the new batch at 'pending' status.
But you can also place another copy of the file in a DMZ folder for later use.
Create a child job using gb / system / dmzUploadSpool to transfer these stored files from your DMZ folder via SFTP to an external site.
Or use gl / xero / createExportFile to email the file instead.
File Naming
The files created by this job use the following file naming format. This is the same format that happens if you click on the Export button from the menu option.
Purchases - gltoxero#pl_######.txt
Sales - gltoxero#sl_######.txt
Journals - gltoxero#jnl_######.txt
Legend # = and ###### = *
*
Parameters
The following parameters are displayed when this method has been selected.
Gl xero createExportFile
This job performs the same function as navigating to Accounts / Export → Xero, selecting a batch and clicking on Export to get the file.
This job can do one or both of the following;
- Send an email with an attached Xero export batch file
- Store a Xero export batch file in a nominated DMZ folder
The file is copied from the most recently created batch file that is in 'pending' status.
If the field is blank, the file will be re-created in this job.
The job also then updates the batch status to 'exported_ok', (so you know it has been sent).
Make this a child job of gl / xero / createExportBatch) which creates the 'pending' export batch this job needs.
Warning: Catch-e recommends using this job to store the file in a DMZ folder only, or directly downloading files as required from Accounts / Export → Xero. Sending files as email attachments is not secure.
Parameters
The following parameters are displayed when this method has been selected.