Cochrane+ App API

<back to all web services

BackgroundLocationReceived

The following routes are available for this service:
POST/location/background
BackgroundLocationReceived Parameters:
NameParameterData TypeRequiredDescription
ApiKeybodystringNo
locationbodyLocationDataNo
LocationData Parameters:
NameParameterData TypeRequiredDescription
coordsformCoordsDataNo
extrasformExtrasDataNo
is_movingformboolNo
odometerformdoubleNo
uuidformstringNo
activityformActivityDataNo
batteryformBatteryDataNo
timestampformDateTimeNo
CoordsData Parameters:
NameParameterData TypeRequiredDescription
speedformdoubleNo
longitudeformdoubleNo
latitudeformdoubleNo
accuracyformdoubleNo
altitudeformdoubleNo
headingformdoubleNo
ExtrasData Parameters:
NameParameterData TypeRequiredDescription
systemUserIdformintNo
deviceIdformGuidNo
ActivityData Parameters:
NameParameterData TypeRequiredDescription
typeformstringNo
confidenceformintNo
BatteryData Parameters:
NameParameterData TypeRequiredDescription
levelformdoubleNo
is_chargingformboolNo
ApiServiceResponse Parameters:
NameParameterData TypeRequiredDescription
DescriptionformstringNo
HeadingformstringNo
WasSuccessfulformboolNo
ModelStateformObjectNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /location/background HTTP/1.1 
Host: cochraneplus-api-dev.happen.zone 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"apiKey":"String","location":{"coords":{"speed":0,"longitude":0,"latitude":0,"accuracy":0,"altitude":0,"heading":0},"extras":{"systemUserId":0,"deviceId":"00000000-0000-0000-0000-000000000000"},"is_moving":false,"odometer":0,"uuid":"String","activity":{"type":"String","confidence":0},"battery":{"level":0,"is_charging":false},"timestamp":"0001-01-01T00:00:00.0000000"}}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"description":"String","heading":"String","wasSuccessful":false,"modelState":{}}