The Maintenance Visit object

Attributes

id string

Unique identifier for the object.

created_at string

ISO 8601 timestamp of when the object was created.

updated_at string

ISO 8601 timestamp of when the object was last updated.

status string

Default: draft

customer string required
customer_name string
address_display string
contact_display string
contact_mobile string
contact_email string
mntc_date string required
mntc_time string
completion_status string required
maintenance_type string

Default: Unscheduled

customer_feedback string
company string required
customer_address string
contact_person string
territory string
customer_group string
maintenance_schedule string
maintenance_schedule_detail string
The Maintenance Visit object
{
  "id": "maintenance-visit_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "status": "draft",
  "customer": "customer_example",
  "customer_name": "customer_name_example",
  "address_display": "address_display_example",
  "contact_display": "contact_display_example",
  "contact_mobile": "contact_mobile_example",
  "contact_email": "[email protected]",
  "mntc_date": "2024-01-15",
  "mntc_time": "mntc_time_example",
  "completion_status": "completion_status_example",
  "maintenance_type": "Unscheduled",
  "customer_feedback": "customer_feedback_example",
  "company": "Example Corp",
  "customer_address": "customer_address_example",
  "contact_person": "contact_person_example",
  "territory": "territory_example",
  "customer_group": "customer_group_example",
  "maintenance_schedule": "maintenance_schedule_example",
  "maintenance_schedule_detail": "maintenance_schedule_detail_example"
}
GET /api/maintenance/maintenance-visit/{id}

Retrieve a maintenance visit

Retrieves the details of an existing maintenance visit. Supply the unique maintenance visit ID that was returned from a previous request.

Path parameters

id string required

The identifier of the maintenance visit to retrieve.

Returns

Returns the maintenance visit object if a valid identifier was provided.

GET /api/maintenance/maintenance-visit/{id}
curl https://api.overplane.dev/api/maintenance/maintenance-visit/maintenance-visit_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "id": "maintenance-visit_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "status": "draft",
  "customer": "customer_example",
  "customer_name": "customer_name_example",
  "address_display": "address_display_example",
  "contact_display": "contact_display_example",
  "contact_mobile": "contact_mobile_example",
  "contact_email": "[email protected]",
  "mntc_date": "2024-01-15",
  "mntc_time": "mntc_time_example",
  "completion_status": "completion_status_example",
  "maintenance_type": "Unscheduled",
  "customer_feedback": "customer_feedback_example",
  "company": "Example Corp",
  "customer_address": "customer_address_example",
  "contact_person": "contact_person_example",
  "territory": "territory_example",
  "customer_group": "customer_group_example",
  "maintenance_schedule": "maintenance_schedule_example",
  "maintenance_schedule_detail": "maintenance_schedule_detail_example"
}
GET /api/maintenance/maintenance-visit

List all maintenance visits

Returns a list of maintenance visits. The results are sorted by creation date, with the most recently created appearing first.

Query parameters

limit integer

Maximum number of objects to return. Default: 20.

offset integer

Number of objects to skip for pagination. Default: 0.

Returns

A paginated list of maintenance visit objects.

GET /api/maintenance/maintenance-visit
curl https://api.overplane.dev/api/maintenance/maintenance-visit \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "data": [
    {
      "id": "maintenance-visit_abc123",
      "created_at": "2024-01-15T09: 30: 00Z",
      "updated_at": "2024-01-15T09: 30: 00Z",
      "status": "draft",
      "customer": "customer_example",
      "customer_name": "customer_name_example",
      "address_display": "address_display_example",
      "contact_display": "contact_display_example",
      "contact_mobile": "contact_mobile_example",
      "contact_email": "[email protected]",
      "mntc_date": "2024-01-15",
      "mntc_time": "mntc_time_example",
      "completion_status": "completion_status_example",
      "maintenance_type": "Unscheduled",
      "customer_feedback": "customer_feedback_example",
      "company": "Example Corp",
      "customer_address": "customer_address_example",
      "contact_person": "contact_person_example",
      "territory": "territory_example",
      "customer_group": "customer_group_example",
      "maintenance_schedule": "maintenance_schedule_example",
      "maintenance_schedule_detail": "maintenance_schedule_detail_example"
    }
  ],
  "has_more": false,
  "total": 1
}
POST /api/maintenance/maintenance-visit

Create a maintenance visit

Creates a new maintenance visit object.

Body parameters

status string

Default: draft

customer string required
customer_name string
address_display string
contact_display string
contact_mobile string
contact_email string
mntc_date string required
mntc_time string
completion_status string required
maintenance_type string

Default: Unscheduled

customer_feedback string
company string required
customer_address string
contact_person string
territory string
customer_group string
maintenance_schedule string
maintenance_schedule_detail string

Returns

Returns the newly created maintenance visit object if the call succeeded.

POST /api/maintenance/maintenance-visit
curl https://api.overplane.dev/api/maintenance/maintenance-visit \
  -H "Authorization: Bearer sk_test_..." \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"customer":"customer_example","mntc_date":"2024-01-15","completion_status":"completion_status_example","company":"Example Corp"}'
Response
{
  "id": "maintenance-visit_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "status": "draft",
  "customer": "customer_example",
  "customer_name": "customer_name_example",
  "address_display": "address_display_example",
  "contact_display": "contact_display_example",
  "contact_mobile": "contact_mobile_example",
  "contact_email": "[email protected]",
  "mntc_date": "2024-01-15",
  "mntc_time": "mntc_time_example",
  "completion_status": "completion_status_example",
  "maintenance_type": "Unscheduled",
  "customer_feedback": "customer_feedback_example",
  "company": "Example Corp",
  "customer_address": "customer_address_example",
  "contact_person": "contact_person_example",
  "territory": "territory_example",
  "customer_group": "customer_group_example",
  "maintenance_schedule": "maintenance_schedule_example",
  "maintenance_schedule_detail": "maintenance_schedule_detail_example"
}
PATCH /api/maintenance/maintenance-visit/{id}

Update a maintenance visit

Updates the specified maintenance visit by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Path parameters

id string required

The identifier of the maintenance visit to update.

Body parameters

status string

Default: draft

customer string
customer_name string
address_display string
contact_display string
contact_mobile string
contact_email string
mntc_date string
mntc_time string
completion_status string
maintenance_type string

Default: Unscheduled

customer_feedback string
company string
customer_address string
contact_person string
territory string
customer_group string
maintenance_schedule string
maintenance_schedule_detail string

Returns

Returns the updated maintenance visit object.

PATCH /api/maintenance/maintenance-visit/{id}
curl https://api.overplane.dev/api/maintenance/maintenance-visit/maintenance-visit_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{"status":"draft","customer":"customer_example"}'
Response
{
  "id": "maintenance-visit_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "status": "draft",
  "customer": "customer_example",
  "customer_name": "customer_name_example",
  "address_display": "address_display_example",
  "contact_display": "contact_display_example",
  "contact_mobile": "contact_mobile_example",
  "contact_email": "[email protected]",
  "mntc_date": "2024-01-15",
  "mntc_time": "mntc_time_example",
  "completion_status": "completion_status_example",
  "maintenance_type": "Unscheduled",
  "customer_feedback": "customer_feedback_example",
  "company": "Example Corp",
  "customer_address": "customer_address_example",
  "contact_person": "contact_person_example",
  "territory": "territory_example",
  "customer_group": "customer_group_example",
  "maintenance_schedule": "maintenance_schedule_example",
  "maintenance_schedule_detail": "maintenance_schedule_detail_example"
}
DELETE /api/maintenance/maintenance-visit/{id}

Delete a maintenance visit

Permanently deletes a maintenance visit. This cannot be undone.

Path parameters

id string required

The identifier of the maintenance visit to delete.

Returns

Returns a confirmation that the maintenance visit has been deleted.

DELETE /api/maintenance/maintenance-visit/{id}
curl https://api.overplane.dev/api/maintenance/maintenance-visit/maintenance-visit_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X DELETE
Response
{
  "id": "maintenance-visit_abc123",
  "deleted": true
}
POST /api/maintenance/maintenance-visit/{id}/submit

Submit a maintenance visit

Submits a draft maintenance visit, transitioning its status from draft to submitted.

Path parameters

id string required

The identifier of the maintenance visit to act on.

Returns

Returns the maintenance visit object with updated status.

POST /api/maintenance/maintenance-visit/{id}/submit
curl https://api.overplane.dev/api/maintenance/maintenance-visit/maintenance-visit_abc123/submit \
  -H "Authorization: Bearer sk_test_..." \
  -X POST
Response
{
  "id": "maintenance-visit_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "status": "draft",
  "customer": "customer_example",
  "customer_name": "customer_name_example",
  "address_display": "address_display_example",
  "contact_display": "contact_display_example",
  "contact_mobile": "contact_mobile_example",
  "contact_email": "[email protected]",
  "mntc_date": "2024-01-15",
  "mntc_time": "mntc_time_example",
  "completion_status": "completion_status_example",
  "maintenance_type": "Unscheduled",
  "customer_feedback": "customer_feedback_example",
  "company": "Example Corp",
  "customer_address": "customer_address_example",
  "contact_person": "contact_person_example",
  "territory": "territory_example",
  "customer_group": "customer_group_example",
  "maintenance_schedule": "maintenance_schedule_example",
  "maintenance_schedule_detail": "maintenance_schedule_detail_example"
}
POST /api/maintenance/maintenance-visit/{id}/cancel

Cancel a maintenance visit

Cancels a submitted maintenance visit, transitioning its status to cancelled.

Path parameters

id string required

The identifier of the maintenance visit to act on.

Returns

Returns the maintenance visit object with updated status.

POST /api/maintenance/maintenance-visit/{id}/cancel
curl https://api.overplane.dev/api/maintenance/maintenance-visit/maintenance-visit_abc123/cancel \
  -H "Authorization: Bearer sk_test_..." \
  -X POST
Response
{
  "id": "maintenance-visit_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "status": "draft",
  "customer": "customer_example",
  "customer_name": "customer_name_example",
  "address_display": "address_display_example",
  "contact_display": "contact_display_example",
  "contact_mobile": "contact_mobile_example",
  "contact_email": "[email protected]",
  "mntc_date": "2024-01-15",
  "mntc_time": "mntc_time_example",
  "completion_status": "completion_status_example",
  "maintenance_type": "Unscheduled",
  "customer_feedback": "customer_feedback_example",
  "company": "Example Corp",
  "customer_address": "customer_address_example",
  "contact_person": "contact_person_example",
  "territory": "territory_example",
  "customer_group": "customer_group_example",
  "maintenance_schedule": "maintenance_schedule_example",
  "maintenance_schedule_detail": "maintenance_schedule_detail_example"
}

Line items

Child objects that belong to this maintenance visit. These are accessed via the parent's ID.

Maintenance Visit Purpose

Attributes

idx integer
maintenance_visit_id string required
item_code string
item_name string
serial_no string
description string
service_person string required
work_done string required
prevdoc_doctype string
prevdoc_docname string
maintenance_schedule_detail string

Endpoints

GET /api/maintenance/maintenance-visit-purpose?parent_id={id}
POST /api/maintenance/maintenance-visit-purpose
PATCH /api/maintenance/maintenance-visit-purpose/{id}
DELETE /api/maintenance/maintenance-visit-purpose/{id}
POST /api/maintenance/maintenance-visit-purpose/reorder
Maintenance Visit Purpose object
{
  "id": "maintenance-visit-purpose_abc123",
  "idx": 1,
  "maintenance_visit_id": "maintenance_visit_id_example",
  "item_code": "item_code_example",
  "item_name": "item_name_example",
  "serial_no": "serial_no_example",
  "description": "description_example",
  "service_person": "service_person_example",
  "work_done": "work_done_example",
  "prevdoc_doctype": "prevdoc_doctype_example",
  "prevdoc_docname": "prevdoc_docname_example",
  "maintenance_schedule_detail": "maintenance_schedule_detail_example"
}