Title

Global

Members

string

readonly BalanceType

Enum that represents balance types.
Properties:
Name Type Description
TOTAL string Total balance
PERIOD string Period balance
CUMULATIVE string Cumulative balance
string

readonly DecimalSeparator

Enum for decimal separator.
Properties:
Name Type Description
COMMA string
DOT string
string

readonly Periodicity

The Periodicity of the query. It depends the way you write the range params. You can use variables.

Go to bkper.com and open report wizard: to learn more about query sintax.
Properties:
Name Type Description
DAILY string Ex: after:25/01/1983, before:04/mar/2013, after:$d-30, before:$d, after:$d-15/$m
MONTHLY string Ex: after:jan/2013, before:mar/2013, after:$m-1, before:$m
YARLY string Ex: 2013, 2013, $y
DAILY string
MONTHLY string
YARLY string
string

readonly Permission

Enum for Permissions.
Properties:
Name Type Description
NONE string
VIEWER string
POST string
EDITOR string
OWNER string

Methods

getAuthorizationHtml(continueUrlopt, continueTextopt)

Gets the authorization screen html template for the user to authorize the API
Parameters:
Name Type Attributes Description
continueUrl string <optional>
The url to continue the action after authorization
continueText string <optional>
The link text to show the user the action after authorization

isUserAuthorized() → {boolean}

Check if the user is already althorized with OAuth2 to the bkper API
true if the user is already authorized, false otherwise
boolean

listBooks() → {Array}

Gets the books of the user.
All books the user has access
Array

listLedgers()

Deprecated:

openById(bookId) → {Book}

Returns the Book with the specified ID.
Parameters:
Name Type Description
bookId string The universal book id - The same bookId param of URL you access at bkper.com
Book
Example
var book = BkperApp.openById("agtzfmJrcGVyLWhyZHITCxIGTGVkZ2VyGICAgIDggqALDA");
  book.record("#fuel for my Land Rover 126.50 28/01/2013");

openLedgerById()

Deprecated:

Type Definitions

Variables

A variable represents a moment on time. Useful to keep queries and expressions updated on time.
Go to bkper.com and open report wizard: to learn more about variables.
The sintax is ($y|$m|$d)(-|+)(1-999). See more bellow.
Properties:
Name Type Description
$d string The current day. Example: $d-15 (fifthteen days ago) / $d+1 (one day ahead)
$m string The current month. Example: $m-1 (one month ago) / $m+2 (two months ahead)
$y string The current year. Example: $y-1 (one year ago) / $y+1 (one year ahead)