Every transaction row carries its resolved income category and GL code. These are the same values you see in the manager accounting report and its CSV export, so you do not have to recompute them.

Pull transactions into your books

1

Get a key and confirm its scope

Ask your Gymdesk contact for a key, then call GET /me to confirm which academies it covers.
2

Pull the transactions for a date window

Call GET /transactions with a paidFrom and a paidTo date. Both are required. Each academy reads the window in its own local calendar days. The window can span up to 366 calendar days, counting both end dates.
3

Read each row's amounts and codes

Map incomeCategory, glCode, and departmentCode onto your chart of accounts. Read the money fields as minor units. See Amounts and currency.
4

Page through the whole window

Follow meta.nextCursor until it is null. See Pagination.
5

Cross-check with the summary

Call GET /transactions/summary over the same window for totals per academy and per type. The summary aggregates the same rows as the detail endpoint. It is not paginated, so walk every detail page before you compare.
Only reconciled rows appear. The API excludes pending transactions, failed transactions, and canceled payments, which matches the manager accounting report. Refund and chargeback rows carry a negative total and no method. A method filter therefore never matches a refund or a chargeback.

Income category and GL codes

These fields let external accounting software file each row correctly. Gymdesk resolves them server-side and returns them ready to use. Every row carries all four keys. Any of them can be null.

How Gymdesk resolves a code

incomeCategory takes the first value it finds:
  1. A per-transaction override.
  2. The source item, which is the product or the membership.
  3. The default for the source type.
  4. An umbrella bucket, such as membership or retail.
glCode and departmentCode follow a shorter chain, and it changes with the row type:
  • Retail and membership rows take an override first, then the product or membership. They do not fall back to a source-type default.
  • Booking rows take an override, then the booking source-type default.
  • Casual rows take an override, then the academy accounting settings.
venueCode comes from the academy settings only. An unconfigured code returns JSON null, not an empty string. Test for null.
A resolved code reflects the configuration as it stands now. If someone changes a mapping, re-reading an old row returns the new code. Only a per-transaction override pins a row’s codes permanently. Capture the code at import time if your books need a fixed historical value.