Skip to main content

Export History

Export History shows report exports that were created as background jobs. Use it to check whether an export is pending, processing, completed, or failed, and to download completed export files.

Track export jobs

See all report export jobs with status, format, date range, report type, and creation date.

Download completed files

Download completed exports when the file is ready.

Filter and refresh

Filter by status, file format, and creation date, or refresh the table manually.

Access Export History

Export History is opened from the reports area. Use it after creating a background export from a report page, such as the Purchase Orders Report.
1

Open Reports

Go to the reports area in Mathership.
2

Open Export History

Select Export History.
3

Review your exports

Check the status of previous exports and download completed files.

What Export History shows

The export history table shows report export jobs for the selected company context. Each row can show:
ColumnDescription
FormatExport file format, such as CSV or PDF
Date rangeThe report period covered by the export
Report typeThe type of report that was exported
StatusCurrent export job status
CreatedWhen the export job was created
DownloadDownload button, shown only when the export is completed and downloadable

File format badges

Export files are shown with visual badges.
FormatBadge
CSVGreen spreadsheet badge
PDFBlue document badge

Statuses

Export jobs can have different statuses.
StatusMeaning
pendingThe export job was created and is waiting to be processed
processingThe export job is currently being generated
completedThe export finished successfully and can be downloaded if a file is available
failedThe export failed. The error message may be shown below the failed badge
When a job is processing and progress is available, the frontend can show the progress percentage next to the status badge.

Automatic refresh

Export History automatically refreshes while there are unfinished jobs. Unfinished jobs are jobs that are not yet:
  • completed
  • failed
The frontend checks for unfinished jobs and refreshes the table every 5 seconds while any unfinished job is visible. You can also click Refresh to reload the table manually.

Downloading an export

Completed exports show a Download button when the job is downloadable.
1

Find a completed export

Look for a row with status Completed.
2

Click Download

Click Download in the row action area.
3

Open the file

Mathership opens a secure download URL in a new browser tab.
Download is only shown when the export status is completed and the job can be downloaded.

Filters

Export History supports filters in the toolbar.
FilterDescription
StatusFilter by one or more export statuses
FormatFilter by CSV or PDF
CreatedFilter by export creation date range
Click Add filter to show optional filters. Use Clear all to reset active filters.

URL search parameters

The frontend keeps filter, sorting, and pagination state in the URL.
ParameterDescription
pageCurrent page, starting at 0
page_sizeNumber of rows per page, from 1 to 200
orderingSort order, such as -created_at
statusComma-separated statuses
file_formatComma-separated file formats
created_fromCreated date filter start
created_toCreated date filter end
The default ordering is newest first:
SettingDefault
ordering-created_at
page_size20

Sorting

The table supports sorting for selected columns. Sortable columns include:
  • Format
  • Date range
  • Report type
  • Status
  • Created
Sorting updates the ordering URL parameter and resets the table to the first page.

Pagination

Export History is paginated. The backend returns:
FieldMeaning
resultsExport jobs for the current page
pageCurrent page
page_sizeNumber of rows per page
totalTotal number of matching export jobs
total_pagesTotal number of pages

Creating an export job

Export jobs are created from report pages, such as the purchase report. For example, a report page can create a background export job with:
FieldMeaning
company_idCompany that owns the export job
date_fromStart date for the export period
date_toEnd date for the export period
file_formatExport format, such as CSV or PDF
report_typeReport type. If omitted, the backend defaults to delivery_location
After the job is created, it starts with status pending. The backend then queues the report export task for processing.

Direct download vs background export

Some report pages can support both direct downloads and background exports.
ActionBehavior
Direct CSV or PDF downloadThe report file is generated and downloaded immediately from the report endpoint
Background export jobA job is created and later appears in Export History
Background exports are useful for larger reports or long-running report generation.

Backend list behavior

The backend lists export jobs through the export job endpoint. It supports:
  • Pagination
  • Company filtering
  • Status filtering
  • Report type filtering
  • File format filtering
  • Created date range filtering
  • Ordering
The backend restricts the list to companies where the user has permission to view financial data.

Backend filters

The backend accepts these filters for export jobs:
Query parameterDescription
company_idLimit results to one company
statusFilter by one or more statuses
report_typeFilter by one or more report types
file_formatFilter by one or more file formats
created_at_fromFilter jobs created on or after this date
created_at_toFilter jobs created on or before this date
orderingSort order
pagePage number
page_sizePage size
The frontend uses created_from and created_to; the backend export-job endpoint uses created_at_from and created_at_to. The API hook should translate these values before calling the backend.

Backend ordering

The backend supports ordering by:
Field
created_at
updated_at
status
date_from
date_to
id
report_type
file_format
If an unsupported ordering field is sent, the backend falls back to newest first.

Access control

Export jobs are restricted by financial-report access. A user can only list, create, or download export jobs for companies where they have the required financial viewing capability. If the user does not have access, Mathership returns an access error.

Download backend behavior

When a user downloads a completed export, the backend:
  1. Checks that the job belongs to a company the user can access
  2. Confirms that the user has permission to view financial data
  3. Checks that the job status is completed
  4. Checks that a file key exists
  5. Generates a secure pre-signed S3 download URL
  6. Returns the download URL, expiry time, and filename
The returned download URL expires after 1 hour.
Response fieldMeaning
download_urlTemporary secure URL for the exported file
expires_in_secondsDownload URL lifetime, currently 3600 seconds
filenameSuggested filename for the downloaded ZIP file

Download errors

SituationResult
Job is not completedDownload is rejected because the report is not ready
No file key existsDownload is rejected because no file is available
S3 URL generation failsBackend returns a server error
User lacks accessBackend returns an authorization error

Empty and loading states

The frontend can show:
StateBehavior
LoadingTable shows loading state while export jobs are fetched
No rowsTable is empty when no jobs match the current filters
Failed jobFailed badge is shown, with error message if available
Processing jobProcessing badge is shown, with progress if available

Common workflows

Create and download a report export

  1. Open a report page
  2. Select the required filters, such as date range and delivery location
  3. Create the export job
  4. Open Export History
  5. Wait until the job status is Completed
  6. Click Download

Check why an export failed

  1. Open Export History
  2. Filter by status Failed
  3. Find the failed job
  4. Review the error message shown under the failed badge
  5. Recreate the export after correcting the report filters or data issue

Find a specific export

  1. Open Export History
  2. Filter by file format if you know whether it was CSV or PDF
  3. Filter by created date range
  4. Sort by Created or Date range
  5. Download the completed file

Best practices

Use background exports for larger reports

Create export jobs for reports that may take longer to generate.

Check status before downloading

Download is only available after the export reaches Completed.

Refresh when needed

Use the Refresh button if you want to check the latest job status immediately.

Use filters

Filter by status, format, and creation date to find older exports quickly.

Download soon

Secure download URLs expire after 1 hour.

Check permissions

Users need financial-report access for the company to list, create, or download exports.

Common problems

The job must have status completed and must be marked as downloadable.If the job is still pending or processing, wait until it completes.
Click Refresh to reload the latest status.If the status does not change for a long time, the export task may need backend review.
Review the error message shown under the failed badge.Create the export again after correcting the report filters or underlying data issue.
Check that you selected the correct company and that your user has permission to view financial reports for that company.

Inventory Report

Review stock levels, movement history, costs, and ingredient activity.

Purchase Orders Report

Analyze received vendor order data by delivery location and date range.

Delivery Locations

Manage delivery locations used by purchase reports.

Organization Settings

Manage organizations, companies, members, and access permissions.
Last modified on June 7, 2026