Improved

🔄 Freshness filters & full-source employments


  • New optional updated_at_from / updated_at_to query params and a per-row updated_at timestamp on GET /invoices — filter invoices by freshness.
  • New the same updated_at_from / updated_at_to filtering and per-row updated_at on GET /employments.
  • Improved GET /employments now returns records from all IMSS/ISSSTE sources (no more static priority dedup); distinguish them via data_source.

⚙️ What Changes

updated_at range filtering on GET /invoices

  • GET /invoices now accepts optional updated_at_from and updated_at_to query params (format YYYY-MM-DD, e.g. ?updated_at_from=2026-01-01&updated_at_to=2026-03-31). Both are optional and combinable (from-only, to-only, or a full range).
  • Each invoice row now carries its own updated_at (ISO-8601) reflecting the real recovery date of that record.
  • from > to returns a 400 invalid_input_data error; equal bounds are allowed.

updated_at range filtering on GET /employments

  • GET /employments accepts the same optional updated_at_from / updated_at_to params, with identical semantics.
  • Each employment row now carries its own updated_at reflecting the real recovery date of that record.

GET /employments returns all data sources

  • The endpoint no longer collapses each institution to a single "winning" source. It returns records from every IMSS/ISSSTE source (imss_get_weeks, imss_rpci, issste, …), and clients distinguish them via the data_source field.
  • Responses may now include more rows and pagination counts may grow accordingly. Existing response contracts are otherwise unchanged.

🛠️ No Action Required

The new query params and fields are additive and optional. GET /employments returning more rows is the main behavioral change — use the data_source field to filter by source if you previously relied on the server picking one for you.