Post robot samples (beta)
const url = 'https://api.example.yas/v1/robots/raw/samples';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"partnerId":"partner","schemaVersion":"2026-11","sourceSystem":"partner-export","records":[{"robotId":"rbt_example","recordedAt":"2026-10-15T10:00:05.000Z","timezone":"Asia/Hong_Kong","label":"dock_camera","payload":{"note":"glare"}}]}'};
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/raw/samples \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "partnerId": "partner", "schemaVersion": "2026-11", "sourceSystem": "partner-export", "records": [ { "robotId": "rbt_example", "recordedAt": "2026-10-15T10:00:05.000Z", "timezone": "Asia/Hong_Kong", "label": "dock_camera", "payload": { "note": "glare" } } ] }'Beta. Post 1 to 100 samples with the server key. Each record needs robotId, recordedAt, timezone, and label. payload is optional and is stored as sent. The robot must already exist for this partnerId. An unknown robotId is 404; nothing in the call is stored. An empty list or a missing field is 400. More than 100 records is 413. Records have no id. Post again and YAS stores another row. accepted equals the number of records.
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.
Other samples in this call. Send 1 to 100.
object
Robot id. The robot must already exist.
When this sample was taken, as ISO-8601.
IANA timezone. Example: Asia/Hong_Kong.
Name the partner gives this sample.
Extra fields for this sample. Stored as sent.
object
Example
{ "partnerId": "partner", "schemaVersion": "2026-11", "sourceSystem": "partner-export", "records": [ { "robotId": "rbt_example", "recordedAt": "2026-10-15T10:00:05.000Z", "timezone": "Asia/Hong_Kong", "label": "dock_camera", "payload": { "note": "glare" } } ]}Responses
Section titled “Responses”Samples stored. accepted equals the number of records.
object
Example
{ "accepted": 1}400The list is empty or a required field is missing. Nothing is stored.
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"}413More than 100 records. Nothing is stored.
object
Stable error code. No stack trace.
Example
{ "error": "payload_too_large"}