Skip to content

API Endpoints

All endpoints are read-only and require an X-API-Key header with a token that has read scope or higher.

Base URL: https://api.ogarni.ai


List your purchase documents (receipts, invoices, email purchases).

Query parameters:

ParameterTypeDefaultDescription
fromDateTimeStart date filter (ISO 8601)
toDateTimeEnd date filter (ISO 8601)
sortBystringpurchase_timeSort field: purchase_time or created_at
sortDirectionstringdescSort order: desc or asc

Example:

Okno terminala
curl "https://api.ogarni.ai/api/PurchaseDocuments/my?from=2025-01-01&to=2025-01-31&sortBy=purchase_time&sortDirection=desc" \
-H "X-API-Key: $OGARNIAI_API_TOKEN"

Get full details of a single purchase document by its UUID.

Get the scanned image (receipt photo) of a document. Returns binary image data with the appropriate content type.

GET /api/PurchaseDocuments/{id}/duplicates

Section titled “GET /api/PurchaseDocuments/{id}/duplicates”

Get duplicate suggestions for a specific document, including confidence scores and match reasons.


List all expense and income categories with their subcategories. Each category includes Polish and English names, an emoji, and a list of subcategories.

List all user-defined tags. Tags can be attached to purchase documents for custom organization.


Get the most recent weekly spending summary, including an AI-generated text summary, daily breakdowns, and category totals.

List weekly summaries with pagination.

Query parameters:

ParameterTypeDefaultDescription
pageint1Page number
pageSizeint10Items per page

Get a spending summary for a custom date range.

Query parameters:

ParameterTypeRequiredDescription
startDateDateTimeYesStart of the period (ISO 8601)
endDateDateTimeYesEnd of the period (ISO 8601)
granularitystringNoDay (default), Week, or Month

Get a spending summary for a preset period.

Query parameters:

ParameterTypeRequiredDescription
presetstringYescurrent-week, current-month, last-week, or last-month
granularitystringNoDay (default), Week, or Month

List notifications with filtering and pagination.

Query parameters:

ParameterTypeDefaultDescription
isReadboolFilter by read status
typeenumError=1, Warning=2, Info=3, Success=4
categoryenumDocumentProcessing=1, WeeklySummary=2, System=3, DuplicateDetection=4
pageSizeint50Items per page
pageNumberint1Page number

Get details of a single notification by its UUID.

Get the count of unread notifications. Returns {"count": N}.


List your finance groups (for shared expenses).

Query parameters:

ParameterTypeDefaultDescription
showArchivedboolInclude archived groups

Get details of a specific group by its UUID, including owner information.


List your inbound email addresses used for forwarding receipts to Ogarni.AI.

List duplicate document suggestions with confidence scores and match reasons.

List connected loyalty program accounts (e.g., store loyalty cards).

Get the list of banks supported for bank statement import.

List detected recurring expenses (subscriptions, regular payments).

Query parameters:

ParameterTypeDefaultDescription
includeInactiveboolfalseInclude inactive recurring expenses