Documentation forAdministrator
Support

Scheduled Maintenance API

moduleAPI Documentation Updated 17 Oct 2026

Scheduled Maintenance API

Product: NEXTMEGABYTE (Greenitco ITAM) · Module: API Documentation · Audience: Developer, Administrator

This page lists the NEXTMEGABYTE REST API endpoints for scheduled maintenance. All URLs are relative to your portal, for example https://your-domain.com/api/.... Authenticate first with the Login API and send the standard headers described in the API Overview. Example values are shortened and anonymized.

Add an attachment to a maintenance task

POST /api/task/add/attachment

Uploads proof or documents to a maintenance task.

Headers: standard authenticated headers (apptoken, token, Content-Type: application/x-www-form-urlencoded). See API Overview.

Request Body Parameters

Parameter Type Required Description
id String Yes task id
proof file Yes attachment

Example request

{
  "id": "<string>",
  "proof": "<string>"
}

Top-level response fields: code, status, message, data

Example response (values shortened and anonymized)

{
  "code": 200,
  "status": "success",
  "message": "Task updated successfully",
  "data": {
    "id": 384,
    "task_id": "<string>",
    "original_file_name": "<string>",
    "path": "https://your-domain.com/..."
  }
}

List assigned maintenance plans

POST /api/assigned-plan-list

Returns maintenance plans assigned to the signed-in user, by tab (ongoing, week, month, year, completed, all).

Headers: standard authenticated headers (apptoken, token, Content-Type: application/x-www-form-urlencoded). See API Overview.

Request Body Parameters

Parameter Type Required Description
index String Yes 0
search_key: String Yes any kind of search key
order_dir String Yes 1
order_by String Yes 7
tab String Yes ongoing,allplan,week,month,year,completed

Example request

{ "index": "0", "search_key": "any kind of search ke" "order_dir": "1", "order_by": "7", "tab": "ongoing,allplan,week,month,year,completed" }

Top-level response fields: code, status, message, tot, filter_record, current_index, is_prev_index, is_next_index, data

Example response (values shortened and anonymized)

{
  "code": 200,
  "status": "success",
  "message": "",
  "tot": 1,
  "filter_record": 1,
  "current_index": 0,
  "is_prev_index": 0,
  "is_next_index": 0,
  "data": [
    {
      "id": 2329,
      "allocated_id": 92,
      "plan_id": 27,
      "color": "<string>",
      "file_name": "https://your-domain.com/...",
      "device_id": 2,
      "status_id": 2,
      "cat_name": "<string>",
      "model_name": "<string>",
      "supplier_name": null,
      "plan_title": "<string>",
      "full_name": "<string>",
      "status": "Inprogress",
      "last_updated_at": "<string>",
      "scheduled_date": "<string>",
      "device_tag": "<string>",
      "percentage": 50,
      "cost": "<string>",
      "p": "<string>",
      "assigned_person": "<string>",
      "...": "2 more fields"
    }
  ]
}

Update a maintenance task

POST /api/my-allocated-task/update

Updates a task of an allocated maintenance plan, including GPS and proof when required.

Headers: standard authenticated headers (apptoken, token, Content-Type: application/x-www-form-urlencoded). See API Overview.

Request Body Parameters

Parameter Type Required Description
task_id String Yes taskId
comment: String Yes test
cost int Yes 1000
plan_id String Yes planId
latitude double Yes location latitude
longitude double Yes location longitude
location String Yes current location
last_step String Yes tasks length

Example request

{ "task_id": "123", "comment": "test" "cost": "1000", "plan_id": "123", "latitude": "xxxx.xxxx" "longitude": "xxxx.xxxx" "location": "delhi", "last_step": "2", }

Top-level response fields: code, status, message, data

Example response (values shortened and anonymized)

{
  "code": 200,
  "status": "success",
  "message": "Task updated successfully",
  "data": []
}

Get maintenance plan details

GET /api/my-allocated-task-list/plan-id

Returns a plan with its tasks and progress.

Headers: standard authenticated headers (apptoken, token, Content-Type: application/x-www-form-urlencoded). See API Overview.

Top-level response fields: code, status, message, data

Example response (values shortened and anonymized)

{
  "code": 200,
  "status": "success",
  "message": "",
  "data": {
    "plan": {
      "plan_name": "<string>",
      "duration": "<string>",
      "manager": null,
      "created_by": "<string>",
      "created_at": "2024-09-17 16:37:03",
      "updated_at": "2024-09-18 09:42:39",
      "description": "<string>",
      "status": "Inprogress",
      "recursion_plan": "<string>"
    },
    "percentage": 50,
    "last_order": 2,
    "first_order": 1,
    "tasks": [
      {
        "id": 211,
        "task_id": 52,
        "status": 1,
        "order_no": 1,
        "latitude": "<string>",
        "longitude": "<string>",
        "cost": "<string>",
        "comment": null,
        "location": "<string>",
        "task_title": "<string>",
        "task_description": "<string>",
        "task_notes": "<string>",
        "gps_required": 1,
        "proof_required": 1,
        "downtime_required": 0,
        "downtime_duration": null,
        "image_path": "https://your-domain.com/..."
      },
      "..."
    ],
    "attach": []
  }
}

Remove a maintenance task attachment

POST /api/task/delete/attachment

Deletes an attachment from a maintenance task.

Headers: standard authenticated headers (apptoken, token, Content-Type: application/x-www-form-urlencoded). See API Overview.

Request Body Parameters

Parameter Type Required Description
id: String Yes that id which returns from add attachment api response
task_id: String Yes taskId

Example request

{
  "id": "<string>",
  "task_id": "<string>"
}

Example response (values shortened and anonymized)

{
  "msg": "Task attachment deleted successfully",
  "status": "success"
}

Get module permissions

GET /api/getModulesPermissions/module-id

Returns the signed-in user's permissions for a module.

Headers: standard authenticated headers (apptoken, token, Content-Type: application/x-www-form-urlencoded). See API Overview.

Top-level response fields: status, msg, isTechnician, data

Example response (values shortened and anonymized)

{
  "status": "success",
  "msg": "Permission fetched successfully",
  "isTechnician": true,
  "data": [
    {
      "id": 408,
      "name": "PlanView",
      "status": true
    },
    "..."
  ]
}

Update maintenance plan status

POST /api/update-status/planId

Changes the status of a maintenance plan (for example In Progress, Postponed, Hold).

Headers: standard authenticated headers (apptoken, token, Content-Type: application/x-www-form-urlencoded). See API Overview.

Request Body Parameters

Parameter Type Required Description
remark String Yes test
status: int Yes statusId

Example request

{
  "remark": "<string>",
  "status": "2"
}

Top-level response fields: code, status, message, data

Example response (values shortened and anonymized)

{
  "code": 200,
  "status": "success",
  "message": "Status updated successfully",
  "data": []
}

List maintenance plan statuses

GET /api/get-status

Returns the available plan statuses.

Headers: standard authenticated headers (apptoken, token, Content-Type: application/x-www-form-urlencoded). See API Overview.

Top-level response fields: code, status, message, data

Example response (values shortened and anonymized)

{
  "code": 200,
  "status": "success",
  "message": "",
  "data": [
    {
      "id": 1,
      "status": "Scheduled",
      "is_enabled": 1,
      "is_editable": 0,
      "created_at": "2023-05-04T00:10:50.000000Z",
      "updated_at": "2023-05-04T01:22:28.000000Z",
      "deleted_at": null,
      "color": "<string>",
      "original_file_name": "<string>",
      "file_name": "<string>",
      "extension": "<string>",
      "description": null
    },
    "..."
  ]
}