Record pours with the API
Send each pour from your POS or meter to the Partner API so keg levels, kicked kegs and analytics stay current, then read pours back to sync your own records.
When your POS, a flow meter or your own software records a pour, send it to RaspberryPints. Each pour lowers the keg's level on the Taps page and on your taplist, and counts toward your analytics.
The examples use $BASE for https://api.raspberrypints.com/v1/partner/breweries/YOUR_BREWERY_ID and $KEY for your API key. See Authentication and scopes.
Before you start
- The key needs the Pours: Write scope to record pours, and Pours: Read to list them.
- The tap needs a beer on it. For keg levels, tap the beer with its keg size (
volumeStart). See Manage beers and taps with the API. - To find a tap's
tapId, list your taps withGET /taps(scope Taps: Read), or look one up by your own ID withGET /taps/external/EXTERNAL_ID.
Record a pour
Send the volume in US fluid ounces. A 16 oz pint is 16, whatever measurement system your admin uses.
curl -X POST "$BASE/taps/TAP_ID/pour" \
-H "x-api-key: $KEY" \
-H "Content-Type: application/json" \
-d '{
"volume": 16,
"externalId": "ticket-58213-line-2",
"metadata": { "register": "bar_1" }
}'A successful pour returns 201:
{
"pourId": "POUR_ID",
"tapId": "TAP_ID",
"sessionId": "SESSION_ID",
"volume": 16,
"timestamp": "2026-11-25T19:42:07.512Z",
"externalId": "ticket-58213-line-2",
"metadata": { "register": "bar_1" }
}sessionId identifies the keg the pour came from. timestamp is when RaspberryPints recorded the pour.
What a pour changes
- Keg level. The keg's remaining volume goes down by the pour. The Taps page and, if you show them, the keg levels on your taplist follow. See Keg levels and kicked kegs.
- Kicked kegs. When the remaining volume reaches 0, the keg is marked kicked. The beer stays on the tap until you untap it. If Mark kegs kicked when they run out is on in Settings > Display, your taplist stamps it as kicked.
- Analytics. Once a keg has recorded pours, Analytics uses those measured volumes for it instead of an estimate. See Analytics.
- Email alerts. Pours can trigger the keg-running-low and keg-kicked alerts that people have turned on. See Email alerts.
Every pour is recorded in full, even after the keg reaches 0. The part poured after that comes back as pastEmptyVolume, and the keg stays at 0. If you see it often, the keg held more than the size you set, or the meter reads high. A keg tapped without a size records pours but has no level to lower.
Send each pour once
Give every pour an externalId from your own system, such as a ticket and line number. If your integration retries after a timeout, a second pour with the same externalId is refused with 409 and the code EXTERNAL_ID_CONFLICT, so the keg isn't lowered twice. Treat that 409 as "already recorded".
To check whether a pour arrived, look it up (scope Pours: Read):
curl "$BASE/pours/external/ticket-58213-line-2" -H "x-api-key: $KEY"Read pours back
GET /pours (scope Pours: Read) lists recorded pours, newest first. Use it to reconcile your sales with what was poured.
| Query parameter | What it does |
|---|---|
| since | Only pours at or after this time, as an ISO 8601 timestamp |
| tapId | Only pours on this tap |
| limit | How many to return, from 1 to 1000. The default is 100. |
curl "$BASE/pours?since=2026-11-25T00:00:00Z&limit=500" -H "x-api-key: $KEY"{
"breweryId": "YOUR_BREWERY_ID",
"count": 2,
"pours": [
{
"pourId": "POUR_ID",
"tapId": "TAP_ID",
"sessionId": "SESSION_ID",
"volume": 16,
"timestamp": "2026-11-25T19:42:07.512Z",
"externalId": "ticket-58213-line-2"
}
]
}To sync regularly, keep the timestamp of the newest pour you've stored and pass it as since next time. Because since includes pours at exactly that time, skip any pourId you already have. When count equals your limit, there may be more pours than one page holds. Because the newest pours come first, the ones left out are the oldest in that window. Raise limit (up to 1000) or sync more often so each call returns fewer than limit pours.
Errors when recording a pour
| Status and code | What it means | What to do |
|---|---|---|
| 400 INVALID_VOLUME | volume is missing, not a number, or not above 0 | Send a positive number of fluid ounces |
| 400 NO_ACTIVE_SESSION | No beer is on this tap | Tap a beer first, or check you're using the right tap |
| 404 TAP_NOT_FOUND | No tap with this ID in your brewery | Check the tapId with GET /taps |
| 409 EXTERNAL_ID_CONFLICT | A pour with this externalId is already recorded | Don't resend it |
| 403 INSUFFICIENT_SCOPE | The key doesn't have Pours: Write | Create a key with that permission |
For errors every endpoint can return, see Limits and errors.
Was this article helpful?
