Work order management

A work order in Deepomatic corresponds to the set of elementary tasks that must be performed by a field worker.

A task in this context refers to a specific checkpoint that can be validated via the Deepomatic application. Tasks are grouped into task groups, which we can consider as a type of photo requested from the field workers. The list of task groups therefore corresponds to the list of photos that a field worker must take during an intervention.

Here you can find the different endpoints to create, update and delete work orders. Open each card to learn more.

All endpoints are described with the EU (Europe) server format. If your application runs on the US server, you will need to use the following format: https://api.{site-id}.customers.us1.deepomatic.com/v0.2/.

Every Deepomatic application is versioned. We recommend to not integrate any logic based on the tasks and task groups ids as those ids changes when a version is upgraded. You can instead use tasks and task groups names that are agnostic to version changes.

Create a new work order

POST https://api.{site-id}.customers.deepomatic.com/v0.2/work-orders/

Headers

NameTypeDescription

Authorization*

string

Deepomatic API Key associated to your account.

Request Body

NameTypeDescription

name*

string

Name of the work order. Only letters, numbers, underscores and hyphens are accepted for the name.

The name is limited to 128 characters maximum.

It recommended to set a unique name per work order. If your system keeps track of work orders, it is also recommended to use your internal work order id as a name.

metadata

object

Dictionary to set metadata to a work order. Metadata let you store custom data on a per work order basis. Metadata can be used in the visual applications to cross-validate analysis but also to filter the work orders on our monitoring platform.

To retrieve the list of metadata to be provided for your application, please refer to the metadata documentation.

When a metadata is not available, it is not necessary to include the field in the request.

The metadata must be sent as a key-value object, otherwise a 400 error will be generated.

tags

array

List of tags attached to your work order. These tags make it possible to group work orders according to your own logic.

field_engineer_email

string

Email of the field engineer assigned to the work order.

For analytics purposes, it is recommended to assign a specific field engineer to a work order.

Warning: the API will only accept engineers that have a Deepomatic account.

user_group_ids

array

List of user group assigned to the work order. User groups allow you to define the group(s) associated to a specific work order.

To retrieve the list of user_group_ids, please contact your CSM.

work_order_types

array

List of work order types. Work order types allow you to filter the tasks of a work order at the time of its creation to activate only the relevant tasks for the intervention.

Warning: this requires that work order types have been configured beforehand. To retrieve the list of work order types configured, please refer to the tasks configuration documentation.

Response format

progress_score - number (between 0 and 100) : completion state of the work order computed based on the tasks included in the conformity score.

{
    "id": "1eb136be-65d9-4964-8a8d-1a20c1573d7b",
    "name": "work-order",
    "site_id": "39c9d63f-a517-4f9d-ae45-415d80931226",
    "progress_score": 0,
    "review_date": null,
    "create_date": "2023-05-29T12:12:11.584841Z",
    "update_date": "2023-05-29T12:12:12.020635Z",
    "tags": [
        "group-1",
        "group-2"
    ],
    "app_version_id": "c14d3664-b69f-4357-a443-866111a65fb8",
    "parameters": null,
    "metadata": {
        "region": "North",
        "intervention_date": "05-29-2023"
    },
    "types": [
        {
            "id": "47fed03f-0894-4d1a-91ff-d0ab0af641b0",
            "name": "maintenance"
        },
        {
            "id": "4e9acb6f-ee3e-4e90-86fd-8baea0dfd969",
            "name": "one-equipment"
        }
    ],
    "field_engineer_email": "john.doe@deepomatic.com,
    "field_engineer_name": "John Doe",
    "user_group_ids": [],
    "tasks": [
        {
            "id": "db081122-b571-48d9-b19b-6f690be1e94e",
            "name": "equipment_after_intervention",
            "label": "Is it a photo of the equipment after intervention?",
            "type": "Boolean",
            "group_id": "6f15b52e-4717-4ec5-a8b2-bd58e7eec5ca",
            "group_name": "equipment-after-intervention",
            "state": null
        }, 
        {
            "id": "b5293ca9-faa1-4880-8c07-1bb0475da4d6",
            "name": "equipment_after_intervention_degradations",
            "label": "Number of degradations",
            "type": "Number",
            "group_id": "6f15b52e-4717-4ec5-a8b2-bd58e7eec5ca",
            "group_name": "equipment-after-intervention",
            "state": null
        },
    ],
    "task_groups": [
        {
            "id": "6f15b52e-4717-4ec5-a8b2-bd58e7eec5ca",
            "name": "equipment-after-intervention",
            "display_name": "Equipment after intervention",
            "order": 0
        }
    ]
}

Request example

curl 'https://api.{site-id}.customers.deepomatic.com/v0.2/work-orders/' \
    -X POST \
    -H 'Authorization: Token <your_api_key>' \
    -H 'Content-Type: application/json' \
    -d '{
    "name": "work-order",
    "metadata": {
        "region": "North",
        "intervention_date": "05-29-2023"
    },
    "tags": ["group-1", "group-2"],
    "field_engineer_email": "john.doe@deepomatic.com", 
    "work_order_types": ["one-equipment", "maintenance"]
}'

Only letters, numbers, underscores and hyphens are accepted for the name.

The name is limited to 128 characters maximum.

Update a work order

PATCH https://api.{site-id}.customers.deepomatic.com/v0.2/work-orders/{id}/

Path Parameters

NameTypeDescription

id*

string

Id of the work order to update This id corresponds to the id returned in the create a work order API response.

Headers

NameTypeDescription

Authorization*

string

Deepomatic API Key associated to your account.

Request Body

NameTypeDescription

name

string

Override work order name

metadata

object

Override work order metadata

To retrieve the list of metadata to be provided for your application, please refer to the metadata documentation.

tags

array

Override work order tags

field_engineer_email

string

Add or override a field engineer

Warning: the API will only accept engineers that have a Deepomatic account.

user_group_ids

array

List of user group assigned to the work order. User groups allow you to define the group(s) associated to a specific work order.

To retrieve the list of user_group_ids, please contact your CSM.

work_order_types

array

Override work order types

Response format

progress_score - number (between 0 and 100) : completion state of the work order computed based on the tasks included in the conformity score.

{
    "id": "1eb136be-65d9-4964-8a8d-1a20c1573d7b",
    "name": "work-order",
    "site_id": "39c9d63f-a517-4f9d-ae45-415d80931226",
    "progress_score": 0,
    "review_date": null,
    "create_date": "2023-05-29T12:12:11.584841Z",
    "update_date": "2023-05-29T12:15:12.020635Z",
    "tags": [
        "group-1",
        "group-2"
    ],
    "app_version_id": "c14d3664-b69f-4357-a443-866111a65fb8",
    "parameters": null,
    "metadata": {
        "region": "North",
        "intervention_date": "05-29-2023"
    },
    "types": [
        {
            "id": "47fed03f-0894-4d1a-91ff-d0ab0af641b0",
            "name": "maintenance"
        },
        {
            "id": "4e9acb6f-ee3e-4e90-86fd-8baea0dfd969",
            "name": "one-equipment"
        }
    ],
    "field_engineer_email": "richard.roe@deepomatic.com,
    "field_engineer_name": "Richard Roe",
    "user_group_ids": [],
    "tasks": [
        {
            "id": "db081122-b571-48d9-b19b-6f690be1e94e",
            "name": "equipment_after_intervention",
            "label": "Is it a photo of the equipment after intervention?",
            "type": "Boolean",
            "group_id": "6f15b52e-4717-4ec5-a8b2-bd58e7eec5ca",
            "group_name": "equipment-after-intervention",
            "state": null
        }, 
        {
            "id": "b5293ca9-faa1-4880-8c07-1bb0475da4d6",
            "name": "equipment_after_intervention_degradations",
            "label": "Number of degradations",
            "type": "Number",
            "group_id": "6f15b52e-4717-4ec5-a8b2-bd58e7eec5ca",
            "group_name": "equipment-after-intervention",
            "state": null
        },
    ],
    "task_groups": [
        {
            "id": "6f15b52e-4717-4ec5-a8b2-bd58e7eec5ca",
            "name": "equipment-after-intervention",
            "display_name": "Equipment after intervention",
            "order": 0
        }
    ]
}

Request example

curl 'https://api.{site-id}.customers.deepomatic.com/v0.2/work-orders/{id}/' \
    -X PATCH \
    -H 'Authorization: Token <your_api_key>' \       
    -H 'Content-Type: application/json' \      
    -d '{"field_engineer_email": "richard.roe@deepomatic.com"}'

Delete a work order

DELETE https://api.{site-id}.customers.deepomatic.com/v0.2/work-orders/{id}/

Path Parameters

NameTypeDescription

id*

string

Id of the work order to delete This id corresponds to the id returned in the create a work order API response.

Headers

NameTypeDescription

Authorization*

string

Deepomatic API Key associated to your account.

1

Request example

curl 'https://api.{site-id}.customers.deepomatic.com/v0.2/work-orders/{id}/' \ 
    -X DELETE \
    -H 'Authorization: Token <your_api_key>' \      
    -H 'Content-Type: application/json'       

Last updated