Guides
Sync harvests into your ERP / accounting
Bring confirmed harvest records into your system as soon as they exist — no duplicates, nothing missed.
1. Listen to harvest events
harvest.batch.created when a record is confirmed; harvest.batch.verified when the actual yield is verified.
2. De-duplicate
Store the X-Nextfarm-Delivery (= webhook-id) you processed; the same message can be delivered more than once.
3. Reconcile periodically
Each night pull records by status to catch anything missed while your system was down.
Examplecurl "https://api-prod.nextfarm.vn/api/v1/harvest/harvest-records?status=confirmed&page=1&page_size=100" -H "Authorization: Bearer nfk_..."4. Write back (optional)
Declare harvest records from your system with scope harvest.harvest.create, always with an Idempotency-Key.