# API for Assets

<section class="markdown-section" data-markdown-raw="

## Overview" data-section-index="2" id="bkmrk-overview"><section class="markdown-section" data-markdown-raw="

## Overview" data-section-index="2" id="bkmrk-overview-1">### Overview

The Assets APIs provides endpoints for managing assets categories, assets groups, assets tasks and sign off tasks within the MXSuite system. This API allows you to retrieve assets categories, assets groups and task sign offs, to create, update, delete and retrive assets tasks with proper authorization controls.

<p class="callout info">Last updated for MXSuite version 3.5.0</p>

### Base URL


- <span style="color: rgb(0, 0, 0);">api/external/AssetsCategories/</span>
- <span style="color: rgb(0, 0, 0);">api/external/AssetsGroups/</span>
- <span style="color: rgb(0, 0, 0);">api/external/AssetsTasks/</span>
- <span style="color: rgb(0, 0, 0);">api/external/AssetsTaskSignOffs/</span>

## <span style="color: rgb(0, 0, 0);">1. Assets Categories</span>

##### <span style="color: rgb(0, 0, 0);">Overview</span>

</section><section class="markdown-section" data-markdown-raw="
The Maintenance Task API provides endpoints for managing maintenance tasks within the MXSuite system. This API allows you to create, update, delete, and retrieve maintenance tasks with proper authorization controls." data-section-index="3" id="bkmrk-the-maintenance-task"><span style="color: rgb(0, 0, 0);">The Assets Category API provides endpoints for managing assets categories within the MXSuite system. This API allows you to retrieve assets categories with proper authorization controls.</span></section>
##### <span style="color: rgb(0, 0, 0);">Base URL</span>

<span style="color: rgb(0, 0, 0);">api/external/AssetsCategories/</span>

<section class="markdown-section" data-markdown-raw="

## Authentication" data-section-index="5" id="bkmrk-authentication">##### <span style="color: rgb(0, 0, 0);">Authentication</span>

</section><section class="markdown-section" data-markdown-raw="
All endpoints require authentication and appropriate user rights. The API uses token-based authentication through the `MXApiPolicyAuthorize` attribute." data-section-index="6" id="bkmrk-all-endpoints-requir"><span style="color: rgb(0, 0, 0);">All endpoints require authentication and appropriate user rights. The API uses token-based authentication through the <span class="markdown-inline-code leading-[1.4]">MXApiPolicyAuthorize</span> attribute.</span></section>
### <span style="color: rgb(0, 0, 0);">Endpoints</span>

<section class="markdown-section" data-markdown-raw="

## Overview" data-section-index="2" id="bkmrk-1.-get-categories-en">
#### <span style="color: rgb(0, 0, 0);">1. Get categories</span>

##### <span style="color: rgb(0, 0, 0);">Endpoint</span>

</section><section class="markdown-section" data-markdown-raw="

## Overview" data-section-index="2"><section class="markdown-section" data-markdown-raw="

## Base URL
```
api/ExternalMaintenanceTask/
```" data-section-index="4"><span style="color: rgb(0, 0, 0);">GET /api/external/AssetsCategories/Get?locationName=Neptune</span>

##### <span style="color: rgb(0, 0, 0);">Request</span>

<span style="color: rgb(0, 0, 0);">Query parameter:</span>  
<span style="color: rgb(0, 0, 0);">• locationName=Neptune</span>

##### <span style="color: rgb(0, 0, 0);">Validations  
</span>

- <span style="color: rgb(0, 0, 0);">**LocationName**: Required, max length 128.</span>

##### <span style="color: rgb(0, 0, 0);">Response</span>

```json
[
  {
    "id": "b1a2c3d4-e5f6-7890-abcd-1234567890ab",
    "uniqueId": "CAT-001",
    "name": "Engine Room",
    "parentId": "c2b3a4d5-e6f7-8901-bcda-2345678901bc",
    "displayIndex": 1
  }
]

```

#### <span style="color: rgb(0, 0, 0);">2. Download category document</span>

##### <span style="color: rgb(0, 0, 0);">Endpoint</span>

<section class="markdown-section" data-markdown-raw="

## Base URL
```
api/ExternalMaintenanceTask/
```" data-section-index="4"><span style="color: rgb(0, 0, 0);">GET /api/external/AssetsCategories/DownloadDocument</span>

##### <span style="color: rgb(0, 0, 0);">Request</span>

<span style="color: rgb(0, 0, 0);">Query parameter:</span>

- <span style="color: rgb(0, 0, 0);">categoryId=6EBA173C-1A53-4A91-B926-517DCF371F91</span>
- <span style="color: rgb(0, 0, 0);">documentId=6E290768-D98B-40A1-AAE2-98E886334D41</span>

##### <span style="color: rgb(0, 0, 0);">Validations  
</span>

- <span style="color: rgb(0, 0, 0);">categoryId: Required **GUID**</span>
- <span style="color: rgb(0, 0, 0);">documentId: Required **GUID**</span>
- <span style="color: rgb(0, 0, 0);">User has right to see categories</span>

##### <span style="color: rgb(0, 0, 0);">Response</span>

```
<binary data>
```

</section></section><section class="markdown-section" data-markdown-raw="

## Overview" data-section-index="2" id="bkmrk-2.-assets-groups-ove">#### <span style="color: rgb(0, 0, 0);">3. Get category details</span>

##### <span style="color: rgb(0, 0, 0);">Endpoint</span>

<section class="markdown-section" data-markdown-raw="

## Base URL
```
api/ExternalMaintenanceTask/
```" data-section-index="4"><span style="color: rgb(0, 0, 0);">GET /api/external/AssetsCategories/GetDetails?id=6EBA173C-1A53-4A91-B926-517DCF371F91</span>

##### <span style="color: rgb(0, 0, 0);">Request</span>

<span style="color: rgb(0, 0, 0);">Query parameter:</span>  
<span style="color: rgb(0, 0, 0);">• id=6EBA173C-1A53-4A91-B926-517DCF371F91</span>

##### <span style="color: rgb(0, 0, 0);">Validations  
</span>

- <span style="color: rgb(0, 0, 0);">**id**: Required **GUID**</span>
- <span style="color: rgb(0, 0, 0);">**User is allowed on location**</span>
- <span style="color: rgb(0, 0, 0);">**User has rights to see categories**</span>

##### <span style="color: rgb(0, 0, 0);">Response</span>

```json
{
    "Comments": "When the parts are red colored in the inventory means that the stock of this part is to low and need to order.",
    "RatingPriority": 5.6,
    "DefaultCounter": "Deck"
    "IsCritical": true,
    "IsOperationalCritical": false,
    "Documents" :[
      {
        "Id": "a2934fa2-6f7e-4ac9-8210-681814ac86c4",
        "Name":"Paint specs",
        "Size":"5.2MB"
      },
      {
        "Id": "20380a36-8777-43f7-a79e-65bdb53f4621"
        "Name": "Inspection form"
        "Size": "547.45KB"
      }  
    ]
    "Properties" :[
      {
        "Name": "In use",
        "Value": "true"
      },
      {
        "Name": "Price"
        "Value": "24.45$"
      }  
    ]
}
```

</section>
</section>## <span style="color: rgb(0, 0, 0);">2. Assets Groups</span>

</section></section><section class="markdown-section" data-markdown-raw="

## Overview" data-section-index="2" id="bkmrk-overview-4">##### <span style="color: rgb(0, 0, 0);">Overview</span>

</section><section class="markdown-section" data-markdown-raw="
The Maintenance Task API provides endpoints for managing maintenance tasks within the MXSuite system. This API allows you to create, update, delete, and retrieve maintenance tasks with proper authorization controls." data-section-index="3" id="bkmrk-the-assets-groupsapi"><span style="color: rgb(0, 0, 0);">The Assets GroupsAPI provides endpoints for managing assets groups within the MXSuite system. This API allows you to retrieve assets groups with proper authorization controls.</span></section><section class="markdown-section" data-markdown-raw="

## Base URL
```
api/ExternalMaintenanceTask/
```" data-section-index="4" id="bkmrk-base-url-api%2Fexterna-1">##### <span style="color: rgb(0, 0, 0);">Base URL</span>

<span style="color: rgb(0, 0, 0);">api/external/AssetsGroups/</span>

<section class="markdown-section" data-markdown-raw="

## Authentication" data-section-index="5" id="bkmrk-authentication-2">##### <span style="color: rgb(0, 0, 0);">Authentication</span>

</section><section class="markdown-section" data-markdown-raw="
All endpoints require authentication and appropriate user rights. The API uses token-based authentication through the `MXApiPolicyAuthorize` attribute." data-section-index="6" id="bkmrk-all-endpoints-requir-1"><span style="color: rgb(0, 0, 0);">All endpoints require authentication and appropriate user rights. The API uses token-based authentication through the <span class="markdown-inline-code leading-[1.4]">MXApiPolicyAuthorize</span> attribute.</span></section><section class="markdown-section" data-markdown-raw="

## Endpoints" data-section-index="7" id="bkmrk-endpoints-1.-get-gro">### <span style="color: rgb(0, 0, 0);">Endpoints</span>

#### <span style="color: rgb(0, 0, 0);">1. Get groups</span>

##### <span style="color: rgb(0, 0, 0);">Endpoint</span>

<span style="color: rgb(0, 0, 0);">GET /api/external/AssetsGroups/Get?categoryId=b1a2c3d4-e5f6-7890-abcd-1234567890ab</span>

##### <span style="color: rgb(0, 0, 0);">Request</span>

<span style="color: rgb(0, 0, 0);">Query parameter:</span>  
<span style="color: rgb(0, 0, 0);">• categoryId=b1a2c3d4-e5f6-7890-abcd-1234567890ab</span>

##### <span style="color: rgb(0, 0, 0);">Response</span>

```json
[
  {
    "id": "d3e4f5a6-b7c8-9012-cdab-3456789012cd",
    "type": 1,
    "uniqueId": "GRP-001",
    "name": "Auxiliary Systems",
    "displayIndex":1
  }
]

```

##### <span style="color: rgb(0, 0, 0);">Validations  
</span>

- <span style="color: rgb(0, 0, 0);">**CategoryId**: Required, valid GUID</span>

</section></section><section class="markdown-section" data-markdown-raw="

## Overview" data-section-index="2" id="bkmrk-3.-assets-tasks-over">## <span style="color: rgb(0, 0, 0);">3. Assets Tasks</span>

##### <span style="color: rgb(0, 0, 0);">Overview</span>

</section><section class="markdown-section" data-markdown-raw="
The Maintenance Task API provides endpoints for managing maintenance tasks within the MXSuite system. This API allows you to create, update, delete, and retrieve maintenance tasks with proper authorization controls." data-section-index="3" id="bkmrk-the-assets-task-api-"><span style="color: rgb(0, 0, 0);">The Assets Task API provides endpoints for managing maintenance tasks within the MXSuite system. This API allows you to create, update, delete, and retrieve maintenance tasks with proper authorization controls.</span></section>```json
{
  "GroupId":"3C160DF1-3A5C-406F-BAC6-00A4AB8C44A9",
  "GroupType":1,
  "UniqueId": "Task-001",
  "TaskName": "Oil Change - Updated",
  "Interval": 45,
  "IntervalType": 1,
  "DueDate": "2025-06-01T00:00:00Z",
  "IsCounterBased": false,
  "IsRemarkMandatory": true,
  "IsProject": false,
  "IsRecurrent": true,
  "IsFixedInterval": true,
  "IsAtServiceRequest": false,
  "IsDefect": false,
  "TaskDescription": "Updated description for oil change.",
  "MaxInterval": 90,
  "MaxIntervalType": 2,
  "DueCounters": 150,
  "Downtime": 3.0,
  "WarningInterval": 10,
  "WarningIntervalType": 1,
  "CounterName": "Main Engine",
  "DefaultEstimatedBudget": {
    "Amount": 600.0,
    "Currency": "USD" 
  },
  "Ranks": ["Rank1", "Rank2"],
  "ApproverRanks": ["Approver1"],
  "RequiresApproval": true
}

```

<section class="markdown-section" data-markdown-raw="

## Base URL
```
api/ExternalMaintenanceTask/
```" data-section-index="4" id="bkmrk-base-url-api%2Fexterna-2">##### <span style="color: rgb(0, 0, 0);">Base URL</span>

<span style="color: rgb(0, 0, 0);">api/external/AssetsTasks/</span>

<section class="markdown-section" data-markdown-raw="

## Authentication" data-section-index="5" id="bkmrk-authentication-4">##### <span style="color: rgb(0, 0, 0);">Authentication</span>

</section><section class="markdown-section" data-markdown-raw="
All endpoints require authentication and appropriate user rights. The API uses token-based authentication through the `MXApiPolicyAuthorize` attribute." data-section-index="6" id="bkmrk-all-endpoints-requir-2"><span style="color: rgb(0, 0, 0);">All endpoints require authentication and appropriate user rights. The API uses token-based authentication through the <span class="markdown-inline-code leading-[1.4]">MXApiPolicyAuthorize</span> attribute.</span></section><section class="markdown-section" data-markdown-raw="

## Endpoints" data-section-index="7" id="bkmrk-endpoints-3">### <span style="color: rgb(0, 0, 0);">Endpoints</span>

</section><section class="markdown-section" data-markdown-raw="

### 1. Create Maintenance Task" data-section-index="8" id="bkmrk-1.-create-maintenanc">#### <span style="color: rgb(0, 0, 0);">1. Create Maintenance Task</span>

</section><section class="markdown-section" data-markdown-raw="
Creates a new maintenance task in the system." data-section-index="9" id="bkmrk-creates-a-new-mainte"><span style="color: rgb(0, 0, 0);">Creates a new maintenance task in the system.</span></section><section class="markdown-section" data-markdown-raw="
Creates a new maintenance task in the system." data-section-index="9"></section>##### <span class="markdown-bold-text" style="color: rgb(0, 0, 0);">Endpoint</span>

<section class="markdown-section" data-markdown-raw="
**Endpoint:** `POST api/ExternalMaintenanceTask/Create`" data-section-index="11"><span class="markdown-inline-code leading-[1.4]" style="color: rgb(0, 0, 0);">POST api/external/AssetsTasks/Create</span></section>##### <span class="markdown-bold-text" style="color: rgb(0, 0, 0);">Authorization Required</span>

<section class="markdown-section" data-markdown-raw="
**Authorization Required:**
- User must have `AddMaintenanceTask` rights
- Location must not be read-only" data-section-index="13">- <span style="color: rgb(0, 0, 0);">User must have <span class="markdown-inline-code leading-[1.4]">AddMaintenanceTask</span> rights</span>

##### <span style="color: rgb(0, 0, 0);">Validations  
</span>

- <span style="color: rgb(0, 0, 0);">**GroupId:** identifies the group together with **GroupType.** Both are ***required***</span>
- <span style="color: rgb(0, 0, 0);">**UniqueId**: Max length 50. Not required, but should be unique if provided.</span>
- <span style="color: rgb(0, 0, 0);">**TaskName**: ***Required***, max length 128, must be unique.</span>
- <span style="color: rgb(0, 0, 0);">**Interval**: Must be greater than 0, within limits based on **IntervalType**.</span>
- <span style="color: rgb(0, 0, 0);">**IntervalType, MaxIntervalType** or **WarningIntervalType**: should contain one of these values:</span>
    - - <span style="color: rgb(0, 0, 0);">1 = days</span>
        - <span style="color: rgb(0, 0, 0);">2 = weeks</span>
        - <span style="color: rgb(0, 0, 0);">3 = months</span>
- <span style="color: rgb(0, 0, 0);">**DueDate**: Must be between **01/01/1900** and **01/01/2100**.</span>
- <span style="color: rgb(0, 0, 0);">**TaskDescription**: ***Required*** depending on how it is set in Administration &gt; Assets &gt; Tasks &gt; Settings</span>  
    <span style="color: rgb(0, 0, 0);">[![image.png](https://docs.mxsuite.nl/uploads/images/gallery/2025-07/scaled-1680-/NP5image.png)](https://docs.mxsuite.nl/uploads/images/gallery/2025-07/NP5image.png)</span>
- <span style="color: rgb(0, 0, 0);">**Ranks**: ***Required*** for tasks requiring approval.</span>
- <span style="color: rgb(0, 0, 0);">**RequiresApproval**: Must be false for Silver licenses.</span>
- <span style="color: rgb(0, 0, 0);">**ApproverRanks: *Required*** only if **RequiresApproval** is set to **true.**</span>
- <span style="color: rgb(0, 0, 0);">**Currency**: when provided, it should contain the currency name as seen in Administration &gt; Currencies</span><span style="color: rgb(0, 0, 0);">[![image.png](https://docs.mxsuite.nl/uploads/images/gallery/2025-07/scaled-1680-/dReimage.png)](https://docs.mxsuite.nl/uploads/images/gallery/2025-07/dReimage.png)</span>
- <span style="color: rgb(0, 0, 0);">When a **rank** is provided (e.g.: **Ranks** or **ApproverRanks**), the name from Administration &gt; Ranks should be used:</span><span style="color: rgb(0, 0, 0);">[![image.png](https://docs.mxsuite.nl/uploads/images/gallery/2025-07/scaled-1680-/FFbimage.png)](https://docs.mxsuite.nl/uploads/images/gallery/2025-07/FFbimage.png)</span>
- <span style="color: rgb(0, 0, 0);">**CounterName**: required when **IsCounterBased** is set to true. The values provided should be the ones defined in Symmary &gt; Counters</span>
- <span style="color: rgb(0, 0, 0);">**WarningInterval + WarningIntervalType**: required when **IsCounterBased** is set to true.</span>

##### <span style="color: rgb(0, 0, 0);">Errors</span>

- <span style="color: rgb(0, 0, 0);">409 Conflict</span>
- <span style="color: rgb(0, 0, 0);">404 Not Found: Task not found.</span>
- <span style="color: rgb(0, 0, 0);">412 Precondition failed: Exceeding limits for intervals</span>
- <span style="color: rgb(0, 0, 0);">403 Forbidden </span>
- <span style="color: rgb(0, 0, 0);">400 Bad Request: Validation errors and required fields</span>

##### <span style="color: rgb(0, 0, 0);">Response</span>

```json
{
  "TaskId": "1463aea5-9062-45bf-8b9c-24cc5615d467"
}

```

##### <span style="color: rgb(0, 0, 0);">Fields details</span>

- <span style="color: rgb(0, 0, 0);">General task details</span>  
    <span style="color: rgb(0, 0, 0);">[![image.png](https://docs.mxsuite.nl/uploads/images/gallery/2025-07/scaled-1680-/image.png)](https://docs.mxsuite.nl/uploads/images/gallery/2025-07/image.png)</span>

- <span style="color: rgb(0, 0, 0);">Counter based tasks:</span><span style="color: rgb(0, 0, 0);">[![image.png](https://docs.mxsuite.nl/uploads/images/gallery/2025-07/scaled-1680-/MOPimage.png)](https://docs.mxsuite.nl/uploads/images/gallery/2025-07/MOPimage.png)</span>

- <span style="color: rgb(0, 0, 0);">Approver ranks:</span><span style="color: rgb(0, 0, 0);">[![image.png](https://docs.mxsuite.nl/uploads/images/gallery/2025-07/scaled-1680-/ZJximage.png)](https://docs.mxsuite.nl/uploads/images/gallery/2025-07/ZJximage.png)</span>

</section><section class="markdown-section" data-markdown-raw="
**Request Body:**" data-section-index="15" id="bkmrk-2.-update-maintenanc"><section class="markdown-section" data-markdown-raw="

### 2. Update Maintenance Task" data-section-index="19" id="bkmrk-2.-update-maintenanc-1">#### <span style="color: rgb(0, 0, 0);">2. Update Maintenance Task</span>

</section><section class="markdown-section" data-markdown-raw="
Updates an existing maintenance task." data-section-index="20" id="bkmrk-updates-an-existing-"><span style="color: rgb(0, 0, 0);">Updates an existing maintenance task.</span></section>##### <span class="markdown-bold-text" style="color: rgb(0, 0, 0);">Endpoint</span>

<section class="markdown-section" data-markdown-raw="
**Endpoint:** `PUT api/ExternalMaintenanceTask/Update`" data-section-index="22"><span class="markdown-inline-code leading-[1.4]" style="color: rgb(0, 0, 0);">PUT api/external/AssetsTasks/Update</span></section>##### <span class="markdown-bold-text" style="color: rgb(0, 0, 0);">Authorization Required</span>

<section class="markdown-section" data-markdown-raw="
**Authorization Required:**
- User must have `EditMaintenanceTask` rights
- Location must not be read-only" data-section-index="24">- <span style="color: rgb(0, 0, 0);">User must have <span class="markdown-inline-code leading-[1.4]">EditMaintenanceTask</span> rights</span>

```json
{
  "UniqueId": "Task-001",
  "TaskName": "Oil Change - Updated",
  "TaskId": "1463aea5-9062-45bf-8b9c-24cc5615d467",
  "GroupId":"3C160DF1-3A5C-406F-BAC6-00A4AB8C44A9",
  "GroupType":1,
  "Interval": 45,
  "IntervalType": 1,
  "DueDate": "2025-06-01T00:00:00Z",
  "IsCounterBased": false,
  "IsRemarkMandatory": true,
  "IsProject": false,
  "IsRecurrent": true,
  "IsFixedInterval": true,
  "IsAtServiceRequest": false,
  "IsDefect": false,
  "TaskDescription": "Updated description for oil change.",
  "MaxInterval": 90,
  "MaxIntervalType": 2,
  "DueCounters": 150,
  "Downtime": 3.0,
  "WarningInterval": 10,
  "WarningIntervalType": 1,
  "CounterName": "Main Engine",
  "DefaultEstimatedBudget": {
    "Amount": 600.0,
    "Currency":  "EURO"
  },
  "Ranks": ["Rank1", "Rank2"],
  "ApproverRanks": ["Approver1"],
  "RequiresApproval": true
}
```

##### <span style="color: rgb(0, 0, 0);">Validations</span>

<span style="color: rgb(0, 0, 0);">Same as the **Create** action.</span>

##### <span style="color: rgb(0, 0, 0);">Errors</span>

- <span style="color: rgb(0, 0, 0);">409 Conflict</span>
- <span style="color: rgb(0, 0, 0);">404 Not Found: Task not found.</span>
- <span style="color: rgb(0, 0, 0);">412 Precondition failed: Exceeding limits for intervals</span>
- <span style="color: rgb(0, 0, 0);">403 Forbidden </span>
- <span style="color: rgb(0, 0, 0);">400 Bad Request: Validation errors and required fields</span>

</section></section><section class="markdown-section" data-markdown-raw="
```json
{
    "locationName": "string",
    "categoryName": "string",
    "groupName": "string",
    "taskName": "string",
    "taskDescription": "string",
    "uniqueId": "string",
    "interval": number,
    "intervalType": "string",
    "warningInterval": number,
    "warningIntervalType": "string",
    "maxInterval": number,
    "maxIntervalType": "string",
    "projectTypeIds": ["string"],
    "defaultContractor": "string",
    "estimatedBudget": number,
    "currency": "string",
    "taskRanks": ["string"],
    "projectRanks": ["string"],
    "defectRanks": ["string"],
    "approverRanks": ["string"],
    "runningHours": number,
    "costCode": "string",
    "dueDate": "string"
}
```" data-section-index="16" id="bkmrk-3.-delete-maintenanc"><div class="markdown-code-outer-container"><div class="composer-message-codeblock"><div forcegap="2" forcererender="1"><div><section class="markdown-section" data-markdown-raw="

### 3. Delete Maintenance Task" data-section-index="30" id="bkmrk-3.-delete-maintenanc-1">#### <span style="color: rgb(0, 0, 0);">3. Delete Maintenance Task</span>

</section><section class="markdown-section" data-markdown-raw="
Deletes a maintenance task from the system." data-section-index="31" id="bkmrk-deletes-a-maintenanc"><span style="color: rgb(0, 0, 0);">Description: Deletes a maintenance task.</span></section><section class="markdown-section" data-markdown-raw="
Deletes a maintenance task from the system." data-section-index="31">- <span style="color: rgb(0, 0, 0);">**HTTP Method**: DELETE</span>
- <span style="color: rgb(0, 0, 0);">There can be to types of request bodies, please see examples below</span>

</section><section class="markdown-section" data-markdown-raw="
**Authorization Required:**
- User must have `DeleteMaintenanceTask` rights
- Location must not be read-only" data-section-index="35" id="bkmrk-authorization-requir-2">##### <span class="markdown-bold-text" style="color: rgb(0, 0, 0);">Authorization Required</span>

</section><section class="markdown-section" data-markdown-raw="
**Authorization Required:**
- User must have `DeleteMaintenanceTask` rights
- Location must not be read-only" data-section-index="35">- <span style="color: rgb(0, 0, 0);">User must have <span class="markdown-inline-code leading-[1.4]">Delete Maintenance Task</span> rights</span>

<span style="color: rgb(0, 0, 0);">**Request body for URL /api/external/AssetsTasks/delete?taskId={taskId}** </span>

##### <span style="color: rgb(0, 0, 0);">Response</span>

- <span style="color: rgb(0, 0, 0);">Status Code: 204 No Content</span>
- <span style="color: rgb(0, 0, 0);">Body: Empty response on success.</span>

</section></div></div></div></div>##### <span style="color: rgb(0, 0, 0);">Validations</span>

- <span style="color: rgb(0, 0, 0);">**taskId:** Required, must be a valid GUID.</span>

##### <span style="color: rgb(0, 0, 0);">Errors</span>

- <span style="color: rgb(0, 0, 0);">404 Not Found: Task not found.</span>
- <span style="color: rgb(0, 0, 0);">500 Internal Server Error: Unexpected errors.</span>

<section class="markdown-section" data-markdown-raw="

### 4. Get Maintenance Task Details" data-section-index="41" id="bkmrk-4.-get-maintenance-t">#### <span style="color: rgb(0, 0, 0);">4. Get</span>

##### <span style="color: rgb(0, 0, 0);">Endpoint</span>

<span style="color: rgb(0, 0, 0);">/api/external/AssetsTasks/Get**?taskId={taskId}**</span>

##### <span style="color: rgb(0, 0, 0);">Validations</span>

- <span style="color: rgb(0, 0, 0);">taskId: Required, must be a valid GUID.</span>

#### <span style="color: rgb(0, 0, 0);">5. Get Multiple Tasks </span>

##### <span style="color: rgb(0, 0, 0);">Endpoint</span>

<span style="color: rgb(0, 0, 0);">/api/external/AssetsTasks/GetTasks</span>

##### <span style="color: rgb(0, 0, 0);">Request JSON</span>

```json
[
    "1463aea5-9062-45bf-8b9c-24cc5615d467",
    "7b95cb8b-0cb8-4cdf-ad3e-3285a162cbea"
]

```

##### <span style="color: rgb(0, 0, 0);">Validations</span>

- <span style="color: rgb(0, 0, 0);">taskIds: Required, must be a list of valid GUIDs.</span>

#### <span style="color: rgb(0, 0, 0);">6. Get Tasks Ids</span>

<span style="color: rgb(0, 0, 0);"> Retrieves the IDs of maintenance task/s.</span>

</section><section class="markdown-section" data-markdown-raw="
**Endpoint:** `GET api/ExternalMaintenanceTask/Get`" data-section-index="44" id="bkmrk-endpoint%3A%C2%A0get-api%2Fex">- <span style="color: rgb(0, 0, 0);">HTTP Method: GET</span>
- <span style="color: rgb(0, 0, 0);">URL: /api/external/AssetsTasks/GetTasksIds</span>

</section><section class="markdown-section" data-markdown-raw="
**Endpoint:** `GET api/ExternalMaintenanceTask/Get`" data-section-index="44"></section>##### <span class="markdown-bold-text" style="color: rgb(0, 0, 0);">Authorization Required</span>

<section class="markdown-section" data-markdown-raw="
**Authorization Required:**
- Location must not be read-only" data-section-index="46">- <span style="color: rgb(0, 0, 0);">Location must not be read-only</span>

</section><section class="markdown-section" data-markdown-raw="
**Query Parameters:**" data-section-index="48" id="bkmrk-request-body%3A-%7B-%C2%A0-%C2%A0-"><div><section class="markdown-section" data-markdown-raw="
**Authorization Required:**
- User must have `DeleteMaintenanceTask` rights
- Location must not be read-only" data-section-index="35" id="bkmrk-request-body%3A">##### <span style="color: rgb(0, 0, 0);">Request body</span>

</section></div>```json
{
  "GroupId": "d3e4f5a6-b7c8-9012-cdab-3456789012cd",
  "GroupType": 1
}

```

</section><section class="markdown-section" data-markdown-raw="
```
locationName: string
categoryName: string
groupName: string (optional)
taskName: string (optional)
```" data-section-index="49" id="bkmrk-response%E2%80%A2-%C2%A0-%C2%A0status-">##### <span style="color: rgb(0, 0, 0);">Response</span>

<div class="markdown-code-outer-container"><div><div class="composer-message-codeblock"><div><div><div>- <span style="color: rgb(0, 0, 0);">Status Code: 200 OK</span>

</div></div></div></div></div></div>```json
[
  "e4f5a6b7-c8d9-0123-dabc-4567890123de",
  "f5a6b7c8-d9e0-1234-abcd-5678901234ef"
]
```

##### <span style="color: rgb(0, 0, 0);">Validations</span>

<div class="markdown-code-outer-container"><div>- <span style="color: rgb(0, 0, 0);">**GroupId**: Must be GUID</span>
- <span style="color: rgb(0, 0, 0);">**GroupType**: Must be a positive number.</span>

</div></div>##### <span style="color: rgb(0, 0, 0);">Errors</span>

<div class="markdown-code-outer-container"><div forcegap="2" forcererender="1"><div>- <span style="color: rgb(0, 0, 0);">404 Not Found: Task not found.• 500 Internal Server Error: Unexpected errors.</span>

</div></div></div><section class="markdown-section" data-markdown-raw="

## Overview" data-section-index="2" id="bkmrk-overview-7">#### <span style="color: rgb(0, 0, 0);">4. Assets Task Sign Offs</span>

##### <span style="color: rgb(0, 0, 0);">Overview</span>

</section><section class="markdown-section" data-markdown-raw="
The Maintenance Task API provides endpoints for managing maintenance tasks within the MXSuite system. This API allows you to create, update, delete, and retrieve maintenance tasks with proper authorization controls." data-section-index="3" id="bkmrk-the-assets-task-sign"><span style="color: rgb(0, 0, 0);">The Assets Task Sign Offs API provides endpoints for managing task sign offs within the MXSuite system. This API allows you to retrieve task sign offs with proper authorization controls.</span></section><section class="markdown-section" data-markdown-raw="

## Base URL
```
api/ExternalMaintenanceTask/
```" data-section-index="4" id="bkmrk-base-url-api%2Fexterna-3">##### <span style="color: rgb(0, 0, 0);">Base URL</span>

<span style="color: rgb(0, 0, 0);">api/external/AssetsTaskSignOffs/</span>

<section class="markdown-section" data-markdown-raw="

## Authentication" data-section-index="5" id="bkmrk-authentication-6">##### <span style="color: rgb(0, 0, 0);">Authentication</span>

</section><section class="markdown-section" data-markdown-raw="
All endpoints require authentication and appropriate user rights. The API uses token-based authentication through the `MXApiPolicyAuthorize` attribute." data-section-index="6" id="bkmrk-all-endpoints-requir-3"><span style="color: rgb(0, 0, 0);">All endpoints require authentication and appropriate user rights. The API uses token-based authentication through the <span class="markdown-inline-code leading-[1.4]">MXApiPolicyAuthorize</span> attribute.</span></section><section class="markdown-section" data-markdown-raw="

## Endpoints" data-section-index="7" id="bkmrk-endpoints-1.-get-sig">### <span style="color: rgb(0, 0, 0);">Endpoints</span>

#### <span style="color: rgb(0, 0, 0);">1. Get Sign-Offs</span>

</section></section>##### <span style="color: rgb(0, 0, 0);">Endpoint</span>

<div class="markdown-code-outer-container"><div><span style="color: rgb(0, 0, 0);">/api/external/AssetsTaskSignOffs/Get</span></div><div>  
</div></div>##### <span style="color: rgb(0, 0, 0);">Request JSON</span>

```json
{
  "TaskId": "7b95cb8b-0cb8-4cdf-ad3e-3285a162cbea",
  "NumberOfSignOffs": 5
}

```

##### <span style="color: rgb(0, 0, 0);">Validations</span>

- <span style="color: rgb(0, 0, 0);">TaskId: Required, must be a valid GUID</span>
- <span style="color: rgb(0, 0, 0);">NumberOfSignOffs: Optional, must be a valid number.</span>

##### <span style="color: rgb(0, 0, 0);">AuthorizationAuthorization</span>

<div class="markdown-code-outer-container" id="bkmrk--1"><div>- <span style="color: rgb(0, 0, 0);">Ensure the user has the required rights (UserRights) for each endpoint (Add task, edit task, delete task)</span>
- <span style="color: rgb(0, 0, 0);">The LocationIsNotReadOnly flag must be true for all operations.</span>

</div></div></section><div><section class="markdown-section" data-markdown-raw="

## Error Responses" data-section-index="51" id="bkmrk-error-responses">## <span style="color: rgb(0, 0, 0);">Error Responses</span>

<span style="color: rgb(0, 0, 0);">All error responses follow this structure:</span>

```json
{
  "Errors": [
    {
      "message": "string",
      "errorCode": number,
      "isBusinessException": false,
      "businessExceptionData": null,
      "failureServerReason": null
    }
  ]
}
```

```json
{
    "errors": [
        {
            "message": "Category name is required",
            "errorCode": 9,
            "isBusinessException": false,
            "businessExceptionData": null,
            "failureServerReason": null
        }
    ]
}
```

</section><section class="markdown-section" data-markdown-raw="
The API may return the following error responses:" data-section-index="53" id="bkmrk-the-api-may-return-t"><span style="color: rgb(0, 0, 0);">The API may return the following error responses:</span></section><section class="markdown-section" data-markdown-raw="

1. **400 Bad Request**
   - When request validation fails
   - When required fields are missing
   - When field values are invalid" data-section-index="54" id="bkmrk-400-bad-request-when">1. <span class="markdown-bold-text" style="color: rgb(0, 0, 0);">400 Bad Request</span>

- <span style="color: rgb(0, 0, 0);">When request validation fails</span>
- <span style="color: rgb(0, 0, 0);">When required fields are missing</span>
- <span style="color: rgb(0, 0, 0);">When field values are invalid</span>

</section><section class="markdown-section" data-markdown-raw="

2. **401 Unauthorized**
   - When authentication token is missing or invalid
   - When user doesn't have required rights" data-section-index="55" id="bkmrk-401-unauthorized-whe">- <span class="markdown-bold-text" style="color: rgb(0, 0, 0);">401 Unauthorized</span>
    - <span style="color: rgb(0, 0, 0);">When the authentication token is missing or invalid</span>
    - <span style="color: rgb(0, 0, 0);">When the user doesn't have required rights</span>
- <span class="markdown-bold-text" style="color: rgb(0, 0, 0);">403 Forbidden</span>
    - <span style="color: rgb(0, 0, 0);">When location is read-only</span>
    - <span style="color: rgb(0, 0, 0);">When user doesn't have sufficient permissions</span>
- <span class="markdown-bold-text" style="color: rgb(0, 0, 0);">404 Not Found</span>
    - <span style="color: rgb(0, 0, 0);">When the requested task doesn't exist</span>
    - <span style="color: rgb(0, 0, 0);">When location or category doesn't exist</span>
- <span class="markdown-bold-text" style="color: rgb(0, 0, 0);">409 Conflict</span>
    - <span style="color: rgb(0, 0, 0);">When trying to create a duplicate task</span>
    - <span style="color: rgb(0, 0, 0);">When a task name already exists in the specified location/category/group</span>

</section><section class="markdown-section" data-markdown-raw="

3. **403 Forbidden**
   - When location is read-only
   - When user doesn't have sufficient permissions" data-section-index="56" id="bkmrk-403-forbidden-when-l">## <span style="color: rgb(0, 0, 0);">Validation Rules and status codes</span>

</section><section class="markdown-section" data-markdown-raw="

4. **404 Not Found**
   - When requested task doesn't exist
   - When location or category doesn't exist" data-section-index="57" id="bkmrk-404-not-found-when-r"></section><div><div><span style="color: rgb(0, 0, 0);">0: **UnknownError** - A gene</span>ric or unspecified error. Used as a fallback when the specific cause is not known. </div><div>  
</div><div>Status: **400 Bad Request**</div>1–3: **Duplicate/Uniqueness Errors**- 1: **TaskNameDuplicate**: The task name already exists in the system.
- 2: **UniqueIdDuplicate**: The unique identifier for a task is already in use.
- 3: **TaskNameDuplicateInGroup**: The task name is duplicated within a specific group.

</div></div>Status: **409 Conflict**

<div><div>4–10: **Not Found Errors**- 4: **LocationNotFound**: The specified location does not exist.
- 5: **CategoryNotFound**: The specified category does not exist.
- 6: **GroupNotFound**: The specified group does not exist.
- 7: **TaskNotFound**: The specified task does not exist.
- 8: **RankNotFound**: The specified rank does not exist.
- 9: **ApproverRankNotFound**: The specified approver rank does not exist.
- 10: **CurrencyNotFound**: The specified currency does not exist.

  
<div>Status: **404 Not Found**</div>  
11–31: **Required Field Errors**- 11: **LocationRequired**: Location is required but missing.
- 12: **CategoryRequired**: Category is required but missing.
- 13: **GroupRequired**: Group is required but missing.
- 14: **TaskRequired**: Task is required but missing.
- 15: **TaskNameRequired**: Task name is required but missing.
- 16: **TaskDescriptionRequired**: Task description is required but missing.
- 17: **UniqueIdRequired**: Unique ID is required but missing.
- 18: **IntervalRequired**: Interval value is required but missing.
- 19: **IntervalTypeRequired**: Interval type is required but missing.
- 20: **WarningIntervalRequired**: Warning interval is required but missing.
- 21: **WarningIntervalTypeRequired**: Warning interval type is required but missing.
- 22: **MaxIntervalTypeRequired**: Max interval type is required but missing.
- 23: **ProjectRanksRequired**: Project ranks are required but missing.
- 24: **DefectRanksRequired**: Defect ranks are required but missing.
- 25: **ApproverRanksRequired**: Approver ranks are required but missing.
- 26: **RunningHoursRequired**: Running hours are required but missing.
- 27: **DueDateRequired**: Due date is required but missing.
- 28: **TaskIdRequired**: Task ID is required but missing.
- 29: **RankRequired**: Rank is required but missing.
- 30: **RanksRequired**: Ranks are required but missing.
- 31: **TaskListEmptyOrNull**: The list of tasks is empty or null.

<div>Status: **400 Bad Request**</div>  
<div>32–34: **Length Validation Errors**</div>- 32: **TaskNameTooLong**: Task name exceeds the maximum allowed length.
- 33: **LocationNameTooLong**: Location name exceeds the maximum allowed length.
- 34: **UniqueIdTooLong**: Unique ID exceeds the maximum allowed length.

<div>Status: **400 Bad Request**</div>  
35–44: **Numeric/Value Validation Errors**- 35: **GroupTypeGreaterThanZero**: Group type must be greater than zero.
- 36: **IntervalGreaterThanZero**: Interval must be greater than zero.
- 37: **WarningIntervalGreaterThanZero**: Warning interval must be greater than zero.
- 38: **MaxIntervalGreaterThanZero**: Max interval must be greater than zero.

</div><div>39–41: **412 Precondition Failed**</div><div>- 39: **IntervalExceedsLimit**: Interval exceeds the allowed limit.
- 40: **WarningIntervalExceedsLimit**: Warning interval exceeds the allowed limit.
- 41: **MaxIntervalExceedsLimit**: Max interval exceeds the allowed limit.
- 42: **EstimatedBudgetAmountGreaterThanZero**: Estimated budget must be greater than zero.
- 43: **DueRunningHoursPositiveError**: Due running hours must be positive.
- 44: **DowntimeGreaterThanZero**: Downtime must be greater than zero. Status:

<div>Others: **400 Bad Request**</div>  
<div>45–51: **Business Rule Validation Errors**</div>- 45: **ProjectCannotBeCounterBased**: Projects cannot be based on counters.
- 46: **TaskCompletionApprovalNotAllowed**: Task completion approval is not allowed.
- 47: **DefectRequiresOneTimeTask**: Defect tasks must be one-time tasks.
- 48: **ApproverRankNotAllowed**: Approver rank is not allowed.
- 49: **DowntimeNotAllowed**: Downtime is not allowed.
- 50: **AttachmentNotAllowed**: Attachments are not allowed.
- 51: **PriorityNotAllowed**: Priority is not allowed. Status:
- 45, 47: **412 Precondition Failed**
- 46, 48–51: **403 Forbidden**

  
<div>54–56: **Invalid/Out-of-Range Errors**</div>- 54: **WarningIntervalTypeInvalid**: Warning interval type is invalid.
- 55: **IntervalTypeInvalid**: Interval type is invalid.
- 56: **MaxIntervalTypeInvalid**: Max interval type is invalid.
- 57: **InvalidRanks**: Ranks are invalid

Status: **400 Bad Request**</div><div>  
<div>- 58: **UserIsNotAllowedOnLocation**: User is not allowed on the specified location (**400 Bad Request**)

</div></div>  
</div></section></section>