# Push to Thingsup Track Action

This provides a way to push data directly to Thingsup Track platform. User need to provide following parameters.

#### Function

* Javascript code to process input data.
* "payload" object is available in this code. This payload will be sent to Thingsup Track Servers.

```
//Example 1

payload.attributes["sender"] = "Thingsup";
payload.deviceId = "98889988889";
```

#### AuthKey

User need to provide Thingsup Track Auth Key.

#### Sample Payload

All the fields in sample payload are compulsory. Attributes can vary as per device but motion, ignition, odometer attributes are compulsory. Unavailability of compulsory fields will result in action failure.

```
{
   "id":0,
   "attributes":{
      "priority":0,
      "sat":7,
      "event":0,
      "ignition":false,
      "motion":true,
      "rssi":5,
      "io200":0,
      "gpsStatus":1,
      "pdop":1,
      "hdop":0.9,
      "power":0,
      "battery":3.857,
      "io68":0,
      "temp1":25,
      "operator":40490,
      "odometer":8124,
      "distance":7.32,
      "totalDistance":8318161.78
   },
   "deviceId":"TestDevice4",
   "type":null,
   "protocol":"thingsup",
   "serverTime":"2021-01-29T10:54:27.625+0000",
   "deviceTime":"2021-01-29T10:54:25.000+0000",
   "fixTime":"2021-01-29T10:54:25.000+0000",
   "outdated":false,
   "valid":true,
   "latitude":17.7066716,
   "longitude":73.7727833,
   "altitude":592,
   "speed":3.779699,
   "course":283,
   "address":null,
   "accuracy":0,
   "network":null
}
```

![Add Push to Thingsup Track Action](/files/NmVuW3RU1AyIqUZqt7Fe)

Please note the following points:

{% hint style="info" %}

* "payload" object is supplied from Action Trigger like Rules, Action Command etc.
* Response object will be available as Action Response.
* Loops are not supported for Performance.
  {% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.thingsup.io/actions/push-to-thingsup-track-action.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
