Sync inventory between SeedLink and your system
Keeping your own database in step with what's actually active in Metrc or BioTrack is the most common integration job there is. This is the pattern for doing it on a schedule.
Pull active packages
Code
Page through with page/per_page until pagination.total_pages is reached. Do the same with status=inactive if you also track packages that have left the facility.
Reconcile against your own records
Diff the results against what you have stored. A package that's active in SeedLink but missing on your side needs to be created; one that's gone needs to be marked inactive.
Push corrections back where they apply
If your side is the source of truth for quantity or hold status, write it back:
Code
Gotchas
There's no modified_since filter on any resource yet, so every sync is a full pull of the current active set, not an incremental diff. Budget for that in how often you run this.