Skip to content

Books API

The close of the books: daily count, locked periods, the month-end pack, the auditor's link, the accountant's access and the files for their software.

The same operations are in the interactive API reference, and the whole contract is in the OpenAPI document.

GET/v1/books/closes

Daily closes

The days closed in a range (default the last 31 days) and the days not closed. Needs books:read.

Scope books:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
fromquerystringNoFirst day.
toquerystringNoLast day.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/books/closes

Close the day

Records the cash count. A gap outside the owner's tolerance needs all three answers (cash taken out, refunds, unrecorded sales). A day closes once. Needs books:write.

Scope books:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/books/closes/expected

Cash expected in the drawer

What the books say the drawer should hold at the end of a day: yesterday's count (or the opening given), plus cash received, less cash paid out. Give counted_micros to see whether the three gap questions must be answered. Needs books:read.

Scope books:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
datequerystringNoThe day.
currencyquerystringNoDefault the workspace currency.
counted_microsqueryintegerNoThe counted cash.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/books/periods

Periods of the books

The weeks and months, open, reviewed or closed. A closed period locks the entries dated in it. Needs books:read.

Scope books:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/books/periods

Open a period

Opens the calendar week or month holding date, or the exact range given for a fiscal month. Only an owner may. Needs books:write.

Scope books:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/books/periods/{id}/lock

Lock a week

Locks a week. Changes dated in it are made as dated adjustments. Only an owner may. Needs books:write.

Scope books:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/books/periods/{id}/review

Review a month

The accountant has looked at the pack as it stands now. Needs a live accountant grant. Needs books:read.

Scope books:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/books/periods/{id}/sign

Sign a month closed

Closes a reviewed month against the same pack. Refused when the figures changed since the review (the review is withdrawn) or an exception is open. The owner signs as the owner; an accountant needs a grant that allows signing. Needs books:read.

Scope books:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/books/periods/{id}/pack

Month-end pack

Sales and collections by day and how they were paid, purchases and payments, tax charged and paid, who owes the business and whom it owes by age, and the open exceptions. Needs books:read.

Scope books:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/books/adjustments

Adjust a locked entry

Cancels a posted entry in a closed period with a dated adjustment and the reason. The period is not touched. Only an owner may. Needs books:write.

Scope books:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/books/links

Give an auditor a link

Makes an expiring read-only link to a period's pack and registers. The address is shown once. Only an owner may. Needs books:write.

Scope books:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/books/links/{id}/revoke

Withdraw a link

Withdraws a link at once. Needs books:write.

Scope books:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/books/accountants

Accountant access

Who has accountant access to the books, and until when. Only an owner may. Needs books:read.

Scope books:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/books/accountants

Give accountant access

Lets a member read the books, review a month and, if allowed, sign its close, for a time. It carries no money authority. Only an owner may. Needs books:write.

Scope books:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/books/accountants/{id}/revoke

Withdraw accountant access

Withdraws the access at once. Needs books:write.

Scope books:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/books/exports/profiles

File profiles

How files are written for the accountant's software: delimiter, date and number style, header words. None ship by default. Needs books:read.

Scope books:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

PUT/v1/books/exports/profiles/{name}

Save a file profile

Saves a profile under its name, replacing an earlier one. Needs books:write.

Scope books:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
namepathstringYesThe profile name.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

DELETE/v1/books/exports/profiles/{name}

Delete a file profile

Deletes a saved profile. Needs books:write.

Scope books:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
namepathstringYesThe profile name.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/books/exports

Make the month-end files

The pack as four files and the sales and purchase registers, written under the profile named (default plain comma-separated text). Needs books:read.

Scope books:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/books/imports/stock

Import opening stock

Reads opening stock (item, quantity, optional label and unit cost). The file is checked whole and every problem is listed with its line; with apply and no problems it is applied. Applying is an owner's. Needs books:write.

Scope books:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/books/imports/balances

Import opening balances

Reads opening balances owed to the business, owed by it and cash held. Checked whole like stock; applied once per import against the owner's stake. Applying is an owner's. Needs books:write.

Scope books:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/books/openings

Opening balances

The opening balances imported so far. Needs books:read.

Scope books:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.