Hướng dẫn
In tem truy xuất lên bao bì
Lấy lô truy xuất và mã tem QR của trại để in lên bao bì; người mua quét tem thấy nhật ký canh tác và chứng nhận.
1. Khoá với scope truy xuất
harvest.trace.view, harvest.qr-codes.view, harvest.certification.view.
2. Nghe tem mới
Sự kiện harvest.qr.created báo mỗi khi trại tạo tem — lấy code để in.
3. Đọc lô truy xuất
Danh sách lô đã phát hành và chi tiết một lô (nhật ký, chứng nhận, ảnh).
Lệnh mẫucurl https://api-prod.nextfarm.vn/api/v1/harvest/trace -H "Authorization: Bearer nfk_..." curl https://api-prod.nextfarm.vn/api/v1/harvest/trace/<id> -H "Authorization: Bearer nfk_..."4. Trang quét công khai
Chi tiết theo mã tem không cần khoá — đúng nội dung người mua thấy.
Lệnh mẫucurl https://api-prod.nextfarm.vn/api/v1/harvest/trace/qr/<code>