> For the complete documentation index, see [llms.txt](https://docs.thingsup.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thingsup.io/actions/push-to-thingsup-track-action.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
