> For the complete documentation index, see [llms.txt](https://apimoderan.gitbook.io/moderan-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apimoderan.gitbook.io/moderan-api/costs-api/send-readings-data.md).

# Send Readings data

To enable sending Readings data to Moderan via API you need to:

* **Get** the ID of the Property/Building set for which you want to send the Reading data
* Send the **example** test Reading data, making a POST request
* **Send the batch Readings** to the needed set through another POST&#x20;

To get the **COST\_SET\_ID** see:

{% content-ref url="/pages/-MX1Ez4Bl31WGcr6jkt0" %}
[Get Property-Building sets](/moderan-api/costs-api/get-property-building-sets.md)
{% endcontent-ref %}

## Sending example Reading

To send **an example** Reading data to Moderan via API

## Send an example Reading to Moderan

<mark style="color:green;">`POST`</mark> `https://www.moderan.net/api/domains/DOMAIN_ID/readingdumps`

This endpoint allows you to **send your Readings data** into Moderan via POST.

#### Query Parameters

| Name    | Type   | Description                                                    |
| ------- | ------ | -------------------------------------------------------------- |
| date    | string | date of the meter reading, =YYYY-MM-DD                         |
| meter   | string | meter name                                                     |
| set     | object | object for which you specify the set ID                        |
| id      | number | COST\_SET\_ID which you GET from a Property-Building set query |
| reading | number | reading data of the meter                                      |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{    "name": "Cake's name",    "recipe": "Cake's recipe name",    "cake": "Binary cake"}
```

{% endtab %}

{% tab title="404 Could not find a cake matching this query." %}

```
{    "message": "Ain't no cake like that."}
```

{% endtab %}
{% endtabs %}

Example JSON for sending trial Reading data:

```
{
        "date" : "2019-06-17",
        "meter" : "7JK1P",
        "set" : 
{             "id" : 61          }
,
         "reading" : 3803
}
```

## Sending Readings data to Moderan

Readings data can be send to Moderan in a batch.&#x20;

Regardless of how many records you want to send to Moderan, you need to use a batch POST method. &#x20;

## Send Readings in batch to Moderan

<mark style="color:green;">`POST`</mark> `https://www.moderan.net/api/domains/DOMAIN_ID/readingdumps/batch`

This endpoint allows you to **send your Readings data** into Moderan via POST.

#### Query Parameters

| Name    | Type   | Description                                                    |
| ------- | ------ | -------------------------------------------------------------- |
| date    | string | date of the meter reading, =YYYY-MM-DD                         |
| meter   | string | meter name                                                     |
| set     | object | object for which you specify the set ID                        |
| id      | number | COST\_SET\_ID which you GET from a Property-Building set query |
| reading | number | reading data of the meter                                      |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{    "name": "Cake's name",    "recipe": "Cake's recipe name",    "cake": "Binary cake"}
```

{% endtab %}

{% tab title="404 Could not find a cake matching this query." %}

```
{    "message": "Ain't no cake like that."}
```

{% endtab %}
{% endtabs %}

Example JSON for sending Readings data in batch:

```
{
   "readings":[
      {
         "date":"2021-09-10",
         "meter":"Electricity.1",
         "set":{
            "id":627
         },
         "reading":3803
      },
      {
         "date":"2021-09-10",
         "meter":"Electricity.2",
         "set":{
            "id":627
         },
         "reading":3703
      }
   ]
}
```


---

# 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://apimoderan.gitbook.io/moderan-api/costs-api/send-readings-data.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.
