Skip to content

API reference

One endpoint takes temperature readings from anything that can make an HTTPS request. There is nothing brand-specific to install.

Authentication

An owner creates API keys under Settings, API keys in the app. Send the key in the Authorization header as a bearer token. A key belongs to one company and can only read and write that company's units. It is shown once when created; if it is lost, revoke it and create another.

Find your unit ids

Readings are filed against a refrigeration unit. List the units of your vehicles in service to get their ids. The id is also shown on each vehicle's page.

curl https://coldledger.tech/api/v1/units -H "Authorization: Bearer key_your_api_key"
{
  "units": [
    { "id": "0195c1de-816b-7172-9698-407120f4893a",
      "vehicle": "Trailer 7", "plate": "T 4471",
      "brand": "Thermo King", "model": "SLXi 300", "zones": 2 }
  ]
}

Post readings

POST https://coldledger.tech/api/v1/readings with a JSON body holding between 1 and 1000 readings.

curl -X POST https://coldledger.tech/api/v1/readings \
  -H "Authorization: Bearer key_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "readings": [
      { "unit_id": "0195c1de-816b-7172-9698-407120f4893a",
        "zone": 1, "temp_c": -19.6,
        "recorded_at": "2026-03-18T10:05:00Z" },
      { "unit_id": "0195c1de-816b-7172-9698-407120f4893a",
        "zone": 2, "temp_c": 2.4,
        "recorded_at": "2026-03-18T10:05:00Z" }
    ]
  }'
FieldMeaning
unit_idThe refrigeration unit the reading is for. Required.
zone1 or 2. Optional; 1 if left out. Zone 2 exists only on two-zone units.
temp_c or temp_fThe temperature, in Celsius or Fahrenheit. Send exactly one of the two.
recorded_atWhen the reading was taken, as an ISO 8601 time with an offset or Z. It may be in the past, so a logger can send what it stored while out of coverage.

A successful request answers with status 200:

{ "accepted": 2, "duplicates": 0 }

A reading already on file for the same unit, zone and time is counted under duplicates and skipped, so it is always safe to send a batch again after a timeout.

When a request is refused

A batch is all or nothing. If any reading in it is not acceptable, nothing is stored and the response lists what was wrong, by the reading's position in the array.

{
  "error": "Some readings could not be accepted. Nothing was stored.",
  "issues": [
    { "index": 1, "message": "Unknown unit 0195c1de-0000-7000-8000-000000000000" }
  ]
}
StatusMeaning
200Stored.
400The body is not valid JSON.
401The API key is missing, wrong or revoked.
402The account is read-only because its trial ended or its subscription was cancelled.
422One or more readings were not acceptable. See issues.
429More than 120 requests in a minute from one key. Send readings in batches and try again after the number of seconds in the Retry-After header.

What happens to a reading

It is stored against the unit. If a trip is in progress on that unit, the reading is checked against the trip's allowed range straight away, and an alert email goes out once an excursion has lasted longer than the company's alert delay. Readings sent when no trip is open are kept, and count towards any trip later created over that time.

Questions about an integration? Get in touch and include a sample of what your device sends.