Task Export Service API (1.0.0)

Export tasks to csv files.

Return the list of Task Export Jobs.

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "jobs": [
    ]
}

Creates a Task Export Job that can be started later.

Basic jobs use the shared Basic CSV contract documented by the Platform Partner export. FedEx jobs keep the FedEx-specific format unchanged.

Authorizations:
bearerAuth
Request Body schema: application/json
org_id
required
string
org_name
required
string
name
required
string
type
required
string (export_type)
Enum: "basic" "fedex"
creation_start_date
required
string <date-time>
creation_end_date
required
string <date-time>

Responses

Request samples

Content type
application/json
{
  • "org_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  • "org_name": "My Organization",
  • "name": "My Task Export",
  • "type": "basic",
  • "creation_start_date": "2019-08-24T14:15:22Z",
  • "creation_end_date": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "job": {
    }
}

Read an existing Task Export Job.

Authorizations:
bearerAuth
path Parameters
export_job_id
required
string

ID of the Task Export Job to be read.

Responses

Response samples

Content type
application/json
{
  • "job": {
    }
}

Start an existing Task Export Job.

Only the job with status 'new' can be started.

Starting a job will update its status from 'new' to 'queued'

Authorizations:
bearerAuth
path Parameters
export_job_id
required
string

ID of the Task Export Job to be updated.

Request Body schema: application/json
version_rev
string

Responses

Request samples

Content type
application/json
{
  • "version_rev": "0-xxxxxxxx"
}

Response samples

Content type
application/json
{
  • "job": {
    }
}

Update status of Task Export Job to In Progress.

Only the job with status 'queued' can be updated to 'in progress'

Authorizations:
bearerAuth
path Parameters
export_job_id
required
string

ID of the Task Export Job to be updated.

Request Body schema: application/json
version_rev
string

Responses

Request samples

Content type
application/json
{
  • "version_rev": "0-xxxxxxxx"
}

Response samples

Content type
application/json
{
  • "job": {
    }
}

Update status of Task Export Job to Done.

Only the job with status 'in progress' can be mark as done

Authorizations:
bearerAuth
path Parameters
export_job_id
required
string

ID of the Task Export Job to be updated.

Request Body schema: multipart/form-data
file
string <binary>

There are a few requirements for the zip file to be uploaded:

  1. The zip file attached must be of type application/zip
  2. The zip file must be non-empty
  3. The zip filename must end with '.csv.zip'

Recommended zip filename: {export_job_id}-task-export.csv.zip

version_rev
string

Responses

Response samples

Content type
application/json
{
  • "message": "successfully update status to done"
}

Update status of Task Export Job to Failed.

Authorizations:
bearerAuth
path Parameters
export_job_id
required
string

ID of the Task Export Job to be updated.

Request Body schema: application/json
error
string
version_rev
string

Responses

Request samples

Content type
application/json
{
  • "error": "An error occurred",
  • "version_rev": "0-xxxxxxxx"
}

Response samples

Content type
application/json
{
  • "message": "successfully update status to fail"
}

Direct CSV export and download for Platform Partners.

Generates and downloads CSV export directly for platform partners. This endpoint fetches tasks from the task management service and returns a CSV file for immediate download. The Basic CSV includes Assigned Vehicle Type immediately after Vehicle Preference. Known assigned vehicle codes use their human-readable labels, unknown non-empty codes are preserved, and missing values produce an empty cell. Immediately before Total Price, the Basic CSV includes Estimated Distance (km), CO2 Emissions (g) - EV, CO2 Emissions (g) - ICE, CO2 Savings (g), and CO2 Savings (%). Populated environmental values use exactly three decimal places. Assigned EV rows populate the complete block. Assigned ICE rows populate distance and ICE emissions but leave EV emissions and both savings cells empty. Legacy, pending, failed, or unavailable calculations leave emissions and savings empty; distance remains independently populated when available.

Security Requirements:

  • Requires JWT authentication
  • User must have platform owner role
Authorizations:
bearerAuth
Request Body schema: application/json
org_id
required
string

Organization ID. If 'all', all organizations will be included.

org_name
required
string

Organization name

name
required
string

Export name/identifier

platform_id
string

Platform ID (optional)

creation_start_date
required
string <date-time>

Start date for task creation filter

creation_end_date
required
string <date-time>

End date for task creation filter

Responses

Request samples

Content type
application/json
{
  • "org_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx / all",
  • "org_name": "My Organization",
  • "name": "My Task Export",
  • "platform_id": "platform-123",
  • "creation_start_date": "2024-01-01T00:00:00Z",
  • "creation_end_date": "2024-01-31T23:59:59Z"
}

Response samples

Content type
application/json
{
  • "message": "validation error message"
}