Guides

Print traceability labels on packaging

Fetch the farm's traceability lots and QR codes to print on packaging; buyers scan the label to see the cultivation log and certificates.

  1. 1. A key with traceability scopes

    harvest.trace.view, harvest.qr-codes.view, harvest.certification.view.

  2. 2. Listen for new labels

    The harvest.qr.created event fires whenever the farm creates a label — take its code to print.

    harvest.qr.created

  3. 3. Read the traceability lot

    Published lots and one lot's detail (log, certificates, photos).

    Example
    curl 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. 4. The public scan page

    Detail by label code needs no key — exactly what the buyer sees.

    Example
    curl https://api-prod.nextfarm.vn/api/v1/harvest/trace/qr/<code>