---
title: "Create an order export job"
method: POST
path: "/orders/export"
tags: ["Orders", "Export"]
---

# Create an order export job

`POST /orders/export`

## Request

- Base URL: `https://v3.api.hypertrack.com`
- URL: `https://v3.api.hypertrack.com/orders/export`
- Auth: one of:
  - HTTP basic
  - HTTP bearer
- TypeScript: <https://skmtc.dev/hypertrack/apis/hypertrack-api/docs/orders/export/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates an asynchronous job to export orders to CSV.gz file. Returns a job_id that can be used to check status. Download link will be sent via email when ready.

## Request body

- OrderExportRequest
  - `worker_handle` string, nullable: Unique customer provided identifier of the worker to used retrieve orders associated with the specified worker
  - `place_handle` string, nullable: Unique customer provided identifier of the place to be used retrieve orders associated with the specified place
  - `search_term` string, nullable: String representing the search term. Search will be done on order_handle, ops_group_handle, worker_handle and metadata fields.
  - `ops_group_handle` string, nullable: Unique Handle of Ops Group to fetch orders for
  - `order_metadata_filter` string, nullable: JSON encoded string for order metadata to filter orders by
  - `risk_status` string, nullable: Filter for risk status of order
  - `region_filter` string, nullable: JSON object containing `city`, `state`, or `country` used to filter orders
  - `status` string, nullable: String representation of Order status to fetch orders for. It can be comma separated list, each item in list can be one of `completed`, `cancelled`, `rescheduled`, `disabled`, `ongoing`, `unplanned`, `assigned`, `planned`. eg. `?status=completed,cancelled` or `?status=completed` to filter for one status
  - `device_id` string, nullable: Filter for orders associated with this device id.
  - `destination_geohash` string, nullable: Geohash of the area where order destination must lie.
  - `plan_mode` unknown
  - `plan_id` string, nullable: Filter for orders in this plan id.
  - `route_handle` string, nullable: Unique Handle of the route to fetch orders for
  - `track_mode` unknown
  - `device_switch_mode` unknown
  - `created_at_date` string, nullable: Date (YYYY-MM-DD) used as a filter to retrieve orders that are created on a given date.
  - `created_at_from` string, nullable: Timestamp (YYYY-MM-DD HH:mm:ss) of the start of window to retrieve orders that created within a timeframe.
  - `created_at_to` string, nullable: Timestamp (YYYY-MM-DD HH:mm:ss) of the end of window to retrieve orders that created within a timeframe.
  - `planned_at_date` string, nullable: Date (YYYY-MM-DD) used as a filter to retrieve orders that are planned on a given date.
  - `planned_at_from` string, nullable: Timestamp (YYYY-MM-DD HH:mm:ss) of the start of window to retrieve orders planned within a timeframe.
  - `planned_at_to` string, nullable: Timestamp (YYYY-MM-DD HH:mm:ss) of the start of window to retrieve orders planned within a timeframe.
  - `scheduled_at_date` string, nullable: Date (YYYY-MM-DD) used as a filter to retrieve orders that are scheduled on a given date.
  - `scheduled_at_date_without_tz` string, nullable: Date (YYYY-MM-DD) used as a filter to retrieve orders that are scheduled on a given date irrespective of timezone.
  - `completed_at_date_without_tz` string, nullable: Date (YYYY-MM-DD) used as a filter to retrieve orders that are completed on a given date irrespective of timezone.
  - `scheduled_at_from` string, nullable: Timestamp (YYYY-MM-DD HH:mm:ss) of the start of window to retrieve orders which have scheduled_at within a timeframe.
  - `scheduled_at_to` string, nullable: Timestamp (YYYY-MM-DD HH:mm:ss) of the end of window to retrieve orders that which have scheduled_at within a timeframe.
  - `scheduled_at_without_tz_from` string, nullable: Timestamp (YYYY-MM-DD HH:mm:ss) of the start of window to retrieve orders of that day in all timezone.
  - `scheduled_at_without_tz_to` string, nullable: Timestamp (YYYY-MM-DD HH:mm:ss) of the end of window to retrieve orders of that day in all timezone.
  - `cancelled_at_date` string, nullable: Date (YYYY-MM-DD) used as a filter to retrieve orders that are cancelled on a given date.
  - `cancelled_at_from` string, nullable: Timestamp (YYYY-MM-DD HH:mm:ss) of the start of window to retrieve orders that cancelled within a timeframe.
  - `cancelled_at_to` string, nullable: Timestamp (YYYY-MM-DD HH:mm:ss) of the end of window to retrieve orders that cancelled within a timeframe.
  - `completed_at_date` string, nullable: Date (YYYY-MM-DD) used as a filter to retrieve orders that are completed on a given date.
  - `completed_at_from` string, nullable: Timestamp (YYYY-MM-DD HH:mm:ss) of the start of window to retrieve orders that completed within a timeframe.
  - `completed_at_to` string, nullable: Timestamp (YYYY-MM-DD HH:mm:ss) of the end of window to retrieve orders that completed within a timeframe.
  - `rescheduled_marked_at_date` string, nullable: Date (YYYY-MM-DD) used as a filter to retrieve orders that are rescheduled on a given date.
  - `rescheduled_marked_at_from` string, nullable: Timestamp (YYYY-MM-DD HH:mm:ss) of the start of window to retrieve orders that rescheduled within a timeframe.
  - `rescheduled_marked_at_to` string, nullable: Timestamp (YYYY-MM-DD HH:mm:ss) of the end of window to retrieve orders that rescheduled within a timeframe.
  - `route_started_at_date` string, nullable: Date (YYYY-MM-DD) used as a filter to retrieve orders for which route started on a given date.
  - `route_started_at_from` string, nullable: Timestamp (YYYY-MM-DD HH:mm:ss) of the start of window to retrieve orders for which route started within a timeframe.
  - `route_started_at_to` string, nullable: Timestamp (YYYY-MM-DD HH:mm:ss) of the end of window to retrieve orders for which route started within a timeframe.
  - `completed_at_without_tz_from` string, nullable: Timestamp (YYYY-MM-DD HH:mm:ss) of the start of window to retrieve orders of that day for all timezone for completed orders.
  - `completed_at_without_tz_to` string, nullable: Timestamp (YYYY-MM-DD HH:mm:ss) of the end of window to retrieve orders of that day for all timezone for completed orders.
  - `created_at_without_tz_from` string, nullable: Start Date (YYYY-MM-DD ) of the window to retrieve orders from that day for all timezone for created orders.
  - `created_at_without_tz_to` string, nullable: End Date (YYYY-MM-DD ) of the window to retrieve orders till that day for all timezone for created orders.
  - `created_at_date_without_tz` string, nullable: Date (YYYY-MM-DD) used as a filter to retrieve orders that are created on a given date irrespective of timezone.
  - `driver_handle` string, nullable: Unique customer provided identifier of the driver to used retrieve orders associated with the specified driver
  - `sort_direction` unknown
  - `fulfillment_attempt` integer, nullable: Filter for fulfillment attempt number
  - `aggregate` boolean, nullable: Flag to fetch order's aggregated data.
  - `limit` integer, nullable: Limit to number of results in response
  - `pagination_token` string, nullable: Encoded value provided by our API to retrieve the next page of orders
  - `send_outage` boolean, nullable: Boolean to send the outage in aggregation
  - `tracking_status` 'tracked' | 'untracked' | 'null', nullable: Parameter to filter for tracked and untracked orders
  - `filter_outage_category` string, nullable: List of outage category as comma separated strings used for filtering associated orders within time range
  - `worker_profile_filter` string, Encoded JSON, nullable: JSON encoded string metadata associated with the worker to filter orders
  - `worker_inside_destination` boolean, nullable: Boolean flag to filter orders based on whether the worker is inside the destination or not.
  - `order_handle` string, nullable: List of order handles as comma separated strings used to fetch a specific subset of orders.
  - `email_recipients` string[]: Optional list of email addresses to send the export download link. Falls back to the account email when omitted.

## Response `201`

Successful response

- OrderExportResponse
  - `job_id` string, required: Unique identifier for the export job
  - `status` string, required: Current status of the export job: pending, processing, completed, failed
  - `message` string, required: Human-readable message about the job

## Other responses

- `400`: Validation error
- `401`: Authentication error

---

[API](https://skmtc.dev/hypertrack/apis/hypertrack-api.md) - [All operations](https://skmtc.dev/hypertrack/apis/hypertrack-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hypertrack/apis/hypertrack-api/revisions/389326c4c9c8?raw)
