Skip to content
PackChain Systems Book a demo

Developers

Read your PackChain data from other systems.

A read-only API for customers: connect a reporting tool, a spreadsheet or your own system to your organisation's records. A key reads one organisation and can never change anything.

Start in three steps

  1. 1Get a keyPackChain makes a key for each system you connect. It is shown once, so store it safely.
  2. 2Send it with every requestIn the Authorization header. Never put it in a web page or an address.
  3. 3Read, then keep in stepRead everything once, then ask only for what changed since your last read.

The address

https://packchain.co.zw/api/v1

A first request

curl -H "Authorization: Bearer pck_your_key" https://packchain.co.zw/api/v1/farms
{
  "data": [ { "id": "north-farm", "name": "North Farm" } ],
  "has_more": false
}

What you can read

ResourceWhat it isTypical fields
/farmsThe organisation's farmsid, name
/blocksFarm blocks from the master fileid, name, section, variety, plants, farm_id
/receivingFruit receiving batchesbatch number, block, variety, weights, date
/work-ordersPacking work orderswork order number, customer, pack type, status
/palletsPalletspallet number, cartons, status, customer
/loading-notesLoading notes (dispatch)docket, customer, vehicle, pallets

Every record also carries internal_id (a number that never changes), farm_id, created_at and updated_at. People, pay and settings cannot be read through the API.

Options

OptionWhat it doesExample
farmOnly one farm. The ids come from /farms.?farm=north-farm
sinceOnly records changed after this moment.?since=2026-11-01T00:00:00Z
limitRecords per page: 1 to 1,000. Normally 200.?limit=500
afterContinue after this internal_id (the next_after of the page before).?after=18250

Reading page by page

Records come oldest first. When a page says "has_more": true, ask again with after set to its next_after, until has_more is false.

GET https://packchain.co.zw/api/v1/receiving?limit=500
GET https://packchain.co.zw/api/v1/receiving?limit=500&after=18250

Keeping in step

After the first full read, note the time you started it. Next time, send that time as since to receive only what was added or changed. A record that changed arrives again with the same internal_id, so replace your copy.

GET https://packchain.co.zw/api/v1/pallets?since=2026-11-13T06:00:00Z

When something is refused

Every refusal is JSON with an error and a plain message.

StatusErrorWhy
400bad_requestA query option is not valid. The message says which one.
401unauthorizedThe key is missing, wrong or revoked.
403pausedThe organisation's subscription is paused. Its keys work again when it is resumed.
404not_foundThere is no such resource, or the key has no farm with that id.
405method_not_allowedThe API is read-only: use GET.
429rate_limitedMore than 120 calls in a minute with this key. Wait a minute.

Limits and care of keys

Want to connect a system?

Tell us what should read your data and we will set up a key.