Download OpenAPI specification:Download
API documentation for the TrulySmall platform.
This document describes the TrulySmall Accounting API. This is the api used by the TrulySmall Invoicing, Expenses, and Ledger applications.
The api defines an accounting ledger and the additional features needed by the applications.
A TrulySmall user account is needed to use the api. The quickest way to get started is to sign up for a free trial with one of our applications. This will create an account for you, along with a user and a business. You can then use your credentials to obtain an authentication token and start using the api.
The ledger is centered around businesses, one of which will be created for you when you sign up for an account. Most endpoints accept a business id to identify who the operation is for. For example, a business will have its own contacts, taxes, transactions, accounts, and so on.
To allow for multi-user businesses, a user account is also assigned a user id. The user id can be associated with more than one business. The authentication token will only allow access to the business data for which the user has been granted access to. The user id is also used for user-specific operations such as purging a user account.
Subscriptions are centered around businesses. Each business must pay for its own subscription. A user can access any businesses that they have access to as long as the business is on an active subscription.
TrulySmall allows for two categories of authentication: first-party and third-party. First-party authentication is for developers at TrulySmall who are building apps for the company. Third-party authentication is for external developers who wish to integrate with TrulySmall.
There are two ways to log the user in directly: either standard user-password login or through single-sign-on providers such as Google, Apple, or Facebook.
The endpoints for first-party authentication are under the /useraccount
path. See that section below for more
information.
When a login completes successfully, the api returns a bearer token and a refresh token. The response also includes the
user account's user and business information needed for making subsequent calls. For example, a login call to POST /useraccount/login/tse
will return the following:
{
"refreshToken": "refresh-token",
"token": "bearer-token",
"user": {
"id": "95748954-6601-4eba-a230-b302ebb92c07",
... other user properties ...
},
"business": {
"id": "ed7fd001-5330-43ff-9923-31ff9766d9f6",
... other business properties ...
}
The returned bearer token must be passed in within the Authorization header for each call, in the format
Bearer bearer-token
. When the token expires, a 401 response will be given, and the client app can use the refresh
token to obtain a new bearer and refresh token. This is done with the call POST /useraccount/tokens/refresh
.
Users can enable multi-factor authentication (MFA) on their account. When MFA is enabled, the user must use another authentication method in addition to their password to complete their login and receive an authentication token. The api supports authenticator apps, email, and sms as second factor methods.
First-party login requires the user to enter their password, but we don't want users sharing their TrulySmall login information with any third parties. Instead, TrulySmall provides an OAuth2 server that allows third-parties to redirect users to TrulySmall to login and then redirects them back to the third party app with an access token. The third party can then use the access token to make api calls to TrulySmall on behalf of the user.
An explanation of OAuth2 is beyond the scope of this document. There are many resources online that explain the protocol, for example this one.
To get started, a third-party developer must register their app with TrulySmall. This is done manually and requires contacting TrulySmall and providing the redirect URLs for the OAuth flow. Once the app is registered, the developer will receive login and logout URLs to initiate the OAuth flow, as well as a client id and secret to use within it.
Here is a brief outline of the flow:
A single page app (SPA) redirects the browser/user to the TrulySmall login URL, which includes the client id and the redirect URL as query parameters. The redirect URL must be one of the URLs registered with TrulySmall for the app.
// client side code
// generate a random CSRF token to prevent cross-site request forgery
const csrfToken = Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15)
// store the state in the session storage so that we can validate it when we get the response
sessionStorage.setItem('csrf-token', csrfToken)
window.location.href = 'https://accounts.trulysmall.net/oauth2/authorize?' +
'client_id=... the client id ...' +
'&response_type=code' +
'&scope=offline_access' +
'&redirect_uri=... the redirect uri ...' +
'&state=' + csrfToken
The user logs in to TrulySmall on the OAuth server and is redirected back to the redirect URL with an authorization code.
https://redirect-uri?code=... the authorization code ...&state=... the state ...
The redirect URL should be handled by a server-side handler because it will need the client secret. It will use the authorization code and client secret to obtain an access token from TrulySmall.
// server side code
// send the following as form data
let formData = new URLSearchParams()
formData.append('code', ... received authorization code ...)
formData.append('grant_type', 'authorization_code')
formData.append('redirect_uri', ... the redirect uri ...')
formData.append('client_id', ... the client id ...')
formData.append('client_secret', ... the client secret ...')
// make an axios call to the oauth server to exchange the code for an access token using form encoded data
axios.post('https://accounts.trulysmall.com/oauth2/token', formData, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } })
.then(response => {
// parse the response data into token and user id
this.token = response.data.access_token
this.refreshToken = response.data.refresh_token
this.expiresIn = response.data.expires_in
this.tokenType = response.data.token_type
this.userId = response.data.userId
The server-side handler should redirect the browser back to the SPA with the access token, refresh token, and csrf cookie as http-only cookies.
The SPA can now make api calls to TrulySmall on behalf of the user by passing the access token in the Authorization header.
The api uses several data types that are worth documenting.
The object ids within the api are generally string
version 4 UUIDs, for
examplea6f573e7-39fb-4a6c-b010-81127b4ab7f7
. The api assigns object ids on creation but the client can also provide
them if it's helpful.
Amounts are represented as whole number strings, for example "100"
as $1.00. The amounts are whole numbers obtained
by multiplying the real amounts by the currency base amount (which is 100 for USD). This is done to avoid any floating
point arithmetic errors. Amounts are currently represented as strings due to a
Google protobuf typing design decision. The api must represent
amounts internally as 64-bit integers, but the JavaScript specification only supports 63-bit integers, hence protobuf
encodes them as strings.
Amounts are always paired with currency codes. These are three-letter codes defined in ISO 4217, for example 'USD'.
Times are represented as RFC 3339 strings, for example
2021-08-12T12:34:56.789Z
. Transactions can either be assigned dates with no time component, or full date-times. (Note
that the api documentation shows dates as including a zero time component, but this is ignored by the api.) The
date-times include time and timezone components, so they can be in UTC or in the user's local timezone.
Transactions also accept timezones along with date-times. These are used to explicitly state where the user is entering the transaction irrespective of the timezone format used within the date-time. Timezones are those defined in the tz database, for example 'America/New_York'.
The api uses several enums, for example for transaction types and category accounts. These are represented as strings
and follow protobuf naming conventions, for example TRANSACTION_TYPE_INCOME
.
User account management for TrulySmall apps. Used for registering new users, logging in, and managing user settings.
Get information about a User
userId required | string ID of the user |
Authorization required | string Example: Bearer foo |
{- "token": "auth-token",
- "user": {
- "data": { },
- "fullName": "John Smith",
- "id": "12345678-1234-1234-1234-123456789012",
- "insertInstant": 1701164388303,
- "lastLoginInstant": 1701969388303,
- "mfaMethods": [
- {
- "email": "string",
- "id": "string",
- "lastUsed": true,
- "method": "authenticator",
- "mobilePhone": "string",
- "secret": "string"
}
], - "registrationInstants": {
- "property1": 0,
- "property2": 0
}, - "verified": true
}
}
Patches a user account object. Updates only those properties which are not set.
userId required | string ID of the user |
Authorization required | string Example: Bearer foo |
patch user request
required | object (api.TSUser) |
{- "user": {
- "data": { },
- "fullName": "John Smith",
- "id": "12345678-1234-1234-1234-123456789012",
- "insertInstant": 1701164388303,
- "lastLoginInstant": 1701969388303,
- "mfaMethods": [
- {
- "email": "string",
- "id": "string",
- "lastUsed": true,
- "method": "authenticator",
- "mobilePhone": "string",
- "secret": "string"
}
], - "registrationInstants": {
- "property1": 0,
- "property2": 0
}, - "verified": true
}
}
{- "token": "string",
- "user": {
- "data": { },
- "fullName": "John Smith",
- "id": "12345678-1234-1234-1234-123456789012",
- "insertInstant": 1701164388303,
- "lastLoginInstant": 1701969388303,
- "mfaMethods": [
- {
- "email": "string",
- "id": "string",
- "lastUsed": true,
- "method": "authenticator",
- "mobilePhone": "string",
- "secret": "string"
}
], - "registrationInstants": {
- "property1": 0,
- "property2": 0
}, - "verified": true
}
}
Logs the user into TrulySmall Expenses using an SSO provider such as Google. Note that the standard login endpoint can also be used for this purpose.
Provider login info
authorizationCode | string |
identityProviderId required | string |
object (api.MfaLoginRequest) | |
redirectUri | string |
token required | string |
{- "authorizationCode": "auth-code",
- "identityProviderId": "provider-id",
- "mfaLogin": {
- "mfaCode": "123456",
- "mfaId": "mfa-id",
- "trustComputer": true
}, - "token": "auth-token"
}
{- "business": {
- "businessNumber": "1234567890",
- "currency": "CAD",
- "fiscalYearStart": "2019-01-01",
- "id": "12345678-1234-1234-1234-123456789012",
- "name": "TrulySmall",
- "transactionStartDate": "2019-01-01"
}, - "refreshToken": "refresh-token",
- "token": "auth-token",
- "user": {
- "data": { },
- "fullName": "John Smith",
- "id": "12345678-1234-1234-1234-123456789012",
- "insertInstant": 1701164388303,
- "lastLoginInstant": 1701969388303,
- "mfaMethods": [
- {
- "email": "string",
- "id": "string",
- "lastUsed": true,
- "method": "authenticator",
- "mobilePhone": "string",
- "secret": "string"
}
], - "registrationInstants": {
- "property1": 0,
- "property2": 0
}, - "verified": true
}
}
Logs the user into TrulySmall Invoices using an SSO provider such as Google. Note that the standard login endpoint can also be used for this purpose.
Provider login info
authorizationCode | string |
identityProviderId required | string |
object (api.MfaLoginRequest) | |
redirectUri | string |
token required | string |
{- "authorizationCode": "auth-code",
- "identityProviderId": "provider-id",
- "mfaLogin": {
- "mfaCode": "123456",
- "mfaId": "mfa-id",
- "trustComputer": true
}, - "token": "auth-token"
}
{- "business": {
- "businessNumber": "1234567890",
- "currency": "CAD",
- "fiscalYearStart": "2019-01-01",
- "id": "12345678-1234-1234-1234-123456789012",
- "name": "TrulySmall",
- "transactionStartDate": "2019-01-01"
}, - "refreshToken": "refresh-token",
- "token": "auth-token",
- "user": {
- "data": { },
- "fullName": "John Smith",
- "id": "12345678-1234-1234-1234-123456789012",
- "insertInstant": 1701164388303,
- "lastLoginInstant": 1701969388303,
- "mfaMethods": [
- {
- "email": "string",
- "id": "string",
- "lastUsed": true,
- "method": "authenticator",
- "mobilePhone": "string",
- "secret": "string"
}
], - "registrationInstants": {
- "property1": 0,
- "property2": 0
}, - "verified": true
}
}
Logs the user into TrulySmall Expenses using any type of login: basic email and password, provider login (such as Google), or to complete MFA. If the account has MFA enabled, this will return a 242 response and the user will have to call the endpoint again to complete an MFA login.
User login details
anonymousUserId | string If the user is in anonymous mode, this is the id that they have been using |
string The email of the user | |
object (api.MfaLoginRequest) | |
password | string The password the user is logging in with |
object (api.PostUserAccountLoginProviderTseRequest) | |
object (api.StandardLoginRequest) | |
object (api.TokenLoginRequest) |
{- "anonymousUserId": "12345678-1234-1234-1234-123456789012",
- "mfaLogin": {
- "mfaCode": "123456",
- "mfaId": "mfa-id",
- "trustComputer": true
}, - "password": "password",
- "providerLogin": {
- "authorizationCode": "auth-code",
- "identityProviderId": "provider-id",
- "mfaLogin": {
- "mfaCode": "123456",
- "mfaId": "mfa-id",
- "trustComputer": true
}, - "token": "auth-token"
}, - "tokenLogin": {
- "refreshToken": "refresh-token",
- "token": "auth-token"
}
}
{- "business": {
- "businessNumber": "1234567890",
- "currency": "CAD",
- "fiscalYearStart": "2019-01-01",
- "id": "12345678-1234-1234-1234-123456789012",
- "name": "TrulySmall",
- "transactionStartDate": "2019-01-01"
}, - "refreshToken": "refresh-token",
- "token": "auth-token",
- "user": {
- "data": { },
- "fullName": "John Smith",
- "id": "12345678-1234-1234-1234-123456789012",
- "insertInstant": 1701164388303,
- "lastLoginInstant": 1701969388303,
- "mfaMethods": [
- {
- "email": "string",
- "id": "string",
- "lastUsed": true,
- "method": "authenticator",
- "mobilePhone": "string",
- "secret": "string"
}
], - "registrationInstants": {
- "property1": 0,
- "property2": 0
}, - "verified": true
}
}
Logs the user into TrulySmall Invoices using any type of login: basic email and password, provider login (such as Google), or to complete MFA. If the account has MFA enabled, this will return a 242 response and the user will have to call the endpoint again to complete an MFA login.
User login details
anonymousUserId | string If the user is in anonymous mode, this is the id that they have been using |
string The email of the user | |
object (api.MfaLoginRequest) | |
password | string The password the user is logging in with |
object (api.PostUserAccountLoginProviderTseRequest) | |
object (api.StandardLoginRequest) | |
object (api.TokenLoginRequest) |
{- "anonymousUserId": "12345678-1234-1234-1234-123456789012",
- "mfaLogin": {
- "mfaCode": "123456",
- "mfaId": "mfa-id",
- "trustComputer": true
}, - "password": "password",
- "providerLogin": {
- "authorizationCode": "auth-code",
- "identityProviderId": "provider-id",
- "mfaLogin": {
- "mfaCode": "123456",
- "mfaId": "mfa-id",
- "trustComputer": true
}, - "token": "auth-token"
}, - "tokenLogin": {
- "refreshToken": "refresh-token",
- "token": "auth-token"
}
}
{- "business": {
- "businessNumber": "1234567890",
- "currency": "CAD",
- "fiscalYearStart": "2019-01-01",
- "id": "12345678-1234-1234-1234-123456789012",
- "name": "TrulySmall",
- "transactionStartDate": "2019-01-01"
}, - "refreshToken": "refresh-token",
- "token": "auth-token",
- "user": {
- "data": { },
- "fullName": "John Smith",
- "id": "12345678-1234-1234-1234-123456789012",
- "insertInstant": 1701164388303,
- "lastLoginInstant": 1701969388303,
- "mfaMethods": [
- {
- "email": "string",
- "id": "string",
- "lastUsed": true,
- "method": "authenticator",
- "mobilePhone": "string",
- "secret": "string"
}
], - "registrationInstants": {
- "property1": 0,
- "property2": 0
}, - "verified": true
}
}
Logs the user out of the TrulySmall apps and invalidates the user's login tokens so that they can no longer be used.
Log out request
refreshToken required | string |
{- "refreshToken": "string"
}
{ }
Disables a single MFA method for a user account. If there are other methods, then MFA is still required to login. If this is the only method, then the account will no longer require MFA for logging in. Note that the user needs to provide a valid MFA code from the device or use a recovery code to disable MFA.
Authorization required | string Example: Bearer foo |
enable mfa request
code required | string |
methodId required | string |
{- "code": "string",
- "methodId": "string"
}
{- "user": {
- "data": { },
- "fullName": "John Smith",
- "id": "12345678-1234-1234-1234-123456789012",
- "insertInstant": 1701164388303,
- "lastLoginInstant": 1701969388303,
- "mfaMethods": [
- {
- "email": "string",
- "id": "string",
- "lastUsed": true,
- "method": "authenticator",
- "mobilePhone": "string",
- "secret": "string"
}
], - "registrationInstants": {
- "property1": 0,
- "property2": 0
}, - "verified": true
}
}
To enable MFA, the user has to have a valid token and an mfa code from the device they wish to enable, If this is the case, mfa is enabled for the user using the associated method and will now be required for logging in. The success response includes a set of recovery codes that can be used to recover access if a user loses their mfa device. These codes are used in place of mfa codes from the device and can be used for both logging in and for disabling the mfa method. Each recovery code can only be used once.
Authorization required | string Example: Bearer foo |
enable mfa request
code required | string The code received from the mfa device |
string Set appropriately when enabling email | |
method required | string The mfa method being enabled |
mobilePhone | string Set appropriately when enabling sms |
secret | string Set appropriately when enabling authenticator |
{- "code": "string",
- "email": "string",
- "method": "string",
- "mobilePhone": "string",
- "secret": "string"
}
{- "recoveryCodes": [
- "string"
], - "user": {
- "data": { },
- "fullName": "John Smith",
- "id": "12345678-1234-1234-1234-123456789012",
- "insertInstant": 1701164388303,
- "lastLoginInstant": 1701969388303,
- "mfaMethods": [
- {
- "email": "string",
- "id": "string",
- "lastUsed": true,
- "method": "authenticator",
- "mobilePhone": "string",
- "secret": "string"
}
], - "registrationInstants": {
- "property1": 0,
- "property2": 0
}, - "verified": true
}
}
This is an optional method to generate the secret needed to create an authenticator app entry. This generates a single secret and returns it in three formats, any of which can be used. When enabling mfa with the authenticator method, the secret should then be provided to the enableMfa method.
Authorization required | string Example: Bearer foo |
{- "authenticatorUrl": "string",
- "secret": "string",
- "secretBase32": "string"
}
Used for completing an MFA login. This can happen in two contexts and the request is different for each:
Authorization | string Example: Bearer foo |
MFA send code request
object (api.MfaSendCodeLoginRequest) | |
object (api.MfaSendCodeNormalRequest) |
{- "login": {
- "methodId": "string",
- "mfaId": "string"
}, - "normal": {
- "email": "string",
- "method": "string",
- "methodId": "string",
- "mobilePhone": "string"
}
}
{ }
change password request
changePasswordId required | string |
password required | string |
{- "changePasswordId": "string",
- "password": "string"
}
{- "oneTimePassword": "string",
- "state": { },
- "statusCode": 0
}
Sends a reset password email to the user's email address so that they can log in temporarily and change their password. It will only accept an email address.
Password reset request
loginId required | string |
{- "loginId": "string"
}
{- "changePasswordId": "string"
}
Creates a user account and registers it for using the TrulySmall Expenses application. If the user already exists, then they are just registered for the application.
User sign-up data
email required | string The email the user will use |
fullName required | string The user's full name |
password required | string The password the user would like to set |
userId | string A uuid for the user. Can be provided by the client, but if not, one will be generated. |
{- "fullName": "John Smith",
- "password": "password",
- "userId": "12345678-1234-1234-1234-123456789012"
}
{- "business": {
- "businessNumber": "1234567890",
- "currency": "CAD",
- "fiscalYearStart": "2019-01-01",
- "id": "12345678-1234-1234-1234-123456789012",
- "name": "TrulySmall",
- "transactionStartDate": "2019-01-01"
}, - "refreshToken": "refresh-token",
- "token": "auth-token",
- "user": {
- "data": { },
- "fullName": "John Smith",
- "id": "12345678-1234-1234-1234-123456789012",
- "insertInstant": 1701164388303,
- "lastLoginInstant": 1701969388303,
- "mfaMethods": [
- {
- "email": "string",
- "id": "string",
- "lastUsed": true,
- "method": "authenticator",
- "mobilePhone": "string",
- "secret": "string"
}
], - "registrationInstants": {
- "property1": 0,
- "property2": 0
}, - "verified": true
}
}
Creates a user account and registers it for using the TrulySmall Invoices application. If the user already exists, then they are just registered for the application.
User sign-up data
email required | string The email the user will use |
fullName required | string The user's full name |
password required | string The password the user would like to set |
userId | string A uuid for the user. Can be provided by the client, but if not, one will be generated. |
{- "fullName": "John Smith",
- "password": "password",
- "userId": "12345678-1234-1234-1234-123456789012"
}
{- "business": {
- "businessNumber": "1234567890",
- "currency": "CAD",
- "fiscalYearStart": "2019-01-01",
- "id": "12345678-1234-1234-1234-123456789012",
- "name": "TrulySmall",
- "transactionStartDate": "2019-01-01"
}, - "refreshToken": "refresh-token",
- "token": "auth-token",
- "user": {
- "data": { },
- "fullName": "John Smith",
- "id": "12345678-1234-1234-1234-123456789012",
- "insertInstant": 1701164388303,
- "lastLoginInstant": 1701969388303,
- "mfaMethods": [
- {
- "email": "string",
- "id": "string",
- "lastUsed": true,
- "method": "authenticator",
- "mobilePhone": "string",
- "secret": "string"
}
], - "registrationInstants": {
- "property1": 0,
- "property2": 0
}, - "verified": true
}
}
Allows the caller to obtain a new auth token using a refresh token. This is needed when an auth token expires and is rejected with a 401. If the refresh token is not valid, then the user will have to log in again.
refresh token request
refreshToken required | string |
token required | string |
{- "refreshToken": "string",
- "token": "string"
}
{- "refreshToken": "string",
- "refreshTokenId": "string",
- "token": "string"
}
Validate a JWT auth token
validate taken request
token required | string |
{- "token": "string"
}
{- "jwt": {
- "aud": null,
- "exp": 0,
- "iat": 0,
- "iss": "string",
- "jti": "string",
- "nbf": 0,
- "otherClaims": { },
- "sub": "string"
}
}
Deletes a user account. Since the data is shared across TS apps, the registration and data for all apps will be deleted.
id required | string ID of the user |
Authorization required | string Example: Bearer foo |
{ }
Check permision and provides necessary data to integrate TSI into TSA
email required | string email of the user |
code | string Oauth code from fusionAuth |
activationCode | string Activation code from GetTsaActivationCode |
redirectURI | string Uri requesting the data |
{- "lastInvoiceSent": {
- "amountPaid": "string",
- "created": "2019-10-12T07:20:50.52Z",
- "currency": "string",
- "discountAmount": "string",
- "discountTotal": "string",
- "discountType": "string",
- "due": "2019-10-12T07:20:50.52Z",
- "from": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "name": "string",
- "phone": "string"
}, - "id": "string",
- "isSubscribed": "string",
- "items": [
- {
- "accountId": "string",
- "additionalDetails": "string",
- "category": "string",
- "id": "string",
- "itemTotal": 0,
- "quantity": "string",
- "rate": "string",
- "taxes": [
- {
- "businessId": "string",
- "description": "string",
- "id": "string",
- "name": "string",
- "rate": "string",
- "taxTotal": 0,
- "userId": "string"
}
], - "title": "string"
}
], - "logo": "string",
- "notes": "string",
- "number": "string",
- "paymentMethods": [
- {
- "accepted": true,
- "capability": "string",
- "name": "string",
- "recipientFee": "string",
- "recipientPaysFee": true,
- "serviceFee": "string",
- "status": "string",
- "type": "string"
}
], - "sent": "2019-10-12T07:20:50.52Z",
- "shipping": "string",
- "status": "string",
- "subtotal": "string",
- "taxTotal": "string",
- "template": {
- "color": "string",
- "estimate": {
- "id": "string",
- "version": 0
}, - "invoice": {
- "id": "string",
- "version": 0
}, - "receipt": {
- "id": "string",
- "version": 0
}, - "themeSvg": "string"
}, - "timeZone": "string",
- "to": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string"
}
], - "total": "string",
- "transactions": [
- {
- "amount": 0,
- "applicationFee": 0,
- "convenienceFee": 0,
- "createdAt": {
- "nanos": 0,
- "seconds": 0
}, - "currency": "string",
- "customerId": "string",
- "id": "string",
- "paymentMethod": {
- "name": "string",
- "type": "string"
}, - "source": "string"
}
], - "updated": "2019-10-12T07:20:50.52Z",
- "voidReason": "string"
}, - "oldestInvoiceDate": "string",
- "user": {
- "data": { },
- "fullName": "John Smith",
- "id": "12345678-1234-1234-1234-123456789012",
- "insertInstant": 1701164388303,
- "lastLoginInstant": 1701969388303,
- "mfaMethods": [
- {
- "email": "string",
- "id": "string",
- "lastUsed": true,
- "method": "authenticator",
- "mobilePhone": "string",
- "secret": "string"
}
], - "registrationInstants": {
- "property1": 0,
- "property2": 0
}, - "verified": true
}
}
Endpoints for managing subscriptions for a business. This is the subscription that the business has with TrulySmall and determines whether the business is allowed to use the TrulySmall apps.
Cancels a subscription. Only works for the Google and Chargebee stores.
Authorization required | string Example: Bearer foo |
Cancel Subscription
cancelAt | string |
endOfTerm | boolean |
id | string subscription ID |
subscriberId | string |
{- "cancelAt": "2019-10-12T07:20:50.52Z",
- "endOfTerm": true,
- "id": "string",
- "subscriberId": "string"
}
{ }
Retrieves a particular subscription using a subscription ID.
id | string ID of subscriptions |
subscriberId | string Subscriber ID / Business ID |
subscriptionApplication required | string subscription application: SubscriptionApplication_ALL,SubscriptionApplication_INVOICE,SubscriptionApplication_ESTIMATE |
Authorization required | string Example: Bearer foo |
{- "subscription": {
- "appId": "string",
- "expiresDate": "2019-10-12T07:20:50.52Z",
- "id": "string",
- "isSandbox": true,
- "originalId": "string",
- "originalPurchaseDate": "2019-10-12T07:20:50.52Z",
- "pauseDate": "2019-10-12T07:20:50.52Z",
- "platformProductId": "string",
- "purchaseDate": "2019-10-12T07:20:50.52Z",
- "resumeDate": "2019-10-12T07:20:50.52Z",
- "status": "string",
- "store": "string",
- "subscriberId": "string",
- "subscriptionApplication": "string",
- "unsubscribeDetectedAt": "2019-10-12T07:20:50.52Z",
- "userId": "string"
}
}
Creates a subscription for a business.
Authorization required | string Example: Bearer foo |
Create Subscription Request
appId | string |
originalId | string |
platformProductId | string |
purchaseToken | string |
purchasedExplicitlyInApp | boolean |
store required | string |
subscriberId | string |
subscriptionApplication | string |
userEmail | string |
userId | string |
{- "appId": "string",
- "originalId": "string",
- "platformProductId": "string",
- "purchaseToken": "string",
- "purchasedExplicitlyInApp": true,
- "store": "string",
- "subscriberId": "string",
- "subscriptionApplication": "string",
- "userEmail": "string",
- "userId": "string"
}
{- "subscription": {
- "appId": "string",
- "expiresDate": "2019-10-12T07:20:50.52Z",
- "id": "string",
- "isSandbox": true,
- "originalId": "string",
- "originalPurchaseDate": "2019-10-12T07:20:50.52Z",
- "pauseDate": "2019-10-12T07:20:50.52Z",
- "platformProductId": "string",
- "purchaseDate": "2019-10-12T07:20:50.52Z",
- "resumeDate": "2019-10-12T07:20:50.52Z",
- "status": "string",
- "store": "string",
- "subscriberId": "string",
- "subscriptionApplication": "string",
- "unsubscribeDetectedAt": "2019-10-12T07:20:50.52Z",
- "userId": "string"
}
}
Retrieves the rating information of an app from the App Store.
appId required | integer App ID |
{- "resultCount": 0,
- "results": [
- {
- "advisories": [
- "string"
], - "appletvScreenshotUrls": [
- "string"
], - "artistId": 0,
- "artistName": "string",
- "artistViewUrl": "string",
- "artworkUrl100": "string",
- "artworkUrl512": "string",
- "artworkUrl60": "string",
- "averageUserRating": 0,
- "averageUserRatingForCurrentVersion": 0,
- "bundleId": "string",
- "contentAdvisoryRating": "string",
- "currency": "string",
- "currentVersionReleaseDate": "string",
- "description": "string",
- "features": [
- "string"
], - "fileSizeBytes": "string",
- "formattedPrice": "string",
- "genreIds": [
- "string"
], - "genres": [
- "string"
], - "ipadScreenshotUrls": [
- "string"
], - "isGameCenterEnabled": true,
- "isVppDeviceBasedLicensingEnabled": true,
- "kind": "string",
- "languageCodesISO2A": [
- "string"
], - "minimumOsVersion": "string",
- "price": 0,
- "primaryGenreId": 0,
- "primaryGenreName": "string",
- "releaseDate": "string",
- "releaseNotes": "string",
- "screenshotUrls": [
- "string"
], - "sellerName": "string",
- "sellerUrl": "string",
- "supportedDevices": [
- "string"
], - "trackCensoredName": "string",
- "trackContentRating": "string",
- "trackId": 0,
- "trackName": "string",
- "trackViewUrl": "string",
- "userRatingCount": 0,
- "userRatingCountForCurrentVersion": 0,
- "version": "string",
- "wrapperType": "string"
}
]
}
Creates a Chargebee checkout window for launching the Chargebee checkout flow.
Authorization required | string Example: Bearer foo |
New Checkout
couponId | Array of strings |
object (serverpb.ChargeBeeCustomer) | |
subscriberId required | string |
subscriptionApplication required | string |
subscriptionPlanId required | string |
userId | string |
{- "couponId": [
- "string"
], - "customer": {
- "city": "string",
- "country": "string",
- "email": "string",
- "firstName": "string",
- "lastName": "string",
- "line1": "string",
- "line2": "string",
- "locale": "string",
- "stateCode": "string",
- "zip": "string"
}, - "subscriberId": "string",
- "subscriptionApplication": "string",
- "subscriptionPlanId": "string",
- "userId": "string"
}
{- "checkoutInfo": [
- 0
], - "content": [
- 0
], - "createdAt": 0,
- "embed": true,
- "expiresAt": 0,
- "failureReason": "string",
- "id": "string",
- "object": "string",
- "passThruContent": "string",
- "resourceVersion": 0,
- "state": "string",
- "type": "string",
- "updatedAt": 0,
- "url": "string"
}
Creates a Chargebee portal session
Authorization required | string Example: Bearer foo |
New portal session
subscriptionId | string |
{- "subscriptionId": "string"
}
{- "accessUrl": "string",
- "createdAt": 0,
- "customerId": "string",
- "expiresAt": 0,
- "id": "string",
- "loginAt": 0,
- "loginIpAddress": "string",
- "logoutAt": 0,
- "logoutIpAddress": "string",
- "object": "string",
- "redirectUrl": "string",
- "status": "string",
- "token": "string"
}
Retrieves customer reviews for a specific app from the App Store Connect API.
appId required | string App ID |
customerReviewResponses | string Fields to return for customer review responses (comma-separated list). Possible Values: lastModifiedDate, responseBody, review, state |
customerReviews | string Fields to return for customer reviews (comma-separated list). Possible Values: body, createdDate, rating, response, reviewerNickname, territory, title |
filterRating | string Filter by ratings (comma-separated list). For example, filtering for 1,2,5 shows only reviews with ratings of 1, 2, or 5. The minimum numeric rating value is 1, and the maximum is 5. |
include | string Relationship data to include. Value: response |
limit | integer Number of resources to return (max: 200) |
sort | string Attributes by which to sort. Possible Values: createdDate, -createdDate, rating, -rating |
filterTerritory | string Filter by territories (comma-separated list). Possible Values: ABW, AFG, AGO, AIA, ALB, AND, ANT, ARE, ARG, ARM, ASM, ATG, AUS, AUT, AZE, BDI, BEL, BEN, BES, BFA, BGD, BGR, BHR, BHS, BIH, BLR, BLZ, BMU, BOL, BRA, BRB, BRN, BTN, BWA, CAF, CAN, CHE, CHL, CHN, CIV, CMR, COD, COG, COK, COL, COM, CPV, CRI, CUB, CUW, CXR, CYM, CYP, CZE, DEU, DJI, DMA, DNK, DOM, DZA, ECU, EGY, ERI, ESP, EST, ETH, FIN, FJI, FLK, FRA, FRO, FSM, GAB, GBR, GEO, GGY, GHA, GIB, GIN, GLP, GMB, GNB, GNQ, GRC, GRD, GRL, GTM, GUF, GUM, GUY, HKG, HND, HRV, HTI, HUN, IDN, IMN, IND, IRL, IRQ, ISL, ISR, ITA, JAM, JEY, JOR, JPN, KAZ, KEN, KGZ, KHM, KIR, KNA, KOR, KWT, LAO, LBN, LBR, LBY, LCA, LIE, LKA, LSO, LTU, LUX, LVA, MAC, MAR, MCO, MDA, MDG, MDV, MEX, MHL, MKD, MLI, MLT, MMR, MNE, MNG, MNP, MOZ, MRT, MSR, MTQ, MUS, MWI, MYS, MYT, NAM, NCL, NER, NFK, NGA, NIC, NIU, NLD, NOR, NPL, NRU, NZL, OMN, PAK, PAN, PER, PHL, PLW, PNG, POL, PRI, PRT, PRY, PSE, PYF, QAT, REU, ROU, RUS, RWA, SAU, SEN, SGP, SHN, SLB, SLE, SLV, SMR, SOM, SPM, SRB, SSD, STP, SUR, SVK, SVN, SWE, SWZ, SXM, SYC, TCA, TCD, TGO, THA, TJK, TKM, TLS, TON, TTO, TUN, TUR, TUV, TWN, TZA, UGA, UKR, UMI, URY, USA, UZB, VAT, VCT, VEN, VGB, VIR, VNM, VUT, WLF, WSM, YEM, ZAF, ZMB, ZWE |
existsPublishedResponse | boolean Filter by whether the review has a published response. A Boolean value that filters the reviews based on whether the review has a published response in the App Store. Use true to return the customer reviews that already have a published response in the App Store. Use false to return the customer reviews that don’t have a published response. Note that it’s possible that a review has a response that isn’t yet published. |
{- "data": [
- {
- "attributes": {
- "body": "string",
- "createdDate": "string",
- "rating": 0,
- "reviewerNickname": "string",
- "territory": "string",
- "title": "string"
}, - "id": "string",
- "links": {
- "self": "string"
}, - "relationships": {
- "property1": {
- "links": {
- "related": "string",
- "self": "string"
}
}, - "property2": {
- "links": {
- "related": "string",
- "self": "string"
}
}
}, - "type": "string"
}
]
}
Retrieves subscription entitlements for a given store: apple app store, google play store, or chargebee.
store | string Store; APP_STORE,PLAY_STORE,CHARGEBEE |
{- "entitlements": [
- {
- "displayName": "string",
- "platformProductId": "string",
- "store": "string",
- "subscriptionApplications": "string"
}
]
}
Retrieves all subscriptions for a business using either the subscriber ID or the user ID.
subscriberId required | string Subscriber ID / User ID |
subscriptionApplication required | string subscription application: SubscriptionApplication_ALL,SubscriptionApplication_INVOICE,SubscriptionApplication_ESTIMATE |
Authorization required | string Example: Bearer foo |
{- "subscription": [
- {
- "appId": "string",
- "expiresDate": "2019-10-12T07:20:50.52Z",
- "id": "string",
- "isSandbox": true,
- "originalId": "string",
- "originalPurchaseDate": "2019-10-12T07:20:50.52Z",
- "pauseDate": "2019-10-12T07:20:50.52Z",
- "platformProductId": "string",
- "purchaseDate": "2019-10-12T07:20:50.52Z",
- "resumeDate": "2019-10-12T07:20:50.52Z",
- "status": "string",
- "store": "string",
- "subscriberId": "string",
- "subscriptionApplication": "string",
- "unsubscribeDetectedAt": "2019-10-12T07:20:50.52Z",
- "userId": "string"
}
]
}
Pauses a subscription. Only works for the Google and Chargebee stores.
Authorization required | string Example: Bearer foo |
Pause a Subscription
id | string subscription ID |
pauseOption | integer |
specificDate | string |
subscriberId | string |
{- "id": "string",
- "pauseOption": 0,
- "specificDate": "2019-10-12T07:20:50.52Z",
- "subscriberId": "string"
}
{ }
Retrieves a subscription store's plan using a subscription application.
store required | string Store; APP_STORE,PLAY_STORE,CHARGEBEE |
{- "subscriptionPlans": [
- {
- "description": "string",
- "price": 0,
- "productId": "string",
- "title": "string"
}
]
}
Refunds a subscription. Only works with Google.
Authorization required | string Example: Bearer foo |
Refund Subscription
id | string subscription ID |
subscriberId | string |
{- "id": "string",
- "subscriberId": "string"
}
{ }
Resumes a paused subscription. Only works with Chargebee
Authorization required | string Example: Bearer foo |
Resume Subscription
id | string subscription ID |
resumeOption | string |
specificDate | string |
subscriberId | string |
{- "id": "string",
- "resumeOption": "string",
- "specificDate": "2019-10-12T07:20:50.52Z",
- "subscriberId": "string"
}
{ }
Endpoints for managing business accounts and viewing their journal entries. Accounts are automatically created for a business based on their chart of accounts. The user can modify their accounts using these endpoints to suit their needs.
Retrieves an account by ID or all of a business's accounts by business ID.
id | string ID of Account |
businessId | string ID of Business to retrieve Accounts for |
Authorization | string Example: Bearer foo |
{- "accounts": [
- {
- "accountType": "ACCOUNT_TYPE_BANK",
- "category": "ACCOUNT_CATEGORY_ASSET",
- "description": "Account description",
- "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "name": "Bank Account",
- "number": "4000",
- "transactionStartDate": "2019-06-11"
}
]
}
Creates a new account for a business. The business will already start with a chart of accounts so this endpoint is only used to create additional accounts.
Authorization required | string Example: Bearer foo |
Account to create
required | object (ledgerpb.Account) |
businessId required | string |
{- "account": {
- "accountType": "ACCOUNT_TYPE_BANK",
- "category": "ACCOUNT_CATEGORY_ASSET",
- "description": "Account description",
- "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "name": "Bank Account",
- "number": "4000",
- "transactionStartDate": "2019-06-11"
}, - "businessId": "815b81c1-1650-4750-95b4-c6933e6df705"
}
{- "account": {
- "accountType": "ACCOUNT_TYPE_BANK",
- "category": "ACCOUNT_CATEGORY_ASSET",
- "description": "Account description",
- "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "name": "Bank Account",
- "number": "4000",
- "transactionStartDate": "2019-06-11"
}
}
Updates an existing account for a business.
Authorization | string Example: Bearer foo |
Account to update
required | object (ledgerpb.Account) |
{- "account": {
- "accountType": "ACCOUNT_TYPE_BANK",
- "category": "ACCOUNT_CATEGORY_ASSET",
- "description": "Account description",
- "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "name": "Bank Account",
- "number": "4000",
- "transactionStartDate": "2019-06-11"
}
}
{- "account": {
- "accountType": "ACCOUNT_TYPE_BANK",
- "category": "ACCOUNT_CATEGORY_ASSET",
- "description": "Account description",
- "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "name": "Bank Account",
- "number": "4000",
- "transactionStartDate": "2019-06-11"
}
}
Retrieves the balance of an account on a given day. This is returned as an array of amounts because the account may have multiple currencies. In most cases, it will be a single amount in the primary currency.
id required | string Id of account to retrieve balance for |
asOf | string Date to retrieve balance for. If not provided, will use current date. |
timezone | string Timezone to use for asOf date |
Authorization | string Example: Bearer foo |
{- "balances": [
- {
- "amount": "100",
- "currency": "USD"
}
]
}
Retrieves the balance of all accounts on a given day. Each account will have an array of amounts because the account may have multiple currencies.
businessId required | string Id of business to retrieve balance for |
asOf | string Date to retrieve balances for. If not provided, will use current date. |
timezone | string Timezone to use for asOf date |
Authorization | string Example: Bearer foo |
{- "balances": [
- {
- "account_id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "balances": [
- {
- "amount": "100",
- "currency": "USD"
}
]
}
]
}
Retrieves the journal entries that have been made against an account.
id | string ID of account |
Authorization | string Example: Bearer foo |
{- "journalEntries": [
- {
- "amount": "1000",
- "currency": "USD",
- "date": "2019-10-12",
- "description": "Invoice #1234",
- "id": "815b81c1-1650-4750-95b4-c6933e6df705"
}
]
}
Endpoints for managing a business's budgets on expense categories. A budget object applies to a specific expense category over a period of a month. They are just used for expenses.
Retrieves a budget by ID or all of a business's budgets by business ID.
id | string ID of budget |
businessId | string Retrieve Budget by Business ID |
transactionGroupType | string Group type of budgets |
demo | string Flag to request demo business data |
Authorization | string Example: Bearer foo |
{- "budgets": [
- {
- "amount": "100",
- "category": "string",
- "id": "xxxx-xxxx-xxxx-xxxx"
}
]
}
Creates a budget for a business. The budget is for a specific category over a monthly period.
Authorization required | string Example: Bearer foo |
Budget to create
required | object (ledgerpb.Budget) |
businessId required | string |
{- "budget": {
- "amount": "100",
- "category": "string",
- "id": "xxxx-xxxx-xxxx-xxxx"
}, - "businessId": "xxxx-xxxx-xxxx-xxxx"
}
{- "budget": {
- "amount": "100",
- "category": "string",
- "id": "xxxx-xxxx-xxxx-xxxx"
}
}
Updates an existing budget for a business.
Authorization | string Example: Bearer foo |
Budget to update
required | object (ledgerpb.Budget) |
{- "budget": {
- "amount": "100",
- "category": "string",
- "id": "xxxx-xxxx-xxxx-xxxx"
}
}
{- "budget": {
- "amount": "100",
- "category": "string",
- "id": "xxxx-xxxx-xxxx-xxxx"
}
}
Calculates the expenses and budgets for each category for a business
businessId required | string Business ID |
period required | string period to calculate |
timezone required | string Time zone to calculate in |
dateTime | string Date & time to calculate in. If missing, uses the end of the current day in the specified time zone |
startDate | string For custom periods, the start date & time of the period |
endDate | string For custom periods, the end date & time of the period. It can also specify the end date of preset periods. |
Authorization | string Example: Bearer foo |
{- "expenseBudgets": [
- {
- "budget": {
- "amount": "100",
- "category": "string",
- "id": "xxxx-xxxx-xxxx-xxxx"
}, - "expenseTotal": "100"
}
]
}
Calculates the total expenses and budgets for a business.
businessId required | string Business ID |
period required | string period to calculate |
timezone required | string Time zone to calculate in |
dateTime | string Date & time to calculate in. If missing, uses the end of the current day in the specified time zone |
startDate | string For custom periods, the start date & time of the period |
endDate | string For custom periods, the end date & time of the period. It can also specify the end date of preset periods. |
Authorization | string Example: Bearer foo |
{- "budgetTotal": "230",
- "expenseTotal": "100"
}
Endpoints for managing businesses. Businesses are the main entity within the ledger. A user can have multiple businesses. Each business has its own set of accounts, transactions, contacts, etc.
Retrieves a business by ID or all of a user's businesses by user ID.
id | string ID of Business |
userId | string ID of User |
Authorization | string Example: Bearer foo |
{- "businesses": [
- {
- "businessNumber": "123456789",
- "currency": "USD",
- "fiscalYearStart": "2019-01-01",
- "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "name": "My Business",
- "transactionStartDate": "2019-01-01",
- "userIds": [
- "string"
]
}
]
}
Updates individual business properties. Only those properties with non-empty values will be changed by the operation. If any properties need to be cleared, use the Put endpoint instead.
Authorization | string Example: Bearer foo |
Business to patch
required | object (ledgerpb.Business) |
{- "business": {
- "businessNumber": "123456789",
- "currency": "USD",
- "fiscalYearStart": "2019-01-01",
- "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "name": "My Business",
- "transactionStartDate": "2019-01-01",
- "userIds": [
- "string"
]
}
}
{- "business": {
- "businessNumber": "123456789",
- "currency": "USD",
- "fiscalYearStart": "2019-01-01",
- "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "name": "My Business",
- "transactionStartDate": "2019-01-01",
- "userIds": [
- "string"
]
}
}
Creates a new business. Users must then be added to the business for access. In general, the register endpoint should be used instead.
Authorization required | string Example: Bearer foo |
Business to create
required | object (ledgerpb.Business) |
{- "business": {
- "businessNumber": "123456789",
- "currency": "USD",
- "fiscalYearStart": "2019-01-01",
- "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "name": "My Business",
- "transactionStartDate": "2019-01-01",
- "userIds": [
- "string"
]
}
}
{- "business": {
- "businessNumber": "123456789",
- "currency": "USD",
- "fiscalYearStart": "2019-01-01",
- "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "name": "My Business",
- "transactionStartDate": "2019-01-01",
- "userIds": [
- "string"
]
}
}
Updates all the business properties
Authorization | string Example: Bearer foo |
Business to put
required | object (ledgerpb.Business) |
{- "business": {
- "businessNumber": "123456789",
- "currency": "USD",
- "fiscalYearStart": "2019-01-01",
- "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "name": "My Business",
- "transactionStartDate": "2019-01-01",
- "userIds": [
- "string"
]
}
}
{- "business": {
- "businessNumber": "123456789",
- "currency": "USD",
- "fiscalYearStart": "2019-01-01",
- "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "name": "My Business",
- "transactionStartDate": "2019-01-01",
- "userIds": [
- "string"
]
}
}
Removes a user's access to a business.
Authorization | string Example: Bearer foo |
User to delete
businessId | string |
userIds | Array of strings |
{- "businessId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "userIds": [
- "string"
]
}
{ }
Gives a user access to a business. This is required after creating a business o that the User can access the business when logging in.
Authorization | string Example: Bearer foo |
User to add
businessId | string |
userIds | Array of strings |
{- "businessId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "userIds": [
- "string"
]
}
{ }
Endpoints for managing payment methods to pay for expenses. These are used by the TSE app as a more user-friendly abstraction than a source account. They are essentially synonyms for accounts however and are optional.
Retrieves payment methods either by payment method id, business id, or user id.
id | string ID of PaymentMethod |
businessId | string Query PaymentMethod for a specific business |
userId | string Query PaymentMethod for a specific FA user |
demo | string Flag to request demo business data |
Authorization | string Example: Bearer foo |
{- "paymentMethods": [
- {
- "accountId": "9a371680-620f-44fa-8e29-be1c1891104e",
- "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "isCredit": true,
- "isPrimary": true,
- "isSystem": false,
- "name": "Visa",
- "number": "string",
- "type": "PAYMENT_METHOD_TYPE_VISA"
}
]
}
Creates a payment method for a business.
Authorization required | string Example: Bearer foo |
Payment method to create
businessId required | string |
required | object (ledgerpb.PaymentMethod) |
{- "businessId": "string",
- "paymentMethod": {
- "accountId": "9a371680-620f-44fa-8e29-be1c1891104e",
- "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "isCredit": true,
- "isPrimary": true,
- "isSystem": false,
- "name": "Visa",
- "number": "string",
- "type": "PAYMENT_METHOD_TYPE_VISA"
}
}
{- "paymentMethod": {
- "accountId": "9a371680-620f-44fa-8e29-be1c1891104e",
- "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "isCredit": true,
- "isPrimary": true,
- "isSystem": false,
- "name": "Visa",
- "number": "string",
- "type": "PAYMENT_METHOD_TYPE_VISA"
}
}
Updates an existing payment method.
Authorization | string Example: Bearer foo |
Payment method to update
businessId required | string |
required | object (ledgerpb.PaymentMethod) |
{- "businessId": "string",
- "paymentMethod": {
- "accountId": "9a371680-620f-44fa-8e29-be1c1891104e",
- "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "isCredit": true,
- "isPrimary": true,
- "isSystem": false,
- "name": "Visa",
- "number": "string",
- "type": "PAYMENT_METHOD_TYPE_VISA"
}
}
{- "paymentMethod": {
- "accountId": "9a371680-620f-44fa-8e29-be1c1891104e",
- "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "isCredit": true,
- "isPrimary": true,
- "isSystem": false,
- "name": "Visa",
- "number": "string",
- "type": "PAYMENT_METHOD_TYPE_VISA"
}
}
Endpoints for reports on transaction data. These compute reports based on a business's transaction data.
Creates a report for the budgets that the business has set on transaction categories. For every category with a budget set on it, the total amount of expenses for that time period is calculated. The monthly budget amount is also converted to an amount for the requested period. The overall transaction amount for the budgeted categories and their budgeted amount is returned as well.
businessId required | string Business ID |
demo | string Flag to request demo business data |
period required | string Period for calculation |
transactionGroupType | string Group type of budgets |
timezone required | string Time zone to calculate in |
startDate | string For custom periods, the start date & time of the period. This boundary is inclusive (>=). |
endDate | string For custom periods, the end date & time of the period. This boundary is inclusive (<=). It can also specify the end date of preset periods. |
Authorization | string Example: Bearer foo |
{- "budgetTotal": "string",
- "endDate": "2019-10-12T07:20:50.52Z",
- "expenseBudgets": [
- {
- "budget": {
- "amount": "100",
- "category": "string",
- "id": "xxxx-xxxx-xxxx-xxxx"
}, - "expenseTotal": "100"
}
], - "expenseTotal": "string",
- "startDate": "2019-10-12T07:20:50.52Z"
}
Calculates a time series of amounts for every category as well as aggregate statistics such as total amount of transactions, the sum, avg, min, and max of the amounts. The results can be filtered to only business or only personal categories.
businessId required | string Business ID |
demo | string Flag to request demo business data |
period required | string Period for calculation |
transactionGroupType | string Group type of transactions |
timezone required | string Time zone to calculate in |
startDate | string For custom periods, the start date & time of the period. This boundary is inclusive (>=). |
endDate | string For custom periods, the end date & time of the period. This boundary is inclusive (<=). It can also specify the end date of preset periods. |
Authorization | string Example: Bearer foo |
{- "data": [
- {
- "amounts": [
- {
- "amount": "1000",
- "currency": "USD",
- "endDate": "2019-10-12T07:20:50.52Z",
- "startDate": "2019-10-12T07:20:50.52Z"
}
], - "averageAmount": "string",
- "category": "ACCOUNT_CATEGORY_ADVERTISING_MARKETING",
- "currency": "USD",
- "maxAmount": "string",
- "minAmount": "string",
- "numTransactions": 100,
- "totalAmount": "string"
}
]
}
Calculates a report of the expenses and budgets for a particular category for a business
businessId required | string Business ID |
category required | string Account category |
demo | string Flag to request demo business data |
period required | string Period for calculation |
timezone required | string Time zone to calculate in |
startDate | string For custom periods, the start date & time of the period. This boundary is inclusive (>=). |
endDate | string For custom periods, the end date & time of the period. This boundary is inclusive (<=). It can also specify the end date of preset periods. |
Authorization | string Example: Bearer foo |
{- "data": {
- "amounts": [
- {
- "amount": "1000",
- "currency": "USD",
- "endDate": "2019-10-12T07:20:50.52Z",
- "startDate": "2019-10-12T07:20:50.52Z"
}
], - "averageAmount": "string",
- "category": "ACCOUNT_CATEGORY_ADVERTISING_MARKETING",
- "currency": "USD",
- "maxAmount": "string",
- "minAmount": "string",
- "numTransactions": 100,
- "totalAmount": "string"
}, - "historicData": {
- "averageAmounts": [
- "string"
], - "budget": {
- "amount": "100",
- "category": "string",
- "id": "xxxx-xxxx-xxxx-xxxx"
}, - "historicalData": {
- "amounts": [
- {
- "amount": "1000",
- "currency": "USD",
- "endDate": "2019-10-12T07:20:50.52Z",
- "startDate": "2019-10-12T07:20:50.52Z"
}
], - "averageAmount": "string",
- "category": "ACCOUNT_CATEGORY_ADVERTISING_MARKETING",
- "currency": "USD",
- "maxAmount": "string",
- "minAmount": "string",
- "numTransactions": 100,
- "totalAmount": "string"
}
}
}
Calculates a time series of amounts for all transactions as well as aggregate statistics such as total amount of transactions, the sum, avg, min, and max of the amounts. The results can be filtered to only business or only personal categories.
businessId required | string Business ID |
demo | string Flag to request demo business data |
period required | string Period for calculation |
transactionGroupType | string Group type of transactions |
timezone required | string Time zone to calculate in |
startDate | string For custom periods, the start date & time of the period. This boundary is inclusive (>=). |
endDate | string For custom periods, the end date & time of the period. This boundary is inclusive (<=). It can also specify the end date of preset periods. |
Authorization | string Example: Bearer foo |
{- "data": {
- "amounts": [
- {
- "amount": "1000",
- "currency": "USD",
- "endDate": "2019-10-12T07:20:50.52Z",
- "startDate": "2019-10-12T07:20:50.52Z"
}
], - "averageAmount": "string",
- "category": "ACCOUNT_CATEGORY_ADVERTISING_MARKETING",
- "currency": "USD",
- "maxAmount": "string",
- "minAmount": "string",
- "numTransactions": 100,
- "totalAmount": "string"
}
}
Used for exporting all or a subset of business transactions to a file. The request is synchronous and will return a CSV file with the transactions.
businessId required | string Business ID |
demo | string Flag to use demo business data for the export |
period required | string Period for the export |
transactionGroupType | string Group type of transactions |
timezone required | string Time zone to calculate in |
startDate | string For custom periods, the start date & time of the period. This boundary is inclusive (>=). |
endDate | string For custom periods, the end date & time of the period. This boundary is inclusive (<=). It can also specify the end date of preset periods. |
Authorization required | string Example: Bearer foo |
Retrieve one or more taxes by ID, by rate ID, or all of a business's taxes by business ID.
id | string Comma separated list of tax ids |
businessId | string Business ID to get taxes for |
rateId | string Comma separated list of tax rade ids |
demo | string Flag to request demo business data |
archived | string Flag to filter by archived or not archived taxes |
page | integer Page Number: 1 is the first page |
pageSize | integer Number of results per page |
search | string search term to search for taxes |
Authorization | string Example: Bearer foo |
{- "taxes": [
- {
- "archived": false,
- "businessId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "description": "string",
- "id": "9a371680-620f-44fa-8e29-be1c1891104e",
- "name": "VAT",
- "rates": [
- {
- "archived": false,
- "id": "9a371680-620f-44fa-8e29-be1c1891104e",
- "rate": "4.5"
}
], - "registrationNumber": "123456789"
}
]
}
Create a tax for a business. The tax can have multiple rates. Ids can be empty strings.
Authorization required | string Example: Bearer foo |
Tax to create
businessId required | string |
required | object (ledgerpb.Tax) |
{- "businessId": "string",
- "tax": {
- "archived": false,
- "businessId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "description": "string",
- "id": "9a371680-620f-44fa-8e29-be1c1891104e",
- "name": "VAT",
- "rates": [
- {
- "archived": false,
- "id": "9a371680-620f-44fa-8e29-be1c1891104e",
- "rate": "4.5"
}
], - "registrationNumber": "123456789"
}
}
{- "tax": {
- "archived": false,
- "businessId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "description": "string",
- "id": "9a371680-620f-44fa-8e29-be1c1891104e",
- "name": "VAT",
- "rates": [
- {
- "archived": false,
- "id": "9a371680-620f-44fa-8e29-be1c1891104e",
- "rate": "4.5"
}
], - "registrationNumber": "123456789"
}
}
Update an existing tax for a business. Most tax properties (like name) are immutable and cannot be updated. Some like description and registrationNumber can. This endpoint is also used to add new rates to a tax. The new rates can have empty string ids.
Authorization | string Example: Bearer foo |
Tax to update
businessId required | string |
required | object (ledgerpb.Tax) |
{- "businessId": "string",
- "tax": {
- "archived": false,
- "businessId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "description": "string",
- "id": "9a371680-620f-44fa-8e29-be1c1891104e",
- "name": "VAT",
- "rates": [
- {
- "archived": false,
- "id": "9a371680-620f-44fa-8e29-be1c1891104e",
- "rate": "4.5"
}
], - "registrationNumber": "123456789"
}
}
{- "tax": {
- "archived": false,
- "businessId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "description": "string",
- "id": "9a371680-620f-44fa-8e29-be1c1891104e",
- "name": "VAT",
- "rates": [
- {
- "archived": false,
- "id": "9a371680-620f-44fa-8e29-be1c1891104e",
- "rate": "4.5"
}
], - "registrationNumber": "123456789"
}
}
Allows the user to perform an action on an estimate. Actions are things like marking as viewed, accepted, or void.
Action request
action required | string |
businessId | string |
id required | string The id of the estimate to perform the action on |
{- "action": "TRANSACTION_ACTION_SET_ACCEPTED",
- "businessId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "id": "815b81c1-1650-4750-95b4-c6933e6df705"
}
{- "transaction": {
- "accountId": "18bbd7e3-93df-4ff9-8ba7-15e937ea0b96",
- "adjustment": {
- "adjustments": [
- {
- "accountId": "string",
- "amount": "string",
- "id": "string"
}
]
}, - "amount": "1000",
- "attachments": [
- {
- "content": "string",
- "contentLength": 0,
- "filename": "string",
- "id": "string",
- "mimeType": "string",
- "namespace": "string",
- "url": "string"
}
], - "businessId": "string",
- "contact": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string"
}, - "currency": "USD",
- "date": "2019-10-12",
- "dateTime": "2019-10-12T15:30:00.000Z",
- "expense": {
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e"
}, - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "items": [
- {
- "accountId": "0289dd65-c982-43c5-b7d3-6a6871865685",
- "additionalDetails": "additional details about line item",
- "category": "ACCOUNT_CATEGORY_INSURANCE",
- "customTaxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "total": "112"
}
], - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "quantity": "150",
- "rate": "112",
- "subtype": "LINE_ITEM_SUB_TYPE_NONE",
- "taxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "taxRateId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}
], - "title": "sale",
- "total": "112"
}
], - "notes": "notes about transaction",
- "number": "4000",
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e",
- "resolution": {
- "amountDue": "1000",
- "dueDateTime": "2000-10-31T01:30:00.000-05:00",
- "enabledPaymentMethods": [
- "string"
], - "from": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}, - "payments": [
- {
- "accountId": "string",
- "amount": "string",
- "applicationFee": "string",
- "convenienceFee": "string",
- "currency": "string",
- "date": "2019-10-12",
- "dateTime": "2000-10-31T01:30:00.000-05:00",
- "id": "string",
- "notes": "string",
- "number": "string",
- "paymentServiceId": "string",
- "timezone": "string"
}
], - "reminders": {
- "estimate": {
- "expiring": {
- "customMessage": "string",
- "enabled": true
}
}, - "invoice": {
- "due": {
- "customMessage": "string",
- "enabled": true
}, - "overdue": {
- "customMessage": "string",
- "enabled": true
}
}
}, - "status": "TRANSACTION_RESOLUTION_STATUS_OVERDUE",
- "templateVariables": {
- "color": "string",
- "id": 0
}, - "to": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}
], - "voidReason": "Voiding this invoice",
- "wasViewed": true
}, - "source": "plaid",
- "sourceId": "plaid-123",
- "sourceType": "TRANSACTION_SOURCE_TYPE_BANK_FEED",
- "timezone": "America/New_York",
- "transfer": {
- "transferAccountId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}, - "type": "TRANSACTION_TYPE_INCOME",
- "updatedAt": "2019-10-12T07:20:50.52Z"
}
}
Sends a reminder for an estimate to the client.
Authorization | string Example: Bearer foo |
Reminder Request
businessId | string |
contactInfo | string |
customMessage | string |
documentId required | string |
type | integer |
{- "businessId": "string",
- "contactInfo": "string",
- "customMessage": "string",
- "documentId": "string",
- "type": 0
}
{ }
Retrieves transactions either by one or more transaction ids, an account id, or a business id. THe transactions returned can be of any type, or a type filter can be specified.
ids | string Comma separated list of transaction IDs to retrieve |
businessId | string Business ID |
userId | string User ID to get transactions for when anonymous |
accountId | string Account ID |
category | string Category filter |
demo | string Flag to request demo business data |
transactionGroupType | string Group type of transactions |
paymentMethodId | string Payment Method id of transactions |
type | string Transaction type filter |
page | integer Page Number: 1 is the first page |
pageSize | integer Number of results per page |
period | string Period filter |
fromDate | string Transaction start date |
toDate | string Transaction start date |
search | string Query tern for searching through transactions |
filter | string Filter term for searching through transactions |
Authorization | string Example: Bearer foo |
{- "totalTransactions": 0,
- "transactions": [
- {
- "accountId": "18bbd7e3-93df-4ff9-8ba7-15e937ea0b96",
- "adjustment": {
- "adjustments": [
- {
- "accountId": "string",
- "amount": "string",
- "id": "string"
}
]
}, - "amount": "1000",
- "attachments": [
- {
- "content": "string",
- "contentLength": 0,
- "filename": "string",
- "id": "string",
- "mimeType": "string",
- "namespace": "string",
- "url": "string"
}
], - "businessId": "string",
- "contact": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string"
}, - "currency": "USD",
- "date": "2019-10-12",
- "dateTime": "2019-10-12T15:30:00.000Z",
- "expense": {
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e"
}, - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "items": [
- {
- "accountId": "0289dd65-c982-43c5-b7d3-6a6871865685",
- "additionalDetails": "additional details about line item",
- "category": "ACCOUNT_CATEGORY_INSURANCE",
- "customTaxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "total": "112"
}
], - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "quantity": "150",
- "rate": "112",
- "subtype": "LINE_ITEM_SUB_TYPE_NONE",
- "taxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "taxRateId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}
], - "title": "sale",
- "total": "112"
}
], - "notes": "notes about transaction",
- "number": "4000",
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e",
- "resolution": {
- "amountDue": "1000",
- "dueDateTime": "2000-10-31T01:30:00.000-05:00",
- "enabledPaymentMethods": [
- "string"
], - "from": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}, - "payments": [
- {
- "accountId": "string",
- "amount": "string",
- "applicationFee": "string",
- "convenienceFee": "string",
- "currency": "string",
- "date": "2019-10-12",
- "dateTime": "2000-10-31T01:30:00.000-05:00",
- "id": "string",
- "notes": "string",
- "number": "string",
- "paymentServiceId": "string",
- "timezone": "string"
}
], - "reminders": {
- "estimate": {
- "expiring": {
- "customMessage": "string",
- "enabled": true
}
}, - "invoice": {
- "due": {
- "customMessage": "string",
- "enabled": true
}, - "overdue": {
- "customMessage": "string",
- "enabled": true
}
}
}, - "status": "TRANSACTION_RESOLUTION_STATUS_OVERDUE",
- "templateVariables": {
- "color": "string",
- "id": 0
}, - "to": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}
], - "voidReason": "Voiding this invoice",
- "wasViewed": true
}, - "source": "plaid",
- "sourceId": "plaid-123",
- "sourceType": "TRANSACTION_SOURCE_TYPE_BANK_FEED",
- "timezone": "America/New_York",
- "transfer": {
- "transferAccountId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}, - "type": "TRANSACTION_TYPE_INCOME",
- "updatedAt": "2019-10-12T07:20:50.52Z"
}
]
}
Creates one or more transactions for a business.
Authorization required | string Example: Bearer foo |
Transaction to create
businessId required | string |
required | Array of objects (ledgerpb.Transaction) |
{- "businessId": "string",
- "transactions": [
- {
- "accountId": "18bbd7e3-93df-4ff9-8ba7-15e937ea0b96",
- "adjustment": {
- "adjustments": [
- {
- "accountId": "string",
- "amount": "string",
- "id": "string"
}
]
}, - "amount": "1000",
- "attachments": [
- {
- "content": "string",
- "contentLength": 0,
- "filename": "string",
- "id": "string",
- "mimeType": "string",
- "namespace": "string",
- "url": "string"
}
], - "businessId": "string",
- "contact": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string"
}, - "currency": "USD",
- "date": "2019-10-12",
- "dateTime": "2019-10-12T15:30:00.000Z",
- "expense": {
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e"
}, - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "items": [
- {
- "accountId": "0289dd65-c982-43c5-b7d3-6a6871865685",
- "additionalDetails": "additional details about line item",
- "category": "ACCOUNT_CATEGORY_INSURANCE",
- "customTaxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "total": "112"
}
], - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "quantity": "150",
- "rate": "112",
- "subtype": "LINE_ITEM_SUB_TYPE_NONE",
- "taxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "taxRateId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}
], - "title": "sale",
- "total": "112"
}
], - "notes": "notes about transaction",
- "number": "4000",
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e",
- "resolution": {
- "amountDue": "1000",
- "dueDateTime": "2000-10-31T01:30:00.000-05:00",
- "enabledPaymentMethods": [
- "string"
], - "from": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}, - "payments": [
- {
- "accountId": "string",
- "amount": "string",
- "applicationFee": "string",
- "convenienceFee": "string",
- "currency": "string",
- "date": "2019-10-12",
- "dateTime": "2000-10-31T01:30:00.000-05:00",
- "id": "string",
- "notes": "string",
- "number": "string",
- "paymentServiceId": "string",
- "timezone": "string"
}
], - "reminders": {
- "estimate": {
- "expiring": {
- "customMessage": "string",
- "enabled": true
}
}, - "invoice": {
- "due": {
- "customMessage": "string",
- "enabled": true
}, - "overdue": {
- "customMessage": "string",
- "enabled": true
}
}
}, - "status": "TRANSACTION_RESOLUTION_STATUS_OVERDUE",
- "templateVariables": {
- "color": "string",
- "id": 0
}, - "to": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}
], - "voidReason": "Voiding this invoice",
- "wasViewed": true
}, - "source": "plaid",
- "sourceId": "plaid-123",
- "sourceType": "TRANSACTION_SOURCE_TYPE_BANK_FEED",
- "timezone": "America/New_York",
- "transfer": {
- "transferAccountId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}, - "type": "TRANSACTION_TYPE_INCOME",
- "updatedAt": "2019-10-12T07:20:50.52Z"
}
]
}
{- "transactions": [
- {
- "accountId": "18bbd7e3-93df-4ff9-8ba7-15e937ea0b96",
- "adjustment": {
- "adjustments": [
- {
- "accountId": "string",
- "amount": "string",
- "id": "string"
}
]
}, - "amount": "1000",
- "attachments": [
- {
- "content": "string",
- "contentLength": 0,
- "filename": "string",
- "id": "string",
- "mimeType": "string",
- "namespace": "string",
- "url": "string"
}
], - "businessId": "string",
- "contact": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string"
}, - "currency": "USD",
- "date": "2019-10-12",
- "dateTime": "2019-10-12T15:30:00.000Z",
- "expense": {
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e"
}, - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "items": [
- {
- "accountId": "0289dd65-c982-43c5-b7d3-6a6871865685",
- "additionalDetails": "additional details about line item",
- "category": "ACCOUNT_CATEGORY_INSURANCE",
- "customTaxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "total": "112"
}
], - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "quantity": "150",
- "rate": "112",
- "subtype": "LINE_ITEM_SUB_TYPE_NONE",
- "taxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "taxRateId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}
], - "title": "sale",
- "total": "112"
}
], - "notes": "notes about transaction",
- "number": "4000",
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e",
- "resolution": {
- "amountDue": "1000",
- "dueDateTime": "2000-10-31T01:30:00.000-05:00",
- "enabledPaymentMethods": [
- "string"
], - "from": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}, - "payments": [
- {
- "accountId": "string",
- "amount": "string",
- "applicationFee": "string",
- "convenienceFee": "string",
- "currency": "string",
- "date": "2019-10-12",
- "dateTime": "2000-10-31T01:30:00.000-05:00",
- "id": "string",
- "notes": "string",
- "number": "string",
- "paymentServiceId": "string",
- "timezone": "string"
}
], - "reminders": {
- "estimate": {
- "expiring": {
- "customMessage": "string",
- "enabled": true
}
}, - "invoice": {
- "due": {
- "customMessage": "string",
- "enabled": true
}, - "overdue": {
- "customMessage": "string",
- "enabled": true
}
}
}, - "status": "TRANSACTION_RESOLUTION_STATUS_OVERDUE",
- "templateVariables": {
- "color": "string",
- "id": 0
}, - "to": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}
], - "voidReason": "Voiding this invoice",
- "wasViewed": true
}, - "source": "plaid",
- "sourceId": "plaid-123",
- "sourceType": "TRANSACTION_SOURCE_TYPE_BANK_FEED",
- "timezone": "America/New_York",
- "transfer": {
- "transferAccountId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}, - "type": "TRANSACTION_TYPE_INCOME",
- "updatedAt": "2019-10-12T07:20:50.52Z"
}
]
}
Updates one or more existing transactions for a business.
Authorization | string Example: Bearer foo |
Transactions to update
businessId required | string |
required | Array of objects (ledgerpb.Transaction) |
{- "businessId": "string",
- "transactions": [
- {
- "accountId": "18bbd7e3-93df-4ff9-8ba7-15e937ea0b96",
- "adjustment": {
- "adjustments": [
- {
- "accountId": "string",
- "amount": "string",
- "id": "string"
}
]
}, - "amount": "1000",
- "attachments": [
- {
- "content": "string",
- "contentLength": 0,
- "filename": "string",
- "id": "string",
- "mimeType": "string",
- "namespace": "string",
- "url": "string"
}
], - "businessId": "string",
- "contact": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string"
}, - "currency": "USD",
- "date": "2019-10-12",
- "dateTime": "2019-10-12T15:30:00.000Z",
- "expense": {
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e"
}, - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "items": [
- {
- "accountId": "0289dd65-c982-43c5-b7d3-6a6871865685",
- "additionalDetails": "additional details about line item",
- "category": "ACCOUNT_CATEGORY_INSURANCE",
- "customTaxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "total": "112"
}
], - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "quantity": "150",
- "rate": "112",
- "subtype": "LINE_ITEM_SUB_TYPE_NONE",
- "taxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "taxRateId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}
], - "title": "sale",
- "total": "112"
}
], - "notes": "notes about transaction",
- "number": "4000",
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e",
- "resolution": {
- "amountDue": "1000",
- "dueDateTime": "2000-10-31T01:30:00.000-05:00",
- "enabledPaymentMethods": [
- "string"
], - "from": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}, - "payments": [
- {
- "accountId": "string",
- "amount": "string",
- "applicationFee": "string",
- "convenienceFee": "string",
- "currency": "string",
- "date": "2019-10-12",
- "dateTime": "2000-10-31T01:30:00.000-05:00",
- "id": "string",
- "notes": "string",
- "number": "string",
- "paymentServiceId": "string",
- "timezone": "string"
}
], - "reminders": {
- "estimate": {
- "expiring": {
- "customMessage": "string",
- "enabled": true
}
}, - "invoice": {
- "due": {
- "customMessage": "string",
- "enabled": true
}, - "overdue": {
- "customMessage": "string",
- "enabled": true
}
}
}, - "status": "TRANSACTION_RESOLUTION_STATUS_OVERDUE",
- "templateVariables": {
- "color": "string",
- "id": 0
}, - "to": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}
], - "voidReason": "Voiding this invoice",
- "wasViewed": true
}, - "source": "plaid",
- "sourceId": "plaid-123",
- "sourceType": "TRANSACTION_SOURCE_TYPE_BANK_FEED",
- "timezone": "America/New_York",
- "transfer": {
- "transferAccountId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}, - "type": "TRANSACTION_TYPE_INCOME",
- "updatedAt": "2019-10-12T07:20:50.52Z"
}
]
}
{- "transactions": [
- {
- "accountId": "18bbd7e3-93df-4ff9-8ba7-15e937ea0b96",
- "adjustment": {
- "adjustments": [
- {
- "accountId": "string",
- "amount": "string",
- "id": "string"
}
]
}, - "amount": "1000",
- "attachments": [
- {
- "content": "string",
- "contentLength": 0,
- "filename": "string",
- "id": "string",
- "mimeType": "string",
- "namespace": "string",
- "url": "string"
}
], - "businessId": "string",
- "contact": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string"
}, - "currency": "USD",
- "date": "2019-10-12",
- "dateTime": "2019-10-12T15:30:00.000Z",
- "expense": {
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e"
}, - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "items": [
- {
- "accountId": "0289dd65-c982-43c5-b7d3-6a6871865685",
- "additionalDetails": "additional details about line item",
- "category": "ACCOUNT_CATEGORY_INSURANCE",
- "customTaxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "total": "112"
}
], - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "quantity": "150",
- "rate": "112",
- "subtype": "LINE_ITEM_SUB_TYPE_NONE",
- "taxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "taxRateId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}
], - "title": "sale",
- "total": "112"
}
], - "notes": "notes about transaction",
- "number": "4000",
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e",
- "resolution": {
- "amountDue": "1000",
- "dueDateTime": "2000-10-31T01:30:00.000-05:00",
- "enabledPaymentMethods": [
- "string"
], - "from": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}, - "payments": [
- {
- "accountId": "string",
- "amount": "string",
- "applicationFee": "string",
- "convenienceFee": "string",
- "currency": "string",
- "date": "2019-10-12",
- "dateTime": "2000-10-31T01:30:00.000-05:00",
- "id": "string",
- "notes": "string",
- "number": "string",
- "paymentServiceId": "string",
- "timezone": "string"
}
], - "reminders": {
- "estimate": {
- "expiring": {
- "customMessage": "string",
- "enabled": true
}
}, - "invoice": {
- "due": {
- "customMessage": "string",
- "enabled": true
}, - "overdue": {
- "customMessage": "string",
- "enabled": true
}
}
}, - "status": "TRANSACTION_RESOLUTION_STATUS_OVERDUE",
- "templateVariables": {
- "color": "string",
- "id": 0
}, - "to": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}
], - "voidReason": "Voiding this invoice",
- "wasViewed": true
}, - "source": "plaid",
- "sourceId": "plaid-123",
- "sourceType": "TRANSACTION_SOURCE_TYPE_BANK_FEED",
- "timezone": "America/New_York",
- "transfer": {
- "transferAccountId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}, - "type": "TRANSACTION_TYPE_INCOME",
- "updatedAt": "2019-10-12T07:20:50.52Z"
}
]
}
Allows the user to perform an action on a transaction. Actions are things like requesting email previews or sending a payment reminder.
Action request
action required | string |
businessId | string |
id | string The id of the transaction to perform the action on. |
object (ledgerpb.Transaction) |
{- "action": "TRANSACTION_ACTION_PREVIEW",
- "businessId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "transaction": {
- "accountId": "18bbd7e3-93df-4ff9-8ba7-15e937ea0b96",
- "adjustment": {
- "adjustments": [
- {
- "accountId": "string",
- "amount": "string",
- "id": "string"
}
]
}, - "amount": "1000",
- "attachments": [
- {
- "content": "string",
- "contentLength": 0,
- "filename": "string",
- "id": "string",
- "mimeType": "string",
- "namespace": "string",
- "url": "string"
}
], - "businessId": "string",
- "contact": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string"
}, - "currency": "USD",
- "date": "2019-10-12",
- "dateTime": "2019-10-12T15:30:00.000Z",
- "expense": {
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e"
}, - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "items": [
- {
- "accountId": "0289dd65-c982-43c5-b7d3-6a6871865685",
- "additionalDetails": "additional details about line item",
- "category": "ACCOUNT_CATEGORY_INSURANCE",
- "customTaxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "total": "112"
}
], - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "quantity": "150",
- "rate": "112",
- "subtype": "LINE_ITEM_SUB_TYPE_NONE",
- "taxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "taxRateId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}
], - "title": "sale",
- "total": "112"
}
], - "notes": "notes about transaction",
- "number": "4000",
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e",
- "resolution": {
- "amountDue": "1000",
- "dueDateTime": "2000-10-31T01:30:00.000-05:00",
- "enabledPaymentMethods": [
- "string"
], - "from": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}, - "payments": [
- {
- "accountId": "string",
- "amount": "string",
- "applicationFee": "string",
- "convenienceFee": "string",
- "currency": "string",
- "date": "2019-10-12",
- "dateTime": "2000-10-31T01:30:00.000-05:00",
- "id": "string",
- "notes": "string",
- "number": "string",
- "paymentServiceId": "string",
- "timezone": "string"
}
], - "reminders": {
- "estimate": {
- "expiring": {
- "customMessage": "string",
- "enabled": true
}
}, - "invoice": {
- "due": {
- "customMessage": "string",
- "enabled": true
}, - "overdue": {
- "customMessage": "string",
- "enabled": true
}
}
}, - "status": "TRANSACTION_RESOLUTION_STATUS_OVERDUE",
- "templateVariables": {
- "color": "string",
- "id": 0
}, - "to": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}
], - "voidReason": "Voiding this invoice",
- "wasViewed": true
}, - "source": "plaid",
- "sourceId": "plaid-123",
- "sourceType": "TRANSACTION_SOURCE_TYPE_BANK_FEED",
- "timezone": "America/New_York",
- "transfer": {
- "transferAccountId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}, - "type": "TRANSACTION_TYPE_INCOME",
- "updatedAt": "2019-10-12T07:20:50.52Z"
}
}
{- "transaction": {
- "accountId": "18bbd7e3-93df-4ff9-8ba7-15e937ea0b96",
- "adjustment": {
- "adjustments": [
- {
- "accountId": "string",
- "amount": "string",
- "id": "string"
}
]
}, - "amount": "1000",
- "attachments": [
- {
- "content": "string",
- "contentLength": 0,
- "filename": "string",
- "id": "string",
- "mimeType": "string",
- "namespace": "string",
- "url": "string"
}
], - "businessId": "string",
- "contact": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string"
}, - "currency": "USD",
- "date": "2019-10-12",
- "dateTime": "2019-10-12T15:30:00.000Z",
- "expense": {
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e"
}, - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "items": [
- {
- "accountId": "0289dd65-c982-43c5-b7d3-6a6871865685",
- "additionalDetails": "additional details about line item",
- "category": "ACCOUNT_CATEGORY_INSURANCE",
- "customTaxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "total": "112"
}
], - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "quantity": "150",
- "rate": "112",
- "subtype": "LINE_ITEM_SUB_TYPE_NONE",
- "taxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "taxRateId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}
], - "title": "sale",
- "total": "112"
}
], - "notes": "notes about transaction",
- "number": "4000",
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e",
- "resolution": {
- "amountDue": "1000",
- "dueDateTime": "2000-10-31T01:30:00.000-05:00",
- "enabledPaymentMethods": [
- "string"
], - "from": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}, - "payments": [
- {
- "accountId": "string",
- "amount": "string",
- "applicationFee": "string",
- "convenienceFee": "string",
- "currency": "string",
- "date": "2019-10-12",
- "dateTime": "2000-10-31T01:30:00.000-05:00",
- "id": "string",
- "notes": "string",
- "number": "string",
- "paymentServiceId": "string",
- "timezone": "string"
}
], - "reminders": {
- "estimate": {
- "expiring": {
- "customMessage": "string",
- "enabled": true
}
}, - "invoice": {
- "due": {
- "customMessage": "string",
- "enabled": true
}, - "overdue": {
- "customMessage": "string",
- "enabled": true
}
}
}, - "status": "TRANSACTION_RESOLUTION_STATUS_OVERDUE",
- "templateVariables": {
- "color": "string",
- "id": 0
}, - "to": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}
], - "voidReason": "Voiding this invoice",
- "wasViewed": true
}, - "source": "plaid",
- "sourceId": "plaid-123",
- "sourceType": "TRANSACTION_SOURCE_TYPE_BANK_FEED",
- "timezone": "America/New_York",
- "transfer": {
- "transferAccountId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}, - "type": "TRANSACTION_TYPE_INCOME",
- "updatedAt": "2019-10-12T07:20:50.52Z"
}
}
Retrieves expenses and/or bills either by one or more transaction ids, or a business id. This endpoint is mostly a synonym of GET /transactions but it only returns expenses and bills and has query params specific to these transaction types.
ids | string Comma separated list of expense IDs to retrieve |
businessId | string Business ID |
userId | string User ID to retrieve expenses for when anonymous |
accountId | string Account ID |
category | string Category filter |
demo | string Flag to request demo business data |
transactionGroupType | string Group type of transactions |
paymentMethodId | string Payment Method id of transactions |
page | integer Page Number: 1 is the first page |
pageSize | integer Number of results per page |
period | string Period filter |
fromDate | string Transaction start date |
toDate | string Transaction start date |
search | string Query tern for searching through expenses |
filter | string Filter term for searching through expenses |
billOnly | boolean Flag to return only bills (and exclude expenses) |
Authorization | string Example: Bearer foo |
{- "totalTransactions": 0,
- "transactions": [
- {
- "accountId": "18bbd7e3-93df-4ff9-8ba7-15e937ea0b96",
- "adjustment": {
- "adjustments": [
- {
- "accountId": "string",
- "amount": "string",
- "id": "string"
}
]
}, - "amount": "1000",
- "attachments": [
- {
- "content": "string",
- "contentLength": 0,
- "filename": "string",
- "id": "string",
- "mimeType": "string",
- "namespace": "string",
- "url": "string"
}
], - "businessId": "string",
- "contact": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string"
}, - "currency": "USD",
- "date": "2019-10-12",
- "dateTime": "2019-10-12T15:30:00.000Z",
- "expense": {
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e"
}, - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "items": [
- {
- "accountId": "0289dd65-c982-43c5-b7d3-6a6871865685",
- "additionalDetails": "additional details about line item",
- "category": "ACCOUNT_CATEGORY_INSURANCE",
- "customTaxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "total": "112"
}
], - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "quantity": "150",
- "rate": "112",
- "subtype": "LINE_ITEM_SUB_TYPE_NONE",
- "taxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "taxRateId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}
], - "title": "sale",
- "total": "112"
}
], - "notes": "notes about transaction",
- "number": "4000",
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e",
- "resolution": {
- "amountDue": "1000",
- "dueDateTime": "2000-10-31T01:30:00.000-05:00",
- "enabledPaymentMethods": [
- "string"
], - "from": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}, - "payments": [
- {
- "accountId": "string",
- "amount": "string",
- "applicationFee": "string",
- "convenienceFee": "string",
- "currency": "string",
- "date": "2019-10-12",
- "dateTime": "2000-10-31T01:30:00.000-05:00",
- "id": "string",
- "notes": "string",
- "number": "string",
- "paymentServiceId": "string",
- "timezone": "string"
}
], - "reminders": {
- "estimate": {
- "expiring": {
- "customMessage": "string",
- "enabled": true
}
}, - "invoice": {
- "due": {
- "customMessage": "string",
- "enabled": true
}, - "overdue": {
- "customMessage": "string",
- "enabled": true
}
}
}, - "status": "TRANSACTION_RESOLUTION_STATUS_OVERDUE",
- "templateVariables": {
- "color": "string",
- "id": 0
}, - "to": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}
], - "voidReason": "Voiding this invoice",
- "wasViewed": true
}, - "source": "plaid",
- "sourceId": "plaid-123",
- "sourceType": "TRANSACTION_SOURCE_TYPE_BANK_FEED",
- "timezone": "America/New_York",
- "transfer": {
- "transferAccountId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}, - "type": "TRANSACTION_TYPE_INCOME",
- "updatedAt": "2019-10-12T07:20:50.52Z"
}
]
}
Generates SVGs using parameters such as id, color, isDarkMode, and svgAttributes. The response is an array of SVG strings.
id | string ID |
color required | string Color |
isDarkMode | boolean Is Dark Mode |
svgAttributes | string SVG Attributes |
{- "svgs": [
- "string"
]
}
Retrieves incomes and/or invoices either by one or more transaction ids, or a business id. This endpoint is mostly a synonym of GET /transactions but it only returns incomes and invoices and has query params specific to these transaction types.
ids | string Comma separated list of transaction IDs to retrieve |
businessId | string Business ID to retrieve all business incomes |
userId | string User ID to retrieve incomes for when anonymous |
page | integer Page number. 1 is the first page |
pageSize | integer Number of results per page |
fromDate | string Earliest date that returned incomes should have |
toDate | string Latest date that returned incomes should have |
search | string Query tern for searching through incomes |
filter | string Filter term for searching through incomes |
statuses | string Comma separated list of income statuses to filter by |
invoiceOnly | boolean Flag to return only invoices (and exclude incomes) |
Authorization | string Bearer token authorization header |
{- "totalTransactions": 0,
- "transactions": [
- {
- "accountId": "18bbd7e3-93df-4ff9-8ba7-15e937ea0b96",
- "adjustment": {
- "adjustments": [
- {
- "accountId": "string",
- "amount": "string",
- "id": "string"
}
]
}, - "amount": "1000",
- "attachments": [
- {
- "content": "string",
- "contentLength": 0,
- "filename": "string",
- "id": "string",
- "mimeType": "string",
- "namespace": "string",
- "url": "string"
}
], - "businessId": "string",
- "contact": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string"
}, - "currency": "USD",
- "date": "2019-10-12",
- "dateTime": "2019-10-12T15:30:00.000Z",
- "expense": {
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e"
}, - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "items": [
- {
- "accountId": "0289dd65-c982-43c5-b7d3-6a6871865685",
- "additionalDetails": "additional details about line item",
- "category": "ACCOUNT_CATEGORY_INSURANCE",
- "customTaxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "total": "112"
}
], - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "quantity": "150",
- "rate": "112",
- "subtype": "LINE_ITEM_SUB_TYPE_NONE",
- "taxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "taxRateId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}
], - "title": "sale",
- "total": "112"
}
], - "notes": "notes about transaction",
- "number": "4000",
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e",
- "resolution": {
- "amountDue": "1000",
- "dueDateTime": "2000-10-31T01:30:00.000-05:00",
- "enabledPaymentMethods": [
- "string"
], - "from": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}, - "payments": [
- {
- "accountId": "string",
- "amount": "string",
- "applicationFee": "string",
- "convenienceFee": "string",
- "currency": "string",
- "date": "2019-10-12",
- "dateTime": "2000-10-31T01:30:00.000-05:00",
- "id": "string",
- "notes": "string",
- "number": "string",
- "paymentServiceId": "string",
- "timezone": "string"
}
], - "reminders": {
- "estimate": {
- "expiring": {
- "customMessage": "string",
- "enabled": true
}
}, - "invoice": {
- "due": {
- "customMessage": "string",
- "enabled": true
}, - "overdue": {
- "customMessage": "string",
- "enabled": true
}
}
}, - "status": "TRANSACTION_RESOLUTION_STATUS_OVERDUE",
- "templateVariables": {
- "color": "string",
- "id": 0
}, - "to": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}
], - "voidReason": "Voiding this invoice",
- "wasViewed": true
}, - "source": "plaid",
- "sourceId": "plaid-123",
- "sourceType": "TRANSACTION_SOURCE_TYPE_BANK_FEED",
- "timezone": "America/New_York",
- "transfer": {
- "transferAccountId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}, - "type": "TRANSACTION_TYPE_INCOME",
- "updatedAt": "2019-10-12T07:20:50.52Z"
}
]
}
Sends a reminder for a transaction to the client.
Authorization | string Example: Bearer foo |
Reminder Request
businessId | string |
contactInfo | string |
customMessage | string |
documentId required | string |
type | integer |
{- "businessId": "string",
- "contactInfo": "string",
- "customMessage": "string",
- "documentId": "string",
- "type": 0
}
{ }
Provides uploads and downloads of data such as attachments, logos, and so on. Namespace is one of attachments | downloads. Download blobs are auto-expiring.
Uploads one or more attachments/files for a particular business, given a namespace and businessId. The uuids are returned in the response in the same order that the blobs were uploaded.
namespace required | string the namespace of the blobs |
businessId required | string id of business |
Authorization required | string Example: foo |
file required | string <binary> Blob |
Returns the attachment's/file's metadata given a namespace, businessId and uuid. This is useful for getting the attachemnt's mime type, filename, or size.
namespace required | string the namespace of the blob |
businessId required | string id of business |
uuid required | string id of the blob |
Uploads an attachment/file to a particular uuid, given a namespace, businessId and uuid
namespace required | string the namespace of the blob |
businessId required | string id of business |
uuid required | string id of the blob |
Authorization required | string Example: foo |
file required | string <binary> Blob |
Upload an attachment/file to a particular uuid, given a namespace, businessId and uuid
namespace required | string the namespace of the blob |
businessId required | string id of business |
uuid required | string id of the blob |
Authorization required | string Example: foo |
file required | string <binary> Blob |
Uploads a logo (JPEG, PNG, GIF, SVG) under 3MB to online storage (GCS) and returns a UUID for access. The logo is not associated with the user. For this reason, you should use the Attachment endpoints instead.
logo required | string <binary> JPEG, PNG or GIF |
{- "id": "string",
- "url": "string"
}
Endpoints for adding bank connections via Plaid. This allows for automatic import of bank transactions into a business ledger.
Deletes an existing bank feed for a business.
businessId required | string ID of Business that the feed belongs to |
bankFeedId required | string ID of bank feed |
Authorization | string Example: Bearer foo |
{ }
Retrieves a bank feed by ID or all of a business's bank feeds by business ID.
businessId required | string ID of Business to retrieve Bank Feeds for |
id | string ID of Bank Feed |
Authorization | string Example: Bearer foo |
{- "bankFeeds": [
- {
- "accounts": [
- {
- "balance": "string",
- "currency": "string",
- "id": "string",
- "lastRefreshed": "2019-10-12T07:20:50.52Z",
- "lastRefreshedProvider": "2019-10-12T07:20:50.52Z",
- "linkedAccountId": "string",
- "linkedPaymentMethodId": "string",
- "name": "string",
- "number": "string",
- "openingDate": "2019-10-12",
- "providerId": "string",
- "timezone": "string",
- "type": "string"
}
], - "created": "2019-10-12T07:20:50.52Z",
- "errorCode": "string",
- "errorMessage": "string",
- "id": "string",
- "lastRefreshed": "2019-10-12T07:20:50.52Z",
- "name": "string",
- "provider": "string",
- "providerId": "string",
- "state": "string"
}
]
}
Updates the connections between a bank feed and its ledger accounts. This is needed to associate a bank feed account with a ledger account so that transactions can be ingested into the business's ledger.
Authorization | string Example: Bearer foo |
Bank Feeds to update
required | object (serverpb.BankFeed) |
businessId required | string |
{- "bankFeed": {
- "accounts": [
- {
- "balance": "string",
- "currency": "string",
- "id": "string",
- "lastRefreshed": "2019-10-12T07:20:50.52Z",
- "lastRefreshedProvider": "2019-10-12T07:20:50.52Z",
- "linkedAccountId": "string",
- "linkedPaymentMethodId": "string",
- "name": "string",
- "number": "string",
- "openingDate": "2019-10-12",
- "providerId": "string",
- "timezone": "string",
- "type": "string"
}
], - "created": "2019-10-12T07:20:50.52Z",
- "errorCode": "string",
- "errorMessage": "string",
- "id": "string",
- "lastRefreshed": "2019-10-12T07:20:50.52Z",
- "name": "string",
- "provider": "string",
- "providerId": "string",
- "state": "string"
}, - "businessId": "string"
}
{- "bankFeed": {
- "accounts": [
- {
- "balance": "string",
- "currency": "string",
- "id": "string",
- "lastRefreshed": "2019-10-12T07:20:50.52Z",
- "lastRefreshedProvider": "2019-10-12T07:20:50.52Z",
- "linkedAccountId": "string",
- "linkedPaymentMethodId": "string",
- "name": "string",
- "number": "string",
- "openingDate": "2019-10-12",
- "providerId": "string",
- "timezone": "string",
- "type": "string"
}
], - "created": "2019-10-12T07:20:50.52Z",
- "errorCode": "string",
- "errorMessage": "string",
- "id": "string",
- "lastRefreshed": "2019-10-12T07:20:50.52Z",
- "name": "string",
- "provider": "string",
- "providerId": "string",
- "state": "string"
}
}
Call this endpoint to create the token needed to launch Plaid Link for a business so that they can add a new bank connection. This info should be passed to the Plaid Link js library to launch their UI. The response, if successful, should be passed to the response endpoint to complete set-up.
Authorization required | string Example: Bearer foo |
Plaid Link add request
androidPackageName | string |
businessId required | string |
customizationName | string |
language | string |
locales | Array of strings |
redirectUrl | string |
{- "androidPackageName": "string",
- "businessId": "string",
- "customizationName": "string",
- "language": "string",
- "locales": [
- "string"
], - "redirectUrl": "string"
}
{- "businessId": "string",
- "expiration": "2019-10-12T07:20:50.52Z",
- "linkToken": "string"
}
Call this endpoint with the response returned by Plaid Link to complete a new bank connection for a business. If successful, a corresponding Bank Feed object will be created for the business.
Plaid Link response request
businessId required | string |
publicToken required | string |
timezone required | string |
{- "businessId": "string",
- "publicToken": "string",
- "timezone": "string"
}
{- "bankFeed": {
- "accounts": [
- {
- "balance": "string",
- "currency": "string",
- "id": "string",
- "lastRefreshed": "2019-10-12T07:20:50.52Z",
- "lastRefreshedProvider": "2019-10-12T07:20:50.52Z",
- "linkedAccountId": "string",
- "linkedPaymentMethodId": "string",
- "name": "string",
- "number": "string",
- "openingDate": "2019-10-12",
- "providerId": "string",
- "timezone": "string",
- "type": "string"
}
], - "created": "2019-10-12T07:20:50.52Z",
- "errorCode": "string",
- "errorMessage": "string",
- "id": "string",
- "lastRefreshed": "2019-10-12T07:20:50.52Z",
- "name": "string",
- "provider": "string",
- "providerId": "string",
- "state": "string"
}
}
Call this endpoint to create the token needed to launch Plaid Link for a business so that they can update an existing bank connection. This info should be passed to the Plaid Link js library to launch their UI. The response, if successful, should be passed to the response endpoint to complete set-up.
Authorization required | string Example: Bearer foo |
Plaid Link add request
androidPackageName | string |
bankFeedId required | string |
businessId required | string |
customizationName | string |
language | string |
locales | Array of strings |
redirectUrl | string |
{- "androidPackageName": "string",
- "bankFeedId": "string",
- "businessId": "string",
- "customizationName": "string",
- "language": "string",
- "locales": [
- "string"
], - "redirectUrl": "string"
}
{- "expiration": "2019-10-12T07:20:50.52Z",
- "linkToken": "string"
}
Refreshes a bank feed to get the latest transactions. There is an option to refresh the feed with just the bank feed provider (like Plaid), to synchronize with their database, or to ask the provider to refresh with the bank itself.
Authorization | string Example: Bearer foo |
Refresh request
bankFeedId required | string |
businessId required | string |
refreshWithBank required | boolean |
{- "bankFeedId": "string",
- "businessId": "string",
- "refreshWithBank": true
}
{ }
Endpoints for managing categorization rules for transactions. Categorization rules are used to automatically categorize transactions imported from bank feed providers. They take the suggestions provided by the bank feed provider and map them to category accounts. The business is able to refine these rules to suit their purposes.
Deletes a categorization rule for a business.
businessId required | string ID of Business that the feed belongs to |
category required | string category for the rule |
merchant | string merchant for the rule |
Authorization required | string Example: Bearer foo |
{ }
Retrieves a business's categorization rules by business ID.
businessId required | string ID of Business to retrieve rules for |
Authorization required | string Example: Bearer foo |
{- "rules": [
- {
- "accountCategory": 0,
- "accountId": "string",
- "category": "string",
- "merchant": "string",
- "taxes": [
- "string"
]
}
]
}
Updates a specific categorization rule to change how it is used to categorize transactions. This endpoint is used to allow users to edit existing rules in a rules editor ui.
Authorization required | string Example: Bearer foo |
Categorization Rule to update
businessId required | string |
required | object (serverpb.CategorizationRule) |
{- "businessId": "string",
- "rule": {
- "accountCategory": 0,
- "accountId": "string",
- "category": "string",
- "merchant": "string",
- "taxes": [
- "string"
]
}
}
{ }
Categorizes the transaction according to the categorization rules. This is used when the user changes the category of a transaction. The result should be compared against the user's chosen category and, if they're different, the user can be prompted about whether they want to update the categorization rules.
Authorization required | string Example: Bearer foo |
Categorization Rule to update
businessId required | string |
transactionId required | string |
{- "businessId": "string",
- "transactionId": "string"
}
{- "transaction": {
- "accountCategory": 0,
- "accountId": "string",
- "rule": {
- "category": "string",
- "merchant": "string"
}, - "taxes": [
- "string"
], - "transaction": {
- "category": "string",
- "merchant": "string"
}, - "transactionId": "string"
}
}
Creates a new categorization rule or updates an existing one from a transaction. This is used when the user wants to change the category of an existing transaction.
Authorization required | string Example: Bearer foo |
Categorization Rule to update
accountCategory | integer The category that should be used for this rule. Can be NONE if accountId is set instead. |
accountId | string The account that should be used for this rule. Can be empty if a category is set instead. |
businessId required | string |
merchant | string The merchant that should be used for this rule. Should be either the transaction merchant, or empty. |
taxes | Array of strings The taxes that should be used for this rule. |
transactionId required | string |
{- "accountCategory": 0,
- "accountId": "string",
- "businessId": "string",
- "merchant": "string",
- "taxes": [
- "string"
], - "transactionId": "string"
}
{ }
Deletes a contact based on the ContactID
Authorization required | string Example: Bearer foo |
DeleteContactRequest
businessId | string |
id required | string |
userId | string |
{- "businessId": "string",
- "id": "string",
- "userId": "string"
}
{ }
Retrieves contacts for a business using several possible filters such as user ID, business ID, name, and emails.
id | string ID(s) of contacts |
userId | string User ID |
businessId | string Business ID |
name | string Name of contact |
emails | string Emails of contacts |
page | integer Page Number: 1 is the first page |
archived | string Flag to filter by archived or not archived contacts |
pageSize | integer Number of results per page |
search | string Search contacts using meilisearch |
Authorization | string Example: Bearer foo |
{- "contact": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}
], - "totalContacts": 0
}
Creates a new contact for a business.
Authorization | string Example: Bearer foo |
CreateContactRequest
required | Array of objects (serverpb.Contact) |
namespace | string An optional namespace for the contact to allow for multiple contact lists |
{- "contact": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}
], - "namespace": "string"
}
{- "contact": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}
]
}
Updates a contact for a business.
Authorization required | string Example: Bearer foo |
UpdateContactRequest
required | object (serverpb.Contact) |
namespace | string |
{- "contact": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}, - "namespace": "string"
}
{- "contact": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}
}
Endpoints for performing optical character recognition (OCR) on source documents such as images or pdfs of receipts.
Uploads a file to temporary storage and runs OCR on it. A transaction object is returned giving the fields that were processed.
businessId required | string id of business |
Authorization | string Example: foo |
currency | string suggested currency code |
file required | string <binary> Blob |
timezone required | string suggested timezone |
transactionGroupType | string suggested transaction Group Type, default is TRANSACTION_GROUP_TYPE_BUSINESS |
transactionType | string suggested transaction type, default is TRANSACTION_TYPE_EXPENSE |
{- "createdTaxes": [
- {
- "archived": false,
- "businessId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "description": "string",
- "id": "9a371680-620f-44fa-8e29-be1c1891104e",
- "name": "VAT",
- "rates": [
- {
- "archived": false,
- "id": "9a371680-620f-44fa-8e29-be1c1891104e",
- "rate": "4.5"
}
], - "registrationNumber": "123456789"
}
], - "suggestedPaymentMethod": {
- "accountId": "9a371680-620f-44fa-8e29-be1c1891104e",
- "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "isCredit": true,
- "isPrimary": true,
- "isSystem": false,
- "name": "Visa",
- "number": "string",
- "type": "PAYMENT_METHOD_TYPE_VISA"
}, - "transaction": {
- "accountId": "18bbd7e3-93df-4ff9-8ba7-15e937ea0b96",
- "adjustment": {
- "adjustments": [
- {
- "accountId": "string",
- "amount": "string",
- "id": "string"
}
]
}, - "amount": "1000",
- "attachments": [
- {
- "content": "string",
- "contentLength": 0,
- "filename": "string",
- "id": "string",
- "mimeType": "string",
- "namespace": "string",
- "url": "string"
}
], - "businessId": "string",
- "contact": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string"
}, - "currency": "USD",
- "date": "2019-10-12",
- "dateTime": "2019-10-12T15:30:00.000Z",
- "expense": {
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e"
}, - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "items": [
- {
- "accountId": "0289dd65-c982-43c5-b7d3-6a6871865685",
- "additionalDetails": "additional details about line item",
- "category": "ACCOUNT_CATEGORY_INSURANCE",
- "customTaxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "total": "112"
}
], - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "quantity": "150",
- "rate": "112",
- "subtype": "LINE_ITEM_SUB_TYPE_NONE",
- "taxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "taxRateId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}
], - "title": "sale",
- "total": "112"
}
], - "notes": "notes about transaction",
- "number": "4000",
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e",
- "resolution": {
- "amountDue": "1000",
- "dueDateTime": "2000-10-31T01:30:00.000-05:00",
- "enabledPaymentMethods": [
- "string"
], - "from": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}, - "payments": [
- {
- "accountId": "string",
- "amount": "string",
- "applicationFee": "string",
- "convenienceFee": "string",
- "currency": "string",
- "date": "2019-10-12",
- "dateTime": "2000-10-31T01:30:00.000-05:00",
- "id": "string",
- "notes": "string",
- "number": "string",
- "paymentServiceId": "string",
- "timezone": "string"
}
], - "reminders": {
- "estimate": {
- "expiring": {
- "customMessage": "string",
- "enabled": true
}
}, - "invoice": {
- "due": {
- "customMessage": "string",
- "enabled": true
}, - "overdue": {
- "customMessage": "string",
- "enabled": true
}
}
}, - "status": "TRANSACTION_RESOLUTION_STATUS_OVERDUE",
- "templateVariables": {
- "color": "string",
- "id": 0
}, - "to": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}
], - "voidReason": "Voiding this invoice",
- "wasViewed": true
}, - "source": "plaid",
- "sourceId": "plaid-123",
- "sourceType": "TRANSACTION_SOURCE_TYPE_BANK_FEED",
- "timezone": "America/New_York",
- "transfer": {
- "transferAccountId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}, - "type": "TRANSACTION_TYPE_INCOME",
- "updatedAt": "2019-10-12T07:20:50.52Z"
}
}
Endpoints for managing payment processors for a business. These are used to accept payments from clients.
Removes the connection of a Stripe account from a business. This means that online payments can no longer be accepted for invoices.
businessId | string Business to disconnect from Stripe |
userId | string User to disconnect from Stripe |
Authorization required | string Example: Bearer foo |
{ }
Returns all the information about the business's Stripe payment account including the currency and capabilities. If the business has not onboarded, returns a 204 No Content
businessId | string Business ID |
userId | string User ID |
Authorization required | string Example: Bearer foo |
{- "account": {
- "currency": "string",
- "id": "string",
- "onboarded": true,
- "paymentMethods": [
- {
- "accepted": true,
- "capability": "string",
- "name": "string",
- "recipientFee": "string",
- "recipientPaysFee": true,
- "serviceFee": "string",
- "status": "string",
- "type": "string"
}
], - "requirements": {
- "currentlyDue": [
- "string"
], - "disabledReason": "string",
- "errors": [
- {
- "code": "string",
- "reason": "string",
- "requirement": "string"
}
], - "eventuallyDue": [
- "string"
], - "pastDue": [
- "string"
], - "pendingVerification": [
- "string"
]
}
}
}
Begins the onboarding process for Stripe Connect and returns a Stripe url for the user to complete the process.
Authorization required | string Example: Bearer foo |
OnBoardRequest
accountType | string |
object (serverpb.Address) | |
businessId | string The id of the business that the stripe account is being created for. |
string | |
fullName | string |
phone | string |
refreshUrl | string |
returnUrl | string |
userId | string This field is deprecated. Use businessId instead. |
{- "accountType": "string",
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "businessId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "email": "string",
- "fullName": "string",
- "phone": "string",
- "refreshUrl": "string",
- "returnUrl": "string",
- "userId": "815b81c1-1650-4750-95b4-c6933e6df705"
}
{- "accountId": "string",
- "accountLinkUrl": "string",
- "onboarded": true
}
Associates a bank (token) with a customer of a business, allowing them to pay invoices with ACH.
StripeBankTokenRequest
string | |
invoiceId | string |
token | string |
{- "email": "string",
- "invoiceId": "string",
- "token": "string"
}
{ }
Verifies a customers bank with micro amounts
StripeBankVerificationRequest
amounts | Array of integers |
string | |
invoiceId | string |
{- "amounts": [
- 0
], - "email": "string",
- "invoiceId": "string"
}
{- "status": "string"
}
Returns the information needed to launch Stripe to pay for an invoice.
CheckoutSessionsRequest
cancelUrl | string |
string | |
invoiceId | string |
paymentRequestId | string A string id referring to the invoice that is being paid. This would have been generated by the user and sent to the client. |
successUrl | string |
{- "cancelUrl": "string",
- "email": "string",
- "invoiceId": "string",
- "paymentRequestId": "string",
- "successUrl": "string"
}
{- "sessionAlipayId": "string",
- "sessionCardId": "string"
}
Creates a login link to get into the Stripe account of a business so that they can manage their settings.
Authorization required | string Example: Bearer foo |
LoginLinkRequest
businessId | string The id of the business to log in. |
redirectUrl | string |
userId | string This field is deprecated. Use businessId instead. |
{- "businessId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "redirectUrl": "string",
- "userId": "string"
}
{- "url": "string"
}
Returns the payment methods available when paying an invoice for a business. This information is required to display the payment options and fees to the invoice client.
businessId | string Business ID |
userId | string User ID |
{- "account": {
- "currency": "string",
- "id": "string",
- "onboarded": true,
- "paymentMethods": [
- {
- "accepted": true,
- "capability": "string",
- "name": "string",
- "recipientFee": "string",
- "recipientPaysFee": true,
- "serviceFee": "string",
- "status": "string",
- "type": "string"
}
], - "requirements": {
- "currentlyDue": [
- "string"
], - "disabledReason": "string",
- "errors": [
- {
- "code": "string",
- "reason": "string",
- "requirement": "string"
}
], - "eventuallyDue": [
- "string"
], - "pastDue": [
- "string"
], - "pendingVerification": [
- "string"
]
}
}
}
This is used for updating properties on the payment method, such as the convenience fee and whether it is enabled.
Authorization required | string Example: Bearer foo |
UpdatePaymentMethodRequest
businessId | string The id of the business that the payment method is being updated for. |
object (serverpb.PaymentMethod) | |
userId | string This field is deprecated. Use businessId instead. |
{- "businessId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "paymentMethod": {
- "accepted": true,
- "capability": "string",
- "name": "string",
- "recipientFee": "string",
- "recipientPaysFee": true,
- "serviceFee": "string",
- "status": "string",
- "type": "string"
}, - "userId": "string"
}
{- "paymentMethod": {
- "accepted": true,
- "capability": "string",
- "name": "string",
- "recipientFee": "string",
- "recipientPaysFee": true,
- "serviceFee": "string",
- "status": "string",
- "type": "string"
}
}
Returns all the information needed to display a payable invoice and make an online payment for it. This is part of the payment process for clients. The request is identified by the unique id returned when the payment request was created (and this id is shared with the client).
paymentRequestID | string Payment Request ID |
{- "invoice": {
- "balance": "1000",
- "balanceFormatted": "string",
- "businessId": "18bbd7e3-93df-4ff9-8ba7-15e937ea0b96",
- "currency": "USD",
- "date": "2019-10-12",
- "dateFormatted": "October 12, 2019",
- "due": "900",
- "dueDate": "2019-10-12",
- "dueDateFormatted": "October 12, 2019",
- "dueFormatted": "string",
- "from": {
- "city": "Vancouver",
- "country": "CA",
- "name": "John Doe",
- "postalOrZipCode": "V6B 1A1",
- "provinceOrState": "BC",
- "street1": "123 Main St",
- "street2": "Suite 100"
}, - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "invoiceNumber": "1000",
- "lineItems": [
- {
- "amount": "2000",
- "amountFormatted": "string",
- "description": "Consulting",
- "quantity": "2",
- "rate": "1000",
- "rateFormatted": "string",
- "taxes": [
- "GST",
- " PST"
]
}
], - "notes": "Payment for services rendered",
- "payments": [
- {
- "amount": "100",
- "amountFormatted": "string",
- "date": "2019-10-12",
- "dateFormatted": "October 12, 2019",
- "notes": "Payment collected"
}
], - "subtotal": "900",
- "subtotalFormatted": "string",
- "taxAmounts": [
- {
- "amount": "100",
- "amountFormatted": "string",
- "name": "GST"
}
], - "to": {
- "city": "Vancouver",
- "country": "CA",
- "name": "John Doe",
- "postalOrZipCode": "V6B 1A1",
- "provinceOrState": "BC",
- "street1": "123 Main St",
- "street2": "Suite 100"
}, - "total": "1000",
- "totalFormatted": "string",
- "totalPaid": "1000",
- "totalPaidFormatted": "string"
}, - "payable": true
}
Creates a request to receive online payments for an invoice using the payment service. This stores the info needed to accept payments for the invoice and returns a unique id to share with the client.
CreatePaymentRequestRequest
businessId required | string The business that created the invoice |
invoiceId required | string The invoice that needs to be paid |
{- "businessId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "invoiceId": "815b81c1-1650-4750-95b4-c6933e6df705"
}
{- "paymentRequestId": "815b81c1-1650-4750-95b4-c6933e6df705"
}
Deletes an estimate. This is only available for draft estimates. Estimates that have already been sent cannot be deleted.
Authorization | string Example: Bearer foo |
Delete request
businessId | string |
id | string |
userId | string |
{- "businessId": "string",
- "id": "string",
- "userId": "string"
}
{ }
Retrieves one or more estimates, either by user id, or by a comma separated list of estimate ids.
id | string ID(s) of Estimates |
businessId | string Business ID to get estimates for |
userId | string User ID to get estimates for |
uid | string ID of user when viewing as a client |
status | string comma separated list of estimate statuses to filter by |
Authorization | string Example: Bearer foo |
{- "estimate": [
- {
- "created": "2019-10-12T07:20:50.52Z",
- "currency": "USD",
- "discountAmount": "100",
- "discountTotal": "100",
- "discountType": "DISCOUNT_NONE",
- "expired": "2019-10-12T07:20:50.52Z",
- "from": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "name": "string",
- "phone": "string"
}, - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "isSubscribed": "true",
- "items": [
- {
- "accountId": "string",
- "additionalDetails": "string",
- "category": "string",
- "id": "string",
- "itemTotal": 0,
- "quantity": "string",
- "rate": "string",
- "taxes": [
- {
- "businessId": "string",
- "description": "string",
- "id": "string",
- "name": "string",
- "rate": "string",
- "taxTotal": 0,
- "userId": "string"
}
], - "title": "string"
}
], - "notes": "Thank you for your business.",
- "number": "string",
- "resolution": {
- "reminders": {
- "estimate": {
- "expiring": {
- "customMessage": "string",
- "enabled": true
}
}, - "invoice": {
- "due": {
- "customMessage": "string",
- "enabled": true
}, - "overdue": {
- "customMessage": "string",
- "enabled": true
}
}
}, - "templateVariables": {
- "color": "string",
- "id": 0
}
}, - "sent": "2019-10-12T07:20:50.52Z",
- "shipping": "200",
- "status": "ESTIMATE_DRAFT",
- "subtotal": "1000",
- "taxTotal": "125",
- "template": {
- "color": "string",
- "estimate": {
- "id": "string",
- "version": 0
}, - "invoice": {
- "id": "string",
- "version": 0
}, - "receipt": {
- "id": "string",
- "version": 0
}, - "themeSvg": "string"
}, - "timeZone": "America/Vancouver",
- "to": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string"
}
], - "total": "1225",
- "updated": "2019-10-12T07:20:50.52Z",
- "voidReason": "You can ignore this estimate, it was a mistake."
}
]
}
Creates an estimate for the business.
Authorization | string Example: Bearer foo |
CreateEstimateRequest
businessId | string |
object (serverpb.Estimate) | |
userId | string |
{- "businessId": "string",
- "estimate": {
- "created": "2019-10-12T07:20:50.52Z",
- "currency": "USD",
- "discountAmount": "100",
- "discountTotal": "100",
- "discountType": "DISCOUNT_NONE",
- "expired": "2019-10-12T07:20:50.52Z",
- "from": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "name": "string",
- "phone": "string"
}, - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "isSubscribed": "true",
- "items": [
- {
- "accountId": "string",
- "additionalDetails": "string",
- "category": "string",
- "id": "string",
- "itemTotal": 0,
- "quantity": "string",
- "rate": "string",
- "taxes": [
- {
- "businessId": "string",
- "description": "string",
- "id": "string",
- "name": "string",
- "rate": "string",
- "taxTotal": 0,
- "userId": "string"
}
], - "title": "string"
}
], - "notes": "Thank you for your business.",
- "number": "string",
- "resolution": {
- "reminders": {
- "estimate": {
- "expiring": {
- "customMessage": "string",
- "enabled": true
}
}, - "invoice": {
- "due": {
- "customMessage": "string",
- "enabled": true
}, - "overdue": {
- "customMessage": "string",
- "enabled": true
}
}
}, - "templateVariables": {
- "color": "string",
- "id": 0
}
}, - "sent": "2019-10-12T07:20:50.52Z",
- "shipping": "200",
- "status": "ESTIMATE_DRAFT",
- "subtotal": "1000",
- "taxTotal": "125",
- "template": {
- "color": "string",
- "estimate": {
- "id": "string",
- "version": 0
}, - "invoice": {
- "id": "string",
- "version": 0
}, - "receipt": {
- "id": "string",
- "version": 0
}, - "themeSvg": "string"
}, - "timeZone": "America/Vancouver",
- "to": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string"
}
], - "total": "1225",
- "updated": "2019-10-12T07:20:50.52Z",
- "voidReason": "You can ignore this estimate, it was a mistake."
}, - "userId": "string"
}
{- "estimate": {
- "created": "2019-10-12T07:20:50.52Z",
- "currency": "USD",
- "discountAmount": "100",
- "discountTotal": "100",
- "discountType": "DISCOUNT_NONE",
- "expired": "2019-10-12T07:20:50.52Z",
- "from": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "name": "string",
- "phone": "string"
}, - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "isSubscribed": "true",
- "items": [
- {
- "accountId": "string",
- "additionalDetails": "string",
- "category": "string",
- "id": "string",
- "itemTotal": 0,
- "quantity": "string",
- "rate": "string",
- "taxes": [
- {
- "businessId": "string",
- "description": "string",
- "id": "string",
- "name": "string",
- "rate": "string",
- "taxTotal": 0,
- "userId": "string"
}
], - "title": "string"
}
], - "notes": "Thank you for your business.",
- "number": "string",
- "resolution": {
- "reminders": {
- "estimate": {
- "expiring": {
- "customMessage": "string",
- "enabled": true
}
}, - "invoice": {
- "due": {
- "customMessage": "string",
- "enabled": true
}, - "overdue": {
- "customMessage": "string",
- "enabled": true
}
}
}, - "templateVariables": {
- "color": "string",
- "id": 0
}
}, - "sent": "2019-10-12T07:20:50.52Z",
- "shipping": "200",
- "status": "ESTIMATE_DRAFT",
- "subtotal": "1000",
- "taxTotal": "125",
- "template": {
- "color": "string",
- "estimate": {
- "id": "string",
- "version": 0
}, - "invoice": {
- "id": "string",
- "version": 0
}, - "receipt": {
- "id": "string",
- "version": 0
}, - "themeSvg": "string"
}, - "timeZone": "America/Vancouver",
- "to": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string"
}
], - "total": "1225",
- "updated": "2019-10-12T07:20:50.52Z",
- "voidReason": "You can ignore this estimate, it was a mistake."
}
}
Updates an estimate, for example to note that the target client has accepted it.
Authorization | string Example: Bearer foo |
EstimateUpdatedRequest
businessId | string |
Array of objects (serverpb.Estimate) | |
userId | string |
{- "businessId": "string",
- "estimate": [
- {
- "created": "2019-10-12T07:20:50.52Z",
- "currency": "USD",
- "discountAmount": "100",
- "discountTotal": "100",
- "discountType": "DISCOUNT_NONE",
- "expired": "2019-10-12T07:20:50.52Z",
- "from": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "name": "string",
- "phone": "string"
}, - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "isSubscribed": "true",
- "items": [
- {
- "accountId": "string",
- "additionalDetails": "string",
- "category": "string",
- "id": "string",
- "itemTotal": 0,
- "quantity": "string",
- "rate": "string",
- "taxes": [
- {
- "businessId": "string",
- "description": "string",
- "id": "string",
- "name": "string",
- "rate": "string",
- "taxTotal": 0,
- "userId": "string"
}
], - "title": "string"
}
], - "notes": "Thank you for your business.",
- "number": "string",
- "resolution": {
- "reminders": {
- "estimate": {
- "expiring": {
- "customMessage": "string",
- "enabled": true
}
}, - "invoice": {
- "due": {
- "customMessage": "string",
- "enabled": true
}, - "overdue": {
- "customMessage": "string",
- "enabled": true
}
}
}, - "templateVariables": {
- "color": "string",
- "id": 0
}
}, - "sent": "2019-10-12T07:20:50.52Z",
- "shipping": "200",
- "status": "ESTIMATE_DRAFT",
- "subtotal": "1000",
- "taxTotal": "125",
- "template": {
- "color": "string",
- "estimate": {
- "id": "string",
- "version": 0
}, - "invoice": {
- "id": "string",
- "version": 0
}, - "receipt": {
- "id": "string",
- "version": 0
}, - "themeSvg": "string"
}, - "timeZone": "America/Vancouver",
- "to": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string"
}
], - "total": "1225",
- "updated": "2019-10-12T07:20:50.52Z",
- "voidReason": "You can ignore this estimate, it was a mistake."
}
], - "userId": "string"
}
{- "estimate": [
- {
- "created": "2019-10-12T07:20:50.52Z",
- "currency": "USD",
- "discountAmount": "100",
- "discountTotal": "100",
- "discountType": "DISCOUNT_NONE",
- "expired": "2019-10-12T07:20:50.52Z",
- "from": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "name": "string",
- "phone": "string"
}, - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "isSubscribed": "true",
- "items": [
- {
- "accountId": "string",
- "additionalDetails": "string",
- "category": "string",
- "id": "string",
- "itemTotal": 0,
- "quantity": "string",
- "rate": "string",
- "taxes": [
- {
- "businessId": "string",
- "description": "string",
- "id": "string",
- "name": "string",
- "rate": "string",
- "taxTotal": 0,
- "userId": "string"
}
], - "title": "string"
}
], - "notes": "Thank you for your business.",
- "number": "string",
- "resolution": {
- "reminders": {
- "estimate": {
- "expiring": {
- "customMessage": "string",
- "enabled": true
}
}, - "invoice": {
- "due": {
- "customMessage": "string",
- "enabled": true
}, - "overdue": {
- "customMessage": "string",
- "enabled": true
}
}
}, - "templateVariables": {
- "color": "string",
- "id": 0
}
}, - "sent": "2019-10-12T07:20:50.52Z",
- "shipping": "200",
- "status": "ESTIMATE_DRAFT",
- "subtotal": "1000",
- "taxTotal": "125",
- "template": {
- "color": "string",
- "estimate": {
- "id": "string",
- "version": 0
}, - "invoice": {
- "id": "string",
- "version": 0
}, - "receipt": {
- "id": "string",
- "version": 0
}, - "themeSvg": "string"
}, - "timeZone": "America/Vancouver",
- "to": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string"
}
], - "total": "1225",
- "updated": "2019-10-12T07:20:50.52Z",
- "voidReason": "You can ignore this estimate, it was a mistake."
}
]
}
Delete an estimate. This is only available for draft estimates. Estimates that have already been sent cannot be deleted.
id required | string estimate id |
businessId required | string business id |
Authorization | string Example: Bearer foo |
{ }
Retrieves one or more estimates, either by business id, or by a comma separated list of estimate ids.
ids | string Comma separated list of estimate ids |
businessId | string Business ID to get estimates for |
statuses | string comma separated list of estimate statuses to filter by |
search | string Query tern for searching through estimates |
page | integer Page Number: 1 is the first page |
pageSize | integer Number of results per page |
Authorization | string Example: Bearer foo |
{- "totalTransactions": 0,
- "transactions": [
- {
- "accountId": "18bbd7e3-93df-4ff9-8ba7-15e937ea0b96",
- "adjustment": {
- "adjustments": [
- {
- "accountId": "string",
- "amount": "string",
- "id": "string"
}
]
}, - "amount": "1000",
- "attachments": [
- {
- "content": "string",
- "contentLength": 0,
- "filename": "string",
- "id": "string",
- "mimeType": "string",
- "namespace": "string",
- "url": "string"
}
], - "businessId": "string",
- "contact": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string"
}, - "currency": "USD",
- "date": "2019-10-12",
- "dateTime": "2019-10-12T15:30:00.000Z",
- "expense": {
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e"
}, - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "items": [
- {
- "accountId": "0289dd65-c982-43c5-b7d3-6a6871865685",
- "additionalDetails": "additional details about line item",
- "category": "ACCOUNT_CATEGORY_INSURANCE",
- "customTaxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "total": "112"
}
], - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "quantity": "150",
- "rate": "112",
- "subtype": "LINE_ITEM_SUB_TYPE_NONE",
- "taxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "taxRateId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}
], - "title": "sale",
- "total": "112"
}
], - "notes": "notes about transaction",
- "number": "4000",
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e",
- "resolution": {
- "amountDue": "1000",
- "dueDateTime": "2000-10-31T01:30:00.000-05:00",
- "enabledPaymentMethods": [
- "string"
], - "from": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}, - "payments": [
- {
- "accountId": "string",
- "amount": "string",
- "applicationFee": "string",
- "convenienceFee": "string",
- "currency": "string",
- "date": "2019-10-12",
- "dateTime": "2000-10-31T01:30:00.000-05:00",
- "id": "string",
- "notes": "string",
- "number": "string",
- "paymentServiceId": "string",
- "timezone": "string"
}
], - "reminders": {
- "estimate": {
- "expiring": {
- "customMessage": "string",
- "enabled": true
}
}, - "invoice": {
- "due": {
- "customMessage": "string",
- "enabled": true
}, - "overdue": {
- "customMessage": "string",
- "enabled": true
}
}
}, - "status": "TRANSACTION_RESOLUTION_STATUS_OVERDUE",
- "templateVariables": {
- "color": "string",
- "id": 0
}, - "to": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}
], - "voidReason": "Voiding this invoice",
- "wasViewed": true
}, - "source": "plaid",
- "sourceId": "plaid-123",
- "sourceType": "TRANSACTION_SOURCE_TYPE_BANK_FEED",
- "timezone": "America/New_York",
- "transfer": {
- "transferAccountId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}, - "type": "TRANSACTION_TYPE_INCOME",
- "updatedAt": "2019-10-12T07:20:50.52Z"
}
]
}
Creates one or more estimates for the business.
Authorization | string Example: Bearer foo |
Estimates to create
businessId required | string |
required | Array of objects (ledgerpb.Transaction) |
{- "businessId": "string",
- "transactions": [
- {
- "accountId": "18bbd7e3-93df-4ff9-8ba7-15e937ea0b96",
- "adjustment": {
- "adjustments": [
- {
- "accountId": "string",
- "amount": "string",
- "id": "string"
}
]
}, - "amount": "1000",
- "attachments": [
- {
- "content": "string",
- "contentLength": 0,
- "filename": "string",
- "id": "string",
- "mimeType": "string",
- "namespace": "string",
- "url": "string"
}
], - "businessId": "string",
- "contact": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string"
}, - "currency": "USD",
- "date": "2019-10-12",
- "dateTime": "2019-10-12T15:30:00.000Z",
- "expense": {
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e"
}, - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "items": [
- {
- "accountId": "0289dd65-c982-43c5-b7d3-6a6871865685",
- "additionalDetails": "additional details about line item",
- "category": "ACCOUNT_CATEGORY_INSURANCE",
- "customTaxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "total": "112"
}
], - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "quantity": "150",
- "rate": "112",
- "subtype": "LINE_ITEM_SUB_TYPE_NONE",
- "taxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "taxRateId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}
], - "title": "sale",
- "total": "112"
}
], - "notes": "notes about transaction",
- "number": "4000",
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e",
- "resolution": {
- "amountDue": "1000",
- "dueDateTime": "2000-10-31T01:30:00.000-05:00",
- "enabledPaymentMethods": [
- "string"
], - "from": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}, - "payments": [
- {
- "accountId": "string",
- "amount": "string",
- "applicationFee": "string",
- "convenienceFee": "string",
- "currency": "string",
- "date": "2019-10-12",
- "dateTime": "2000-10-31T01:30:00.000-05:00",
- "id": "string",
- "notes": "string",
- "number": "string",
- "paymentServiceId": "string",
- "timezone": "string"
}
], - "reminders": {
- "estimate": {
- "expiring": {
- "customMessage": "string",
- "enabled": true
}
}, - "invoice": {
- "due": {
- "customMessage": "string",
- "enabled": true
}, - "overdue": {
- "customMessage": "string",
- "enabled": true
}
}
}, - "status": "TRANSACTION_RESOLUTION_STATUS_OVERDUE",
- "templateVariables": {
- "color": "string",
- "id": 0
}, - "to": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}
], - "voidReason": "Voiding this invoice",
- "wasViewed": true
}, - "source": "plaid",
- "sourceId": "plaid-123",
- "sourceType": "TRANSACTION_SOURCE_TYPE_BANK_FEED",
- "timezone": "America/New_York",
- "transfer": {
- "transferAccountId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}, - "type": "TRANSACTION_TYPE_INCOME",
- "updatedAt": "2019-10-12T07:20:50.52Z"
}
]
}
{- "transactions": [
- {
- "accountId": "18bbd7e3-93df-4ff9-8ba7-15e937ea0b96",
- "adjustment": {
- "adjustments": [
- {
- "accountId": "string",
- "amount": "string",
- "id": "string"
}
]
}, - "amount": "1000",
- "attachments": [
- {
- "content": "string",
- "contentLength": 0,
- "filename": "string",
- "id": "string",
- "mimeType": "string",
- "namespace": "string",
- "url": "string"
}
], - "businessId": "string",
- "contact": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string"
}, - "currency": "USD",
- "date": "2019-10-12",
- "dateTime": "2019-10-12T15:30:00.000Z",
- "expense": {
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e"
}, - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "items": [
- {
- "accountId": "0289dd65-c982-43c5-b7d3-6a6871865685",
- "additionalDetails": "additional details about line item",
- "category": "ACCOUNT_CATEGORY_INSURANCE",
- "customTaxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "total": "112"
}
], - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "quantity": "150",
- "rate": "112",
- "subtype": "LINE_ITEM_SUB_TYPE_NONE",
- "taxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "taxRateId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}
], - "title": "sale",
- "total": "112"
}
], - "notes": "notes about transaction",
- "number": "4000",
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e",
- "resolution": {
- "amountDue": "1000",
- "dueDateTime": "2000-10-31T01:30:00.000-05:00",
- "enabledPaymentMethods": [
- "string"
], - "from": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}, - "payments": [
- {
- "accountId": "string",
- "amount": "string",
- "applicationFee": "string",
- "convenienceFee": "string",
- "currency": "string",
- "date": "2019-10-12",
- "dateTime": "2000-10-31T01:30:00.000-05:00",
- "id": "string",
- "notes": "string",
- "number": "string",
- "paymentServiceId": "string",
- "timezone": "string"
}
], - "reminders": {
- "estimate": {
- "expiring": {
- "customMessage": "string",
- "enabled": true
}
}, - "invoice": {
- "due": {
- "customMessage": "string",
- "enabled": true
}, - "overdue": {
- "customMessage": "string",
- "enabled": true
}
}
}, - "status": "TRANSACTION_RESOLUTION_STATUS_OVERDUE",
- "templateVariables": {
- "color": "string",
- "id": 0
}, - "to": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}
], - "voidReason": "Voiding this invoice",
- "wasViewed": true
}, - "source": "plaid",
- "sourceId": "plaid-123",
- "sourceType": "TRANSACTION_SOURCE_TYPE_BANK_FEED",
- "timezone": "America/New_York",
- "transfer": {
- "transferAccountId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}, - "type": "TRANSACTION_TYPE_INCOME",
- "updatedAt": "2019-10-12T07:20:50.52Z"
}
]
}
Updates one or more estimate, for example to note that the target client has accepted it.
Authorization | string Example: Bearer foo |
Estimates to update
businessId required | string |
required | Array of objects (ledgerpb.Transaction) |
{- "businessId": "string",
- "transactions": [
- {
- "accountId": "18bbd7e3-93df-4ff9-8ba7-15e937ea0b96",
- "adjustment": {
- "adjustments": [
- {
- "accountId": "string",
- "amount": "string",
- "id": "string"
}
]
}, - "amount": "1000",
- "attachments": [
- {
- "content": "string",
- "contentLength": 0,
- "filename": "string",
- "id": "string",
- "mimeType": "string",
- "namespace": "string",
- "url": "string"
}
], - "businessId": "string",
- "contact": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string"
}, - "currency": "USD",
- "date": "2019-10-12",
- "dateTime": "2019-10-12T15:30:00.000Z",
- "expense": {
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e"
}, - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "items": [
- {
- "accountId": "0289dd65-c982-43c5-b7d3-6a6871865685",
- "additionalDetails": "additional details about line item",
- "category": "ACCOUNT_CATEGORY_INSURANCE",
- "customTaxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "total": "112"
}
], - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "quantity": "150",
- "rate": "112",
- "subtype": "LINE_ITEM_SUB_TYPE_NONE",
- "taxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "taxRateId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}
], - "title": "sale",
- "total": "112"
}
], - "notes": "notes about transaction",
- "number": "4000",
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e",
- "resolution": {
- "amountDue": "1000",
- "dueDateTime": "2000-10-31T01:30:00.000-05:00",
- "enabledPaymentMethods": [
- "string"
], - "from": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}, - "payments": [
- {
- "accountId": "string",
- "amount": "string",
- "applicationFee": "string",
- "convenienceFee": "string",
- "currency": "string",
- "date": "2019-10-12",
- "dateTime": "2000-10-31T01:30:00.000-05:00",
- "id": "string",
- "notes": "string",
- "number": "string",
- "paymentServiceId": "string",
- "timezone": "string"
}
], - "reminders": {
- "estimate": {
- "expiring": {
- "customMessage": "string",
- "enabled": true
}
}, - "invoice": {
- "due": {
- "customMessage": "string",
- "enabled": true
}, - "overdue": {
- "customMessage": "string",
- "enabled": true
}
}
}, - "status": "TRANSACTION_RESOLUTION_STATUS_OVERDUE",
- "templateVariables": {
- "color": "string",
- "id": 0
}, - "to": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}
], - "voidReason": "Voiding this invoice",
- "wasViewed": true
}, - "source": "plaid",
- "sourceId": "plaid-123",
- "sourceType": "TRANSACTION_SOURCE_TYPE_BANK_FEED",
- "timezone": "America/New_York",
- "transfer": {
- "transferAccountId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}, - "type": "TRANSACTION_TYPE_INCOME",
- "updatedAt": "2019-10-12T07:20:50.52Z"
}
]
}
{- "transactions": [
- {
- "accountId": "18bbd7e3-93df-4ff9-8ba7-15e937ea0b96",
- "adjustment": {
- "adjustments": [
- {
- "accountId": "string",
- "amount": "string",
- "id": "string"
}
]
}, - "amount": "1000",
- "attachments": [
- {
- "content": "string",
- "contentLength": 0,
- "filename": "string",
- "id": "string",
- "mimeType": "string",
- "namespace": "string",
- "url": "string"
}
], - "businessId": "string",
- "contact": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string"
}, - "currency": "USD",
- "date": "2019-10-12",
- "dateTime": "2019-10-12T15:30:00.000Z",
- "expense": {
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e"
}, - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "items": [
- {
- "accountId": "0289dd65-c982-43c5-b7d3-6a6871865685",
- "additionalDetails": "additional details about line item",
- "category": "ACCOUNT_CATEGORY_INSURANCE",
- "customTaxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "total": "112"
}
], - "id": "815b81c1-1650-4750-95b4-c6933e6df705",
- "quantity": "150",
- "rate": "112",
- "subtype": "LINE_ITEM_SUB_TYPE_NONE",
- "taxes": [
- {
- "taxId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "taxRateId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}
], - "title": "sale",
- "total": "112"
}
], - "notes": "notes about transaction",
- "number": "4000",
- "paymentMethodId": "9a371680-620f-44fa-8e29-be1c1891104e",
- "resolution": {
- "amountDue": "1000",
- "dueDateTime": "2000-10-31T01:30:00.000-05:00",
- "enabledPaymentMethods": [
- "string"
], - "from": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}, - "payments": [
- {
- "accountId": "string",
- "amount": "string",
- "applicationFee": "string",
- "convenienceFee": "string",
- "currency": "string",
- "date": "2019-10-12",
- "dateTime": "2000-10-31T01:30:00.000-05:00",
- "id": "string",
- "notes": "string",
- "number": "string",
- "paymentServiceId": "string",
- "timezone": "string"
}
], - "reminders": {
- "estimate": {
- "expiring": {
- "customMessage": "string",
- "enabled": true
}
}, - "invoice": {
- "due": {
- "customMessage": "string",
- "enabled": true
}, - "overdue": {
- "customMessage": "string",
- "enabled": true
}
}
}, - "status": "TRANSACTION_RESOLUTION_STATUS_OVERDUE",
- "templateVariables": {
- "color": "string",
- "id": 0
}, - "to": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "archived": true,
- "bankStatus": "string",
- "businessId": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string",
- "userId": "string"
}
], - "voidReason": "Voiding this invoice",
- "wasViewed": true
}, - "source": "plaid",
- "sourceId": "plaid-123",
- "sourceType": "TRANSACTION_SOURCE_TYPE_BANK_FEED",
- "timezone": "America/New_York",
- "transfer": {
- "transferAccountId": "0289dd65-c982-43c5-b7d3-6a6871865685"
}, - "type": "TRANSACTION_TYPE_INCOME",
- "updatedAt": "2019-10-12T07:20:50.52Z"
}
]
}
Deletes an invoice for a user. This is only available for draft invoices. Invoices sent to clients cannot be deleted.
Authorization | string Example: Bearer foo |
Draft Invoice object to be deleted
businessId | string |
id | string |
userId | string |
{- "businessId": "string",
- "id": "string",
- "userId": "string"
}
{ }
Retrieves one or more invoices, either by user id, or by a comma separated list of invoice ids.
id | string ID(s) of invoices, separated by commas |
businessId | string Business ID to get invoices for |
userId | string User ID to get invoices for |
verifypayment | boolean set to indicate that a client is viewing the invoice |
viewing | boolean set to indicate that a client is viewing the invoice |
status | string comma separated list of invoice statuses to filter by |
Authorization | string Example: Bearer foo |
{- "invoice": [
- {
- "amountPaid": "string",
- "created": "2019-10-12T07:20:50.52Z",
- "currency": "string",
- "discountAmount": "string",
- "discountTotal": "string",
- "discountType": "string",
- "due": "2019-10-12T07:20:50.52Z",
- "from": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "name": "string",
- "phone": "string"
}, - "id": "string",
- "isSubscribed": "string",
- "items": [
- {
- "accountId": "string",
- "additionalDetails": "string",
- "category": "string",
- "id": "string",
- "itemTotal": 0,
- "quantity": "string",
- "rate": "string",
- "taxes": [
- {
- "businessId": "string",
- "description": "string",
- "id": "string",
- "name": "string",
- "rate": "string",
- "taxTotal": 0,
- "userId": "string"
}
], - "title": "string"
}
], - "logo": "string",
- "notes": "string",
- "number": "string",
- "paymentMethods": [
- {
- "accepted": true,
- "capability": "string",
- "name": "string",
- "recipientFee": "string",
- "recipientPaysFee": true,
- "serviceFee": "string",
- "status": "string",
- "type": "string"
}
], - "sent": "2019-10-12T07:20:50.52Z",
- "shipping": "string",
- "status": "string",
- "subtotal": "string",
- "taxTotal": "string",
- "template": {
- "color": "string",
- "estimate": {
- "id": "string",
- "version": 0
}, - "invoice": {
- "id": "string",
- "version": 0
}, - "receipt": {
- "id": "string",
- "version": 0
}, - "themeSvg": "string"
}, - "timeZone": "string",
- "to": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string"
}
], - "total": "string",
- "transactions": [
- {
- "amount": 0,
- "applicationFee": 0,
- "convenienceFee": 0,
- "createdAt": {
- "nanos": 0,
- "seconds": 0
}, - "currency": "string",
- "customerId": "string",
- "id": "string",
- "paymentMethod": {
- "name": "string",
- "type": "string"
}, - "source": "string"
}
], - "updated": "2019-10-12T07:20:50.52Z",
- "voidReason": "string"
}
]
}
Creates an invoice for a user.
Authorization | string Example: Bearer foo |
CreateInvoiceRequest
businessId | string |
businessName | string |
estimateId | string |
object (serverpb.Invoice) | |
userId | string |
{- "businessId": "string",
- "businessName": "string",
- "estimateId": "string",
- "invoice": {
- "amountPaid": "string",
- "created": "2019-10-12T07:20:50.52Z",
- "currency": "string",
- "discountAmount": "string",
- "discountTotal": "string",
- "discountType": "string",
- "due": "2019-10-12T07:20:50.52Z",
- "from": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "name": "string",
- "phone": "string"
}, - "id": "string",
- "isSubscribed": "string",
- "items": [
- {
- "accountId": "string",
- "additionalDetails": "string",
- "category": "string",
- "id": "string",
- "itemTotal": 0,
- "quantity": "string",
- "rate": "string",
- "taxes": [
- {
- "businessId": "string",
- "description": "string",
- "id": "string",
- "name": "string",
- "rate": "string",
- "taxTotal": 0,
- "userId": "string"
}
], - "title": "string"
}
], - "logo": "string",
- "notes": "string",
- "number": "string",
- "paymentMethods": [
- {
- "accepted": true,
- "capability": "string",
- "name": "string",
- "recipientFee": "string",
- "recipientPaysFee": true,
- "serviceFee": "string",
- "status": "string",
- "type": "string"
}
], - "sent": "2019-10-12T07:20:50.52Z",
- "shipping": "string",
- "status": "string",
- "subtotal": "string",
- "taxTotal": "string",
- "template": {
- "color": "string",
- "estimate": {
- "id": "string",
- "version": 0
}, - "invoice": {
- "id": "string",
- "version": 0
}, - "receipt": {
- "id": "string",
- "version": 0
}, - "themeSvg": "string"
}, - "timeZone": "string",
- "to": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string"
}
], - "total": "string",
- "transactions": [
- {
- "amount": 0,
- "applicationFee": 0,
- "convenienceFee": 0,
- "createdAt": {
- "nanos": 0,
- "seconds": 0
}, - "currency": "string",
- "customerId": "string",
- "id": "string",
- "paymentMethod": {
- "name": "string",
- "type": "string"
}, - "source": "string"
}
], - "updated": "2019-10-12T07:20:50.52Z",
- "voidReason": "string"
}, - "userId": "string"
}
{- "invoice": {
- "amountPaid": "string",
- "created": "2019-10-12T07:20:50.52Z",
- "currency": "string",
- "discountAmount": "string",
- "discountTotal": "string",
- "discountType": "string",
- "due": "2019-10-12T07:20:50.52Z",
- "from": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "name": "string",
- "phone": "string"
}, - "id": "string",
- "isSubscribed": "string",
- "items": [
- {
- "accountId": "string",
- "additionalDetails": "string",
- "category": "string",
- "id": "string",
- "itemTotal": 0,
- "quantity": "string",
- "rate": "string",
- "taxes": [
- {
- "businessId": "string",
- "description": "string",
- "id": "string",
- "name": "string",
- "rate": "string",
- "taxTotal": 0,
- "userId": "string"
}
], - "title": "string"
}
], - "logo": "string",
- "notes": "string",
- "number": "string",
- "paymentMethods": [
- {
- "accepted": true,
- "capability": "string",
- "name": "string",
- "recipientFee": "string",
- "recipientPaysFee": true,
- "serviceFee": "string",
- "status": "string",
- "type": "string"
}
], - "sent": "2019-10-12T07:20:50.52Z",
- "shipping": "string",
- "status": "string",
- "subtotal": "string",
- "taxTotal": "string",
- "template": {
- "color": "string",
- "estimate": {
- "id": "string",
- "version": 0
}, - "invoice": {
- "id": "string",
- "version": 0
}, - "receipt": {
- "id": "string",
- "version": 0
}, - "themeSvg": "string"
}, - "timeZone": "string",
- "to": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string"
}
], - "total": "string",
- "transactions": [
- {
- "amount": 0,
- "applicationFee": 0,
- "convenienceFee": 0,
- "createdAt": {
- "nanos": 0,
- "seconds": 0
}, - "currency": "string",
- "customerId": "string",
- "id": "string",
- "paymentMethod": {
- "name": "string",
- "type": "string"
}, - "source": "string"
}
], - "updated": "2019-10-12T07:20:50.52Z",
- "voidReason": "string"
}
}
Updates an existing invoice for a user.
Authorization | string Example: Bearer foo |
InvoiceUpdatedRequest
businessId | string |
businessName | string |
Array of objects (serverpb.Invoice) | |
userId | string |
{- "businessId": "string",
- "businessName": "string",
- "invoice": [
- {
- "amountPaid": "string",
- "created": "2019-10-12T07:20:50.52Z",
- "currency": "string",
- "discountAmount": "string",
- "discountTotal": "string",
- "discountType": "string",
- "due": "2019-10-12T07:20:50.52Z",
- "from": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "name": "string",
- "phone": "string"
}, - "id": "string",
- "isSubscribed": "string",
- "items": [
- {
- "accountId": "string",
- "additionalDetails": "string",
- "category": "string",
- "id": "string",
- "itemTotal": 0,
- "quantity": "string",
- "rate": "string",
- "taxes": [
- {
- "businessId": "string",
- "description": "string",
- "id": "string",
- "name": "string",
- "rate": "string",
- "taxTotal": 0,
- "userId": "string"
}
], - "title": "string"
}
], - "logo": "string",
- "notes": "string",
- "number": "string",
- "paymentMethods": [
- {
- "accepted": true,
- "capability": "string",
- "name": "string",
- "recipientFee": "string",
- "recipientPaysFee": true,
- "serviceFee": "string",
- "status": "string",
- "type": "string"
}
], - "sent": "2019-10-12T07:20:50.52Z",
- "shipping": "string",
- "status": "string",
- "subtotal": "string",
- "taxTotal": "string",
- "template": {
- "color": "string",
- "estimate": {
- "id": "string",
- "version": 0
}, - "invoice": {
- "id": "string",
- "version": 0
}, - "receipt": {
- "id": "string",
- "version": 0
}, - "themeSvg": "string"
}, - "timeZone": "string",
- "to": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string"
}
], - "total": "string",
- "transactions": [
- {
- "amount": 0,
- "applicationFee": 0,
- "convenienceFee": 0,
- "createdAt": {
- "nanos": 0,
- "seconds": 0
}, - "currency": "string",
- "customerId": "string",
- "id": "string",
- "paymentMethod": {
- "name": "string",
- "type": "string"
}, - "source": "string"
}
], - "updated": "2019-10-12T07:20:50.52Z",
- "voidReason": "string"
}
], - "userId": "string"
}
{- "invoice": [
- {
- "amountPaid": "string",
- "created": "2019-10-12T07:20:50.52Z",
- "currency": "string",
- "discountAmount": "string",
- "discountTotal": "string",
- "discountType": "string",
- "due": "2019-10-12T07:20:50.52Z",
- "from": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "name": "string",
- "phone": "string"
}, - "id": "string",
- "isSubscribed": "string",
- "items": [
- {
- "accountId": "string",
- "additionalDetails": "string",
- "category": "string",
- "id": "string",
- "itemTotal": 0,
- "quantity": "string",
- "rate": "string",
- "taxes": [
- {
- "businessId": "string",
- "description": "string",
- "id": "string",
- "name": "string",
- "rate": "string",
- "taxTotal": 0,
- "userId": "string"
}
], - "title": "string"
}
], - "logo": "string",
- "notes": "string",
- "number": "string",
- "paymentMethods": [
- {
- "accepted": true,
- "capability": "string",
- "name": "string",
- "recipientFee": "string",
- "recipientPaysFee": true,
- "serviceFee": "string",
- "status": "string",
- "type": "string"
}
], - "sent": "2019-10-12T07:20:50.52Z",
- "shipping": "string",
- "status": "string",
- "subtotal": "string",
- "taxTotal": "string",
- "template": {
- "color": "string",
- "estimate": {
- "id": "string",
- "version": 0
}, - "invoice": {
- "id": "string",
- "version": 0
}, - "receipt": {
- "id": "string",
- "version": 0
}, - "themeSvg": "string"
}, - "timeZone": "string",
- "to": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string"
}
], - "total": "string",
- "transactions": [
- {
- "amount": 0,
- "applicationFee": 0,
- "convenienceFee": 0,
- "createdAt": {
- "nanos": 0,
- "seconds": 0
}, - "currency": "string",
- "customerId": "string",
- "id": "string",
- "paymentMethod": {
- "name": "string",
- "type": "string"
}, - "source": "string"
}
], - "updated": "2019-10-12T07:20:50.52Z",
- "voidReason": "string"
}
]
}
Allows a user to preview what an invoice and invoice email will look like before creating an actual invoice. The invoice is not saved and is not real yet, but the user can see what it will look like.
Authorization | string Example: Bearer foo |
Invoice Preview Request
businessId | string |
object (serverpb.Invoice) | |
previewEmail required | string |
userId | string |
{- "businessId": "string",
- "invoice": {
- "amountPaid": "string",
- "created": "2019-10-12T07:20:50.52Z",
- "currency": "string",
- "discountAmount": "string",
- "discountTotal": "string",
- "discountType": "string",
- "due": "2019-10-12T07:20:50.52Z",
- "from": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "name": "string",
- "phone": "string"
}, - "id": "string",
- "isSubscribed": "string",
- "items": [
- {
- "accountId": "string",
- "additionalDetails": "string",
- "category": "string",
- "id": "string",
- "itemTotal": 0,
- "quantity": "string",
- "rate": "string",
- "taxes": [
- {
- "businessId": "string",
- "description": "string",
- "id": "string",
- "name": "string",
- "rate": "string",
- "taxTotal": 0,
- "userId": "string"
}
], - "title": "string"
}
], - "logo": "string",
- "notes": "string",
- "number": "string",
- "paymentMethods": [
- {
- "accepted": true,
- "capability": "string",
- "name": "string",
- "recipientFee": "string",
- "recipientPaysFee": true,
- "serviceFee": "string",
- "status": "string",
- "type": "string"
}
], - "sent": "2019-10-12T07:20:50.52Z",
- "shipping": "string",
- "status": "string",
- "subtotal": "string",
- "taxTotal": "string",
- "template": {
- "color": "string",
- "estimate": {
- "id": "string",
- "version": 0
}, - "invoice": {
- "id": "string",
- "version": 0
}, - "receipt": {
- "id": "string",
- "version": 0
}, - "themeSvg": "string"
}, - "timeZone": "string",
- "to": [
- {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "bankStatus": "string",
- "businessNumber": "string",
- "email": "string",
- "id": "string",
- "name": "string",
- "phone": "string"
}
], - "total": "string",
- "transactions": [
- {
- "amount": 0,
- "applicationFee": 0,
- "convenienceFee": 0,
- "createdAt": {
- "nanos": 0,
- "seconds": 0
}, - "currency": "string",
- "customerId": "string",
- "id": "string",
- "paymentMethod": {
- "name": "string",
- "type": "string"
}, - "source": "string"
}
], - "updated": "2019-10-12T07:20:50.52Z",
- "voidReason": "string"
}, - "previewEmail": "string",
- "userId": "string"
}
{- "url": "string"
}
Endpoints for managing taxes for TS Invoicing businesses. These taxes are specific to that application and not shared with the ledger.
Authorization | string Example: Bearer foo |
Tax object to be deleted
businessId | string |
id required | string |
userId | string |
{- "businessId": "string",
- "id": "string",
- "userId": "string"
}
{ }
id | string Ids of taxes to get |
businessId | string Business ID to get taxes for |
userId | string User ID to get taxes for |
search | string Search transactions using meilisearch |
Authorization | string Example: Bearer foo |
{- "taxes": [
- {
- "businessId": "string",
- "description": "string",
- "id": "string",
- "name": "string",
- "rate": "string",
- "taxTotal": 0,
- "userId": "string"
}
]
}
Creates a TSI tax for a business or user to use for estimates and invoices.
Authorization | string Example: Bearer foo |
Tax object to be added
required | Array of objects (serverpb.Tax) |
{- "tax": [
- {
- "businessId": "string",
- "description": "string",
- "id": "string",
- "name": "string",
- "rate": "string",
- "taxTotal": 0,
- "userId": "string"
}
]
}
{- "tax": [
- {
- "businessId": "string",
- "description": "string",
- "id": "string",
- "name": "string",
- "rate": "string",
- "taxTotal": 0,
- "userId": "string"
}
]
}
Authorization | string Example: Bearer foo |
Tax object to be modified
required | object (serverpb.Tax) |
{- "tax": {
- "businessId": "string",
- "description": "string",
- "id": "string",
- "name": "string",
- "rate": "string",
- "taxTotal": 0,
- "userId": "string"
}
}
{- "tax": {
- "businessId": "string",
- "description": "string",
- "id": "string",
- "name": "string",
- "rate": "string",
- "taxTotal": 0,
- "userId": "string"
}
}
Authorization required | string Example: Bearer foo |
DocumentSetting object to be deleted
businessId | string The id of the business to delete settings for |
id | string |
userId | string The id of the user to delete settings for |
{- "businessId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "id": "string",
- "userId": "815b81c1-1650-4750-95b4-c6933e6df705"
}
{ }
id | string ID(s) |
businessId | string Business ID |
userId | string User ID |
Authorization required | string Example: Bearer foo |
{- "documentSettings": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "attachment": {
- "content": "string",
- "contentLength": 0,
- "filename": "string",
- "id": "string",
- "mimeType": "string",
- "namespace": "string",
- "url": "string"
}, - "businessNumber": "string",
- "currencyCode": "string",
- "email": "string",
- "fullName": "string",
- "id": "string",
- "logo": "string",
- "name": "string",
- "phone": "string",
- "resolution": {
- "reminders": {
- "estimate": {
- "expiring": {
- "customMessage": "string",
- "enabled": true
}
}, - "invoice": {
- "due": {
- "customMessage": "string",
- "enabled": true
}, - "overdue": {
- "customMessage": "string",
- "enabled": true
}
}
}, - "templateVariables": {
- "color": "string",
- "id": 0
}
}
}
}
These are the default settings used to populate new invoices in TSI.
Authorization required | string Example: Bearer foo |
DocumentSetting object to be added
businessId | string The id of the business that the settings belong to |
object (serverpb.DocumentSettings) | |
userId | string The id of the user that the settings belong to |
{- "businessId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "documentSettings": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "attachment": {
- "content": "string",
- "contentLength": 0,
- "filename": "string",
- "id": "string",
- "mimeType": "string",
- "namespace": "string",
- "url": "string"
}, - "businessNumber": "string",
- "currencyCode": "string",
- "email": "string",
- "fullName": "string",
- "id": "string",
- "logo": "string",
- "name": "string",
- "phone": "string",
- "resolution": {
- "reminders": {
- "estimate": {
- "expiring": {
- "customMessage": "string",
- "enabled": true
}
}, - "invoice": {
- "due": {
- "customMessage": "string",
- "enabled": true
}, - "overdue": {
- "customMessage": "string",
- "enabled": true
}
}
}, - "templateVariables": {
- "color": "string",
- "id": 0
}
}
}, - "userId": "815b81c1-1650-4750-95b4-c6933e6df705"
}
{- "documentSettings": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "attachment": {
- "content": "string",
- "contentLength": 0,
- "filename": "string",
- "id": "string",
- "mimeType": "string",
- "namespace": "string",
- "url": "string"
}, - "businessNumber": "string",
- "currencyCode": "string",
- "email": "string",
- "fullName": "string",
- "id": "string",
- "logo": "string",
- "name": "string",
- "phone": "string",
- "resolution": {
- "reminders": {
- "estimate": {
- "expiring": {
- "customMessage": "string",
- "enabled": true
}
}, - "invoice": {
- "due": {
- "customMessage": "string",
- "enabled": true
}, - "overdue": {
- "customMessage": "string",
- "enabled": true
}
}
}, - "templateVariables": {
- "color": "string",
- "id": 0
}
}
}
}
Authorization required | string Example: Bearer foo |
DocumentSetting object to be modified
businessId | string The id of the business to update the settings for |
object (serverpb.DocumentSettings) | |
userId | string The id of the user to update the settings for |
{- "businessId": "815b81c1-1650-4750-95b4-c6933e6df705",
- "documentSettings": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "attachment": {
- "content": "string",
- "contentLength": 0,
- "filename": "string",
- "id": "string",
- "mimeType": "string",
- "namespace": "string",
- "url": "string"
}, - "businessNumber": "string",
- "currencyCode": "string",
- "email": "string",
- "fullName": "string",
- "id": "string",
- "logo": "string",
- "name": "string",
- "phone": "string",
- "resolution": {
- "reminders": {
- "estimate": {
- "expiring": {
- "customMessage": "string",
- "enabled": true
}
}, - "invoice": {
- "due": {
- "customMessage": "string",
- "enabled": true
}, - "overdue": {
- "customMessage": "string",
- "enabled": true
}
}
}, - "templateVariables": {
- "color": "string",
- "id": 0
}
}
}, - "userId": "815b81c1-1650-4750-95b4-c6933e6df705"
}
{- "documentSettings": {
- "address": {
- "city": "string",
- "country": "string",
- "line1": "string",
- "line2": "string",
- "postalCode": "string",
- "province": "string"
}, - "attachment": {
- "content": "string",
- "contentLength": 0,
- "filename": "string",
- "id": "string",
- "mimeType": "string",
- "namespace": "string",
- "url": "string"
}, - "businessNumber": "string",
- "currencyCode": "string",
- "email": "string",
- "fullName": "string",
- "id": "string",
- "logo": "string",
- "name": "string",
- "phone": "string",
- "resolution": {
- "reminders": {
- "estimate": {
- "expiring": {
- "customMessage": "string",
- "enabled": true
}
}, - "invoice": {
- "due": {
- "customMessage": "string",
- "enabled": true
}, - "overdue": {
- "customMessage": "string",
- "enabled": true
}
}
}, - "templateVariables": {
- "color": "string",
- "id": 0
}
}
}
}
This endpoint is used to indicate that the user has hit the marketing paywall. This allows the backend to track the event.
email and last invoice id
string | |
os | string |
{- "email": "string",
- "os": "string"
}
{ }
This endpoint is used to remove the FCM token for mobile push notifications. Once removed, the user will no longer receive push notifications.
Authorization | string Example: Bearer foo |
Delete FCM token request
sandbox | boolean |
token | string |
userId | string |
{- "sandbox": true,
- "token": "string",
- "userId": "string"
}
{ }
This endpoint is used to store the FCM token for mobile push notifications. Once stored, the user will receive push notifications for invoices and other events.
Authorization | string Example: Bearer foo |
Add FCM token request
sandbox | boolean |
token | string |
userId | string |
{- "sandbox": true,
- "token": "string",
- "userId": "string"
}
{ }
Websocket used for receiving notifications about a business. Currently only used by TSI on both web and mobile. Allows the client to receive notifications about subscriptions, invoices, and so on.
Opens a websocket that subscribes to subscription, payment, estimate, and invoice notifications. Use topics 'subscription', 'estimate', 'invoice', and 'payment' to subscribe to the different streams. The websocket protocol should be a comma separated value with three properties: application enum, business id, and the user's auth token. The client app needs to ACK each message with the msgID.
Sec-WebSocket-Protocol required | string Protocol. Includes the app, business id, and auth token |
WsRequest
msgId | string |
topic | string |
userId | string |
{- "msgId": "string",
- "topic": "string",
- "userId": "string"
}
{- "data": { },
- "msgId": "string",
- "type": "string"
}
Used to set all the feature toggles that should be enabled on the environment.
Authorization required | string Example: Bearer foo |
Toggles to enable
toggles | Array of strings |
{- "toggles": [
- "string"
]
}
{- "code": 0,
- "detail": "string",
- "id": "string",
- "status": "string"
}