Upload records: reports signed by your team's devices, and synced rows
POST
/own/reports
const url = 'https://api.lovat.cjcameron.com/v2/own/reports';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"records":[{"type":1,"origin":{"deviceId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","seq":"example","hlc":"example"},"data":"example","signature":{"keyId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","value":"example"}}]}'};
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.lovat.cjcameron.com/v2/own/reports \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "records": [ { "type": 1, "origin": { "deviceId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "seq": "example", "hlc": "example" }, "data": "example", "signature": { "keyId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "value": "example" } } ] }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
Example generated
{ "records": [ { "type": 1, "origin": { "deviceId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "seq": "example", "hlc": "example" }, "data": "example", "signature": { "keyId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "value": "example" } } ]}Responses
Section titled “Responses”OK
Media typeapplication/json
object
results
required
Array<object>
object
status
required
string
reason
string
Example
{ "results": [ { "status": "accepted" } ]}