> For the complete documentation index, see [llms.txt](https://knowledge.out-smart.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledge.out-smart.com/openapi/tasks.md).

# Tasks

## Get tasks

> This api is used to sync external projects with WorkorderApp.\
> Each project record can contain the following data:\
> \
> \| Parameter        | Required | Type (size)     |\
> \|------------------|----------|-----------------|\
> \| code             | Y        | Varchar (255)   |\
> \| code\_ext         | N        | Varchar (255)   |\
> \| debtor\_number    | Y        | Varchar (255)   |\
> \| status           | Y        | Varchar (255)   |\
> \| name             | Y        | Varchar (255)   |\
> \| description      | N        | Text            |\
> \| progress         | N        | Integer         |\
> \| date\_start       | Y        | Varchar (255)   |\
> \| date\_end         | N        | Varchar (255)   |\
> \| active           | N        | Integer (1 or 0)|

```json
{"openapi":"3.1.0","info":{"title":"OpenApi","version":"1.0.0"},"servers":[{"url":"{{api_url}}"},{"url":"https://www.werkbonapp.nl"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}}},"paths":{"/tasks/":{"get":{"summary":"Get tasks","parameters":[{"name":"token","in":"query","schema":{"type":"string"}},{"name":"software_token","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Get tasks","headers":{"Date":{"schema":{"type":"string"}},"Server":{"schema":{"type":"string"}},"X-Powered-By":{"schema":{"type":"string"}},"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Content-Length":{"schema":{"type":"integer"}},"Keep-Alive":{"schema":{"type":"string"}},"Connection":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"messages":{"type":"array"},"response":{"type":"array","items":{"type":"object","properties":{"tsk_id":{"type":"string","format":"utc-millisec"},"tsk_tsk_id":{"type":"null"},"tsk_cus_id":{"type":"string","format":"utc-millisec"},"tsk_type":{"type":"string"},"tsk_name":{"type":"string"},"tsk_description":{"type":"string"},"tsk_reference":{"type":"string"},"tsk_category":{"type":"string","format":"utc-millisec"},"tsk_icon":{"type":"string"},"tsk_owner":{"type":"string","format":"color"},"tsk_assigned_to":{"type":"string"},"tsk_priority":{"type":"string"},"tsk_status":{"type":"string"},"tsk_debtor_nr":{"type":"string","format":"color"},"tsk_address_nr":{"type":"string"},"tsk_contact_nr":{"type":"string"},"tsk_timestamp_due":{"type":"null"},"tsk_timestamp_create":{"type":"string","format":"style"},"tsk_timestamp_mutate":{"type":"string"},"tsk_timestamp_started":{"type":"string","format":"style"},"tsk_timestamp_completed":{"type":"string"},"tsk_timestamp_start":{"type":"null"},"tsk_link":{"type":"null"},"tsk_project_nr":{"type":"null"},"tsk_project_activity_nr":{"type":"null"},"tsk_order_nr":{"type":"string"},"tsk_invoice_number":{"type":"string"},"tsk_quotation_number":{"type":"string"}}}}}}}}}},"tags":["Tasks"],"description":"This api is used to sync external projects with WorkorderApp.\nEach project record can contain the following data:\n\n| Parameter        | Required | Type (size)     |\n|------------------|----------|-----------------|\n| code             | Y        | Varchar (255)   |\n| code_ext         | N        | Varchar (255)   |\n| debtor_number    | Y        | Varchar (255)   |\n| status           | Y        | Varchar (255)   |\n| name             | Y        | Varchar (255)   |\n| description      | N        | Text            |\n| progress         | N        | Integer         |\n| date_start       | Y        | Varchar (255)   |\n| date_end         | N        | Varchar (255)   |\n| active           | N        | Integer (1 or 0)|"}}}}
```

## Add tasks

> This api is used to sync tasks with OutSmart.\
> Each task record can contain the following data:\
> \
> \| Parameter               | Required | Description                                                |\
> \|-------------------------|----------|------------------------------------------------------------|\
> \| tsk\_tsk\_id              | N        | Parent tasks ID                                            |\
> \| tsk\_type                | Y        | Type should be \`TASK\`                                      |\
> \| tsk\_name                | Y        | Name description of the task                               |\
> \| tsk\_description         | N        | Long description, can contain HTML format                  |\
> \| tsk\_reference           | Y        | External reference used to update same task in the future  |\
> \| tsk\_category            | Y        | Category used to group in OutSmart in general CALL or MAIL |\
> \| tsk\_icon                | N        | Icon used phone-square and envelope-o                      |\
> \| tsk\_owner               | N        | Employee number of the owner                               |\
> \| tsk\_assigned\_to         | N        | Employee number of the assignee                            |\
> \| tsk\_priority            | Y        | LOW, NORMAL, HIGH                                          |\
> \| tsk\_status              | Y        | YET\_TO\_START,IN\_PROGRESS,COMPLETED,EXPIRED,CLOSED          |\
> \| tsk\_debtor\_nr           | N        | Connected customer debtor number                           |\
> \| tsk\_address\_nr          | N        | Connected address code                                     |\
> \| tsk\_contact\_nr          | N        | Connected contactperson code                               |\
> \| tsk\_timestamp\_due       | N        | Timestamp due                                              |\
> \| tsk\_timestamp\_create    | N        | Timestamp created                                          |\
> \| tsk\_timestamp\_mutate    | N        | Timestamp mutated                                          |\
> \| tsk\_timestamp\_started   | N        | Timestamp started                                          |\
> \| tsk\_timestamp\_completed | N        | Timestamp completed                                        |\
> \| tsk\_timestamp\_start     | N        | Timestamp start                                            |\
> \| tsk\_link                | N        | Link(href) to be rendered in the UI                        |\
> \| tsk\_project\_nr          | N        | Connected project number                                   |\
> \| tsk\_project\_activity\_nr | N        | Connected project activity number                          |\
> \| tsk\_order\_nr            | N        | Connected work order number                                |\
> \| tsk\_invoice\_number      | N        | Connected invoice number                                   |\
> \| tsk\_quotation\_number    | N        | Connected quotation number                                 |

```json
{"openapi":"3.1.0","info":{"title":"OpenApi","version":"1.0.0"},"servers":[{"url":"{{api_url}}"},{"url":"https://www.werkbonapp.nl"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}}},"paths":{"/tasks/":{"post":{"summary":"Add tasks","parameters":[{"name":"token","in":"query","schema":{"type":"string"}},{"name":"software_token","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Response_200"}},"tags":["Tasks"],"description":"This api is used to sync tasks with OutSmart.\nEach task record can contain the following data:\n\n| Parameter               | Required | Description                                                |\n|-------------------------|----------|------------------------------------------------------------|\n| tsk_tsk_id              | N        | Parent tasks ID                                            |\n| tsk_type                | Y        | Type should be `TASK`                                      |\n| tsk_name                | Y        | Name description of the task                               |\n| tsk_description         | N        | Long description, can contain HTML format                  |\n| tsk_reference           | Y        | External reference used to update same task in the future  |\n| tsk_category            | Y        | Category used to group in OutSmart in general CALL or MAIL |\n| tsk_icon                | N        | Icon used phone-square and envelope-o                      |\n| tsk_owner               | N        | Employee number of the owner                               |\n| tsk_assigned_to         | N        | Employee number of the assignee                            |\n| tsk_priority            | Y        | LOW, NORMAL, HIGH                                          |\n| tsk_status              | Y        | YET_TO_START,IN_PROGRESS,COMPLETED,EXPIRED,CLOSED          |\n| tsk_debtor_nr           | N        | Connected customer debtor number                           |\n| tsk_address_nr          | N        | Connected address code                                     |\n| tsk_contact_nr          | N        | Connected contactperson code                               |\n| tsk_timestamp_due       | N        | Timestamp due                                              |\n| tsk_timestamp_create    | N        | Timestamp created                                          |\n| tsk_timestamp_mutate    | N        | Timestamp mutated                                          |\n| tsk_timestamp_started   | N        | Timestamp started                                          |\n| tsk_timestamp_completed | N        | Timestamp completed                                        |\n| tsk_timestamp_start     | N        | Timestamp start                                            |\n| tsk_link                | N        | Link(href) to be rendered in the UI                        |\n| tsk_project_nr          | N        | Connected project number                                   |\n| tsk_project_activity_nr | N        | Connected project activity number                          |\n| tsk_order_nr            | N        | Connected work order number                                |\n| tsk_invoice_number      | N        | Connected invoice number                                   |\n| tsk_quotation_number    | N        | Connected quotation number                                 |"}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://knowledge.out-smart.com/openapi/tasks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
