Skip to main content

Task Activities

Problem​

Ability to read what the technicians did on a task: how a failure was fixed, how long it took, which spare parts were used and what it cost.

Examples:

  • An alarm comes back on a production line: show the technician how it was fixed last time
  • Measure how often a failure occurs, and how much time it costs
  • Feed the activities of your tasks into your ERP or your data warehouse

Combined with the task search, this API links an event of your own system (an alarm, a ticket) to the work carried out in Mobility Work.

Endpoint​

GET /partners/v1/tasks/{taskId}/activities

Available on the Premium and Ultimate plans.

Use the full taskId, never the short id

taskId is the full task identifier returned by the task search in taskId, e.g. S00ySrMwTE7UTUk1stQ1STE31E2ySDPUNUw0MTQ3ME9LTjQwAwA. Store it on your side.

The short id displayed in Mobility Work (8 characters, e.g. 4086a9a6) is refused with a 400 (code 400045): it is not unique within a network, so it cannot designate a single task.

The task is looked up in the network of your API key only. A task of another network answers a 404 (code 404028), exactly like a task that does not exist.

Typical workflow​

  1. When you create a task (POST /partners/v1/tasks) or find it (GET /partners/v1/tasks/search), store its taskId next to the event of your system that relates to it.
  2. When you need to know how the task was handled, read its activities with that taskId.

Query parameters​

No parameter is mandatory.

  • page: current page, from 1 to 500 (default: 1)
  • size: number of activities per page, from 1 to 100 (default: 20)
  • sort: order of the activities, by completion date
    • completedAt.desc (default): latest first
    • completedAt.asc: oldest first
    • Two activities completed at the same time are ordered by activityId, in the same direction, so that browsing the pages never repeats nor skips an activity

A value out of these bounds answers a 400. Unknown parameters are ignored.

Response​

The response follows the same structure as the task search: _links, _items and _pagination.

{
"_links": [
{ "rel": "self", "href": "https://api.mobility-work.com/partners/v1/tasks/S00ySrMwTE7UTUk1stQ1STE31E2ySDPUNUw0MTQ3ME9LTjQwAwA/activities?page=1&size=20&sort=completedAt.desc" },
{ "rel": "next", "href": "https://api.mobility-work.com/partners/v1/tasks/S00ySrMwTE7UTUk1stQ1STE31E2ySDPUNUw0MTQ3ME9LTjQwAwA/activities?page=1&size=20&sort=completedAt.desc" },
{ "rel": "prev", "href": "https://api.mobility-work.com/partners/v1/tasks/S00ySrMwTE7UTUk1stQ1STE31E2ySDPUNUw0MTQ3ME9LTjQwAwA/activities?page=1&size=20&sort=completedAt.desc" }
],
"_items": [
{
"activityId": 8076317,
"description": "Removed the rotor for cleaning, replaced the bolts: the noise came from a bad tightening.",
"completedAt": "2026-02-12T09:54:18+00:00",
"timeSpentInMinutes": 120,
"reporter": {
"firstName": "Jean",
"lastName": "Dupont",
"email": "jean.dupont@client.com"
},
"meterReadings": [
{ "name": "Running hours", "value": "12450", "unitCode": "$hours", "unitSymbol": "h", "unitName": "Hours", "readAt": "2026-02-12T09:50:00+00:00" }
],
"sparePartConsumptions": [
{
"externalReference": "ERP-4471",
"name": "Ball bearing 6205",
"costCenter": "CC-MAINT-12",
"consumedQuantity": 2,
"unitPrice": { "amount": "12.50", "currency": "EUR" }
}
],
"additionalCosts": [
{ "amount": "180.00", "currency": "EUR", "description": "External provider" }
],
"associatedTask": {
"taskId": "S00ySrMwTE7UTUk1stQ1STE31E2ySDPUNUw0MTQ3ME9LTjQwAwA",
"_links": [
{ "rel": "canonical", "href": "https://api.mobility-work.com/partners/v1/tasks/S00ySrMwTE7UTUk1stQ1STE31E2ySDPUNUw0MTQ3ME9LTjQwAwA" },
{ "rel": "web", "href": "https://app.mobility-work.com/work-orders/tasks/detail/S00ySrMwTE7UTUk1stQ1STE31E2ySDPUNUw0MTQ3ME9LTjQwAwA" }
]
},
"_links": [
{ "rel": "canonical", "href": "https://api.mobility-work.com/partners/v1/tasks/S00ySrMwTE7UTUk1stQ1STE31E2ySDPUNUw0MTQ3ME9LTjQwAwA/activities/8076317" },
{ "rel": "web", "href": "https://app.mobility-work.com/work-orders/tasks/detail/S00ySrMwTE7UTUk1stQ1STE31E2ySDPUNUw0MTQ3ME9LTjQwAwA" }
]
}
],
"_pagination": {
"totalItemCount": 1,
"totalPageCount": 1,
"itemCountPerPage": 20,
"currentPage": 1,
"currentItemCount": 1
}
}

Detailed answers​

  • Current page URL
    • Pages start at 1 (not 0)
  • Previous page URL
    • Same as current page URL if the current page is page 1
  • Next page URL
    • Same as current page URL if there is no page after the current one

_items​

Each item is an activity of the task:

  • activityId: activity ID
  • description: what the technician wrote
  • completedAt: when the activity was carried out, in UTC
  • timeSpentInMinutes: time spent on the activity, null when it was not reported
  • reporter: the technician who reported the activity (firstName, lastName, email), null when they deleted their account
  • meterReadings: the meter values submitted with the activity (running hours, temperature...)
    • name: name of the meter
    • value: the value read, as a string so that no precision is lost
    • unitCode: stable identifier of the unit, to map it on your side. The units provided by Mobility Work start with $ ($hours)
    • unitSymbol: symbol of the unit (h, °C...)
    • unitName: name of the unit, in English for the units provided by Mobility Work (Hours), as created for the units added by your network
    • readAt: when the value was read, in UTC
  • sparePartConsumptions: the spare parts consumed
    • externalReference: the reference of the spare part in your system (item code)
    • name: name of the spare part
    • costCenter: cost center of the spare part, null when none is set. It is the current one of the spare part, not a snapshot taken at consumption
    • consumedQuantity: number of units consumed by the activity
    • unitPrice: the unit price frozen when the spare part was consumed, or its current unit price when none was frozen. It is the price Mobility Work displays on the task
  • additionalCosts: the other costs declared on the activity (amount, currency, description)
  • associatedTask: the task the activity belongs to (taskId)

Amounts​

Amounts are decimal strings, never floats, so that you never have to round them: "12.50" in EUR, "1250" in JPY. They carry the number of decimals of their currency. An additional cost stored with more decimals is rounded half up ("12.345" in EUR reads "12.35").

  • canonical: identifies the activity or the task in the API
  • web: opens the task in Mobility Work. An activity is displayed inside its task, so the web link of an activity opens its task

_pagination​

  • totalItemCount: number of activities of the task
  • totalPageCount: number of pages needed to browse all activities
  • itemCountPerPage: number of activities per page (the size parameter)
  • currentPage: current page returned by the API
  • currentItemCount: number of activities on the current page

Errors​

HTTPCodeWhen
400400045taskId is a short id, or is not a task identifier
400A query parameter is out of its bounds
401The API key is missing or invalid
403Your plan does not include this API
404404028No task of your network carries this taskId

Try it in Postman​

The whole API is described by an OpenAPI file that Postman imports directly.

  1. In Postman, click Import and paste the link https://docs.mobility-work.com/openapi.json.
  2. Before confirming, open View Import Settings and set the parameter generation (requests and responses) to Example. With the default setting, Postman fills every field with a placeholder such as <string> instead of the documented examples.
  3. In the Variables tab of the generated collection, add a variable apiKey holding your API key. The collection authorization already sends {{apiKey}} in the Api-Key header, and baseUrl is already set to https://api.mobility-work.com.
  4. Open Maintenance > Read the activities of a task, replace the example taskId with one of yours, and send.

Each documented response (200, 400, 401, 403, 404) comes with an example, visible next to the request.

Curl Example​

curl -X GET "https://api.mobility-work.com/partners/v1/tasks/S0syMzI1N0_STU4ySdY1MbRI1k00tEjSNbBMsbBITU0xsExNBgA/activities?page=1&size=20&sort=completedAt.desc" \
-H "Accept: application/json" \
-H "Api-Key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | jq