Skip to main content

Smartvatten Data API: “Updated After” Feature

Using the query[updatedafter] Parameter to Sync Updated and Recalculated Data via Smartvatten API

P
Written by Pauliina Lupunen
Updated over 3 weeks ago

The query[updatedafter] parameter in the Smartvatten Data API allows systems to retrieve all values that have been updated or recalculated since a specific timestamp—without the need to define a start or end date.

This mechanism ensures that integrations with Smartvatten remain fully synchronized with the most accurate and up-to-date data, including historical corrections and recalculations.


Key Features

  • Returns all values updated since the specified timestamp, including recalculated historical data.

  • No need to define a time range—only the query[updatedafter] parameter is required.

  • Supports rolling updates: Call the API periodically (for example, daily) to retrieve only new or changed data.

  • Covers up to 2 years of history: Any value updated within the last two years can be returned.

  • Captures recalculated data: If a value from months or even years ago was recalculated recently, it will be included in the response.


Parameter Details

  • Parameter: query[updatedafter]

  • Type: string

  • Format: YYYY-MM-DDTHH (e.g. 2025-07-25T01)

  • Function: Returns all data updated since the specified timestamp.

  • Limit: Updates can be returned for up to 2 years prior to the current date.


How It Works

When query[updatedafter] is used, the API returns:

  • All values that were have been created, modified, or recalculated after the given timestamp.

  • Historical values are included if they were updated after the specified time.

You do not need to define a start date or end date—the API automatically returns all relevant updates up to the latest available data.


Usage Example

To keep your system synchronized on a daily basis:

  1. Set query[updatedafter]=2025-07-21T00 (for example, your last successful sync time).

  2. Call the API once per day.

The API will return:

  • All values updated or recalculated since July 21, 2025, at 00:00.

  • Including historical values that were modified during that period.


Best Practices

  • Use a rolling timestamp (for example, the timestamp of the last successful sync).

  • Persist the timestamp of each successful API call and reuse it as the next query[updatedafter] value.

  • Keep in mind that the API can return updates going back up to 2 years, but not earlier.


If you have any questions or need assistance integrating the query[updatedafter] parameter into your system, please contact our integrations team at integrations@smartvatten.com.

Did this answer your question?