ModestGram
Board Holds Slip Rates Pass-down Desk Log in

API

Actions a shift actually takes.

Base URL is https://api.modestgram.com/v1. Send a bearer token issued to the desk. The calls below open a shift, record a room or a reefer that left its limit, write the quarantine slip, take the driver mark, and file the pass-down. They are not a general account directory.

Bearer token

Every call sends Authorization: Bearer and the desk token. Replace the sample token in the curls below with the one issued when the desk was opened. A token for one subscriber cannot read another desk's slips. A driver token can write a mark on a slip that is already open. It cannot release the lot.

curl https://api.modestgram.com/v1/holds \
  -H "Authorization: Bearer mg_desk_example"

Calls

POST /shifts

Put a staffed shift on the board. Name the kind: room, arrival, or pass-down. A shift that has not started can be canceled. A shift that has started is billed.

POST /rooms/{room_id}/exceedances

Record a reading that left the limit for that room and probe. Returns how far past the limit, and whether a slip should be opened.

GET /holds

List quarantine slips that are not released. Filter with shift_id when the morning only wants the night it just inherited.

POST /slips

Open a quarantine slip for a lot. One open slip per lot. A second open for the same lot returns lot_already_held.

POST /slips/{slip_id}/driver-mark

The driver accepts the load into the named room or refuses the seal. The mark appends. It does not erase the reading.

POST /slips/{slip_id}/release

A supervisor signs the release. Coming back into range does not call this for you.

POST /handovers

Write the pass-down from one roster name to the next.

GET /reefers/{unit_id}

Read setpoint, return air, and the arrival window currently tied to that unit.

Record an exceedance

Room B2, probe 4, frozen ceiling -18.0°C, reading -16.2°C. Times are UTC.

curl https://api.modestgram.com/v1/rooms/b2/exceedances \
  -H "Authorization: Bearer mg_desk_example" \
  -H "Content-Type: application/json" \
  -d '{
    "probe_id": "b2-probe-4",
    "limit_c": -18.0,
    "reading_c": -16.2,
    "recorded_at": "2026-10-22T00:10:00Z",
    "lot_id": "BR-2291"
  }'
{
  "exceedance_id": "ex_1841",
  "room_id": "b2",
  "over_by_c": 1.8,
  "minutes_outside": 11,
  "slip_suggested": true
}

Open the slip

curl https://api.modestgram.com/v1/slips \
  -H "Authorization: Bearer mg_desk_example" \
  -H "Content-Type: application/json" \
  -d '{
    "exceedance_id": "ex_1841",
    "lot_id": "BR-2291",
    "goods": "Frozen mixed berries",
    "pallet_count": 18,
    "isolated_at": "Cage 2, rows 4-6",
    "opened_by": "N. Hale"
  }'
{
  "slip_id": "Q-184",
  "state": "in_process",
  "driver_mark": null,
  "release": null
}

Driver accept or refuse

decision is accept or refuse. Anything else is rejected. A note can describe a soft door seal. The note is not a third decision.

curl https://api.modestgram.com/v1/slips/Q-184/driver-mark \
  -H "Authorization: Bearer mg_desk_example" \
  -H "Content-Type: application/json" \
  -d '{
    "unit_id": "reefer-441",
    "driver_name": "R. Pell",
    "decision": "refuse",
    "note": "Return air warm. Seal not accepted.",
    "signed_at": "2026-10-22T02:44:00Z"
  }'
{
  "slip_id": "Q-184",
  "state": "in_process",
  "driver_mark": "refuse",
  "release": null
}

Write the pass-down

curl https://api.modestgram.com/v1/handovers \
  -H "Authorization: Bearer mg_desk_example" \
  -H "Content-Type: application/json" \
  -d '{
    "shift_id": "night-2026-10-22",
    "from_name": "N. Hale",
    "to_name": "M. Ortiz",
    "still_held": ["Q-184"],
    "do_not_expect": ["Q-179"],
    "note": "Cage 2 keys are on the night hook. Probe 4 battery swapped at 03:20."
  }'
{
  "handover_id": "pd_2206",
  "to_name": "M. Ortiz",
  "still_held": ["Q-184"]
}

When the lot is already held

A second open slip for lot BR-2291 returns 409. Point the clerk at the slip that is already in process.

{
  "error": "lot_already_held",
  "lot_id": "BR-2291",
  "open_slip_id": "Q-184"
}

Questions about a token or a feed go to the desk or to support@modestgram.com.