Operation Status & Reconciliation
Every disbursement and collection you create is recorded as an operation with a stable operation_id (returned in the write's response). These endpoints let you read operations back — the reconciliation half of the API.
GET /operations/{operation_id}
POST /operations/query (recommended)
GET /operations (deprecated — see below)
GET /operationsis deprecated, sunset 2027-01-30. It still works today, but responses carry aDeprecation: trueheader and adeprecation_noticefield once that date passes it will stop responding — migrate toPOST /operations/querybefore then. The reason:idempotency_keyandexternal_referenceidentify one specific transaction, and a GET request's query string ends up verbatim in web server, proxy, and WAF access logs, and in browser history if you ever debug a call from one.POST /operations/querytakes the exact same filters as a JSON body instead — nothing new to learn, just a different envelope.GET /operations/{operation_id}(single lookup by id) is unaffected — an id in a path isn't a search term, and isn't going anywhere.
Required scope: none beyond a valid signature. Both endpoints only ever return operations your own credential created, so no additional grant is needed.
When you need this
- A write timed out. You POSTed a disbursement, the connection dropped, and you never saw the response. Look the operation up by the
idempotency_keyyou sent — if it exists, the write landed; itsstatustells you the outcome. (Retrying the POST with the sameidempotency_keyis also safe and returns the original result — both patterns work; lookups are read-only and simpler to reason about in recovery code.) - End-of-day reconciliation. List everything you created today and diff it against your own ledger.
- Following up an async confirmation. If you confirm operations via Webhooks, polling
GET /operations/{operation_id}is the pull-based alternative.
Get one operation
GET /operations/{operation_id}| Parameter | Description |
|---|---|
operation_id |
The numeric id returned by POST /disbursements or POST /collections. |
TIMESTAMP=$(date +%s)
REQUEST_URI="/api/partner/v1/operations/412"
BODY_HASH=$(printf '%s' '' | openssl dgst -sha256 | sed 's/^.* //')
SIGNATURE=$(printf '%s' "${TIMESTAMP}|GET|${REQUEST_URI}||${BODY_HASH}" | openssl dgst -sha256 -hmac "$API_SECRET" | sed 's/^.* //')
curl "https://prodsacco.officeug.com${REQUEST_URI}" \
-H "X-Api-Key: $API_KEY" \
-H "X-Timestamp: $TIMESTAMP" \
-H "X-Signature: $SIGNATURE"
{
"success": true,
"message": "OK",
"data": {
"operation_id": 412,
"operation": "disbursement",
"status": "completed",
"amount": 250000.0,
"currency": "UGX",
"external_reference": "LOAN-2026-00871",
"idempotency_key": "bank-tx-9f31d2",
"failure_reason": null,
"otp_expires_at": null,
"confirmed_at": null,
"created_at": "2026-07-09T10:41:22+03:00",
"updated_at": "2026-07-09T10:41:23+03:00"
},
"request_id": "..."
}
status is one of pending, completed, failed, or — collections only, and only when the SACCO requires OTP confirmation, the default for live partners (see Collections) — awaiting_confirmation or expired. When failed, failure_reason carries the same partner-safe message the original write returned. otp_expires_at is only non-null while status is awaiting_confirmation; confirmed_at is set once a collection is confirmed via /confirm.
List / search operations
POST /operations/query (recommended)
GET /operations (deprecated, sunset 2027-01-30)All parameters are optional; combine them freely. Same fields either way — as JSON body keys on POST /operations/query, as query parameters on the deprecated GET /operations.
| Parameter | Description |
|---|---|
idempotency_key |
Exact match — the recovery lookup for a write whose response you lost. |
external_reference |
Exact match on the reference you supplied at creation. |
status |
pending, awaiting_confirmation, completed, failed, expired, or cancelled. |
operation |
disbursement or collection. |
from / to |
Creation-date range (YYYY-MM-DD). |
page / per_page |
Pagination — per_page defaults to 20, max 100. |
Example: "did my write land?" (recommended, POST)
TIMESTAMP=$(date +%s)
REQUEST_URI="/api/partner/v1/operations/query"
BODY='{"idempotency_key":"bank-tx-9f31d2"}'
BODY_HASH=$(printf '%s' "$BODY" | openssl dgst -sha256 | sed 's/^.* //')
SIGNATURE=$(printf '%s' "${TIMESTAMP}|POST|${REQUEST_URI}|application/json|${BODY_HASH}" | openssl dgst -sha256 -hmac "$API_SECRET" | sed 's/^.* //')
curl -X POST "https://prodsacco.officeug.com${REQUEST_URI}" \
-H "X-Api-Key: $API_KEY" \
-H "X-Timestamp: $TIMESTAMP" \
-H "X-Signature: $SIGNATURE" \
-H "Content-Type: application/json" \
-d "$BODY"Same lookup, deprecated GET form — still works today, but avoid it for anything that includes idempotency_key or external_reference, since those end up in the URL:
TIMESTAMP=$(date +%s)
REQUEST_URI="/api/partner/v1/operations?idempotency_key=bank-tx-9f31d2"
BODY_HASH=$(printf '%s' '' | openssl dgst -sha256 | sed 's/^.* //')
SIGNATURE=$(printf '%s' "${TIMESTAMP}|GET|${REQUEST_URI}||${BODY_HASH}" | openssl dgst -sha256 -hmac "$API_SECRET" | sed 's/^.* //')
curl "https://prodsacco.officeug.com${REQUEST_URI}" \
-H "X-Api-Key: $API_KEY" \
-H "X-Timestamp: $TIMESTAMP" \
-H "X-Signature: $SIGNATURE"Signing note: the signature covers the path and any query string exactly as sent, plus the
Content-Typeheader. For POST, the body hash covers the actual JSON you send, not a blank value. See Authentication.
Example response (same shape either way)
{
"success": true,
"message": "OK",
"data": {
"operations": [
{
"operation_id": 412,
"operation": "disbursement",
"status": "completed",
"amount": 250000.0,
"currency": "UGX",
"external_reference": "LOAN-2026-00871",
"idempotency_key": "bank-tx-9f31d2",
"failure_reason": null,
"created_at": "2026-07-09T10:41:22+03:00",
"updated_at": "2026-07-09T10:41:23+03:00"
}
],
"pagination": { "current_page": 1, "last_page": 1, "total": 1 }
},
"request_id": "..."
}An empty operations array with your idempotency_key filter means the write never landed — it is safe to send it again with the same key.
Errors
| HTTP | error_code | Meaning |
|---|---|---|
| 404 | OPERATION_NOT_FOUND |
No operation with that id exists for your credential. Another partner's ids always 404 — ids are not enumerable across partners. |