Runsheet Management Service API (1.0.0)

Perform CRUD actions for runsheets.

Runsheet

Return the list of runsheets

Return the list of runsheets

Authorizations:
bearerAuth
query Parameters
page
integer <int64> >= 1
Default: 1
per_page
integer <int64> >= 1
Default: 200
order
string
Default: "desc"
Enum: "asc" "desc"

The direction of the sort

range_start_created_at
string

Range start (inclusive) of Created At

range_end_created_at
string

Range end (inclusive) of Created At

is_qa
string
Enum: true false

Whether 'Is QA' is true or false

is_accepted
string
Enum: true false

Whether the runsheet has been accepted by a driver

vehicle_preference
string
Enum: "ltl" "motorcycle" "car" "mpv" "van_1.7m" "van_2.4m" "lorry_10ft" "lorry_14ft" "lorry_24ft" "lorry_40ft" "boat"

Types of the vehicle

Responses

Response samples

Content type
application/json
Example
{
  • "meta": {
    },
  • "runsheets": [ ]
}

Create a new runsheet

Create a new runsheet

Authorizations:
bearerAuth
Request Body schema: application/json
name
string

Responses

Request samples

Content type
application/json
{
  • "name": "My Runsheet"
}

Response samples

Content type
application/json
{
  • "id": "000000000000000000000000",
  • "name": "My Runsheet",
  • "version_seq": 0,
  • "version_rev": "0-12345678",
  • "server_time": "2020-11-13T12:31:14.890316+08:00"
}

Read an existing runsheet

Read an existing runsheet

Authorizations:
bearerAuth
path Parameters
runsheetID
required
string

ID of the runsheet to be read

Responses

Response samples

Content type
application/json
{
  • "id": "000000000000000000000000",
  • "name": "My Runsheet",
  • "driver": null,
  • "tasks": [ ],
  • "total_tasks": 0,
  • "created_at": "2021-03-10T02:59:00.641Z",
  • "version_seq": 0,
  • "version_rev": "0-12345678"
}

Update an existing runsheet

Update an existing runsheet

Authorizations:
bearerAuth
path Parameters
runsheetID
required
string

ID of the runsheet to be modified

Request Body schema: application/json
name
string

Responses

Request samples

Content type
application/json
{
  • "name": "My Runsheet"
}

Response samples

Content type
application/json
{
  • "runsheet": {
    },
  • "server_time": "2019-08-24T14:15:22Z"
}

List of unassigned runsheet

Only OrgTransporter Authorized.

Return the list of runsheets for a transporter

  • Status = Broadcasting
  • Last Broadcast Expired At >= time now
  • Driver = null
  • Preference = Marine
Authorizations:
bearerAuth
query Parameters
page
integer <int64> >= 1
Default: 1
per_page
integer <int64> >= 1
Default: 200
is_qa
string
Enum: true false

Whether 'Is QA' is true or false

vehicle_preference
string
Enum: "ltl" "motorcycle" "car" "mpv" "van_1.7m" "van_2.4m" "lorry_10ft" "lorry_14ft" "lorry_24ft" "lorry_40ft" "boat"

Types of the vehicle

service_type
string
Enum: "ltl" "ftl" "truck" "boat"

Service type

Responses

Response samples

Content type
application/json
Example
{
  • "meta": {
    },
  • "runsheets": [ ]
}

Transporter to read an unassigned runsheet detail

Only orgAdmin that authorized.

Authorizations:
bearerAuth
path Parameters
runsheetID
required
string

ID of the runsheet to be read

Responses

Response samples

Content type
application/json
{
  • "id": "000000000000000000000000",
  • "name": "My Runsheet",
  • "tasks": [ ],
  • "total_tasks": 0,
  • "created_at": "2021-03-10T02:59:00.641Z",
  • "version_seq": 0,
  • "version_rev": "0-12345678"
}

List of unassigned runsheet

Only OrgTransporter Authorized.

Return the list of runsheets for a transporter

  • Status = Accepted
  • OrgTransporter.ID = Transporter Organization ID
  • Preference = Marine
Authorizations:
bearerAuth
query Parameters
page
integer <int64> >= 1
Default: 1
per_page
integer <int64> >= 1
Default: 200
is_qa
string
Enum: true false

Whether 'Is QA' is true or false

vehicle_preference
string
Enum: "ltl" "motorcycle" "car" "mpv" "van_1.7m" "van_2.4m" "lorry_10ft" "lorry_14ft" "lorry_24ft" "lorry_40ft" "boat"

Types of the vehicle

Responses

Response samples

Content type
application/json
Example
{
  • "meta": {
    },
  • "runsheets": [ ]
}

Transporter to read an accepted runsheet detail

Only orgTransporter that authorized.

Authorizations:
bearerAuth
path Parameters
runsheetID
required
string

ID of the runsheet to be read

Responses

Response samples

Content type
application/json
{
  • "id": "000000000000000000000000",
  • "name": "My Runsheet",
  • "driver": {
    },
  • "tasks": [
    ],
  • "total_tasks": 1,
  • "currency": "SGD",
  • "created_at": "2019-08-24T14:15:22Z",
  • "version_seq": 0,
  • "statuses": [
    ],
  • "version_rev": "0-12345678"
}

List of unassigned runsheet

Only freelanceDriver authorized.

Return the list of runsheets for a driver

  • Status = Broadcasting
  • Last Broadcast Expired At >= time now
  • Driver = null
  • Preference = Standard, Squad
Authorizations:
bearerAuth
query Parameters
page
integer <int64> >= 1
Default: 1
per_page
integer <int64> >= 1
Default: 200
is_qa
string
Enum: true false

Whether 'Is QA' is true or false

vehicle_preference
string
Enum: "ltl" "motorcycle" "car" "mpv" "van_1.7m" "van_2.4m" "lorry_10ft" "lorry_14ft" "lorry_24ft" "lorry_40ft" "boat"

Types of the vehicle

Responses

Response samples

Content type
application/json
Example
{
  • "meta": {
    },
  • "runsheets": [ ]
}

Read an unassigned runsheet detail

Read an unassigned runsheet detail

Authorizations:
bearerAuth
path Parameters
runsheetID
required
string

ID of the runsheet to be read

Responses

Response samples

Content type
application/json
{
  • "id": "000000000000000000000000",
  • "name": "My Runsheet",
  • "tasks": [ ],
  • "total_tasks": 0,
  • "created_at": "2021-03-10T02:59:00.641Z",
  • "version_seq": 0,
  • "version_rev": "0-12345678"
}

Runsheet Tasks

Add task(s) to an existing runsheet

Add task(s) to an existing runsheet

Authorizations:
bearerAuth
path Parameters
runsheetID
required
string

ID of the runsheet to be modified

Request Body schema: application/json
Array of objects (task)
version_rev
required
string

Responses

Request samples

Content type
application/json
{
  • "tasks": [
    ],
  • "version_rev": "0-12345678"
}

Response samples

Content type
application/json
{
  • "message": "Successfully added tasks to Runsheet",
  • "skipped_ids": [ ],
  • "success_count": 1
}

Update task status in an existing runsheet

Only SysAdmin is authorized.

Authorizations:
bearerAuth
path Parameters
runsheetID
required
string

ID of the runsheet to be modified

taskID
required
string

ID of the task to be modified

Request Body schema: application/json
task_current_status
required
string
task_version_rev
required
string
version_rev
required
string

Responses

Request samples

Content type
application/json
{
  • "task_current_status": "pending_delivery",
  • "task_version_rev": "0-12345678",
  • "version_rev": "0-12345678"
}

Response samples

Content type
application/json
{
  • "message": "Successfully updated task"
}

Update task details in an existing runsheet

Only SysAdmin is authorized.

Authorizations:
bearerAuth
path Parameters
runsheetID
required
string

ID of the runsheet to be modified

taskID
required
string

ID of the task to be modified

Request Body schema: application/json
pickup_note_to_driver
required
string
delivery_note_to_driver
required
string
required
object (contact)
required
object (contact)
driver_price
required
integer <int64> >= 0

Unit used is 1/1000 cents, will be set as 0 if the currency is "". The example value (120000 = 120x1000) represents 120 cents.

task_version_rev
required
string
version_rev
required
string

Responses

Request samples

Content type
application/json
{
  • "pickup_note_to_driver": "Pickup note to driver",
  • "delivery_note_to_driver": "Delivery note to driver",
  • "from_contact": {
    },
  • "to_contact": {
    },
  • "driver_price": 120000,
  • "task_version_rev": "0-12345678",
  • "version_rev": "0-12345678"
}

Response samples

Content type
application/json
{
  • "message": "Successfully updated task"
}

Remove task from a runsheet

Remove task from a runsheet

Authorizations:
bearerAuth
path Parameters
runsheetID
required
string

ID of the runsheet to be modified

taskID
required
string

ID of the task to be modified

Request Body schema: application/json
version_rev
required
string

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "message": "Successfully deleted the task from runsheet"
}

Cancel a task from runsheet, Merchant and SysAdmin

Cancel a task from runsheet, Merchant and SysAdmin are allowed

Authorizations:
bearerAuth
path Parameters
runsheetID
required
string

ID of the runsheet

taskID
required
string

ID of the task

Request Body schema: application/json
version_rev
required
string

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "message": "Successfully cancel task from Runsheet",
  • "runsheet": {
    }
}

Platform Partners User updates a task in a runsheet

Allows a Platform Partners User to update a task in a runsheet. Requires Platform Partners User authorization.

Authorizations:
bearerAuth
path Parameters
id
required
string

ID of the runsheet to be modified

taskID
required
string

ID of the task to be modified

Request Body schema: application/json
pickup_note_to_driver
required
string
delivery_note_to_driver
required
string
required
object (contact)
required
object (contact)
driver_price
required
integer <int64> >= 0

Unit used is 1/1000 cents, will be set as 0 if the currency is "". The example value (120000 = 120x1000) represents 120 cents.

task_version_rev
required
string
version_rev
required
string

Responses

Request samples

Content type
application/json
{
  • "pickup_note_to_driver": "Pickup note to driver",
  • "delivery_note_to_driver": "Delivery note to driver",
  • "from_contact": {
    },
  • "to_contact": {
    },
  • "driver_price": 120000,
  • "task_version_rev": "0-12345678",
  • "version_rev": "0-12345678"
}

Response samples

Content type
application/json
{
  • "message": "Successfully updated task {taskID}"
}

Platform Partners User cancels a task from a runsheet

Allows a Platform Partners User to cancel a task from a runsheet. Requires Platform Partners User authorization.

Authorizations:
bearerAuth
path Parameters
id
required
string

ID of the runsheet

taskID
required
string

ID of the task

Request Body schema: application/json
version_rev
required
string

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "message": "Successfully cancel task from Runsheet",
  • "runsheet": {
    }
}

Broadcasting

Update runsheet & all tasks' status to Broadcastin

Update runsheet & all tasks' status to Broadcasting; Also update the Last Broadcast Expired Time

Authorizations:
bearerAuth
path Parameters
runsheetID
required
string

ID of the runsheet to be modified

Request Body schema: application/json
object (driver)
version_rev
required
string

Responses

Request samples

Content type
application/json
{
  • "driver": {
    },
  • "version_rev": "0-12345678"
}

Response samples

Content type
application/json
{
  • "message": "Successfully broadcasted all tasks"
}

Stop Broadcasted Runsheet

Stop Broadcasted Runsheet

Authorizations:
bearerAuth
path Parameters
runsheetID
required
string

ID of the runsheet to be modified

Request Body schema: application/json
object (driver)
version_rev
required
string

Responses

Request samples

Content type
application/json
{
  • "driver": {
    },
  • "version_rev": "0-12345678"
}

Response samples

Content type
application/json
{
  • "message": "Successfully stop broadcasted task"
}

Increment all tasks's Prices inside the runsheet

Increment all tasks's Prices inside the runsheet

Authorizations:
bearerAuth
path Parameters
runsheetID
required
string

ID of the runsheet to be modified

Request Body schema: application/json
increment_attempt
number
version_rev
required
string

Responses

Request samples

Content type
application/json
{
  • "increment_attempt": 0,
  • "version_rev": "0-12345678"
}

Response samples

Content type
application/json
{
  • "message": "Successfully increment all the tasks inside the runsheet"
}

Expire all tasks's status inside the runsheet

Expire all tasks's status inside the runsheet

Authorizations:
bearerAuth
path Parameters
runsheetID
required
string

ID of the runsheet to be modified

Request Body schema: application/json
version_rev
required
string

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "message": "Successfully expire all the tasks inside the runsheet"
}

Assign Driver

SysAdmin assigning a driver to an existing runshee

SysAdmin assigning a driver to an existing runsheet

Authorizations:
bearerAuth
path Parameters
runsheetID
required
string

ID of the runsheet to be modified

Request Body schema: application/json
version_rev
required
string
is_squad
boolean

information whether the task are squad orders or not

task_ids
Array of arrays
object

Responses

Request samples

Content type
application/json
{
  • "version_rev": "0-12345678",
  • "is_squad": false,
  • "task_ids": [
    ],
  • "driver": {
    }
}

Response samples

Content type
application/json
{
  • "message": "Successfully assigned driver to Runsheet"
}

Assign a driver to an existing runsheet

Assign a driver to an existing runsheet

Authorizations:
bearerAuth
path Parameters
runsheetID
required
string

ID of the runsheet to be modified

Request Body schema: application/json
version_rev
required
string

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "message": "Successfully assigned driver to Runsheet"
}

Assign Transporter

SysAdmin assigning a transporter to an existing ru

SysAdmin assigning a transporter to an existing runsheet

Authorizations:
bearerAuth
path Parameters
runsheetID
required
string

ID of the runsheet to be modified

Request Body schema: application/json
version_rev
required
string
task_ids
Array of arrays
object

Responses

Request samples

Content type
application/json
{
  • "version_rev": "0-12345678",
  • "task_ids": [
    ],
  • "org_transporter": {
    }
}

Response samples

Content type
application/json
{
  • "message": "Successfully assigned transporter to Runsheet"
}

Transporter to accept the existing runsheet

Only OrgTransporter is authorized.

Runsheet status between broadcasting & accepted. When accepted, the runsheet can be updated by same orgTransproter that accept the runsheet

Authorizations:
bearerAuth
path Parameters
runsheetID
required
string

ID of the runsheet to be modified

Request Body schema: application/json
version_rev
required
string
task_ids
Array of arrays
object

Responses

Request samples

Content type
application/json
{
  • "version_rev": "0-12345678",
  • "task_ids": [
    ],
  • "org_transporter": {
    }
}

Response samples

Content type
application/json
{
  • "message": "Successfully assigned transporter to Runsheet"
}