REST DocumentationIncremental sync

Incremental sync

Load everything once, then fetch only what changed. This page shows how modified_after, id_after and id[] work together and what an incremental sync cannot see.

Which lists accept modified_after is shown in the reference: every list that can do it names the parameter, and returns modified for each entry.

Watermark with modified_after

Read all pages first, then take the largest modified value of everything you received and store it as the new watermark. Send it as modified_after on the next run.

The list is not sorted by modified. The last row is therefore not the newest: take the maximum over all pages, and store the watermark only after the last page. If a run stops halfway, keep the old watermark and repeat the run.

curl 'https://www.zep-online.de/zepinstanz/next/api/v1/employees?modified_after=2026-10-27T15:57:15.000000Z&limit=200' -H 'Authorization: Bearer {token}' -H 'Accept: application/json'

Most lists return only records modified strictly after the value. Page size and links.next are described under Pagination.

Records that share one timestamp: id_after

/attendances and /absences accept id_after together with modified_after. It continues after the last id you processed when many records carry the same modified.

  • /attendances: the cursor is inclusive. Records with exactly the sent modified value come back again, so none is skipped. Your code must ignore the duplicate. With id_after, those records at exactly that timestamp whose id is not greater are skipped.
  • /absences: modified_after stays strict. Only with id_after it also returns records modified exactly at modified_after whose id is greater than the given one.
curl 'https://www.zep-online.de/zepinstanz/next/api/v1/attendances?modified_after=2026-10-27T15:57:15.000000Z&id_after=48213&limit=200' -H 'Authorization: Bearer {token}' -H 'Accept: application/json'

See attendances and absences in the reference.

Re-read remembered ids with id[]

Some lists filter by id[] (one value or a list), for example /attendances and /absences. Use it to re-read records you noted earlier, such as the ones your system still shows as open, without a full load:

curl 'https://www.zep-online.de/zepinstanz/next/api/v1/absences?id[]=101&id[]=102&id[]=103' -H 'Authorization: Bearer {token}' -H 'Accept: application/json'

An id that no longer exists simply does not come back. The reference shows id[] on every list that supports it.

What an incremental sync does not detect

Plan a full read from time to time for these cases.

  • Deletions. modified never shows a deleted record. This applies in particular to devices, regular working times, meals, price tables and offers: their deletion cannot be detected today. Deleted tasks, deleted receipt amounts, deleted customer contacts and deleted internal rates are not detected either.
  • Invoice items. A change to an invoice item does not necessarily change the modified of the invoice.
  • Derived fields. They change without modified moving, for example end_date of a price table (it follows from the next table) or whether an employee is employed on a given day.
  • modified_before. It hides rows without a modified value.
  • Offers. A change to an offer item does not move offer.modified; read /offers/{id}/items per offer.
  • Price tables and customer contacts. A change there does not update the parent’s modified.
  • Booked hours of a task. They change only the task’s own modified, not the project’s.
  • /plannings. The next link loses modified_after and limit for now. Do not follow it there: send page yourself and repeat the filters.

A change to some children does update the parent’s modified, so the parent’s modified_after finds it:

  • /projects: an employee assignment of the project or of one of its tasks, an activity, a location, and a created or changed task. A change of a task’s booked hours (plan_hours_done, plan_hours_invoiced) does not count.
  • /employees: an employment period or a regular working time (created, changed or deleted). With include=internal_rates also a created or changed internal rate.
  • /receipts: a created or changed amount.

Saves roughly all of the data volume of unchanged records once the first full load is done.