SoftLedger Accounting API v2

Download OpenAPI specification:Download

Introduction

Below is an overview of our REST API, including endpoints related to our general ledger and other components of SoftLedger's accounting software.

Endpoints

SoftLedger has the following endpoints.

Site Endpoint
Production https://api.softledger.com/v2
Europe https://eu-api.softledger.com/v2

Access to the Accounting API

Please contact support@softledger.com to request access to the API.

Version 1

Previous versions documentation of the API are available at the linke below

APIv1 Docs are available here

Note that these docs are deprecated and will reach end of life on April 30th, 2024.

Authentication

OAuth v2.0

SoftLedger API uses OAuth2.0 to access it's API. For any request to the API, you'll need to pass a JWT.

Authorization

Prior to making any API request you'll need to request an OAuth token.

After you receive a token, add the following headers to every subsequent request:

{
  "Authorization": "Bearer {access_token}",
  "Content-Type": "application/json"
}

Request Token

Request OAuth Token

  • URL for this request should be https://auth.accounting-auth.com/oauth/token for Production
  • URL for this request should be https://eu.accounting-auth.com/oauth/token for Europe
Request Body schema: application/json
required
grant_type
required
string

The OAuth grant type used to generate the toekn.

  • Should be set to client_credentials
audience
required
string

API reference. This will be provided along with your client_id and client_secret.

tenantUUID
required
string

The Tenant UUID to request data for

client_id
required
string

The Client ID of the OAuth client

client_secret
required
string

The Client Secret of the OAuth client

Responses

Request samples

Content type
application/json
{
  • "grant_type": "string",
  • "tenantUUID": "string",
  • "audience": "string",
  • "client_id": "string",
  • "client_secret": "string"
}

Response samples

Content type
application/json
{
  • "access_token": "string",
  • "expires_in": 0,
  • "scope": "string"
}

Auditing

Actions performed by the api will have their audit logs labelled with the name of the api key generated by the SoftLedger team.

Performing requests on behalf of users / Labeling audit log entries

If you would like to use an alternate label, or perform actions on behalf of a user, you can pass the x-softledger-auditlabel header with the email of a user or a string label. This label will then be used in the audit log entry.

  • The audit entry will still retain information to know that this was an API request and not performed directly by a user in the SoftLedger UI.
  • This header is ignored for tokens generated by a user initiated OAuth flow.

Rate Limiting

Requests to the SoftLedger API are rate limited to 200 requests per minute.

A rate limited request will return a HTTP Status of 429.

Every request to the API will return the following headers:

X-RateLimit-Remaining: String<integer> - The number of api requests left during the interval.

X-RateLimit-RetryAfter: String<integer> - The number of seconds remaining until the next interval.

Request and Responses

Pagination

The query paramaters for most GET requests limit and cursor allow pagination through large sets of data.

By default limit is set to 25

In order to page forward set the cursor query param to the cursor value returned in the previous requests response data.

Filtering

Building the filter statement

The query parameter filter and filterType for most GET endpoints allows you to filter on the requested data.

The filter paramater should be a JSON.stringified key: value object.

The filterType should be one of all or any. It defaults to all. If set to all all results that match ALL filters are returned. If set to any all restults that match ANY filters are returned.

For example, if we wanted to get all Invoices that were paid, the where clause would be:

{
  "status": {
    "equals": "paid"
  }
}

This would then be stringified prior to attaching in the URL

let tmp = JSON.stringify({
  status: {
    equals: "paid"
  }
});

Then the request URL would look as follows

https://api.softledger.com/api/invoices?filter=tmp&filterType=any

Available Filter Options

Key Description
equals Exactly equals
contains Column contains. *String values only
not Does not equal
gt Greater than
gte Greater than or equal to
lt Less than
lte Less than or equal to
in Column is exactly any of the passed columns. Its value should be an array of values

Example

Get all created or approved bills posted after "2020-01-01"

{
  "status": {
    "in": ["created", "approved"]
  },
  "postingDate": {
    "gt": "2020-01-01"
  }
}

Errors

Successful API request responses will be described inline throughout the document 401,403,404 Messages will not contain a body as the error is implied. Other 4xx error codes will return as following:

{
  error: "Error Message"
}

Webhooks

Webhooks

Webhooks allow you to subscribe to events that happen in SoftLedger. When one of those events is triggered, we'll send an HTTP POST payload to the webhook's configured URL. Webhooks are sent with an 'at-least' once method. We recommend utilizing the uuid field to ensure that you do not process the same webhook multiple times.

Webhook endpoints should be respond immediately with a http 200 status code. The system that receives the webhook should then process the webhook asynchronously and not wait for its work to complete prior to responding to the webhook request. If the endpoint is slow to respond or returns a non 200 status code, the webhook endpoint will be blacklisted by SoftLedger. Please contact support@softledger.com to resolve the issue if this occurs.

Webhook Payload

The webhook payload will be sent as a JSON object with the following structure:

{
  "uuid": "Unique identifier for the webhook",
  "date": "ISO timestamp for when the webhook was triggered",
  "tenantId": "The tenantUUID that triggered the webhook",
  "objectType": "The type of object that triggered the webhook",
  "objectId": "The _id of the object that triggered the webhook",
  "action": "The action that triggered the webhook",
}

What webhooks are sent?

Each endpoint below specifies what webhooks are sent for each request. The list will contain the objectType and action that will be sent in the webhook payload.

Search

Returns a list of webhooks in ascending order by uri

query Parameters
cursor
string

Cursor key to page forwards from. Must be populated from the result of a previous query call.

limit
integer [ 1 .. 1000 ]
Default: 25

Maximum number of records to return.

Responses

Response samples

Content type
application/json
{
  • "hasNextPage": true,
  • "cursor": "string",
  • "data": [
    ]
}

Create

creates a new webhook

Request Body schema: application/json

JSON body to create new Webhook

uri
required
string

Responses

Request samples

Content type
application/json
{
  • "uri": "string"
}

Response samples

Content type
application/json
{
  • "_id": 0,
  • "uri": "string",
  • "createdAt": "2019-08-24T14:15:22Z"
}

Delete

Delete one Webhook

path Parameters
id
required
string

Webhook Id

Responses

Addresses

Search

Field Filterable Sortable
_id
label
line1
line2
city
state
zip
country
isDefault
isVerified
createdAt
updatedAt
CustomerId
VendorId
Customer.name
Vendor.name
query Parameters
filter
string

JSON Key:Value object to filter results on

filterType
string
Default: "all"
Enum: "all" "any"

Results will match "all" filters or just "any" of the passed filters

cursor
string

Cursor key to page forwards from. Must be populated from the result of a previous query call.

limit
integer [ 1 .. 1000 ]
Default: 25

Maximum number of records to return.

order
string
Default: "label:ASC"

Order to return results in. ex "date:desc"

Responses

Response samples

Content type
application/json
{
  • "hasNextPage": true,
  • "cursor": "string",
  • "data": [
    ]
}

Create

Creates a new address

Webhooks

Address CREATE
Request Body schema: application/json

JSON body to create new Address

Only one of [CustomerId, VendorId, Customer.name, Vendor.name] can be set

label
required
string
line1
string
line2
string
city
string
state
string
zip
string
country
string
isDefault
boolean

Set this as the default address for the Customer or Vendor

CustomerId
integer

Ref: Customer._id

VendorId
integer

Ref: Vendor._id

object
object

Responses

Request samples

Content type
application/json
{
  • "label": "string",
  • "line1": "string",
  • "line2": "string",
  • "city": "string",
  • "state": "string",
  • "zip": "string",
  • "country": "string",
  • "isDefault": true,
  • "CustomerId": 0,
  • "VendorId": 0,
  • "Customer": {
    },
  • "Vendor": {
    }
}

Response samples

Content type
application/json
{
  • "_id": 0,
  • "label": "string",
  • "line1": "string",
  • "line2": "string",
  • "city": "string",
  • "state": "string",
  • "zip": "string",
  • "country": "string",
  • "isDefault": true,
  • "isVerified": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "CustomerId": 0,
  • "VendorId": 0
}

Delete

Delete one Address

Webhooks

Address DELETE
path Parameters
id
required
string

Address Id

Responses

Update

Update One Address

Webhooks

Address UPDATE
path Parameters
id
required
integer

Address Id

Request Body schema: application/json

JSON body containing key and values to update

label
string
line1
string
line2
string
city
string
state
string
zip
string
country
string
isDefault
boolean

Set this as the default address for the Customer or Vendor

CustomerId
integer

Ref: Customer._id

VendorId
integer

Ref: Vendor._id

object
object

Responses

Request samples

Content type
application/json
{
  • "label": "string",
  • "line1": "string",
  • "line2": "string",
  • "city": "string",
  • "state": "string",
  • "zip": "string",
  • "country": "string",
  • "isDefault": true,
  • "CustomerId": 0,
  • "VendorId": 0,
  • "Customer": {
    },
  • "Vendor": {
    }
}

Response samples

Content type
application/json
{
  • "_id": 0,
  • "label": "string",
  • "line1": "string",
  • "line2": "string",
  • "city": "string",
  • "state": "string",
  • "zip": "string",
  • "country": "string",
  • "isDefault": true,
  • "isVerified": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "CustomerId": 0,
  • "VendorId": 0
}

One

Get one Address

path Parameters
id
required
string

Address Id

Responses

Response samples

Content type
application/json
{
  • "_id": 0,
  • "label": "string",
  • "line1": "string",
  • "line2": "string",
  • "city": "string",
  • "state": "string",
  • "zip": "string",
  • "country": "string",
  • "isDefault": true,
  • "isVerified": true,
  • "CustomerId": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "VendorId": 0,
  • "Customer": {
    },
  • "Vendor": {
    }
}

Audit Logs

Search

Returns a list of audit logs in descending order by date

Field Filterable
_id
date
object
objectType
objectId
message
user
api
userType
userLabel
query Parameters
where
string

JSON Key:Value object to filter results on

cursor
string

Cursor key to page forwards from. Must be populated from the result of a previous query call.

limit
integer [ 1 .. 1000 ]
Default: 25

Maximum number of records to return.

Responses

Response samples

Content type
application/json
{
  • "hasNextPage": true,
  • "cursor": "string",
  • "data": [
    ]
}

Batch Payments

Search

Field Filterable Sortable
_id
status
referenceNumber
postedDate
paymentDate
currency
amount
LocationId
ClearingAccountId
CashAccountId
createdAt
updatedAt
query Parameters
filter
string

JSON Key:Value object to filter results on

filterType
string
Default: "all"
Enum: "all" "any"

Results will match "all" filters or just "any" of the passed filters

cursor
string

Cursor key to page forwards from. Must be populated from the result of a previous query call.

limit
integer [ 1 .. 1000 ]
Default: 25

Maximum number of records to return.

order
string
Default: "referenceNumber:DESC"

Order to return results in. ex "date:desc"

Responses

Response samples

Content type
application/json
{
  • "hasNextPage": true,
  • "cursor": "string",
  • "data": [
    ]
}

Create

creates a new Batch Payment

Request Body schema: application/json

JSON body to create new Batch Payment

Created batch payments will be created in created status unless the setting for Auto-Approve (AP) is enabled, then the status will be approved

Webhooks

BatchPayment CREATE
paymentDate
required
string <date>
referenceNumber
required
string
CashAccountId
required
integer

Ref: LedgerAccount._id

ClearingAccountId
required
integer

Ref: LedgerAccount._id

required
Array of objects

All bills require, "_id" and "amount". Bills must be from the same location and be in the same currency.

postedDate
string <date>
memo
string

Responses

Request samples

Content type
application/json
{
  • "paymentDate": "2019-08-24",
  • "postedDate": "2019-08-24",
  • "referenceNumber": "string",
  • "memo": "string",
  • "CashAccountId": 0,
  • "ClearingAccountId": 0,
  • "Bills": [
    ]
}

Response samples

Content type
application/json
{
  • "_id": 0,
  • "referenceNumber": "string",
  • "status": "created",
  • "amount": "string",
  • "paymentDate": "2019-08-24",
  • "postedDate": "2019-08-24",
  • "memo": "string",
  • "CashAccountId": 0,
  • "ClearingAccountId": 0,
  • "LocationId": 0,
  • "currency": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Approve

Approve batch payment

path Parameters
id
required
string

BatchPayment._id

Responses

Bills

This endpoint returns bills for the specified batch payment. The parameters of this endpoint are the same as for Bills Search

path Parameters
id
required
string

BatchPayment._id

Responses

Response samples

Content type
application/json
{
  • "hasNextPage": true,
  • "cursor": "string",
  • "data": [
    ]
}

Delete

Delete one Batch Payment

path Parameters
id
required
string

Batch Payment Id

Responses

One

Get one Batch Payment

path Parameters
id
required
string

BatchPayment._id

Responses

Response samples

Content type
application/json
{
  • "_id": 0,
  • "status": "created",
  • "referenceNumber": "string",
  • "postedDate": "2019-08-24",
  • "paymentDate": "2019-08-24",
  • "memo": "string",
  • "currency": "string",
  • "amount": "string",
  • "VendorIds": [
    ],
  • "LocationId": 0,
  • "Location": {
    },
  • "ClearingAccountId": 0,
  • "ClearingAccount": {
    },
  • "CashAccountId": 0,
  • "CashAccount": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "approved_on": "2019-08-24",
  • "approved_name": "string",
  • "approved_email": "user@example.com"
}

Void

Void Batch Payment

path Parameters
id
required
string

BatchPayment._id

Request Body schema: application/json

JSON body containing void details. Can only void a batch in "approved" status

description
string
voidDate
string <date>

Date of the void. Defaults to today. Must be today or earlier.

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "voidDate": "2019-08-24"
}

Bills

Search

Field Filterable Sortable
_id
number
externalId
description
invoiceDate
postedDate
dueDate
dueAmount
amount
VendorId
customFields
currency
LocationId
ICLocationId
status
PurchaseOrderId
APAccountId
SystemJobId
createdAt
updatedAt
query Parameters
filter
string

JSON Key:Value object to filter results on

filterType
string
Default: "all"
Enum: "all" "any"

Results will match "all" filters or just "any" of the passed filters

cursor
string

Cursor key to page forwards from. Must be populated from the result of a previous query call.

limit
integer [ 1 .. 1000 ]
Default: 25

Maximum number of records to return.

order
string
Default: "number:ASC"

Order to return results in. ex "date:desc"

Responses

Response samples

Content type
application/json
{
  • "hasNextPage": true,
  • "cursor": "string",
  • "data": [
    ]
}

Create

creates a new Bill

Request Body schema: application/json

JSON body to create new Bill

One of [Vendor.name, VendorId] is Required One of [Location.id, LocationId] is Required One of [APAccount.number, APAccountId] is Required

invoiceDate
required
string <date>
postingDate
required
string <date>
VendorId
required
integer

Ref: Vendor._id

LocationId
required
integer

Ref: Location._id

APAccountId
required
integer

Ref: LedgerAccount._id

currency
required
string <ISO4217 3 Char Code>
externalId
string
dueDate
string <date>
notes
string
attachments
Array of strings <uri> [ items <uri > ]

Links to any attached documents

description
string
customFields
object
Default: {}

Key -> Value hash of custom fields, must be defined via the UI to show up in the UI

object
ICLocationId
integer

Ref: Location._id

object
object
object
PurchaseOrderId
integer

Ref: PurchaseOrder._id

object
Array of objects

All lines require, "amount" and "quantity"

If an Item is passed, then this line will be considered an "item" type line,

  • Item lines will ignore "LedgerAccountId" and "LedgerAccount.number"

Otherwise it is a "description" type line, which requires

  • "description"
  • One of ["LedgerAccountId", "LedgerAccount.number"]

Tax Logic

  • If a TaxCode is passed it will be set.
  • If a taxAmount is passed it will be used as the tax amount for the line
  • If a TaxCode is set and taxAmount is not, then taxAmount will be set as:
    • taxAmount = (amount * quantity) * (TaxCode.rate / 100)

Responses

Request samples

Content type
application/json
{
  • "externalId": "string",
  • "invoiceDate": "2019-08-24",
  • "postingDate": "2019-08-24",
  • "dueDate": "2019-08-24",
  • "notes": "string",
  • "attachments": [],
  • "description": "string",
  • "currency": "string",
  • "customFields": { },
  • "LocationId": 0,
  • "Location": {
    },
  • "ICLocationId": 0,
  • "ICLocation": {
    },
  • "VendorId": 0,
  • "Vendor": {
    },
  • "APAccountId": 0,
  • "APAccount": {
    },
  • "PurchaseOrderId": 0,
  • "PurchaseOrder": {
    },
  • "BillLineItems": [
    ]
}

Response samples

Content type
application/json
{
  • "_id": 0,
  • "externalId": "string",
  • "invoiceNumber": "string",
  • "invoiceDate": "2019-08-24",
  • "postingDate": "2019-08-24",
  • "dueDate": "2019-08-24",
  • "notes": "string",
  • "description": "string",
  • "currency": "string",
  • "customFields": { },
  • "LocationId": 0,
  • "ICLocationId": 0,
  • "VendorId": 0,
  • "APAccountId": 0,
  • "PurchaseOrderId": 0,
  • "attachments": []
}

Line Search

Field Filterable Sortable
_id
idx
description
amount
quantity
taxAmount
createdAt
updatedAt
BillId
Bill.invoiceNumber
Bill.status
Bill.currency
Bill.description
Bill.invoiceDate
Bill.postingDate
Bill.dueDate
Bill.customFields
Bill.createdAt
Bill.updatedAt
Bill.VendorId
Bill.APAccountId
Bill.LocationId
Bill.ICLocationId
APAccount.number
BillAccount.number
LedgerAccountId
LedgerAccount.number
Vendor.name
Vendor.is1099
Location.name
ICLocation.name
TaxCodeId
TaxCode.code
ItemId
Item.name
Item.salePrice
Item.purchasePrice
Custom1Id
Custom2Id
Custom3Id
CostCenterId
CostCenter.id
ProductId
Product.id
JobId
Job.number
query Parameters
filter
string

JSON Key:Value object to filter results on

filterType
string
Default: "all"
Enum: "all" "any"

Results will match "all" filters or just "any" of the passed filters

cursor
string

Cursor key to page forwards from. Must be populated from the result of a previous query call.

limit
integer [ 1 .. 1000 ]
Default: 25

Maximum number of records to return.

order
string
Default: "Bill.invoiceNumber:ASC"

Order to return results in. ex "date:desc"

credit
boolean

Filter by credit status of the Bill. Operates as follows:

  • If 'credit' is false, lines from Bills that have 'Bill.amount' greater than or equal to zero will be returned
  • If 'credit' is true, lines from Bills that have 'Bill.amount' less than zero will be returned
  • If 'credit' is not provided, all lines will be returned

Responses

Response samples

Content type
application/json
{
  • "hasNextPage": true,
  • "cursor": "string",
  • "data": [
    ]
}

Approve

Approve Bill

path Parameters
id
required
string

Bill._id

Responses

Create Line

creates a new Bill Line

path Parameters
id
required
string

Bill._id

Request Body schema: application/json
amount
required
string <number>
quantity
required
string <number>
description
string

Required if ItemId is not set

taxAmount
string <number>
TaxCodeId
integer

Ref: TaxCode._id

object
ItemId
integer

Ref: Item._id

object
CostCenterId
integer

Ref: Cost Center._id

object
JobId
integer

Ref: Job._id

object
ProductId
integer

Ref: Product._id

object
Custom1Id
integer

Ref: Custom1._id

object
Custom2Id
integer

Ref: Custom2._id

object
Custom3Id
integer

Ref: Custom3._id

object
LedgerAccountId
integer

Ref: LedgerAccount._id

object

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "amount": "string",
  • "quantity": "string",
  • "taxAmount": "string",
  • "TaxCodeId": 0,
  • "TaxCode": {
    },
  • "ItemId": 0,
  • "Item": {
    },
  • "CostCenterId": 0,
  • "CostCenter": {
    },
  • "JobId": 0,
  • "Job": {
    },
  • "ProductId": 0,
  • "Product": {
    },
  • "Custom1Id": 0,
  • "Custom1": {
    },
  • "Custom2Id": 0,
  • "Custom2": {
    },
  • "Custom3Id": 0,
  • "Custom3": {
    },
  • "LedgerAccountId": 0,
  • "LedgerAccount": {
    }
}

Response samples

Content type
application/json
{
  • "_id": 0,
  • "description": "string",
  • "amount": "string",
  • "quantity": "string",
  • "taxAmount": "string",
  • "TaxCodeId": 0,
  • "ItemId": 0,
  • "CostCenterId": 0,
  • "JobId": 0,
  • "ProductId": 0,
  • "Custom1Id": 0,
  • "Custom2Id": 0,
  • "Custom3Id": 0,
  • "LedgerAccountId": 0
}

Delete

Delete one Bill

path Parameters
id
required
string

Bill Id

Responses

Update

Update One Bill

path Parameters
id
required
integer

Bill Id

Request Body schema: application/json

JSON body containing key and values to update

Can only update an bill with "created" status

externalId
string
invoiceDate
string <date>
postingDate
string <date>
dueDate
string <date>
notes
string
attachments
Array of strings <uri> [ items <uri > ]

Links to any attached documents

description
string
currency
string <ISO4217 3 Char Code>
customFields
object
Default: {}

Key -> Value hash of custom fields, must be defined via the UI to show up in the UI

LocationId
integer

Ref: Location._id

object
ICLocationId
integer

Ref: Location._id

object
VendorId
integer

Ref: Vendor._id

object
APAccountId
integer

Ref: LedgerAccount._id

object
PurchaseOrderId
integer

Ref: PurchaseOrder._id

object

Responses

Request samples

Content type
application/json
{
  • "externalId": "string",
  • "invoiceDate": "2019-08-24",
  • "postingDate": "2019-08-24",
  • "dueDate": "2019-08-24",
  • "notes": "string",
  • "attachments": [],
  • "description": "string",
  • "currency": "string",
  • "customFields": { },
  • "LocationId": 0,
  • "Location": {
    },
  • "ICLocationId": 0,
  • "ICLocation": {
    },
  • "VendorId": 0,
  • "Vendor": {
    },
  • "APAccountId": 0,
  • "APAccount": {
    },
  • "PurchaseOrderId": 0,
  • "PurchaseOrder": {
    }
}

Response samples

Content type
application/json
{
  • "_id": 0,
  • "externalId": "string",
  • "invoiceNumber": "string",
  • "invoiceDate": "2019-08-24",
  • "postingDate": "2019-08-24",
  • "dueDate": "2019-08-24",
  • "notes": "string",
  • "attachments": [],
  • "description": "string",
  • "amount": "string",
  • "dueAmount": "string",
  • "currency": "string",
  • "customFields": { },
  • "LocationId": 0,
  • "ICLocationId": 0,
  • "VendorId": 0,
  • "APAccountId": 0,
  • "PurchaseOrderId": 0
}

Delete Line

Deletes an Bill Line

Can only delete a line from an bill with "created" status

path Parameters
id
required
string

BillLine._id

Responses

Update Line

Update a Bill Line

path Parameters
id
required
string

BillLineItem._id

Request Body schema: application/json
description
string

Required if ItemId is not set

amount
string <number>
quantity
string <number>
taxAmount
string <number>
TaxCodeId
integer

Ref: TaxCode._id

object
ItemId
integer

Ref: Item._id

object
CostCenterId
integer

Ref: Cost Center._id

object
JobId
integer

Ref: Job._id

object
ProductId
integer

Ref: Product._id

object
Custom1Id
integer

Ref: Custom1._id

object
Custom2Id
integer

Ref: Custom2._id

object
Custom3Id
integer

Ref: Custom3._id

object
LedgerAccountId
integer

Ref: LedgerAccount._id

object

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "amount": "string",
  • "quantity": "string",
  • "taxAmount": "string",
  • "TaxCodeId": 0,
  • "TaxCode": {
    },
  • "ItemId": 0,
  • "Item": {
    },
  • "CostCenterId": 0,
  • "CostCenter": {
    },
  • "JobId": 0,
  • "Job": {
    },
  • "ProductId": 0,
  • "Product": {
    },
  • "Custom1Id": 0,
  • "Custom1": {
    },
  • "Custom2Id": 0,
  • "Custom2": {
    },
  • "Custom3Id": 0,
  • "Custom3": {
    },
  • "LedgerAccountId": 0,
  • "LedgerAccount": {
    }
}

Response samples

Content type
application/json
{
  • "_id": 0,
  • "description": "string",
  • "amount": "string",
  • "quantity": "string",
  • "taxAmount": "string",
  • "TaxCodeId": 0,
  • "ItemId": 0,
  • "CostCenterId": 0,
  • "JobId": 0,
  • "ProductId": 0,
  • "Custom1Id": 0,
  • "Custom2Id": 0,
  • "Custom3Id": 0,
  • "LedgerAccountId": 0
}

One

Get one Bill

path Parameters
id
required
string

Bill._id

Responses

Response samples

Content type
application/json
{
  • "_id": 0,
  • "status": "created",
  • "externalId": "string",
  • "number": "string",
  • "invoiceDate": "2019-08-24",
  • "postingDate": "2019-08-24",
  • "dueDate": "2019-08-24",
  • "notes": "string",
  • "attachments": [],
  • "approved_on": "2019-08-24",
  • "approved_name": "string",
  • "approved_email": "user@example.com",
  • "description": "string",
  • "currency": "string",
  • "amount": "string",
  • "dueAmount": "string",
  • "customFields": { },
  • "SystemJobId": "string",
  • "LocationId": 0,
  • "Location": {
    },
  • "ICLocationId": 0,
  • "ICLocation": {
    },
  • "VendorId": 0,
  • "Vendor": {
    },
  • "APAccountId": 0,
  • "APAccount": {
    },
  • "PurchaseOrderId": 0,
  • "PurchaseOrder": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "BillLineItems": [
    ]
}

Payments

This endpoint returns only payments for the specified bill. The response and parameters of this endpoint are the same as for Payments Search

path Parameters
id
required
string

Bill._id

Void

Void Bill

path Parameters
id
required
string

Bill._id

Request Body schema: application/json

Bills with linked payments cannot be voided

Bills in created or voided status cannot be voided

description
string
postingDate
string <date>

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "postingDate": "2019-08-24"
}

Cash Receipts

Search

Field Filterable Sortable
_id
number
externalId
type
amount
unused
description
currency
receiveDate
postingDate
status
applyToInvoices
CustomerId
LedgerAccountId
UnappliedCashAccountId
LocationId
createdAt
updatedAt
query Parameters
filter
string

JSON Key:Value object to filter results on

filterType
string
Default: "all"
Enum: "all" "any"

Results will match "all" filters or just "any" of the passed filters

cursor
string

Cursor key to page forwards from. Must be populated from the result of a previous query call.

limit
integer [ 1 .. 1000 ]
Default: 25

Maximum number of records to return.

order
string
Default: "number:ASC"

Order to return results in. ex "date:desc"

Responses

Response samples

Content type
application/json
{
  • "hasNextPage": true,
  • "cursor": "string",
  • "data": [
    ]
}

Create

Creates a new Cash Receipt

Webhooks

CashReceipt CREATE
Request Body schema: application/json

JSON body to create new Cash Receipt

Only one of [Customer.id, CustomerId] can be set

Only one of [LedgerAccount.number, LedgerAccountId] can be set

Only one of [Location.id, LocationId] can be set

Only one of [UnappliedCashAccount.number, UnappliedCashAccountId] can be set

number
required
string
type
required
string
Enum: "charge" "check" "ach" "wire" "cash"
amount
required
string <number>

Must be > 0

currency
required
string

Ref Currency.code

receiveDate
required
string <date>
postingDate
required
string <date>
externalId
string
description
string
applyToInvoices
boolean
Default: false
attachments
Array of strings <uri> [ items <uri > ]

Links to any attached documents

CustomerId
number

Ref: Customer._id

object
LedgerAccountId
number

Ref: LedgerAccount._id

object
LocationId
number

Ref: Location._id

object
UnappliedCashAccountId
number

Ref: LedgerAccount._id

object

Responses

Request samples

Content type
application/json
{
  • "number": "string",
  • "externalId": "string",
  • "type": "charge",
  • "amount": "string",
  • "description": "string",
  • "currency": "string",
  • "receiveDate": "2019-08-24",
  • "postingDate": "2019-08-24",
  • "applyToInvoices": false,
  • "attachments": [],
  • "CustomerId": 0,
  • "Customer": {
    },
  • "LedgerAccountId": 0,
  • "LedgerAccount": {
    },
  • "LocationId": 0,
  • "Location": {
    },
  • "UnappliedCashAccountId": 0,
  • "UnappliedCashAccount": {
    }
}

Response samples

Content type
application/json
{
  • "_id": 0,
  • "number": "string",
  • "externalId": "string",
  • "type": "charge",
  • "amount": "string",
  • "unused": "string",
  • "description": "string",
  • "currency": "string",
  • "receiveDate": "2019-08-24",
  • "postingDate": "2019-08-24",
  • "status": "created",
  • "applyToInvoices": true,
  • "CustomerId": 0,
  • "LedgerAccountId": 0,
  • "LocationId": 0,
  • "UnappliedCashAccountId": 0,
  • "attachments": [],
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete

Delete one Cash Receipt

Cannot delete if there are linked journal entries.

Webhooks

CashReceipt DELETE
path Parameters
id
required
string

Cash Receipt Id

Responses

One

Get one Cash Receipt

path Parameters
id
required
string

Cash Receipt Id

Responses

Response samples

Content type
application/json
{
  • "_id": 0,
  • "number": "string",
  • "externalId": "string",
  • "type": "charge",
  • "amount": "string",
  • "unused": "string",
  • "description": "string",
  • "currency": "string",
  • "receiveDate": "2019-08-24",
  • "postingDate": "2019-08-24",
  • "status": "string",
  • "enum": null,
  • "applyToInvoices": true,
  • "CustomerId": 0,
  • "Customer": {
    },
  • "LedgerAccountId": 0,
  • "LedgerAccount": {
    },
  • "LocationId": 0,
  • "Location": {
    },
  • "UnappliedCashAccountId": 0,
  • "UnappliedCashAccount": {
    },
  • "attachments": [],
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update

Update One Cash Receipt

Webhooks

CashReceipt UPDATE
path Parameters
id
required
integer

Cash Receipt Id

Request Body schema: application/json

JSON body containing key and values to update

Cannot update a Cash Receipt if an unapplied cash journal entry was created

Only one of [Customer.id, CustomerId] can be set

Only one of [LedgerAccount.number, LedgerAccountId] can be set

Only one of [Location.id, LocationId] can be set

number
string
externalId
string
type
string
Enum: "charge" "check" "ach" "wire" "cash"
amount
string <number>

Must be > 0

description
string
currency
string

Ref Currency.code

receiveDate
string <date>
postingDate
string <date>
attachments
Array of strings <uri> [ items <uri > ]

Links to any attached documents

CustomerId
number

Ref: Customer._id

object
LedgerAccountId
number

Ref: LedgerAccount._id

object
LocationId
number

Ref: Location._id

object

Responses

Request samples

Content type
application/json
{
  • "number": "string",
  • "externalId": "string",
  • "type": "charge",
  • "amount": "string",
  • "description": "string",
  • "currency": "string",
  • "receiveDate": "2019-08-24",
  • "postingDate": "2019-08-24",
  • "attachments": [],
  • "CustomerId": 0,
  • "Customer": {
    },
  • "LedgerAccountId": 0,
  • "LedgerAccount": {
    },
  • "LocationId": 0,
  • "Location": {
    }
}

Response samples

Content type
application/json
{
  • "_id": 0,
  • "number": "string",
  • "externalId": "string",
  • "type": "charge",
  • "amount": "string",
  • "unused": "string",
  • "description": "string",
  • "currency": "string",
  • "receiveDate": "2019-08-24",
  • "postingDate": "2019-08-24",
  • "status": "string",
  • "enum": null,
  • "applyToInvoices": true,
  • "CustomerId": 0,
  • "LedgerAccountId": 0,
  • "LocationId": 0,
  • "UnappliedCashAccountId": 0,
  • "attachments": [],
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Payments

This endpoint returns only payments for the specified cash receipt. The response and parameters of this endpoint are the same as for Payments Search

path Parameters
id
required
string

CashReceipt._id

Void

Void one Cash Receipt

Voided cash receipts with journals will post a voided journal

Cannot void if there are any unvoided payments linked

Webhooks

CashReceipt VOID
path Parameters
id
required
string

Cash Receipt Id

Responses

Coins

Search

Field Filterable Sortable
_id
symbol
name
impair
hidden
isFiat
rateSymbol
rateId
rateSource
createdAt
updatedAt
query Parameters
filter
string

JSON Key:Value object to filter results on

filterType
string
Default: "all"
Enum: "all" "any"

Results will match "all" filters or just "any" of the passed filters

cursor
string

Cursor key to page forwards from. Must be populated from the result of a previous query call.

limit
integer [ 1 .. 1000 ]
Default: 25

Maximum number of records to return.

order
string
Default: "symbol:ASC"

Order to return results in. ex "date:desc"

Responses

Response samples

Content type
application/json
{
  • "hasNextPage": true,
  • "cursor": "string",
  • "data": [
    ]
}

Create

Creates a new Coin

Webhooks

Coin CREATE
LedgerAccount CREATE - four ledger accounts are created for each coin created
Request Body schema: application/json

JSON body to create new Coin

symbol
required
string
name
required
string
impair
boolean
Default: false
isFiat
boolean
Default: false

If set true

  • rateId must be a Ref: Currency.Code
rateId
string

Required if coin will use automatic rates

customFields
object

Key->Value hash of custom field names and values

Responses

Request samples

Content type
application/json
{
  • "symbol": "string",
  • "name": "string",
  • "impair": false,
  • "isFiat": false,
  • "rateId": "string",
  • "customFields": { }
}

Response samples

Content type
application/json
{
  • "_id": 0,
  • "symbol": "string",
  • "name": "string",
  • "impair": true,
  • "hidden": true,
  • "isFiat": true,
  • "rateSymbol": "string",
  • "rateId": "string",
  • "rateSource": "coinmarketcap",
  • "customFields": { },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "AssetAccount": {
    },
  • "FeeAccount": {
    },
  • "LTGainLossAccount": {
    },
  • "STGainLossAccount": {
    }
}

Count

Returns a count of transactions based on the passed filters for a single coin. If a significantly large amount of transactions, it is possible an estimated value will be returned.

See /crypto-transactions/coin/search for filterable fields.

path Parameters
coinId
required
string

Coin._id value

query Parameters
LocationId
string

Filters for Wallets (Receive, Sent, Fee) in the specified location. Defaults to Global Location when not set.

filter
string

JSON Key:Value object to filter results on

filterType
string
Default: "all"
Enum: "all" "any"

Results will match "all" filters or just "any" of the passed filters

Responses

Response samples

Content type
application/json
{
  • "count": 0,
  • "estimate": true
}

Crypto Transactions

List of Coin Crypto Transactions. Not orderable.

Field Filterable
_id
date
rQty
sQty
fQty
type
sPrice
rPrice
fPrice
locked
notes
reference
currency
externalId
externalSource
txHash
isJournalStale
createdAt
updatedAt
SystemJobId
rCoinId
sCoinId
fCoinId
rWalletId
sWalletId
fWalletId
LedgerAccountId
CustomerId
VendorId
Journal.number
CostCenterId
ProductId
path Parameters
coinId
required
string

Coin._id

walletId
string

wallet._id

query Parameters
LocationId
string

Filters for Wallets (Receive, Sent, Fee) in the specified location. Defaults to Global Location when not set.

filter
string

JSON Key:Value object to filter results on

filterType
string
Default: "all"
Enum: "all" "any"

Results will match "all" filters or just "any" of the passed filters

cursor
string

Cursor key to page forwards from. Must be populated from the result of a previous query call.

limit
integer [ 1 .. 1000 ]
Default: 25

Maximum number of records to return.

order
string
Default: "date:DESC"

Order to return results in. ex "date:desc"

Responses

Response samples

Content type
application/json
{
  • "hasNextPage": true,
  • "cursor": "string",
  • "data": [
    ]
}

Id Summary

List of Coins with balance details by wallet

Field Filterable Orderable
_id
name
rate
value
gainLoss
isFiat
rateSymbol
custom
impair
quantity
totalCostBasis
path Parameters
coinId
required
string

Coin._id

query Parameters
hideZero
boolean

exclude zero balance coins

date
string <date-time>

date to filter by. defaults to "now" ISO DateTime

LocationId
string

Filters for Wallets (Receive, Sent, Fee) in the specified location. Defaults to Global Location when not set.

consolidated
boolean

True = match on the Location & its children. False = match only wallets in this location.

filter
string

JSON Key:Value object to filter results on

filterType
string
Default: "all"
Enum: "all" "any"

Results will match "all" filters or just "any" of the passed filters

cursor
string

Cursor key to page forwards from. Must be populated from the result of a previous query call.

limit
integer [ 1 .. 1000 ]
Default: 25

Maximum number of records to return.

order
string
Default: "name:ASC"

Order to return results in. ex "date:desc"

Responses

Response samples

Content type
application/json
{
  • "hasNextPage": true,
  • "cursor": "string",
  • "data": [
    ]
}

Summary

Returns a list of coins with balance descriptions

Field Filterable Orderable
_id
name
symbol
rate
value
gainLoss
isFiat
rateSymbol
custom
impair
quantity
totalCostBasis
query Parameters
showHidden
boolean

include hidden coins

hideZero
boolean

exclude zero balance coins

date
string <date>

date to filter by. defaults to "now" ISO Date

LocationId
string

Filters for Wallets (Receive, Sent, Fee) in the specified location. Defaults to Global Location when not set.

consolidated
boolean

True = match on the Location & its children. False = match only wallets in this location.

filter
string

JSON Key:Value object to filter results on

filterType
string
Default: "all"
Enum: "all" "any"

Results will match "all" filters or just "any" of the passed filters

cursor
string

Cursor key to page forwards from. Must be populated from the result of a previous query call.

limit
integer [ 1 .. 1000 ]
Default: 25

Maximum number of records to return.

order
string
Default: "name:ASC"

Order to return results in. ex "date:desc"

Responses

Response samples

Content type
application/json
{
  • "hasNextPage": true,
  • "cursor": "string",
  • "data": [
    ]
}

Delete

Delete one Coin

Webhooks

Coin DELETE
path Parameters
id
required
string

Coin Id

Responses

One

Get one Coin

path Parameters
id
required
string

Coin Id

Responses

Response samples

Content type
application/json
{
  • "_id": "string",
  • "symbol": "string",
  • "name": "string",
  • "impair": true,
  • "hidden": true,
  • "isFiat": true,
  • "rateSymbol": "string",
  • "rateId": "string",
  • "rateSource": "nomics",
  • "customFields": { },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "AssetAccount": {
    },
  • "FeeAccount": {
    },
  • "LTGainLossAccount": {
    },
  • "STGainLossAccount": {
    }
}

Update

Update One Coin

Webhooks

Coin UPDATE
path Parameters
id
required
integer

Coin Id

Request Body schema: application/json

JSON body containing key and values to update

name
string
impair
boolean
hidden
boolean,
rateId
string
rateSource
string
Value: "coinmarketcap"

Required if rateId is set

customFields
object

Key->Value hash of custom field names and values

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "impair": true,
  • "hidden": null,
  • "rateId": "string",
  • "rateSource": "coinmarketcap",
  • "customFields": { }
}

Response samples

Content type
application/json
{
  • "_id": 0,
  • "symbol": "string",
  • "name": "string",
  • "impair": true,
  • "hidden": true,
  • "isFiat": true,
  • "rateSymbol": "string",
  • "rateId": "string",
  • "rateSource": "coinmarketcap",
  • "customFields": { },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Known Coin

Returns Known Coin by rateId

Responses

Response samples

Content type
application/json
{
  • "cmc_id": "string",
  • "symbol": "string",
  • "name": "string",
  • "rank": 0,
  • "logo_url": "string"
}

Known Coins

Returns the 100 coins of the list of coins that SoftLedger can provide automatic rates for ordered by rank ascending. To see more, filter by symbol or name.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Coin Rate

Returns the 'open' rate of the coin in the for the passed date in the fiat currency.

path Parameters
id
required
string

_id of Coin to get rate for Ref: Coin._id

query Parameters
date
required
string <date>

Date to provide rate on

fiat
string
Default: "USD"

Fiat currency to show rate in Ref: Currency.code

Responses

Response samples

Content type
application/json
"string"

Consolidation Rates

Search

Field Filterable Sortable
_id
AccountingPeriodId
ChildId
ParentId
AccountingPeriod.end
createdAt
updatedAt
query Parameters
filter
string

JSON Key:Value object to filter results on

filterType
string
Default: "all"
Enum: "all" "any"

Results will match "all" filters or just "any" of the passed filters

cursor
string

Cursor key to page forwards from. Must be populated from the result of a previous query call.

limit
integer [ 1 .. 1000 ]
Default: 25

Maximum number of records to return.

order
string
Default: "number:ASC"

Order to return results in. ex "date:desc"

LocationId
number

Will include data from this Parent Location and its children only

Responses

Response samples

Content type
application/json
{
  • "hasNextPage": true,
  • "cursor": "string",
  • "data": [
    ]
}

Upsert

Upsert consolidation rates

Request Body schema: application/json

JSON body of consolidation rates to create or update

One of ChildId or Child.id must be provided

One of ParentId or Parent.id must be provided

Parent.currency and Child.currency must be different

Array
spotRate
required
string <number>

Must be > 0

wavgRate
required
string <number>

Must be > 0

AccountingPeriodId
required
number

Ref: AccountingPeriod._id

ChildId
required
number

Ref: Location._id

ParentId
required
number

Ref: Location._id

object
object

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "_id": 0,
  • "AccountingPeriodId": 0,
  • "ChildId": 0,
  • "ParentId": 0,
  • "spotRate": "string",
  • "wavgRate": "string"
}

Populate

Populates consolidation rates

Request Body schema: application/json

JSON body of period to populate rates for

Only missing Child/Parent rates will be populated for the period.

Safe to run multiple times for the same period and it will not overwrite your manually entered rates.

AccountingPeriodId
required
number

Ref: AccountingPeriod._id

Responses

Request samples

Content type
application/json
{
  • "AccountingPeriodId": 0
}

Contacts

Search

Field Filterable Sortable
_id
name
email
phone
isPrimary
createdAt
updatedAt
CustomerId
VendorId
Customer.name
Vendor.name
query Parameters
filter
string

JSON Key:Value object to filter results on

filterType
string
Default: "all"
Enum: "all" "any"

Results will match "all" filters or just "any" of the passed filters

cursor
string

Cursor key to page forwards from. Must be populated from the result of a previous query call.

limit
integer [ 1 .. 1000 ]
Default: 25

Maximum number of records to return.

order
string
Default: "name:ASC"

Order to return results in. ex "date:desc"

Responses

Response samples

Content type
application/json
{
  • "hasNextPage": true,
  • "cursor": "string",
  • "data": [
    ]
}

Create

Creates a new Contact

Webhooks

Contact CREATE
Request Body schema: application/json

JSON body to create new Contact

Only one of [CustomerId, VendorId, Customer.name, Vendor.name] can be set

name
required
string
email
string
phone
string
isPrimary
boolean

Set this as the primary contact for the Customer or Vendor

CustomerId
integer

Ref: Customer._id

VendorId
integer

Ref: Vendor._id

object
object

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "email": "string",
  • "phone": "string",
  • "isPrimary": true,
  • "CustomerId": 0,
  • "VendorId": 0,
  • "Customer": {
    },
  • "Vendor": {
    }
}

Response samples

Content type
application/json
{
  • "_id": 0,
  • "name": "string",
  • "email": "string",
  • "phone": "string",
  • "isPrimary": true,
  • "CustomerId": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "VendorId": 0
}

Delete

Delete one Contact

Webhooks

Contact DELETE
path Parameters
id
required
string

Contact Id

Responses

One

Get one Contact

path Parameters
id
required
string

Contact Id

Responses

Response samples

Content type
application/json
{
  • "_id": 0,
  • "name": "string",
  • "email": "string",
  • "phone": "string",
  • "isPrimary": true,
  • "CustomerId": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "VendorId": 0,
  • "Customer": {
    },
  • "Vendor": {
    }
}

Update

Update One Contact

Webhooks

Contact UPDATE
path Parameters
id
required
integer

Contact Id

Request Body schema: application/json

JSON body containing key and values to update

name
string
email
string
phone
string
isPrimary
boolean

Set this as the primary contact for the Customer or Vendor

CustomerId
integer

Ref: Customer._id

VendorId
integer

Ref: Vendor._id

object
object

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "email": "string",
  • "phone": "string",
  • "isPrimary": true,
  • "CustomerId": 0,
  • "VendorId": 0,
  • "Customer": {
    },
  • "Vendor": {
    }
}

Response samples

Content type
application/json
{
  • "_id": 0,
  • "name": "string",
  • "email": "string",
  • "phone": "string",
  • "isPrimary": true,
  • "CustomerId": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "VendorId": 0
}

Cost Centers

Search

Field Filterable Sortable
_id
id
name
description
inactive
createdAt
updatedAt
query Parameters
filter
string

JSON Key:Value object to filter results on

filterType
string
Default: "all"
Enum: "all" "any"

Results will match "all" filters or just "any" of the passed filters

cursor
string

Cursor key to page forwards from. Must be populated from the result of a previous query call.

limit
integer [ 1 .. 1000 ]
Default: 25

Maximum number of records to return.

status
string
Enum: "active" "inactive"

Results will return active or inactive based on the objects inactive property. If not set all results will be returned.

order
string
Default: "id:ASC"

Order to return results in. ex "date:desc"

Responses

Response samples

Content type
application/json
{
  • "hasNextPage": true,
  • "cursor": "string",
  • "data": [
    ]
}

Create

Create Cost Center

Request Body schema: application/json

JSON body

id
required
string
name
required
string
description
string
inactive
boolean

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "inactive": true
}

Response samples

Content type
application/json
{
  • "_id": 0,
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "inactive": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete

Delete one Cost Center

Webhooks

CostCenter DELETE
path Parameters
id
required
string

Cost Center Id

Responses

One

Get one Cost Center

path Parameters
id
required
string

Cost Center Id

Responses

Response samples

Content type
application/json
{
  • "_id": 0,
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "inactive": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update

Update Cost Center

Webhooks

CostCenter UPDATE
path Parameters
id
required
integer

Cost Center Id

Request Body schema: application/json

JSON body containing key and values to update

id
string
name
string
description
string
inactive
boolean

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "inactive": true
}

Response samples

Content type
application/json
{
  • "_id": 0,
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "inactive": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Crypto Transactions

Cost Basis

Cancel running costbasis process

Responses

Cost Basis

Get next date cost basis will run from

Responses

Response samples

Content type
application/json
{
  • "nextCostBasisDate": null
}

Cost Basis

Start costbasis process

Responses

Create

Create new Crypto Transaction. See below for respective tables containing required fields and fields that are not allowed for each type of transaction.

Field Deposit Withdrawal Trade Transfer
rCoinId
rWalletId
rQty
rPrice ✔️ ✔️
sCoinId
sWalletId
sQty ✔️
sPrice ✔️ --
LedgerAccountId
Fee Fields ✔️ ✔️ ✔️ ✔️

✅ - Required    ❌ - Not Allowed    ✔️ - Optional

Price fields will pull from rate provider if set to null

sPrice is Ignored for Trades as is autocalculated from rPrice

sQty may be set to 0 if fQty > 0, this allows "fee only" transactions

Fee Fields
fCoinId
fWalletId
fQty
fPrice ✔️

Setting fCoinId indicates that a fee should be added

Webhooks

CryptoTransaction CREATE
Request Body schema: application/json

JSON body to create new Crypto Transaction

date
required
string <date-time>
type
required
string
Enum: "deposit" "trade" "transfer" "withdrawal"
currency
required
string

ISO-4217 Currency Code ex "USD" or "GBP". This specifies which currency rPrice/sPrice/fPrice uses.

rQty
string <number>
sQty
string <number>
fQty
string <number>
sPrice
string <number>
rPrice
string <number>
fPrice
string <number>
notes
string
reference
string
externalId
string
externalSource
string
txHash
string
LedgerAccountId
integer

ref: LedgerAccounts._id

CustomerId
integer

ref: Customers._id

VendorId
integer

ref: Vendors._id

CostCenterId
integer

ref: CostCenters._id

ProductId
integer

ref: Products._id

JobId
integer

ref: Jobs._id

Custom1Id
integer

ref: Custom1._id

Custom2Id
integer

ref: Custom2._id

Custom3Id
integer

ref: Custom3._id

Responses

Request samples

Content type
application/json
{
  • "date": "2019-08-24T14:15:22Z",
  • "rQty": "1",
  • "sQty": "1",
  • "fQty": "1",
  • "type": "deposit",
  • "sPrice": "1",
  • "rPrice": "1",
  • "fPrice": "1",
  • "notes": "string",
  • "reference": "string",
  • "currency": "string",
  • "externalId": "string",
  • "externalSource": "string",
  • "txHash": "string",
  • "LedgerAccountId": 0,
  • "CustomerId": 0,
  • "VendorId": 0,
  • "CostCenterId": 0,
  • "ProductId": 0,
  • "JobId": 0,
  • "Custom1Id": 0,
  • "Custom2Id": 0,
  • "Custom3Id": 0
}

Response samples

Content type
application/json
{
  • "_id": 0,
  • "date": "2019-08-24T14:15:22Z",
  • "rQty": "1",
  • "sQty": "1",
  • "fQty": "1",
  • "qtyPicked": "1",
  • "type": "deposit",
  • "sCostBasis": 0,
  • "fCostBasis": 0,
  • "sPrice": "1",
  • "rPrice": "1",
  • "fPrice": "1",
  • "locked": true,
  • "error": { },
  • "notes": "string",
  • "reference": "string",
  • "currency": "string",
  • "currencyRate": "1",
  • "externalId": "string",
  • "externalSource": "string",
  • "txHash": "string",
  • "SystemJobId": "string",
  • "rCoinId": "string",
  • "sCoinId": "string",
  • "fCoinId": "string",
  • "rWalletId": "string",
  • "sWalletId": "string",
  • "fWalletId": "string",
  • "LedgerAccountId": 0,
  • "CustomerId": 0,
  • "VendorId": 0,
  • "JournalId": 0,
  • "CostCenterId": 0,
  • "ProductId": 0,
  • "JobId": 0,
  • "Custom1Id": 0,
  • "Custom2Id": 0,
  • "Custom3Id": 0
}

Search

Field Filterable Sortable
_id
date
rQty
sQty
fQty
qtyPicked
qtyAvailable
type
sCostBasis
fCostBasis
sPrice
rPrice
fPrice
locked
error
notes
reference
currency
currencyRate
externalId
externalSource
txHash
SystemJobId
rCoinId
sCoinId
fCoinId
rWalletId
sWalletId
fWalletId
LedgerAccountId
CustomerId
VendorId
JournalId
CostCenterId
ProductId
JobId
rCoin.symbol
sCoin.symbol
fCoin.symbol
rWallet.name
sWallet.name
fWallet.name
Customer.id
Customer.name
Vendor.id
Vendor.name
LedgerAccount.name
LedgerAccount.number
Journal.number
path Parameters
coinId
string

Coin._id

walletId
string

wallet._id

query Parameters
LocationId
string

Filters for Wallets (Receive, Sent, Fee) in the specified location. Defaults to Global Location when not set.

costLayers
boolean
Default: false

Only returns Crypto Transactions that have unused cost layers.

filter
string

JSON Key:Value object to filter results on

filterType
string
Default: "all"
Enum: "all" "any"

Results will match "all" filters or just "any" of the passed filters

cursor
string

Cursor key to page forwards from. Must be populated from the result of a previous query call.

limit
integer [ 1 .. 1000 ]
Default: 25

Maximum number of records to return.

order
string
Default: "date:DESC"

Order to return results in. ex "date:desc"

Responses

Response samples

Content type
application/json
{
  • "hasNextPage": true,
  • "cursor": "string",
  • "data": [
    ]
}

Delete

Delete one Crypto Transaction

Webhooks

Cryptotransaction DELETE
path Parameters
id
required
integer

Crypto Transaction Id

Responses

One

Get one Crypto Transaction

path Parameters
id
required
integer

Crypto Transaction Id

Responses

Response samples

Content type
application/json
{
  • "_id": 0,
  • "date": "2019-08-24T14:15:22Z",
  • "rQty": 0,
  • "sQty": 0,
  • "fQty": 0,
  • "qtyPicked": "string",
  • "type": "deposit",
  • "sCostBasis": 0,
  • "fCostBasis": 0,
  • "sPrice": 0,
  • "rPrice": 0,
  • "fPrice": 0,
  • "locked": true,
  • "error": { },
  • "notes": "string",
  • "reference": "string",
  • "currency": "string",
  • "currencyRate": "string",
  • "externalId": "string",
  • "externalSource": "string",
  • "txHash": "string",
  • "SystemJobId": "string",
  • "rCoinId": "string",
  • "sCoinId": "string",
  • "fCoinId": "string",
  • "rWalletId": "string",
  • "sWalletId": "string",
  • "fWalletId": "string",
  • "LedgerAccountId": 0,
  • "CustomerId": 0,
  • "VendorId": 0,
  • "JournalId": 0,
  • "CostCenterId": 0,
  • "ProductId": 0,
  • "JobId": 0,
  • "rCoin": {
    },
  • "rWallet": {
    },
  • "sCoin": {
    },
  • "sWallet": {
    },
  • "fCoin": {
    },
  • "fWallet": {
    },
  • "Customer": {
    },
  • "Vendor": {
    },
  • "LedgerAccount": {
    },
  • "Journal": {
    },
  • "CostCenter": {
    },
  • "Product": {
    },
  • "Job": {
    }
}

Update

Update One Crypto Transaction. See Create for allowed fields.

Webhooks

CryptoTransaction UPDATE
path Parameters
id
required
integer

Crypto Transaction Id

Request Body schema: application/json

JSON body containing key and values to update

date
string <date-time>
rQty
string <number>
sQty
string <number>
fQty
string <number>
qtyPicked
string <number>
type
string
Enum: "deposit" "trade" "transfer" "withdrawal"
sPrice
string <number>
rPrice
string <number>
fPrice
string <number>
notes
string
reference
string
LedgerAccountId
integer
CustomerId
integer
currency
string

ISO-4217 Currency Code ex "USD" or "GBP". This specifies which currency rPrice/sPrice/fPrice uses.

currencyRate
string <number>
externalId
string
externalSource
string
txHash
string
VendorId
integer

Responses

Request samples

Content type
application/json
{
  • "date": "2019-08-24T14:15:22Z",
  • "rQty": "1",
  • "sQty": "1",
  • "fQty": "1",
  • "qtyPicked": "1",
  • "type": "deposit",
  • "sPrice": "1",
  • "rPrice": "1",
  • "fPrice": "1",
  • "notes": "string",
  • "reference": "string",
  • "LedgerAccountId": 0,
  • "CustomerId": 0,
  • "currency": "string",
  • "currencyRate": "string",
  • "externalId": "string",
  • "externalSource": "string",
  • "txHash": "string",
  • "VendorId": 0
}

Response samples

Content type
application/json
{
  • "_id": 0,
  • "date": "2019-08-24T14:15:22Z",
  • "rQty": "1",
  • "sQty": "1",
  • "fQty": "1",
  • "qtyPicked": "1",
  • "type": "deposit",
  • "sCostBasis": 0,
  • "fCostBasis": 0,
  • "sPrice": "1",
  • "rPrice": "1",
  • "fPrice": "1",
  • "locked": true,
  • "error": { },
  • "notes": "string",
  • "reference": "string",
  • "currency": "string",
  • "currencyRate": "1",
  • "externalId": "string",
  • "externalSource": "string",
  • "txHash": "string",
  • "SystemJobId": "string",
  • "rCoinId": "string",
  • "sCoinId": "string",
  • "fCoinId": "string",
  • "rWalletId": "string",
  • "sWalletId": "string",
  • "fWalletId": "string",
  • "LedgerAccountId": 0,
  • "CustomerId": 0,
  • "VendorId": 0,
  • "JournalId": 0,
  • "rCoin": {
    },
  • "rWallet": {
    },
  • "sCoin": {
    },
  • "sWallet": {
    },
  • "fCoin": {
    },
  • "fWallet": {
    },
  • "Customer": {
    },
  • "Vendor": {
    },
  • "LedgerAccount": {
    },
  • "Journal": {
    }
}

Merge

Merges a deposit and withdrawal crypto transaction into a transfer transaction.

The deposit and withdrawal transactions will both be deleted and a single transfer transaction will be created. Any linked journals will be destroyed.

The fee from the withdrawal will be added to the transfer transaction.

The rCoin of the deposit and the sCoin of the withdrawal must match.

The rWallet of the deposit and the sWallet of the withdrawal must match.

The rQty of the deposit and the sQty of the withdrawal must match.

The txHash of the deposit and the txHash of the withdrawal must match.

The currency of the deposit and the currency of the withdrawal must match.

Request Body schema: application/json

Merge deposit and withdrawal crypto transactions into a transfer transaction.

depositId
required
string

Ref: CryptoTransaction._id

withdrawalId
required
string

Ref: CryptoTransaction._id

useDepositMetaData
boolean
Default: false

Set True to use deposit meta data to populate new transfer transaction.

Set False to use withdrawal meta data to populate new transfer transaction.

The metadata includes [date, reference, notes, dimensions, attachments, externalId, externalSource]

Responses

Request samples

Content type
application/json
{
  • "depositId": "string",
  • "withdrawalId": "string",
  • "useDepositMetaData": false
}

Response samples

Content type
application/json
{
  • "_id": 0
}

Create Journals