Post robot maintenance (beta)
const url = 'https://api.example.yas/v1/robots/maintenance';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"partnerId":"partner","schemaVersion":"2026-11","sourceSystem":"partner-export","robotId":"rbt_example","maintenanceId":"mnt_1001","timezone":"Asia/Hong_Kong","component":"drive","downtimeStart":"2026-10-15T12:00:00.000Z"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.example.yas/v1/robots/maintenance \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "partnerId": "partner", "schemaVersion": "2026-11", "sourceSystem": "partner-export", "robotId": "rbt_example", "maintenanceId": "mnt_1001", "timezone": "Asia/Hong_Kong", "component": "drive", "downtimeStart": "2026-10-15T12:00:00.000Z" }'Beta. Create or replace one maintenance record with the server key. Send partnerId, schemaVersion, sourceSystem, robotId, maintenanceId, and timezone. The robot must already exist for this partnerId. An unknown robotId is 404. A later call with the same partnerId, robotId, and maintenanceId replaces the stored body. Leave an optional field out and it is cleared. updatedAt is ISO-8601 UTC.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Partner id. It must match the server key.
Schema version of this body. Example: 2026-11.
Name of the system that sent this body. Example: partner-export.
Robot id. The robot must already exist.
Id of this service visit. The same partner, robot, and maintenance id replaces the stored body.
IANA timezone. Example: Asia/Hong_Kong.
Task instance this visit relates to, when there is one.
Event id this visit relates to, when there is one.
What was reported.
What was found.
Part that was serviced. Example: drive.
Part that was replaced.
What was done.
When downtime started, as ISO-8601.
When downtime ended, as ISO-8601.
Labour hours for this visit.
Cost amount. Pair it with currency.
Currency code. Example: HKD.
True when this fault has happened before.
True when the visit was under warranty.
Firmware version at the time of this call.
Extra fields from the partner. Stored as sent.
object
Example
{ "partnerId": "partner", "schemaVersion": "2026-11", "sourceSystem": "partner-export", "robotId": "rbt_example", "maintenanceId": "mnt_1001", "timezone": "Asia/Hong_Kong", "component": "drive", "downtimeStart": "2026-10-15T12:00:00.000Z"}Responses
Section titled “Responses”Maintenance stored. A later call with the same maintenance id replaces it. updatedAt is ISO-8601 UTC.
object
Example
{ "robotId": "rbt_example", "maintenanceId": "mnt_1001", "updatedAt": "2026-10-15T13:00:00.000Z"}400A required field is missing.
object
Stable error code. No stack trace.
Example
{ "error": "invalid_body"}401The server key is missing or wrong.
object
Stable error code. No stack trace.
Example
{ "error": "invalid_credentials"}403A server key may be limited to vehicles, robots, or both. A call outside that limit is 403 `forbidden` and stores nothing. `identity_mismatch` means `partnerId` does not match the server key.
object
Stable error code. No stack trace.
Example
{ "error": "forbidden"}404Unknown `robotId`. Nothing in this call is stored.
object
Stable error code. No stack trace.
Example
{ "error": "not_found"}