Discussions

Ask a Question

MIFARE code

Hi, we're facing problems trying to configure keys to control operator access, the MIFARE code seems not to be recognized and the engine cannot be started. Do we have to insert MIFARE code in a specific way in the portal? The id is something like "16D87814". Another question: is it possible to see all the access attempts (also the failed ones) via API or portal? Thanks, Andrea

Javascript example call

I want to call API from client JS code, I've tried different ways to do it, and in most of them I receive CORS error, i.e. <pre> const data = { grant_type: 'password', username, password }; const init = { method: 'POST' , mode: 'cors' , cache: 'no-cache' , credentials: 'same-origin' // include, *same-origin, omit , headers: { 'Content-Type': 'application/json' // 'Content-Type': 'application/x-www-form-urlencoded', } , redirect: 'follow' // manual, *follow, error , referrerPolicy: 'no-referrer' // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url , body: JSON.stringify(data) }; fetch('https://auth.trackunit.com/token', init) .then(response => { if (response.ok) { let resp = response.json(); debugger; console.log(resp); } }) .catch(error => { debugger; console.err(error); }); </pre> I get the error: Access to fetch at 'https://auth.trackunit.com/token' from origin 'http://localhost:62108' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. Changed mode to 'no-cors', the get error 400 - aborted: <pre> const data = { grant_type: 'password', username, password }; const init = { method: 'POST' , mode: 'no-cors' , cache: 'no-cache' , credentials: 'same-origin' // include, *same-origin, omit , headers: { 'Content-Type': 'application/json' // 'Content-Type': 'application/x-www-form-urlencoded', } , redirect: 'follow' // manual, *follow, error , referrerPolicy: 'no-referrer' // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url , body: JSON.stringify(data) }; fetch('https://auth.trackunit.com/token', init) .then(response => { if (response.ok) { let resp = response.json(); debugger; console.log(resp); } }) .catch(error => { debugger; console.error(error); }); </pre> net::ERR_ABORTED 400 Thank you!

Internal Server Error

Hi, I am trying to request https://api.trackunit.com/public/Report/UnitExtendedInfo and https://api.trackunit.com/public/Report/UnitActiveFaults. In both cases I get the response '500 Internal Server Error' without any further information. What I know is the following: The request for https://api.trackunit.com/public/Report/UnitHistory works fine. I am using the same API key for all requests. The parameters are (probably) valid because I can provoke a Missing Parameter, Invalid UnitId and Invalid DateTime combination error. I suspect an authorization issue because I can provoke an internal server error by appending a letter to the API Key when requesting UnitHistory. This would mean something is wrong with the API key I use to request ExtendeInfo/ActiveFaults but I am using the exact same one I use for History. Is Authorization handled differently for these 2 requests? Some leads on where to start troubleshooting would be highly appreciated. Best Regards, Bruno

Problem with SOAP 1.1 & SOAP 1.2 -> GetUnitExtendedInfo

Hello I got some serialization Errors when i get the result List. I tested the API with Postman and found several wrong encoded value's for example: https://api.trackunit.com/public/GetUnitExtendedInfo?id=1521475 can't copy it in here due to wrong encoding. is it possible to query your API to deliver unicode? Thanks

Get Units by customer

Is there a way to fetch units via classic api GetUnits endpoint by filtering by customerId? We are calling the API using the master account token, but the response includes units from all subaccounts and doesn't include the key of the subaccount that a unit belongs to. Thanks!

How to Get Unit Operating and Idle Hours Per Hours within a Specific Date Range.

403 Access Denied from IRIS API

hello, my name is Pancheng Xue and i'm a developer in a construction company in Germany. We've used the "legacy API" of trackunit for a long time and now we want to upgrade diverse Interfaces with your new IRIS API. I followed every step from the instruction on your website (API user created, token created and so on). But i always get 403 Access Denied from the SwaggerHub with my fresh token. I've also tried the "Resource Owner Password" in Postman to get the data i want, still got 403 Access Denied. Could you find out why i'm having credential problem? My client ID: oa56l6gb63cCDbSl357 API Username: TU-API-21136-1

RunOdo

I need the hours from RunOdo, but https://iris.trackunit.com/public/api/machine/machines/142717/activity does not show any runningOdometer. When I use the Classic API (Http) it works. Do you have any issues with the newer Iris API? { "runningHours": 0.0, "runningOdometer": { "distanceUnit": "KM", "distance": 0.0 }, "timeline": { "startTime": "2020-09-16T06:45:20.246481Z", "endTime": "2020-09-17T06:45:20.2466Z", "summarizedHours": 0.0, "summarizedOdometer": { "distanceUnit": "KM", "distance": 0.0 } } } User: 21707 Email: [email protected]

How we can get battery level for "SPOT" product

Hello at all, we need also the battery level of "SPOT" product to show this in our application. How can we get this? I tried out with https://api.trackunit.com/public/Unit The response do not contain battery level: Response: { "id": "1183240", "serialNumber": "1501048", "phoneNumber": "3197016153036", "vehicleType": "Machine", "deviceType": "Spot", "deviceModel": "Spot", "name": "Bomag BPR 70/70 D 101692635223", "displayName": "Bomag BPR 70/70 D 101692635223", "referenceNumber": "101692635223", "note": "Rüttelplatte Passau\nBomag BPR 70/70 D\nSN: 101692635223\nID: 100236791", "createdAt": "2018-02-09T09:53:50.9759062Z", "gpsFixTime": "2020-07-07T09:05:25.0000000Z", "messageTime": "2020-07-07T09:05:25.0000000Z", "location": { "latitude": 48.5922546386719, "longitude": 13.3857946395874 }, "altitude": 0, "heading": 0, "speed": 0, "address": { "country": "DE", "zipCode": "94036", "city": "Passau", "streetAddress": "Industriestraße 12 - Heining" }, "preRun1": 0, "preRun2": 0, "run1": 0, "run2": 0, "run3": 0, "run4": 0, "runOdo": 0, "preKm": 0, "km": 0, "input1": false, "input2": false, "input3": false, "input4": false, "input5": false, "input6": false, "input7": false, "input8": false, "input9": false, "input10": false, "output1": false, "output2": false, "output3": false, "output4": false, "output5": false, "isActive": true, "isOwn": true, "currentStop": 75942695 },

What do you mean "Event" in Classic Unit API?

Hello, can you please tell me what you mean by the "Event"-Row in "Classic Unit API" -> "Unit History"? The note tells me "2 is a timed transmit and 6 is based on an IO Change". Nevertheless, this explanation is not sufficent for me. Greeting Christoph