Skip to content

Post robot samples (beta)

Beta
POST
/v1/robots/raw/samples
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.

Media typeapplication/json
object
partnerId
required

Partner id. It must match the server key.

string
schemaVersion
required

Schema version of this body. Example: 2026-11.

string
sourceSystem
required

Name of the system that sent this body. Example: partner-export.

string
records
required

Other samples in this call. Send 1 to 100.

Array<object>
>= 1 items <= 100 items
object
robotId
required

Robot id. The robot must already exist.

string
recordedAt
required

When this sample was taken, as ISO-8601.

string format: date-time
timezone
required

IANA timezone. Example: Asia/Hong_Kong.

string
label
required

Name the partner gives this sample.

string
payload

Extra fields for this sample. Stored as sent.

object
key
additional properties
any

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"
}
}
]
}

Samples stored. accepted equals the number of records.

Media typeapplication/json
object
accepted
required
integer

Example

{
"accepted": 1
}
400The list is empty or a required field is missing. Nothing is stored.
Media typeapplication/json
object
error
required

Stable error code. No stack trace.

string

Example

{
"error": "invalid_body"
}
401The server key is missing or wrong.
Media typeapplication/json
object
error
required

Stable error code. No stack trace.

string

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.
Media typeapplication/json
object
error
required

Stable error code. No stack trace.

string

Example

{
"error": "forbidden"
}
404Unknown `robotId`. Nothing in this call is stored.
Media typeapplication/json
object
error
required

Stable error code. No stack trace.

string

Example

{
"error": "not_found"
}
413More than 100 records. Nothing is stored.
Media typeapplication/json
object
error
required

Stable error code. No stack trace.

string

Example

{
"error": "payload_too_large"
}