# API interface

The application programming interface (API) is used to make a connection between MXSuite and other software.

# Manage API keys

The HTTP(S) API has been available since MXSuite version 3.3.0.

To create an API key, there are 2 steps needed:

1. Create the API-user
2. Create the API-key

##### Create an API user

1. Open the **Administration** module
2. Click on **Users**  
    
    [![image.png](https://docs.mxsuite.nl/uploads/images/gallery/2025-01/scaled-1680-/image.png)](https://docs.mxsuite.nl/uploads/images/gallery/2025-01/image.png)
3. Create a new user for the API with the correct user rights. Assure that you select user type API.  
    
    [![image.png](https://docs.mxsuite.nl/uploads/images/gallery/2025-01/scaled-1680-/1BZimage.png)](https://docs.mxsuite.nl/uploads/images/gallery/2025-01/1BZimage.png)

##### Create the API key

1. Open the **Administration** module
2. Click on **API keys**  
    
    [![image.png](https://docs.mxsuite.nl/uploads/images/gallery/2025-01/scaled-1680-/5cHimage.png)](https://docs.mxsuite.nl/uploads/images/gallery/2025-01/5cHimage.png)
3. Click on **New...** 
    
    [![image.png](https://docs.mxsuite.nl/uploads/images/gallery/2025-01/scaled-1680-/qzTimage.png)](https://docs.mxsuite.nl/uploads/images/gallery/2025-01/qzTimage.png)
4. Enter the **Name** of the API so you can easily distinguish all API keys.
5. Select the related API user
6. If needed, enter an expiry date.
7. Click on **Save &amp; close**
8. Now the API key is created and visible.

# General API usage

##### Authentication

To access the API, first an API key needs to be created from the Administration page. The key will be used as a header in the HTTP request.

MXSuite expects a `mx-apikey` header on each request.

```bash
mx-apikey: apikey
```

<p class="callout warning">Besides the mx-apikey header, two more headers are required.  
  
**accept**: application/json, text/plain, \*/\*  
**content-type**: application/json  
</p>

##### Error handling

Successful responses will return a 200 or 204 HTTP response code. Errors will return a 4xx or a 5xx.

Some scenarios of errors:

- missing the mx-apikey header
- wrong api key
- expired api key
- MXSuite license expired
- The user doesn't have enough rights for that specific request

##### Examples

Below an example of how to use the API key in MXSuite. In this example the following parameters are used:

- URL for MXSuite: [http://localhost:4200/](http://localhost:4200/)
- Location mane: vessel2
- API key: 4a74ad039ffc4f3288da7a0e03e608da

##### Postman

Postman can be downloaded here: [https://www.postman.com/downloads/](https://www.postman.com/downloads/)  
Open Postman, click on Import button and paste the following command:

```bash
curl 'http://localhost:4200/api/ExternalCounters/UploadCountersHistory' \
  -H 'accept: application/json' \
  -H 'content-type: application/json' \
  -H 'mx-apikey: 4a74ad039ffc4f3288da7a0e03e608da' \
  --data-raw '[{"name":"c1","locationName":"vessel2","value":1119,"timestamp":"2024-10-05T12:11:11.000Z"},{"name":"C2","locationName":"Vessel2","value":2229,"timestamp":"2024-10-05T12:11:11.000Z"},{"name":"c3","locationName":"Vessel2","value":3339,"timestamp":"2024-10-05T12:11:11.000Z"}]'
```

In the Headers tab the API key can be changed:

[![image.png](https://docs.mxsuite.nl/uploads/images/gallery/2025-01/scaled-1680-/cejimage.png)](https://docs.mxsuite.nl/uploads/images/gallery/2025-01/cejimage.png)

In the Body tab, the payload value can be changed.

[![image.png](https://docs.mxsuite.nl/uploads/images/gallery/2025-01/scaled-1680-/CR6image.png)](https://docs.mxsuite.nl/uploads/images/gallery/2025-01/CR6image.png)

##### Console

Define a payload variable:

```json
let payload = [
    {
        "name": "c1",
	"locationName": "vessel2",
        "value": 1119,
        "timestamp": new Date(2024,09,05,15,11,11)
    },
    {
        "name": "C2",
	"locationName": "Vessel2",
        "value": 2229,
        "timestamp": new Date(2024,09,05,15,11,11)
    },
    {
        "name": "c3",
	"locationName": "Vessel2",
        "value": 3339,
        "timestamp": new Date(2024,09,05,15,11,11)
    }
];
```

Request:

```
fetch("http://localhost:4200/api/ExternalCounters/UploadCountersHistory", {
  "headers": {
    "accept": "application/json",
    "content-type": "application/json",
    "mx-apikey": "4a74ad039ffc4f3288da7a0e03e608da",
  },
  "body": JSON.stringify(payload),
  "method": "POST"
}).then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));

```

<p class="callout info">Don't forget to change the mx-apikey header value</p>

# Update counters via API

## Overview

The Counters API provides endpoints for managing running hours (counters) within the MXSuite system. This API allows you to upload counter history records for one or more counters at a location, with proper authorization controls.

### Base URL

- api/external/Counters/

#### 1. Upload Counters History

##### Overview

The Upload Counters History endpoint allows authorized users to upload a batch of running hours (counter) history records for one or more counters at a specific location. This is typically used to record the latest readings for equipment counters.

##### Endpoint

**POST** /api/external/Counters/UploadCountersHistory

##### Authentication

All endpoints require authentication and appropriate user rights.  
This endpoint requires the UpdateRunningHours right and the location must not be read-only.  
Authorization is enforced via the MXApiPolicyAuthorize attribute.

##### Request

```json
{
  name: string,
  locationName: string,
  value: number,
  timeStamp: Date
}
```

```json
[
  {
    "Name": "Main Engine",
    "LocationName": "Neptune",
    "Value": 12345,
    "TimeStamp": "2025-06-23T14:00:00Z"
  },
  {
    "Name": "Generator 1",
    "LocationName": "Neptune",
    "Value": 6789,
    "TimeStamp": "2025-06-23T14:00:00Z"
  }
]

```

##### Error Responses

- 400 Bad Request: Invalid input data (e.g., missing required fields, invalid values).
- 401 Unauthorized: User is not authenticated.
- 403 Forbidden: User does not have the required rights or the location is read-only.
- 500 Internal Server Error: An unexpected error occurred.

<p class="callout warning">If there is no location with that name, the entry is ignored.  
If there is no counter with that name for that location, the entry is ignored.  
If there is already an entry added for that counter in that location with the same value and timestamp, the entry is ignored.</p>

# API for Assets

<section class="markdown-section" data-markdown-raw="&#xA;&#xA;## Overview" data-section-index="2" id="bkmrk-overview"><section class="markdown-section" data-markdown-raw="&#xA;&#xA;## 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="&#xA;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="&#xA;&#xA;## 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="&#xA;All endpoints require authentication and appropriate user rights. The API uses token-based authentication through the &#96;MXApiPolicyAuthorize&#96; 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="&#xA;&#xA;## 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="&#xA;&#xA;## Overview" data-section-index="2"><section class="markdown-section" data-markdown-raw="&#xA;&#xA;## Base URL&#xA;&#96;&#96;&#96;&#xA;api/ExternalMaintenanceTask/&#xA;&#96;&#96;&#96;" 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="&#xA;&#xA;## Base URL&#xA;&#96;&#96;&#96;&#xA;api/ExternalMaintenanceTask/&#xA;&#96;&#96;&#96;" 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="&#xA;&#xA;## 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="&#xA;&#xA;## Base URL&#xA;&#96;&#96;&#96;&#xA;api/ExternalMaintenanceTask/&#xA;&#96;&#96;&#96;" 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="&#xA;&#xA;## 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="&#xA;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="&#xA;&#xA;## Base URL&#xA;&#96;&#96;&#96;&#xA;api/ExternalMaintenanceTask/&#xA;&#96;&#96;&#96;" 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="&#xA;&#xA;## 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="&#xA;All endpoints require authentication and appropriate user rights. The API uses token-based authentication through the &#96;MXApiPolicyAuthorize&#96; 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="&#xA;&#xA;## 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="&#xA;&#xA;## 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="&#xA;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="&#xA;&#xA;## Base URL&#xA;&#96;&#96;&#96;&#xA;api/ExternalMaintenanceTask/&#xA;&#96;&#96;&#96;" 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="&#xA;&#xA;## 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="&#xA;All endpoints require authentication and appropriate user rights. The API uses token-based authentication through the &#96;MXApiPolicyAuthorize&#96; 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="&#xA;&#xA;## 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="&#xA;&#xA;### 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="&#xA;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="&#xA;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="&#xA;**Endpoint:** &#96;POST api/ExternalMaintenanceTask/Create&#96;" 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="&#xA;**Authorization Required:**&#xA;- User must have &#96;AddMaintenanceTask&#96; rights&#xA;- 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="&#xA;**Request Body:**" data-section-index="15" id="bkmrk-2.-update-maintenanc"><section class="markdown-section" data-markdown-raw="&#xA;&#xA;### 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="&#xA;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="&#xA;**Endpoint:** &#96;PUT api/ExternalMaintenanceTask/Update&#96;" 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="&#xA;**Authorization Required:**&#xA;- User must have &#96;EditMaintenanceTask&#96; rights&#xA;- 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="&#xA;&#96;&#96;&#96;json&#xA;{&#xA;    &quot;locationName&quot;: &quot;string&quot;,&#xA;    &quot;categoryName&quot;: &quot;string&quot;,&#xA;    &quot;groupName&quot;: &quot;string&quot;,&#xA;    &quot;taskName&quot;: &quot;string&quot;,&#xA;    &quot;taskDescription&quot;: &quot;string&quot;,&#xA;    &quot;uniqueId&quot;: &quot;string&quot;,&#xA;    &quot;interval&quot;: number,&#xA;    &quot;intervalType&quot;: &quot;string&quot;,&#xA;    &quot;warningInterval&quot;: number,&#xA;    &quot;warningIntervalType&quot;: &quot;string&quot;,&#xA;    &quot;maxInterval&quot;: number,&#xA;    &quot;maxIntervalType&quot;: &quot;string&quot;,&#xA;    &quot;projectTypeIds&quot;: [&quot;string&quot;],&#xA;    &quot;defaultContractor&quot;: &quot;string&quot;,&#xA;    &quot;estimatedBudget&quot;: number,&#xA;    &quot;currency&quot;: &quot;string&quot;,&#xA;    &quot;taskRanks&quot;: [&quot;string&quot;],&#xA;    &quot;projectRanks&quot;: [&quot;string&quot;],&#xA;    &quot;defectRanks&quot;: [&quot;string&quot;],&#xA;    &quot;approverRanks&quot;: [&quot;string&quot;],&#xA;    &quot;runningHours&quot;: number,&#xA;    &quot;costCode&quot;: &quot;string&quot;,&#xA;    &quot;dueDate&quot;: &quot;string&quot;&#xA;}&#xA;&#96;&#96;&#96;" 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="&#xA;&#xA;### 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="&#xA;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="&#xA;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="&#xA;**Authorization Required:**&#xA;- User must have &#96;DeleteMaintenanceTask&#96; rights&#xA;- 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="&#xA;**Authorization Required:**&#xA;- User must have &#96;DeleteMaintenanceTask&#96; rights&#xA;- 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="&#xA;&#xA;### 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="&#xA;**Endpoint:** &#96;GET api/ExternalMaintenanceTask/Get&#96;" 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="&#xA;**Endpoint:** &#96;GET api/ExternalMaintenanceTask/Get&#96;" 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="&#xA;**Authorization Required:**&#xA;- 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="&#xA;**Query Parameters:**" data-section-index="48" id="bkmrk-request-body%3A-%7B-%C2%A0-%C2%A0-"><div><section class="markdown-section" data-markdown-raw="&#xA;**Authorization Required:**&#xA;- User must have &#96;DeleteMaintenanceTask&#96; rights&#xA;- 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="&#xA;&#96;&#96;&#96;&#xA;locationName: string&#xA;categoryName: string&#xA;groupName: string (optional)&#xA;taskName: string (optional)&#xA;&#96;&#96;&#96;" 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="&#xA;&#xA;## 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="&#xA;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="&#xA;&#xA;## Base URL&#xA;&#96;&#96;&#96;&#xA;api/ExternalMaintenanceTask/&#xA;&#96;&#96;&#96;" 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="&#xA;&#xA;## 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="&#xA;All endpoints require authentication and appropriate user rights. The API uses token-based authentication through the &#96;MXApiPolicyAuthorize&#96; 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="&#xA;&#xA;## 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="&#xA;&#xA;## 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="&#xA;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="&#xA;&#xA;1. **400 Bad Request**&#xA;   - When request validation fails&#xA;   - When required fields are missing&#xA;   - 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="&#xA;&#xA;2. **401 Unauthorized**&#xA;   - When authentication token is missing or invalid&#xA;   - 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="&#xA;&#xA;3. **403 Forbidden**&#xA;   - When location is read-only&#xA;   - 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="&#xA;&#xA;4. **404 Not Found**&#xA;   - When requested task doesn't exist&#xA;   - 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>