Vehicle - Maintenance

The Vehicle interface handles web service calls from the Admin web gui. The base url for this is at:

/api/vehicle-admin

A JSON file with OpenAPI data about all vehicle-related admin APIs can be downloaded here.

Get Vehicle Schedules

Gets the vehicle schedule list (it’s a Paged List APIs, as explained in the introduction):

GET /v1/vehicle-schedules/list

Gets the list of vehicle schedules

Status Codes

Vehicle schedule are used to schedule a time range in which a vehicle will be under maintenance. This API returns a positive JSON response with the vehicle schedules data:

[
  {
    "ID": 1,                                            // Int
    "Type": 0,                                          // Int
    "IsVehicleAvailable": false,                        // Boolean
    "IsMaintenanceAlreadyBegin": false,                 // Boolean
    "StartTimestamp": "2020-09-12T05:50:00Z",           // DateTime
    "EndTimestamp": "2020-09-12T12:50:00Z",             // DateTime (nullable)
    "CreatedDate": "2020-09-10T12:51:26Z",              // DateTime
    "LastUpdated": "2020-09-10T12:51:26Z",              // DateTime
    "VehicleID": 26,                                    // Int
    "LicensePlate": "AA000AA",                          // String
    "VIN": "01234567890",                               // String
    "Sticker": null,                                    // String (nullable)
    "VehicleCategory": "{\"en\":\"Jolly Smart\"}",      // String
    "MinPerformanceBegin": null,                        // DateTime (nullable)
    "MaxPerformanceEnd": null                           // DateTime (nullable)
  },
  ...
]

or an error in case of problems.

The field Type can be one of the value defined in the MovementSchedulableType enumeration.

The field IsVehicleAvailable is a boolean set to true if the vehicle can be reserved during the scheduled period.

The field IsMaintenanceAlreadyBegin is a boolean set to true if the scheduled operation already has some maintenance operation whose begin time is already passed.

The fields MinPerformanceBegin and MaxPerformanceEnd are set only if the schedules operation already has some maintenance operations: in that case, MinPerformanceBegin is set as the min expected start time among all the maintenance operations, and MaxPerformanceEnd as the max expected end time among all the maintenance operations.

The field VehicleCategory is a stringified Json containing pairs “language code”:”localized value”

Get one Vehicle Schedule

Gets the data for a specified vehicle schedule:

GET /v1/vehicle-schedules/{id}

Gets details about a specific vehicle schedules

Parameters
  • id (integer) – The id of the vehicle schedules

Status Codes
DELETE /v1/vehicle-schedules/{id}

Delete the vehicle schedule indicated by the ID

Parameters
  • id (integer) – Vehicle Schedule ID

Status Codes
id: The ID of the vehicle schedules (Int)

where id is the ID of the vehicle schedule you want to retrieve the data for. The API will return a positive JSON response with the vehicle schedule data:

{
  "ID": 1,                                              // Int
  "Type": 0,                                            // Int
  "IsVehicleAvailable": false,                          // Boolean
  "IsMaintenanceAlreadyBegin": false,                   // Boolean
  "StartTimestamp": "2020-09-12T05:50:00Z",             // DateTime
  "EndTimestamp": "2020-09-12T12:50:00Z",               // DateTime (nullable)
  "CreatedDate": "2020-09-10T12:51:26Z",                // DateTime
  "LastUpdated": "2020-09-10T12:51:26Z",                // DateTime
  "VehicleID": 26,                                      // Int
  "LicensePlate": "AA000AA",                            // String
  "VIN": "01234567890",                                 // String
  "Sticker": null,                                      // String (nullable)
  "VehicleCategory": "{\"en\":\"Jolly Smart\"}",        // String
  "MinPerformanceBegin": null,                          // DateTime (nullable)
  "MaxPerformanceEnd": null                             // DateTime (nullable)
}

or an error in case of problems.

The field Type can be one of the value defined in the MovementSchedulableType enumeration.

The field IsVehicleAvailable is a boolean set to true if the vehicle can be reserved during the scheduled period.

The field IsMaintenanceAlreadyBegin is a boolean set to true if the scheduled operation already has some maintenance operation whose begin time is already passed.

The fields MinPerformanceBegin and MaxPerformanceEnd are set only if the schedules operation already has some maintenance operations: in that case, MinPerformanceBegin is set as the min expected start time among all the maintenance operations, and MaxPerformanceEnd as the max expected end time among all the maintenance operations.

The field VehicleCategory is a stringified Json containing pairs “language code”:”localized value”

Check if a Vehicle Schedule can be made

Checks if a vehicle schedule can be made on the selected vehicle, checking its active reservations in the defined time range.

POST /v1/vehicle-schedules/can-be-scheduled

Verify if vehicle schedule can be scheduled

Status Codes

The API takes a JSON body in the following format:

{
  VehicleId: 1,                               // Int
  StartTimestamp: "2001-01-01T01:01:01Z",     // DateTime
  EndTimestamp: "2001-01-01T01:01:01Z"        // DateTime
}

where VehicleId is the ID of the vehicle that should go under scheduled operation, and StartTimestamp and EndTimestamp are the expected start and end time for the vehicle schedule. StartTimestamp and VehicleId are mandatory.

The API will return on of the values defined in the VehicleScheduleType enumeration based on the following rule

  • 0 (Can be Scheduled) if no reservation is found

  • 1 (Group and Category Reserved) if no active reservation is found on the vehicle, but there exists some non-assigned reservations for the vehicle’s group and category

  • 2 (Vehicle Reserved) if an active reservation is assigned to the vehicle

The API will return an error code err_VehicleNotFound if no vehicle has been found for the specified id, or an error whitout a specific code if the start timestamp is not set.

Add a Vehicle Schedule or update an existing one

Persists edits about a new or existing vehicle schedule:

POST /v1/vehicle-schedules

Update a vehicle schedule’s data

Status Codes

The API takes a JSON body in the following format:

{
  ID: 43,                                     // Int
  VehicleID: 1,                               // Int
  Type: 0,                                    // Int (enum VehicleScheduleType)
  IsVehicleAvailable: true,                   // Boolean (null=false)
  StartTimestamp: "2001-01-01T01:01:01Z",     // DateTime
  EndTimestamp: "2001-01-01T01:01:01Z"        // DateTime
}

The field Type can be one of the value defined in the MovementSchedulableType enumeration, and is considered only during new vehicle schedule creation.

The field VehicleID is the ID of the vehicle that should go under scheduled operation, and is considered only during new vehicle schedule creation.

The field IsVehicleAvailable is a boolean set to true if the vehicle can be reserved during the scheduled period.

The API will return a plain positive JSON response if the schedule has been created/updated correctly, or one of the following errors:

err_VehicleNotFound

Returned when creating a new schedule, if no vehicle has been found for the specified ID.

err_InvalidElement

Returned when creating a new schedule if no type has been provided, or if no schedule to edit has been found for the provided ID

err_InvalidDate

Returned when updating a schedule that has some maintenance operation assigned, and the provided start and end time are not coherent with the operations

Delete a Vehicle Schedule

Marks the schedule corresponding to the ID provided as deleted:

GET /v1/vehicle-schedules/{id}

Gets details about a specific vehicle schedules

Parameters
  • id (integer) – The id of the vehicle schedules

Status Codes
DELETE /v1/vehicle-schedules/{id}

Delete the vehicle schedule indicated by the ID

Parameters
  • id (integer) – Vehicle Schedule ID

Status Codes
id: The ID of the vehicle schedules (Int)

Returns a plain Json positive answer if successful, or the following error messages if not:

err_ElementDoesNotExist

No schedule corresponding to the provided ID has been found

err_ElementAlreadyDeleted

The specified schedule is already marked as deleted

err_CannotDelete

There exists one maintenance operation on the vehicle scheduled that is already begun

Get Maintenance Operations

Gets the maintenance operation list (it’s a Paged List APIs, as explained in the introduction):

GET /v1/maintenance-operations/list

Gets the list of maintenance operations

Status Codes

Maintenance operations are linked to a specific vehicle schedule, and represent a single maintenance done on the vehicle. It is possible to link a maintenance operation only to maintenance type vehicle schedule (see MovementSchedulableType for reference). This API returns a positive JSON response with the maintenance operations data:

[
  {
    "ID": 1,                                                 // Int
    "CreatedDate": "2020-09-10T13:45:13Z",                   // DateTime
    "LastUpdated": "2020-09-10T13:45:13Z",                   // DateTime
    "Description": "Descrizione operazione",                 // String (nullable)
    "Summary": "Sommario operazione",                        // String
    "EnteredBy": null,                                       // String (nullable)
    "SignedOffBy": null,                                     // String (nullable)
    "PerformedBy": null,                                     // String (nullable)
    "PerformanceBegin": "2020-09-12T06:44:00Z",              // DateTime (nullable)
    "PerformanceEnd": "2020-09-11T23:44:00Z",                // DateTime (nullable)
    "IsCompleted": false,                                    // Boolean
    "IsSuccessful": false,                                   // Boolean
    "LicensePlate": "AA000AA",                               // String
    "VIN": "01234567890",                                    // String
    "Sticker": null,                                         // String (nullable)
    "VehicleCategory": "{\"en\":\"Jolly Smart\"}",           // String
    "GarageName": null,                                      // String (nullable)
    "ScheduleBegin": "2020-09-12T05:50:00Z",                 // DateTime (nullable)
    "ScheduleEnd": "2020-09-12T12:50:00Z",                   // DateTime (nullable)
    "GarageID": 1,                                           // Int (nullable)
    "VehicleID": 26,                                         // Int
    "ScheduleID": 1                                          // Int
  },
  ...
]

or an error in case of problems.

The fields PerformanceBegin and PerformanceEnd are the expected start and end time of the maintenance operation.

The field VehicleCategory is a stringified Json containing pairs “language code”:”localized value”

The field IsCompleted specifies if the maintenance operation has ended, and the field IsSuccessful specifies if the operation was successful.

Get one Maintenance Operation

Gets the data for a specified maintenance operation:

GET /v1/maintenance-operations/{id}

Gets details about a specific maintenance operation

Parameters
  • id (integer) – The id of the maintenance operation

Status Codes
DELETE /v1/maintenance-operations/{id}

Delete the maintenance operation indicated by the ID

Parameters
  • id (integer) – Maintenance Operation ID

Status Codes
id: Maintenance Operation ID (Int)

where id is the ID of the maintenance operation you want to retrieve the data for. The API will return a positive JSON response with the vehicle schedule data:

{
  "ID": 1,                                                   // Int
  "DeletionDate": null,                                      // DateTime (nullable)
  "CreatedDate": "2020-09-10T13:45:13Z",                     // DateTime
  "LastUpdated": "2020-09-10T13:45:13Z",                     // DateTime
  "Description": "Descrizione operazione",                   // String (nullable)
  "Summary": "Sommario operazione",                          // String
  "EnteredBy": null,                                         // String (nullable)
  "SignedOffBy": null,                                       // String (nullable)
  "PerformedBy": null,                                       // String (nullable)
  "PerformanceBegin": "2020-09-12T06:44:00Z",                // DateTime (nullable)
  "PerformanceEnd": "2020-09-11T23:44:00Z",                  // DateTime (nullable)
  "IsCompleted": false,                                      // Boolean
  "IsSuccessful": false,                                     // Boolean
  "LicensePlate": "AA000AA",                                 // String
  "VIN": "01234567890",                                      // String
  "Sticker": null,                                           // String (nullable)
  "VehicleCategory": "{\"en\":\"Jolly Smart\"}",             // String
  "GarageName": null,                                        // String (nullable)
  "ScheduleBegin": "2020-09-12T05:50:00Z",                   // DateTime (nullable)
  "ScheduleEnd": "2020-09-12T12:50:00Z",                     // DateTime (nullable)
  "GarageID": 1,                                             // Int (nullable)
  "VehicleID": 26,                                           // Int
  "ScheduleID": 1                                            // Int
}

or an error in case of problems.

The fields PerformanceBegin and PerformanceEnd are the expected start and end time of the maintenance operation.

The field VehicleCategory is a stringified Json containing pairs “language code”:”localized value”

The field IsCompleted specifies if the maintenance operation has ended, and the field IsSuccessful specifies if the operation was successful.4

Add a Maintenance Operation or update an existing one

Persists edits about a new or existing maintenance operation:

POST /v1/maintenance-operations

Update a maintenance operations’s data

Status Codes

The API takes a JSON body in the following format:

{
  ID: 2                                           // Int
  ScheduleID: 43,                                 // Int
  GarageID: 5,                                    // Int
  Summary: "Operation short summary",             // String
  Description: "Operation description",           // String (nullable)
  PerformanceBegin: "2001-01-01T01:01:01Z",       // DateTime
  PerformanceEnd: "2001-01-01T01:01:01Z"          // DateTime
}

The field ScheduleID is the ID of the vehicle schedule to which the maintenance operation is linked to. It is mandatory.

The field GarageID is the ID of the garage in which the maintenance operation will be performed. Is is not mandatory.

The field Summary is a short summary of the maintenance operation. It is mandatory.

The API will return a plain positive JSON response if the operation has been created/updated correctly, or one of the following errors:

err_ScheduleNotFound

Returned when creating a new operation, if no vehicle schedule has been found for the specified ID.

err_OperatingBaseNotFound

Returned when creating a new operation, if no garage has been found for the specified ID.

err_InvalidElement

Returned when creating a new schedule if no summary or no vehicle schedule ID has been provided, or if no operation to edit has been found for the provided ID.

err_InvalidScheduleType

Returned when creating a new schedule, if the vehicle schedule corresponding to the provided ID should not have maintenance operations.

err_InvalidDate

Returned when the provided begin or end time falls outside the start and end time specified for the provided vehicle schedule.

Delete a Maintenance Operation

Marks the operation corresponding to the provided ID as deleted:

GET /v1/maintenance-operations/{id}

Gets details about a specific maintenance operation

Parameters
  • id (integer) – The id of the maintenance operation

Status Codes
DELETE /v1/maintenance-operations/{id}

Delete the maintenance operation indicated by the ID

Parameters
  • id (integer) – Maintenance Operation ID

Status Codes
id: Maintenance Operation ID (Int)

Returns a plain Json positive answer if successful, or the following error messages if not:

err_ElementDoesNotExist

No operation corresponding to the provided ID has been found

err_ElementAlreadyDeleted

The specified schedule is already marked as deleted

err_ElementAlreadyCompleted

The specified operation is already marked as completed, so it cannot be deleted

err_CannotDelete

There exists one maintenance operation row on the maintenance operation that is already begun

Mark a Maintenance Operation as completed

Marks a specified maintenance operation as completed.

POST /v1/maintenance-operations/mark-completed

Mark maintenance as completed

Status Codes

The API takes a JSON body in the following format:

{
  ID: 2,                                      // Int
  PerformanceEnd:  "2001-01-01T01:01:01Z",    // DateTime
  IsSuccessful: true                          // Bolean
}

The API will set the maintenance operation IsCompleted field to true, and then update IsSuccessful and PerformanceEnd with the provided data.

The API will return a plain positive JSON response if the operation has been correctly marked completed, or one of the following errors:

err_OperationNotFound

No maintenance operation was found for the provided ID.

err_InvalidElement

No performance end data has been provided.

err_ElementAlreadyDeleted

The specified schedule is already marked as deleted, so it cannot be marked as completed

err_ElementAlreadyCompleted

The specified operation is already marked as completed

Get Maintenance Operation Damage Reports

Gets the list of damage report that were worked on during the specified maintenance operation (it’s a Paged List APIs, as explained in the introduction):

GET /v1/maintenance-operations/{id}/damage-reports

Returns a list of information of damage related to a vehicle

Parameters
  • id (integer) –

Status Codes
id: (Int)

This API returns a positive JSON response with the vehicle schedules data:

[
  {
    ID: "134",
    "Guid": "186e94b5-c383-47ff-8dc9-5b124df62d28",               // Guid
    CreatedDate: "2001-01-01T01:01:01Z",                          // DateTime
    Severity: 2,                                                  // Int
    IsBlocking: true,                                             // Boolean (nullable)
    ReportingUser: "d7309229-84b6-43c2-babe-86af7d95dde4",        // Guid
    ReportingUserName: "User name",                               // String
    SolvingUser: "31a4805d-2f44-4d10-be72-9ff49a388e99",          // Guid (nullable)
    SolvingUserName: "Operator user name",                        // String (nullable)
    Solved: "2001-01-01T01:01:01Z",                               // DateTime (nullable)
    Notes: "Notes about the damage report",                       // String (nullable)
    Attachments: ["0c8e6c63-7bff-4684-a5ed-c16742d76662", "..."]  // Guid Array
  },
  ...
]

or an error in case of problems.

The field Severity can be one of the value defined in the DamageSeverity enumeration.

Get the list of rows for a Maintenance Operation

Gets the list of maintenance operation rows for a specified maintenance operation (it’s a Paged List APIs, as explained in the introduction):

GET /v1/maintenance-operations/{id}/rows

Returns a list of rows related to a maintenance operation

Parameters
  • id (integer) –

Status Codes
POST /v1/maintenance-operations/{id}/rows

Update a row maintenance operations’s data

Parameters
  • id (integer) –

Status Codes
id: (Int)

Maintenace operation rows refers to a specific operation done during a maintenance (i.e. tire replacement, door maintenance etc.). This API returns a positive JSON response with the maintenance operation row data:

[
  {
    "CreatedDate": "2020-09-10T14:25:09Z",                         // DateTime
    "LastUpdated": "2020-09-10T14:25:10Z",                         // DateTime
    "OperationID": 1,                                              // Int
    "PerformedBy": "Gigi",                                         // String
    "Description": "Cleaning Vehicle",                             // String
    "OperationTypeLabels": "{\"en\":\"Cleaning\",\"it\":\"\"}",    // String
    "DeviceSerialNumber": "EDOXVERZKOSYXUJ",                       // String
    "DeviceID": 13,                                                // Int (nullable)
    "OperationTypeID": 2,                                          // Int
    "ID": 1                                                        // Int
  },
  ...
]

or an error in case of problems.

The field OperationTypeLabels is a stringified Json containing pairs “language code”:”localized value”.

Get one Maintenance Operation Row

Gets the data for a specified maintenance operation row:

GET /v1/maintenance-operations/rows/{id}

Gets details about a specific maintenance operation row

Parameters
  • id (integer) – The id of the maintenance operation row

Status Codes
DELETE /v1/maintenance-operations/rows/{id}

Delete the maintenance operation row indicated by the ID

Parameters
  • id (integer) – Maintenance Operation ID

Status Codes

where id is the ID of the maintenance operation you want to retrieve the data for. The API will return a positive JSON response with the vehicle schedule data:

{
  "CreatedDate": "2020-09-10T14:25:09Z",                         // DateTime
  "LastUpdated": "2020-09-10T14:25:10Z",                         // DateTime
  "OperationID": 1,                                              // Int
  "PerformedBy": "Gigi",                                         // String
  "Description": "Cleaning Vehicle",                             // String
  "OperationTypeLabels": "{\"en\":\"Cleaning\",\"it\":\"\"}",    // String
  "DeviceSerialNumber": "EDOXVERZKOSYXUJ",                       // String
  "DeviceID": 13,                                                // Int (nullable)
  "OperationTypeID": 2,                                          // Int
  "ID": 1                                                        // Int
}

or an error in case of problems.

The field OperationTypeLabels is a stringified Json containing pairs “language code”:”localized value”.

Add a Maintenance Operation Row or update an existing one

Persists edits about a new or existing row on a specified maintenance operation:

GET /v1/maintenance-operations/{id}/rows

Returns a list of rows related to a maintenance operation

Parameters
  • id (integer) –

Status Codes
POST /v1/maintenance-operations/{id}/rows

Update a row maintenance operations’s data

Parameters
  • id (integer) –

Status Codes

The API takes a JSON body in the following format:

{
  ID: 7,                                  // Int
  OperationTypeID: 2,                     // Int
  DeviceID: 4,                            // Int
  PerformedBy: "Performing user name",    // String
  Description: "Operation description"    // String
}

The field OperationTypeID is the ID of the type of the operation. It is mandatory.

The field DeviceID is the ID of the on board device worked on during this operation. It is not mandatory.

The API will return a plain positive JSON response if the schedule has been created/updated correctly, or one of the following errors:

err_OperationNotFound

Returned when creating a new row, if no maintenance operation has been found for the specified ID.

err_ElementAlreadyCompleted

Returned when creating a new row, if the specified operation is already marked as completed, so no more rows can be added to it.

err_OperationTypeNotFound

Returned when creating a new operation, if no type has been found for the specified ID

err_DeviceNotFound

Returned when creating a new operation, if no on board device has been found for the specified ID

err_InvalidElement

Returned when creating a row if no maintenance operation or operation type ID was provided, or if no row to edit has been found for the provided ID

Delete a Maintenance Operation Row

Marks the maintenance operation row corresponding to the ID provided as deleted:

GET /v1/maintenance-operations/rows/{id}

Gets details about a specific maintenance operation row

Parameters
  • id (integer) – The id of the maintenance operation row

Status Codes
DELETE /v1/maintenance-operations/rows/{id}

Delete the maintenance operation row indicated by the ID

Parameters
  • id (integer) – Maintenance Operation ID

Status Codes
id: Maintenance Operation ID (Int)

Returns a plain Json positive answer if successful, or the following error messages if not:

err_ElementDoesNotExist

No schedule corresponding to the provided ID has been found

err_ElementAlreadyDeleted

The specified schedule is already marked as deleted

Get the list of Devices for a specified Operation

Gets the list of devices installed on the vehicle worked on during a specified maintenance operation.

GET /v1/maintenance-operations/{id}/devices

Returns a list of devices related to a maintenance operation

Parameters
  • id (integer) –

Status Codes

This API returns a positive JSON response with the list of on board devices:

[
  {
    "CreatedDate": "2020-09-09T12:14:30Z",                       // DateTime
    "Manufacturer": "Dummy Device Corp.",                        // String
    "ModelMain": "Dummy Box",                                    // String
    "ModelSubtype": null,                                        // String (nullable)
    "HardwareVersion": "1.0",                                    // String (nullable)
    "PlatformVersion": "1.0",                                    // String (nullable)
    "SoftwareVersion": null,                                     // String (nullable)
    "SerialNumber": "EDOXVERZKOSYXUJ",                           // String
    "HardwareAddress": "1D:6F:56:33:D3:03",                      // String
    "ReferenceToken": null,                                      // String (nullable)
    "ExternalGuid": "e943e200-bed7-4044-b62e-5c404c02bb01",      // Guid
    "Guid": "7f35f989-b75d-4aeb-840a-0a48633c688d",              // Guid
    "InstallationDate": "2020-09-10T08:42:37Z",                  // DateTime (nullable)
    "LastMaintenanceDate": null,                                 // DateTime (nullable)
    "LastResetDate": null,                                       // DateTime (nullable)
    "ExternalId": null,                                          // String (nullable)
    "LastEventReceived": "2020-09-10T08:34:33Z",                 // DateTime (nullable)
    "LastHFEventReceived": "2020-09-10T08:34:33Z",               // DateTime (nullable)
    "EventPollStartDate": "2020-09-10T08:34:33Z",                // DateTime
    "LastSynchronization": null,                                 // DateTime (nullable)
    "LastNetworkSignalStrengthPct": null,                        // Int (nullable)
    "LastNetworkInfo": null,                                     // String (nullable)
    "Driver": "00000000-0000-0000-0000-000000000000",            // Guid
    "IsEnabled": false,                                          // Boolean
    "DriverName": "Dummy Device",                                // String
    "CanExecuteCommands": false,                                 // Boolean
    "DeletionDate": null,                                        // DateTime (nullable)
    "ID": 13,                                                    // Int
  },
  ...
]

or an error in case of problems.

Get Maintenance Operation Types

Gets the maintenance operation types list (it’s a Paged List APIs, as explained in the introduction):

GET /v1/maintenance-operation-types/list

Gets the list of maintenance operation types

Status Codes

Maintenance operation types are customizable types for the specific operation done during a maintenance. This API returns a positive JSON response with the maintenance operation types data:

[
  {
    "CreatedDate": "2020-09-10T14:24:20Z",                       // DateTime
    "LastUpdated": "2020-09-10T14:24:20Z",                       // DateTime
    "NameLabels": "{\"en\":\"Refuel\",\"it\":\"\"}",             // String
    "Name": "Refuel",                                            // String
    "ID": 1                                                      // Int
  },
  ...
]

or an error in case of problems.

The field NameLabels is a stringified Json containing pairs “language code”:”localized value”

Get all Maintenanbce Operation Types

Gets the list of all maintenance operation types:

GET /v1/maintenance-operation-types/list-all

Gets the list of all maintenance operation types

Status Codes

This API returns a positive JSON response with the maintenance operation types data:

[
  {
    "CreatedDate": "2020-09-10T14:24:20Z",                       // DateTime
    "LastUpdated": "2020-09-10T14:24:20Z",                       // DateTime
    "NameLabels": "{\"en\":\"Refuel\",\"it\":\"\"}",             // String
    "Name": "Refuel",                                            // String
    "ID": 1                                                      // Int
  },
  ...
]

or an error in case of problems.

The field NameLabels is a stringified Json containing pairs “language code”:”localized value”

Add a Maintenance Operation Type or update an existing one

Persists edits about a new or existing maintenance operation type:

POST /v1/maintenance-operation-types

Persists edits about a new or existing maintenance operation type

Status Codes

The API takes a JSON body in the following format:

{
  ID: 1,                                              // Int
  Name: "Operation type name",                        // String
  NameLabels: "{"en":"Glass replacement", ... }"      // String
}

The API will return a plain positive JSON response if the schedule has been created/updated correctly, or one of the following errors:

err_InvalidElement

Returned when creating a new type if no name or name label has been provided, or if no type to edit has been found for the provided ID

Delete a Maintenance Operation Type

Marks the operation type corresponding to the ID provided as deleted:

DELETE /v1/maintenance-operation-types/{id}

Marks a maintenance operation type as deleted

Parameters
  • id (integer) – The id of the maintenance operation type to delete

Status Codes

Returns a plain Json positive answer if successful, or the following error messages if not:

err_ElementDoesNotExist

No schedule corresponding to the provided ID has been found

err_ElementAlreadyDeleted

The specified schedule is already marked as deleted