Global

Members

<readonly> BalanceType :string

Enum that represents balance types.
Type:
  • string
Properties:
Name Type Default Description
TOTAL string total Total balance
PERIOD string period Period balance
CUMULATIVE string cumulative Cumulative balance

<readonly> DecimalSeparator :string

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

<readonly> Periodicity :string

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.
Type:
  • string
Properties:
Name Type Default 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 DAILY
MONTHLY string MONTHLY
YARLY string YARLY

<readonly> Permission :string

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

Methods

getAuthorizationHtml(continueUrl, continueText)

Gets the authorization screen html template for the user to authorize the API
Parameters:
Name Type Argument 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
Returns:
true if the user is already authorized, false otherwise
Type
boolean

listBooks() → {Array}

Gets the books of the user.
Returns:
All books the user has access
Type
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
Returns:
Type
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)