Smile logo

Our Accounting API Documentation

About LessAccounting

LessAccounting is small business accounting software with tens of thousands of happy customers. Read more about our company and team of awesome people. Also you can read more about our feature set here.

Get in Touch

We're always looking for new apps to join our integration list. Shoot us an email if you want to chat about marketing ideas, feature requests and other partnership awesomeness.

Create users/businesses and setup automated banking via the API

If you want to add this additional functinality to your app, we can expose private api methods to you so you can do more. Your users don't even have to know they're using LessAccounting. Contact us

API Forum

The LessAccounting API has a google group. Please use this group to ask questions and receive notifications about the API. Please search for your question before asking to see if your question has already been answered. New members are moderated so your question might not show up for a few hours. http://groups.google.com/group/less-accounting-api

Authentication

The LessAccounting API requires authentication for every request. HTTP Basic Authentication is the only supported authentication scheme.

API Keys

All uses of the LessAccounting API are required to have a valid API Key, which must be supplied as a parameter to each method in the API.

Abuse of the API will result in the api key being revoked. API calls made with a revoked API Key will receive the follow xml as the response with a status code 403:

<?xml version="1.0" encoding="UTF-8"?><errors><error>API Key is not valid</error></errors>

You must have a valid user account to create an API key.

Create/view your API Keys

HTTP Verbs

  • The API makes use of the HTTP verbs GET, POST, PUT and DELETE.
  • Many of the methods are made to the same url and the HTTP verb is used to distinguish what type of operation to perform (Create, Read, Update, Delete).
  • Since web browsers only support GET and POST, the PUT and DELETE verbs must be supplied via a form variable called '_method' with the value either 'put' or 'delete.'

HTTP Status Codes

Here is a complete list of HTTP status codes . Here is an example of a few:
  • 200 OK: everything went ok.
  • 304 Not Modified: there was no new data to return.
  • 400 Bad Request: your request is invalid, and we'll return an error message that tells you why.
  • 401 Not Authorized: either you need to provide authentication credentials, or the credentials provided aren't valid.
  • 403 Forbidden: we understand your request, but are refusing to fulfill it.  An accompanying error message should explain why.
  • 404 Not Found: either you're requesting an invalid URI or the resource in question doesn't exist (ex: no such user). 
  • 500 Internal Server Error: we did something wrong.  Please post to the group about it and the we will investigate.
  • 502 Bad Gateway: returned if More Honey is down or being upgraded.
  • 503 Service Unavailable: the More Honey servers are up, but are overloaded with requests.  Try again later.

Errors

Errors are sent with the proper HTTP status codes and the xml in the following format:

<?xml version="1.0" encoding="UTF-8"?>
<errors>
  <error>API Key is not valid</error>
</errors>

Method Parameters

Method parameters that pertain to a specific object should be supplied in the format: object_type[parameter]. E.G., bank_account[name] or expense[amount]. Please see the example for each method to see the usage.

Business Methods

get_businesses

HTTP Verb/URL: GET https://lessaccounting.com/businesses/get_businesses.xml
Business sub-domain required in url: false
Id parameter required in url: false
API Key (api_key) parameter required: true
No other parameters.

Example:

Request: https://{your_business}.lessaccounting.com/businesses/get_businesses.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
<?xml version="1.0" encoding="UTF-8"?> <businesses type="array"> <business> <address nil="true"/> <amount-due-string>Amount Due:</amount-due-string> <created-at type="datetime">2008-05-15T07:00:00Z</created-at> <currency-id type="integer">1</currency-id> <description-string>Description</description-string> <id type="integer">1</id> <invoice-date-string>Date:</invoice-date-string> <invoice-due-string>Due:</invoice-due-string> <invoice-total-string>i total</invoice-total-string> <level type="integer">2</level> <line-total-string>Line Total</line-total-string> <name>bus1</name> <next-reference-number type="integer">1</next-reference-number> <payment-received-email-subject-string>Payment Received - Thank you</payment-received-email-subject-string> <payment-string>Payment:</payment-string> <paypal-email-address nil="true"/> <proposal-total-string>p total</proposal-total-string> <quantity-string>Quantity</quantity-string> <reference-number-string>Reference #:</reference-number-string> <remaining-balance-string>Remaining Balance:</remaining-balance-string> <sales-tax-fields-default-on type="boolean">true</sales-tax-fields-default-on> <show-paypal type="boolean">false</show-paypal> <subdomain>bus1</subdomain> <title-string>Title</title-string> <total-paid-string>Total Paid:</total-paid-string> <unit-price-string>Unit Price</unit-price-string> <updated-at type="datetime">2008-05-15T07:00:00Z</updated-at> <vat nil="true"/> <vat-string>VAT Number:</vat-string> <email>bus1@example.com</email> </business> <business> <address nil="true"/> <amount-due-string>Amount Due:</amount-due-string> <created-at type="datetime">2008-05-15T07:00:00Z</created-at> <currency-id type="integer">1</currency-id> <description-string>Description</description-string> <id type="integer">17</id> <invoice-date-string>Date:</invoice-date-string> <invoice-due-string>Due:</invoice-due-string> <invoice-total-string>i total</invoice-total-string> <level type="integer">2</level> <line-total-string>Line Total</line-total-string> <name>bus17</name> <next-reference-number type="integer">1</next-reference-number> <payment-received-email-subject-string>Payment Received - Thank you</payment-received-email-subject-string> <payment-string>Payment:</payment-string> <paypal-email-address nil="true"/> <proposal-total-string>p total</proposal-total-string> <quantity-string>Quantity</quantity-string> <reference-number-string>Reference #:</reference-number-string> <remaining-balance-string>Remaining Balance:</remaining-balance-string> <sales-tax-fields-default-on type="boolean">true</sales-tax-fields-default-on> <show-paypal type="boolean">false</show-paypal> <subdomain>bus17</subdomain> <title-string>Title</title-string> <total-paid-string>Total Paid:</total-paid-string> <unit-price-string>Unit Price</unit-price-string> <updated-at type="datetime">2008-05-15T07:00:00Z</updated-at> <vat nil="true"/> <vat-string>VAT Number:</vat-string> <email>bus17@example.com</email> </business> </businesses>

Example:

Request: https://{your_business}.lessaccounting.com/businesses/get_businesses.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
[ { "address": null, "amount_due_string": "Amount Due:", "created_at": "2008-05-15T07:00:00Z", "currency_id": 1, "description_string": "Description", "id": 1, "invoice_date_string": "Date:", "invoice_due_string": "Due:", "invoice_total_string": "i total", "level": 2, "line_total_string": "Line Total", "name": "bus1", "next_reference_number": 1, "payment_received_email_subject_string": "Payment Received - Thank you", "payment_string": "Payment:", "paypal_email_address": null, "proposal_total_string": "p total", "quantity_string": "Quantity", "reference_number_string": "Reference #:", "remaining_balance_string": "Remaining Balance:", "sales_tax_fields_default_on": true, "show_paypal": false, "subdomain": "bus1", "title_string": "Title", "total_paid_string": "Total Paid:", "unit_price_string": "Unit Price", "updated_at": "2008-05-15T07:00:00Z", "vat": null, "vat_string": "VAT Number:", "email": "bus1@example.com" }, { "address": null, "amount_due_string": "Amount Due:", "created_at": "2008-05-15T07:00:00Z", "currency_id": 1, "description_string": "Description", "id": 17, "invoice_date_string": "Date:", "invoice_due_string": "Due:", "invoice_total_string": "i total", "level": 2, "line_total_string": "Line Total", "name": "bus17", "next_reference_number": 1, "payment_received_email_subject_string": "Payment Received - Thank you", "payment_string": "Payment:", "paypal_email_address": null, "proposal_total_string": "p total", "quantity_string": "Quantity", "reference_number_string": "Reference #:", "remaining_balance_string": "Remaining Balance:", "sales_tax_fields_default_on": true, "show_paypal": false, "subdomain": "bus17", "title_string": "Title", "total_paid_string": "Total Paid:", "unit_price_string": "Unit Price", "updated_at": "2008-05-15T07:00:00Z", "vat": null, "vat_string": "VAT Number:", "email": "bus17@example.com" } ]

show

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com/businesses/1.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the business.
name String required Both The name of the business.
subdomain String required Both The subdomain at lessaccounting.com used to access this business.
email String required Both The email used to send invoices. If not supplied on create then the users email address will be used.
created_at Datetime N/A Output
updated_at Datetime N/A Output
sales_tax_fields_default_on Boolean optional Both Do line items show sales tax by default. NOTE: a boolean must be passed as either a 1 or a 0.
next_reference_number Integer optional Both the next number to use to create an invoice or proposal.
address Text optional Both
vat String optional Both The string displayed for VAT.
paypal_email_address String optional Both The paypal account email address to use when showing the paypal button in invoices.
currency_id Integer optional Both The id for the currency type that this business uses. See the Currency object for details. This parameter will be moving to another object in the future.
show_paypal Boolean optional Both NOTE: a boolean must be passed as either a 1 or a 0.
proposal_total_string String optional Both
invoice_total_string String optional Both
vat_string String optional Both
invoice_date_string String optional Both
invoice_due_string String optional Both
reference_number_string String optional Both
payment_string String optional Both
total_paid_string String optional Both
remaining_balance_string String optional Both
payment_received_email_subject_string String optional Both
title_string String optional Both
description_string String optional Both
unit_price_string String optional Both
quantity_string String optional Both
line_total_string String optional Both
amount_due_string String optional Both

Example:

Request: https://{your_business}.lessaccounting.com/businesses/1.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
<?xml version="1.0" encoding="UTF-8"?> <business> <address nil="true"/> <amount-due-string>Amount Due:</amount-due-string> <created-at type="datetime">2008-05-15T07:00:00Z</created-at> <currency-id type="integer">1</currency-id> <description-string>Description</description-string> <id type="integer">1</id> <invoice-date-string>Date:</invoice-date-string> <invoice-due-string>Due:</invoice-due-string> <invoice-total-string>i total</invoice-total-string> <level type="integer">2</level> <line-total-string>Line Total</line-total-string> <name>bus1</name> <next-reference-number type="integer">1</next-reference-number> <payment-received-email-subject-string>Payment Received - Thank you</payment-received-email-subject-string> <payment-string>Payment:</payment-string> <paypal-email-address nil="true"/> <proposal-total-string>p total</proposal-total-string> <quantity-string>Quantity</quantity-string> <reference-number-string>Reference #:</reference-number-string> <remaining-balance-string>Remaining Balance:</remaining-balance-string> <sales-tax-fields-default-on type="boolean">true</sales-tax-fields-default-on> <show-paypal type="boolean">false</show-paypal> <subdomain>bus1</subdomain> <title-string>Title</title-string> <total-paid-string>Total Paid:</total-paid-string> <unit-price-string>Unit Price</unit-price-string> <updated-at type="datetime">2008-05-15T07:00:00Z</updated-at> <vat nil="true"/> <vat-string>VAT Number:</vat-string> <email>bus1@example.com</email> </business>

Example:

Request: https://{your_business}.lessaccounting.com/businesses/1.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
{ "address": null, "amount_due_string": "Amount Due:", "created_at": "2008-05-15T07:00:00Z", "currency_id": 1, "description_string": "Description", "id": 1, "invoice_date_string": "Date:", "invoice_due_string": "Due:", "invoice_total_string": "i total", "level": 2, "line_total_string": "Line Total", "name": "bus1", "next_reference_number": 1, "payment_received_email_subject_string": "Payment Received - Thank you", "payment_string": "Payment:", "paypal_email_address": null, "proposal_total_string": "p total", "quantity_string": "Quantity", "reference_number_string": "Reference #:", "remaining_balance_string": "Remaining Balance:", "sales_tax_fields_default_on": true, "show_paypal": false, "subdomain": "bus1", "title_string": "Title", "total_paid_string": "Total Paid:", "unit_price_string": "Unit Price", "updated_at": "2008-05-15T07:00:00Z", "vat": null, "vat_string": "VAT Number:", "email": "bus1@example.com" }

update

HTTP Verb/URL: PUT https://<business_name>.lessaccounting.com/businesses/1.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
_method Must be supplied as: 'put'
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the business.
name String required Both The name of the business.
subdomain String required Both The subdomain at lessaccounting.com used to access this business.
email String required Both The email used to send invoices. If not supplied on create then the users email address will be used.
created_at Datetime N/A Output
updated_at Datetime N/A Output
sales_tax_fields_default_on Boolean optional Both Do line items show sales tax by default. NOTE: a boolean must be passed as either a 1 or a 0.
next_reference_number Integer optional Both the next number to use to create an invoice or proposal.
address Text optional Both
vat String optional Both The string displayed for VAT.
paypal_email_address String optional Both The paypal account email address to use when showing the paypal button in invoices.
currency_id Integer optional Both The id for the currency type that this business uses. See the Currency object for details. This parameter will be moving to another object in the future.
show_paypal Boolean optional Both NOTE: a boolean must be passed as either a 1 or a 0.
proposal_total_string String optional Both
invoice_total_string String optional Both
vat_string String optional Both
invoice_date_string String optional Both
invoice_due_string String optional Both
reference_number_string String optional Both
payment_string String optional Both
total_paid_string String optional Both
remaining_balance_string String optional Both
payment_received_email_subject_string String optional Both
title_string String optional Both
description_string String optional Both
unit_price_string String optional Both
quantity_string String optional Both
line_total_string String optional Both
amount_due_string String optional Both

Example:

Request: https://{your_business}.lessaccounting.com/businesses/1.xml?business[name]=mynewbusiness&business[subdomain]=my_new_business&business[email]=myemail@mydomain.com&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Example:

Request: https://{your_business}.lessaccounting.com/businesses/1.xml?business[name]=&business[subdomain]=&business[email]=&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
<?xml version="1.0" encoding="UTF-8"?> <errors> <error>Email can't be blank</error> <error>Name can't be blank</error> <error>Name is too short (minimum is 1 characters)</error> <error>Name should contain at least one alpha character (a-z).</error> <error>Subdomain is too short (minimum is 1 characters)</error> </errors>

Example:

Request: https://{your_business}.lessaccounting.com/businesses/1.json?business[name]=mynewbusiness&business[subdomain]=my_new_business&business[email]=myemail@mydomain.com&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Example:

Request: https://{your_business}.lessaccounting.com/businesses/1.json?business[name]=&business[subdomain]=&business[email]=&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
{ "errors": { "email": [ "can't be blank" ], "name": [ "can't be blank", "is too short (minimum is 1 characters)", "should contain at least one alpha character (a-z)." ], "subdomain": [ "is too short (minimum is 1 characters)" ] } }

destroy

Notes: Can only be called by the business owner.
HTTP Verb/URL: DELETE https://<business_name>.lessaccounting.com/businesses/1.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
_method Must be supplied as: 'delete'
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the business.
name String N/A Output The name of the business.
subdomain String N/A Output The subdomain at lessaccounting.com used to access this business.
email String N/A Output The email used to send invoices. If not supplied on create then the users email address will be used.
created_at Datetime N/A Output
updated_at Datetime N/A Output
sales_tax_fields_default_on Boolean N/A Output Do line items show sales tax by default. NOTE: a boolean must be passed as either a 1 or a 0.
next_reference_number Integer N/A Output the next number to use to create an invoice or proposal.
address Text N/A Output
vat String N/A Output The string displayed for VAT.
paypal_email_address String N/A Output The paypal account email address to use when showing the paypal button in invoices.
currency_id Integer N/A Output The id for the currency type that this business uses. See the Currency object for details. This parameter will be moving to another object in the future.
show_paypal Boolean N/A Output NOTE: a boolean must be passed as either a 1 or a 0.
proposal_total_string String N/A Output
invoice_total_string String N/A Output
vat_string String N/A Output
invoice_date_string String N/A Output
invoice_due_string String N/A Output
reference_number_string String N/A Output
payment_string String N/A Output
total_paid_string String N/A Output
remaining_balance_string String N/A Output
payment_received_email_subject_string String N/A Output
title_string String N/A Output
description_string String N/A Output
unit_price_string String N/A Output
quantity_string String N/A Output
line_total_string String N/A Output
amount_due_string String N/A Output

Example:

Request: https://{your_business}.lessaccounting.com/businesses/1.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
[Empty Response]

Example:

Request: https://{your_business}.lessaccounting.com/businesses/1.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
[Empty Response]

Bank Account Methods

index

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com/bank_accounts.xml
Business sub-domain required in url: true
Id parameter required in url: false
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the bank account.
name String N/A Output The name of the business.
business_id Integer N/A Output
created_at Datetime N/A Output
starting_balance Decimal N/A Output
last_imported_at Datetime N/A Output
balance Decimal N/A Output

Example:

Request: https://{your_business}.lessaccounting.com/bank_accounts.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
[ { "business_id": 1, "created_at": "2008-05-15T07:00:00Z", "id": 1, "last_imported_at": null, "name": "checking", "starting_balance": 0.0, "balance": -993.18 }, { "business_id": 1, "created_at": "2008-05-15T07:00:00Z", "id": 101, "last_imported_at": null, "name": "other", "starting_balance": 0.0, "balance": 1000.0 } ]

Example:

Request: https://{your_business}.lessaccounting.com/bank_accounts.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
<?xml version="1.0" encoding="UTF-8"?> <bank-accounts type="array"> <bank-account> <business-id type="integer">1</business-id> <created-at type="datetime">2008-05-15T07:00:00Z</created-at> <id type="integer">1</id> <last-imported-at type="datetime" nil="true"/> <name>checking</name> <starting-balance type="decimal">0.0</starting-balance> <balance type="decimal">-993.18</balance> </bank-account> <bank-account> <business-id type="integer">1</business-id> <created-at type="datetime">2008-05-15T07:00:00Z</created-at> <id type="integer">101</id> <last-imported-at type="datetime" nil="true"/> <name>other</name> <starting-balance type="decimal">0.0</starting-balance> <balance type="decimal">1000.0</balance> </bank-account> </bank-accounts>

show

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com/bank_accounts/1.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the bank account.
name String required Both The name of the business.
business_id Integer N/A Output
created_at Datetime N/A Output
starting_balance Decimal optional Both
last_imported_at Datetime optional Both
balance Decimal N/A Output

Example:

Request: https://{your_business}.lessaccounting.com/bank_accounts/1.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
{ "business_id": 1, "created_at": "2008-05-15T07:00:00Z", "id": 1, "last_imported_at": null, "name": "checking", "starting_balance": 0.0, "balance": -993.18 }

Example:

Request: https://{your_business}.lessaccounting.com/bank_accounts/1.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
<?xml version="1.0" encoding="UTF-8"?> <bank-account> <business-id type="integer">1</business-id> <created-at type="datetime">2008-05-15T07:00:00Z</created-at> <id type="integer">1</id> <last-imported-at type="datetime" nil="true"/> <name>checking</name> <starting-balance type="decimal">0.0</starting-balance> <balance type="decimal">-993.18</balance> </bank-account>

create

HTTP Verb/URL: POST https://<business_name>.lessaccounting.com/bank_accounts.xml
Business sub-domain required in url: true
Id parameter required in url: false
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the bank account.
name String required Both The name of the business.
business_id Integer N/A Output
created_at Datetime N/A Output
starting_balance Decimal optional Both
last_imported_at Datetime optional Both
balance Decimal N/A Output

Example:

Request: https://{your_business}.lessaccounting.com/bank_accounts.xml?bank_account[name]=&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
<?xml version="1.0" encoding="UTF-8"?> <errors> <error>Name can't be blank</error> <error>Name must be within range</error> </errors>

Example:

Request: https://{your_business}.lessaccounting.com/bank_accounts.xml?bank_account[name]=Checking&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 201
Response:
<?xml version="1.0" encoding="UTF-8"?> <bank-account> <business-id type="integer">1</business-id> <created-at type="datetime">2008-05-15T07:00:03Z</created-at> <id type="integer">138</id> <last-imported-at type="datetime" nil="true"/> <name>Checking</name> <starting-balance type="decimal">0.0</starting-balance> <balance type="decimal">0.0</balance> </bank-account>

Example:

Request: https://{your_business}.lessaccounting.com/bank_accounts.json?bank_account[name]=&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
{ "errors": { "name": [ "can't be blank", "must be within range" ] } }

Example:

Request: https://{your_business}.lessaccounting.com/bank_accounts.json?bank_account[name]=Checking&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 201
Response:
{ "business_id": 1, "created_at": "2008-05-15T07:00:02Z", "id": 137, "last_imported_at": null, "name": "Checking", "starting_balance": 0.0, "balance": 0.0 }

update

HTTP Verb/URL: PUT https://<business_name>.lessaccounting.com/bank_accounts/1.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
_method Must be supplied as: 'put'
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the bank account.
name String required Both The name of the business.
business_id Integer N/A Output
created_at Datetime N/A Output
starting_balance Decimal optional Both
last_imported_at Datetime optional Both
balance Decimal N/A Output

Example:

Request: https://{your_business}.lessaccounting.com/bank_accounts/1.json?bank_account[name]=&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
{ "errors": { "name": [ "can't be blank", "must be within range" ] } }

Example:

Request: https://{your_business}.lessaccounting.com/bank_accounts/1.xml?bank_account[name]=Checking&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Example:

Request: https://{your_business}.lessaccounting.com/bank_accounts/1.json?bank_account[name]=Checking&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Example:

Request: https://{your_business}.lessaccounting.com/bank_accounts/1.xml?bank_account[name]=&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
<?xml version="1.0" encoding="UTF-8"?> <errors> <error>Name can't be blank</error> <error>Name must be within range</error> </errors>

destroy

HTTP Verb/URL: DELETE https://<business_name>.lessaccounting.com/bank_accounts/1.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
_method Must be supplied as: 'delete'
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the bank account.
name String N/A Output The name of the business.
business_id Integer N/A Output
created_at Datetime N/A Output
starting_balance Decimal N/A Output
last_imported_at Datetime N/A Output
balance Decimal N/A Output

Example:

Request: https://{your_business}.lessaccounting.com/bank_accounts/1.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Example:

Request: https://{your_business}.lessaccounting.com/bank_accounts/1.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Expense Category Methods

index

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com/expense_categories.xml
Business sub-domain required in url: true
Id parameter required in url: false
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the expense category.
name String N/A Output The name of the expense category.
business_id String N/A Output The id of the business that this expense category belongs to.
expenses_count String N/A Output The number of expenses that belongs to this expense category.

Example:

Request: https://{your_business}.lessaccounting.com/expense_categories.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
<?xml version="1.0" encoding="UTF-8"?> <expense-categories type="array"> <expense-category> <business-id type="integer">1</business-id> <expenses-count type="integer">0</expenses-count> <id type="integer">1</id> <name>first expense</name> </expense-category> </expense-categories>

Example:

Request: https://{your_business}.lessaccounting.com/expense_categories.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
[ { "business_id": 1, "expenses_count": 0, "id": 1, "name": "first expense" } ]

show

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com/expense_categories/1.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the expense category.
name String required Both The name of the expense category.
business_id String N/A Output The id of the business that this expense category belongs to.
expenses_count String N/A Output The number of expenses that belongs to this expense category.

Example:

Request: https://{your_business}.lessaccounting.com/expense_categories/1.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
<?xml version="1.0" encoding="UTF-8"?> <expense-category> <business-id type="integer">1</business-id> <expenses-count type="integer">0</expenses-count> <id type="integer">1</id> <name>first expense</name> </expense-category>

Example:

Request: https://{your_business}.lessaccounting.com/expense_categories/1.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
{ "business_id": 1, "expenses_count": 0, "id": 1, "name": "first expense" }

create

HTTP Verb/URL: POST https://<business_name>.lessaccounting.com/expense_categories.xml
Business sub-domain required in url: true
Id parameter required in url: false
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the expense category.
name String required Both The name of the expense category.
business_id String N/A Output The id of the business that this expense category belongs to.
expenses_count String N/A Output The number of expenses that belongs to this expense category.

Example:

Request: https://{your_business}.lessaccounting.com/expense_categories.xml?expense_category[name]=&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
<?xml version="1.0" encoding="UTF-8"?> <errors> <error>Name can't be blank</error> <error>Name is too short (minimum is 1 characters)</error> </errors>

Example:

Request: https://{your_business}.lessaccounting.com/expense_categories.xml?expense_category[name]=Wages&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 201
Response:
<?xml version="1.0" encoding="UTF-8"?> <expense-category> <business-id type="integer">1</business-id> <expenses-count type="integer">0</expenses-count> <id type="integer">2698</id> <name>Wages</name> </expense-category>

Example:

Request: https://{your_business}.lessaccounting.com/expense_categories.json?expense_category[name]=Wages&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 201
Response:
{ "business_id": 1, "expenses_count": 0, "id": 2697, "name": "Wages" }

Example:

Request: https://{your_business}.lessaccounting.com/expense_categories.json?expense_category[name]=&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
{ "errors": { "name": [ "can't be blank", "is too short (minimum is 1 characters)" ] } }

update

HTTP Verb/URL: PUT https://<business_name>.lessaccounting.com/expense_categories/1.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
_method Must be supplied as: 'put'
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the expense category.
name String required Both The name of the expense category.
business_id String N/A Output The id of the business that this expense category belongs to.
expenses_count String N/A Output The number of expenses that belongs to this expense category.

Example:

Request: https://{your_business}.lessaccounting.com/expense_categories/1.xml?expense_category[name]=&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
<?xml version="1.0" encoding="UTF-8"?> <errors> <error>Name can't be blank</error> <error>Name is too short (minimum is 1 characters)</error> </errors>

Example:

Request: https://{your_business}.lessaccounting.com/expense_categories/1.json?expense_category[name]=Wages&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Example:

Request: https://{your_business}.lessaccounting.com/expense_categories/1.json?expense_category[name]=&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
{ "errors": { "name": [ "can't be blank", "is too short (minimum is 1 characters)" ] } }

Example:

Request: https://{your_business}.lessaccounting.com/expense_categories/1.xml?expense_category[name]=Wages&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

destroy

HTTP Verb/URL: DELETE https://<business_name>.lessaccounting.com/expense_categories/1.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
_method Must be supplied as: 'delete'
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the expense category.
name String N/A Output The name of the expense category.
business_id String N/A Output The id of the business that this expense category belongs to.
expenses_count String N/A Output The number of expenses that belongs to this expense category.

Example:

Request: https://{your_business}.lessaccounting.com/expense_categories/1.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Example:

Request: https://{your_business}.lessaccounting.com/expense_categories/1.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Expense Methods

index

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com/expenses.xml
Business sub-domain required in url: true
Id parameter required in url: false
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the expense.
since Integer Or Date optional Input Only return invoices that are newer than the expense id or date provided as the since value.
amount Decimal N/A Output
bank_account_id Integer N/A Output
title String N/A Output
check_number String N/A Output
created_at Datetime N/A Output
creator_id Integer N/A Output
updated_at Datetime N/A Output
updater_id Integer N/A Output
notes Text N/A Output
business_id Integer N/A Output
date Date N/A Output Returns the paid date if this expense is paid or the due date if it is not paid.
expense_category_id Integer N/A Output
contractor_id Integer N/A Output
employee_id Integer N/A Output
paid_date Date N/A Output Either due date or paid date is required.
is_paid Boolean N/A Output NOTE: a boolean must be passed as either a 1 or a 0.
transfer_fund_id Integer N/A Output The Transfer Fund that this expense is associated with.
payee_id Integer N/A Output
due_date Date N/A Output Either due date or paid date is required.
client_id Integer N/A Output
receipt_url Integer N/A Output
q String optional Input The query to use in search.
page Integer optional Input The page of the search results to return. Default is 1. The number of items per page is 25.

Example:

Request: https://{your_business}.lessaccounting.com/expenses.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
[ { "amount": 1.06, "bank_account_id": 1, "business_id": 1, "check_number": null, "client_id": 1, "contractor_id": null, "created_at": "2006-01-01T00:00:00Z", "creator_id": 1, "date": "2006-01-01", "due_date": "2006-01-01", "employee_id": null, "expense_category_id": 1, "id": 1, "is_paid": true, "notes": null, "paid_date": "2006-01-01", "payee_id": null, "title": "Check 111", "transfer_fund_id": null, "updated_at": "2006-01-01T00:00:00Z", "updater_id": 1, "receipt_url": "", "expense_items": [ { "amount": 1.06, "bank_account_id": null, "business_id": 1, "contractor_id": null, "created_at": "2006-01-01T00:00:00Z", "date": "2006-01-01", "employee_id": null, "expense_category_id": 1, "expense_id": 1, "id": 1, "is_paid": true, "notes": null, "payee_id": null, "repeated_template": false, "title": "Check 111", "transfer_fund_id": null, "updated_at": "2006-01-01T00:00:00Z", "years_holding_value": 0 } ] }, { "amount": 1.06, "bank_account_id": null, "business_id": 1, "check_number": null, "client_id": null, "contractor_id": null, "created_at": "2006-01-01T00:00:00Z", "creator_id": 1, "date": "2006-01-01", "due_date": "2006-01-01", "employee_id": null, "expense_category_id": 1, "id": 100, "is_paid": null, "notes": null, "paid_date": null, "payee_id": null, "title": "first expense", "transfer_fund_id": null, "updated_at": "2006-01-01T00:00:00Z", "updater_id": 1, "receipt_url": "", "expense_items": [ { "amount": 1.06, "bank_account_id": null, "business_id": 1, "contractor_id": null, "created_at": "2006-01-01T00:00:00Z", "date": "2006-01-01", "employee_id": null, "expense_category_id": 1, "expense_id": 100, "id": 100, "is_paid": null, "notes": null, "payee_id": null, "repeated_template": false, "title": null, "transfer_fund_id": null, "updated_at": "2006-01-01T00:00:00Z", "years_holding_value": 0 } ] }, { "amount": 1.06, "bank_account_id": 1, "business_id": 1, "check_number": null, "client_id": 1, "contractor_id": null, "created_at": "2006-01-01T00:00:00Z", "creator_id": 1, "date": "2006-01-01", "due_date": "2007-01-01", "employee_id": null, "expense_category_id": 1, "id": 999, "is_paid": null, "notes": null, "paid_date": null, "payee_id": null, "title": "Check 111", "transfer_fund_id": null, "updated_at": "2006-01-01T00:00:00Z", "updater_id": 1, "receipt_url": "", "expense_items": [ { "amount": 1.06, "bank_account_id": null, "business_id": 1, "contractor_id": null, "created_at": "2006-01-01T00:00:00Z", "date": "2006-01-01", "employee_id": null, "expense_category_id": 1, "expense_id": 999, "id": 999, "is_paid": null, "notes": null, "payee_id": null, "repeated_template": false, "title": "Check 111", "transfer_fund_id": null, "updated_at": "2006-01-01T00:00:00Z", "years_holding_value": 0 } ] }, { "amount": 1.06, "bank_account_id": 1, "business_id": 1, "check_number": null, "client_id": 1, "contractor_id": null, "created_at": "2006-01-01T00:00:00Z", "creator_id": 1, "date": null, "due_date": null, "employee_id": null, "expense_category_id": 1, "id": 2001, "is_paid": null, "notes": null, "paid_date": null, "payee_id": null, "title": "Check 111", "transfer_fund_id": null, "updated_at": "2006-01-01T00:00:00Z", "updater_id": 1, "receipt_url": "", "expense_items": [ { "amount": 1.06, "bank_account_id": null, "business_id": 1, "contractor_id": null, "created_at": "2006-01-01T00:00:00Z", "date": null, "employee_id": null, "expense_category_id": 1, "expense_id": 2001, "id": 2001, "is_paid": null, "notes": null, "payee_id": null, "repeated_template": false, "title": "Check 111", "transfer_fund_id": null, "updated_at": "2006-01-01T00:00:00Z", "years_holding_value": 0 } ] }, { "amount": 1.06, "bank_account_id": null, "business_id": 1, "check_number": null, "client_id": 1, "contractor_id": null, "created_at": "2006-01-01T00:00:00Z", "creator_id": 1, "date": "2006-01-01", "due_date": "2006-01-01", "employee_id": null, "expense_category_id": 1, "id": 2002, "is_paid": true, "notes": null, "paid_date": "2006-01-01", "payee_id": null, "title": "Check 111", "transfer_fund_id": null, "updated_at": "2006-01-01T00:00:00Z", "updater_id": 1, "receipt_url": "", "expense_items": [ { "amount": 1.06, "bank_account_id": null, "business_id": 1, "contractor_id": null, "created_at": "2006-01-01T00:00:00Z", "date": "2006-01-01", "employee_id": null, "expense_category_id": 1, "expense_id": 2002, "id": 2002, "is_paid": true, "notes": null, "payee_id": null, "repeated_template": false, "title": "Check 111", "transfer_fund_id": null, "updated_at": "2006-01-01T00:00:00Z", "years_holding_value": 0 } ] }, { "amount": 1.06, "bank_account_id": 1, "business_id": 1, "check_number": null, "client_id": 1, "contractor_id": null, "created_at": "2006-01-01T00:00:00Z", "creator_id": 1, "date": "2006-01-01", "due_date": "2006-01-01", "employee_id": null, "expense_category_id": 1, "id": 2013, "is_paid": true, "notes": null, "paid_date": "2006-01-01", "payee_id": null, "title": "Test 111", "transfer_fund_id": null, "updated_at": "2006-01-01T00:00:00Z", "updater_id": 1, "receipt_url": "", "expense_items": [ { "amount": 1.06, "bank_account_id": null, "business_id": 1, "contractor_id": null, "created_at": "2006-01-01T00:00:00Z", "date": "2006-01-01", "employee_id": null, "expense_category_id": 1, "expense_id": 2013, "id": 2013, "is_paid": true, "notes": null, "payee_id": null, "repeated_template": false, "title": "Test 111", "transfer_fund_id": null, "updated_at": "2006-01-01T00:00:00Z", "years_holding_value": 0 } ] }, { "amount": 1.06, "bank_account_id": 1, "business_id": 1, "check_number": null, "client_id": 1, "contractor_id": null, "created_at": "2006-01-01T00:00:00Z", "creator_id": 1, "date": "2006-01-01", "due_date": "2006-01-01", "employee_id": null, "expense_category_id": 1, "id": 2014, "is_paid": true, "notes": null, "paid_date": "2006-01-01", "payee_id": null, "title": "Check Card 111", "transfer_fund_id": null, "updated_at": "2006-01-01T00:00:00Z", "updater_id": 1, "receipt_url": "", "expense_items": [ { "amount": 1.06, "bank_account_id": null, "business_id": 1, "contractor_id": null, "created_at": "2006-01-01T00:00:00Z", "date": "2006-01-01", "employee_id": null, "expense_category_id": 1, "expense_id": 2014, "id": 2014, "is_paid": true, "notes": null, "payee_id": null, "repeated_template": false, "title": "Check Card 111", "transfer_fund_id": null, "updated_at": "2006-01-01T00:00:00Z", "years_holding_value": 0 } ] } ]

Example:

Request: https://{your_business}.lessaccounting.com/expenses.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
<?xml version="1.0" encoding="UTF-8"?> <expenses type="array"> <expense> <amount type="decimal">1.06</amount> <bank-account-id type="integer">1</bank-account-id> <business-id type="integer">1</business-id> <check-number nil="true"/> <client-id type="integer">1</client-id> <contractor-id type="integer" nil="true"/> <created-at type="datetime">2006-01-01T00:00:00Z</created-at> <creator-id type="integer">1</creator-id> <date type="date">2006-01-01</date> <due-date type="date">2006-01-01</due-date> <employee-id type="integer" nil="true"/> <expense-category-id type="integer">1</expense-category-id> <id type="integer">1</id> <is-paid type="boolean">true</is-paid> <notes nil="true"/> <paid-date type="date">2006-01-01</paid-date> <payee-id type="integer" nil="true"/> <title>Check 111</title> <transfer-fund-id type="integer" nil="true"/> <updated-at type="datetime">2006-01-01T00:00:00Z</updated-at> <updater-id type="integer">1</updater-id> <receipt-url></receipt-url> <expense-items type="array"> <expense-item> <amount type="decimal">1.06</amount> <bank-account-id type="integer" nil="true"/> <business-id type="integer">1</business-id> <contractor-id type="integer" nil="true"/> <created-at type="datetime">2006-01-01T00:00:00Z</created-at> <date type="date">2006-01-01</date> <employee-id type="integer" nil="true"/> <expense-category-id type="integer">1</expense-category-id> <id type="integer">1</id> <is-paid type="boolean">true</is-paid> <notes nil="true"/> <payee-id type="integer" nil="true"/> <title>Check 111</title> <transfer-fund-id type="integer" nil="true"/> <updated-at type="datetime">2006-01-01T00:00:00Z</updated-at> <years-holding-value type="integer">0</years-holding-value> </expense-item> </expense-items> </expense> <expense> <amount type="decimal">1.06</amount> <bank-account-id type="integer" nil="true"/> <business-id type="integer">1</business-id> <check-number nil="true"/> <client-id type="integer" nil="true"/> <contractor-id type="integer" nil="true"/> <created-at type="datetime">2006-01-01T00:00:00Z</created-at> <creator-id type="integer">1</creator-id> <date type="date">2006-01-01</date> <due-date type="date">2006-01-01</due-date> <employee-id type="integer" nil="true"/> <expense-category-id type="integer">1</expense-category-id> <id type="integer">100</id> <is-paid type="boolean" nil="true"/> <notes nil="true"/> <paid-date type="date" nil="true"/> <payee-id type="integer" nil="true"/> <title>first expense</title> <transfer-fund-id type="integer" nil="true"/> <updated-at type="datetime">2006-01-01T00:00:00Z</updated-at> <updater-id type="integer">1</updater-id> <receipt-url></receipt-url> <expense-items type="array"> <expense-item> <amount type="decimal">1.06</amount> <bank-account-id type="integer" nil="true"/> <business-id type="integer">1</business-id> <contractor-id type="integer" nil="true"/> <created-at type="datetime">2006-01-01T00:00:00Z</created-at> <date type="date">2006-01-01</date> <employee-id type="integer" nil="true"/> <expense-category-id type="integer">1</expense-category-id> <id type="integer">100</id> <is-paid type="boolean" nil="true"/> <notes nil="true"/> <payee-id type="integer" nil="true"/> <title nil="true"/> <transfer-fund-id type="integer" nil="true"/> <updated-at type="datetime">2006-01-01T00:00:00Z</updated-at> <years-holding-value type="integer">0</years-holding-value> </expense-item> </expense-items> </expense> <expense> <amount type="decimal">1.06</amount> <bank-account-id type="integer">1</bank-account-id> <business-id type="integer">1</business-id> <check-number nil="true"/> <client-id type="integer">1</client-id> <contractor-id type="integer" nil="true"/> <created-at type="datetime">2006-01-01T00:00:00Z</created-at> <creator-id type="integer">1</creator-id> <date type="date">2006-01-01</date> <due-date type="date">2007-01-01</due-date> <employee-id type="integer" nil="true"/> <expense-category-id type="integer">1</expense-category-id> <id type="integer">999</id> <is-paid type="boolean" nil="true"/> <notes nil="true"/> <paid-date type="date" nil="true"/> <payee-id type="integer" nil="true"/> <title>Check 111</title> <transfer-fund-id type="integer" nil="true"/> <updated-at type="datetime">2006-01-01T00:00:00Z</updated-at> <updater-id type="integer">1</updater-id> <receipt-url></receipt-url> <expense-items type="array"> <expense-item> <amount type="decimal">1.06</amount> <bank-account-id type="integer" nil="true"/> <business-id type="integer">1</business-id> <contractor-id type="integer" nil="true"/> <created-at type="datetime">2006-01-01T00:00:00Z</created-at> <date type="date">2006-01-01</date> <employee-id type="integer" nil="true"/> <expense-category-id type="integer">1</expense-category-id> <id type="integer">999</id> <is-paid type="boolean" nil="true"/> <notes nil="true"/> <payee-id type="integer" nil="true"/> <title>Check 111</title> <transfer-fund-id type="integer" nil="true"/> <updated-at type="datetime">2006-01-01T00:00:00Z</updated-at> <years-holding-value type="integer">0</years-holding-value> </expense-item> </expense-items> </expense> <expense> <amount type="decimal">1.06</amount> <bank-account-id type="integer">1</bank-account-id> <business-id type="integer">1</business-id> <check-number nil="true"/> <client-id type="integer">1</client-id> <contractor-id type="integer" nil="true"/> <created-at type="datetime">2006-01-01T00:00:00Z</created-at> <creator-id type="integer">1</creator-id> <date type="date" nil="true"/> <due-date type="date" nil="true"/> <employee-id type="integer" nil="true"/> <expense-category-id type="integer">1</expense-category-id> <id type="integer">2001</id> <is-paid type="boolean" nil="true"/> <notes nil="true"/> <paid-date type="date" nil="true"/> <payee-id type="integer" nil="true"/> <title>Check 111</title> <transfer-fund-id type="integer" nil="true"/> <updated-at type="datetime">2006-01-01T00:00:00Z</updated-at> <updater-id type="integer">1</updater-id> <receipt-url></receipt-url> <expense-items type="array"> <expense-item> <amount type="decimal">1.06</amount> <bank-account-id type="integer" nil="true"/> <business-id type="integer">1</business-id> <contractor-id type="integer" nil="true"/> <created-at type="datetime">2006-01-01T00:00:00Z</created-at> <date type="date" nil="true"/> <employee-id type="integer" nil="true"/> <expense-category-id type="integer">1</expense-category-id> <id type="integer">2001</id> <is-paid type="boolean" nil="true"/> <notes nil="true"/> <payee-id type="integer" nil="true"/> <title>Check 111</title> <transfer-fund-id type="integer" nil="true"/> <updated-at type="datetime">2006-01-01T00:00:00Z</updated-at> <years-holding-value type="integer">0</years-holding-value> </expense-item> </expense-items> </expense> <expense> <amount type="decimal">1.06</amount> <bank-account-id type="integer" nil="true"/> <business-id type="integer">1</business-id> <check-number nil="true"/> <client-id type="integer">1</client-id> <contractor-id type="integer" nil="true"/> <created-at type="datetime">2006-01-01T00:00:00Z</created-at> <creator-id type="integer">1</creator-id> <date type="date">2006-01-01</date> <due-date type="date">2006-01-01</due-date> <employee-id type="integer" nil="true"/> <expense-category-id type="integer">1</expense-category-id> <id type="integer">2002</id> <is-paid type="boolean">true</is-paid> <notes nil="true"/> <paid-date type="date">2006-01-01</paid-date> <payee-id type="integer" nil="true"/> <title>Check 111</title> <transfer-fund-id type="integer" nil="true"/> <updated-at type="datetime">2006-01-01T00:00:00Z</updated-at> <updater-id type="integer">1</updater-id> <receipt-url></receipt-url> <expense-items type="array"> <expense-item> <amount type="decimal">1.06</amount> <bank-account-id type="integer" nil="true"/> <business-id type="integer">1</business-id> <contractor-id type="integer" nil="true"/> <created-at type="datetime">2006-01-01T00:00:00Z</created-at> <date type="date">2006-01-01</date> <employee-id type="integer" nil="true"/> <expense-category-id type="integer">1</expense-category-id> <id type="integer">2002</id> <is-paid type="boolean">true</is-paid> <notes nil="true"/> <payee-id type="integer" nil="true"/> <title>Check 111</title> <transfer-fund-id type="integer" nil="true"/> <updated-at type="datetime">2006-01-01T00:00:00Z</updated-at> <years-holding-value type="integer">0</years-holding-value> </expense-item> </expense-items> </expense> <expense> <amount type="decimal">1.06</amount> <bank-account-id type="integer">1</bank-account-id> <business-id type="integer">1</business-id> <check-number nil="true"/> <client-id type="integer">1</client-id> <contractor-id type="integer" nil="true"/> <created-at type="datetime">2006-01-01T00:00:00Z</created-at> <creator-id type="integer">1</creator-id> <date type="date">2006-01-01</date> <due-date type="date">2006-01-01</due-date> <employee-id type="integer" nil="true"/> <expense-category-id type="integer">1</expense-category-id> <id type="integer">2013</id> <is-paid type="boolean">true</is-paid> <notes nil="true"/> <paid-date type="date">2006-01-01</paid-date> <payee-id type="integer" nil="true"/> <title>Test 111</title> <transfer-fund-id type="integer" nil="true"/> <updated-at type="datetime">2006-01-01T00:00:00Z</updated-at> <updater-id type="integer">1</updater-id> <receipt-url></receipt-url> <expense-items type="array"> <expense-item> <amount type="decimal">1.06</amount> <bank-account-id type="integer" nil="true"/> <business-id type="integer">1</business-id> <contractor-id type="integer" nil="true"/> <created-at type="datetime">2006-01-01T00:00:00Z</created-at> <date type="date">2006-01-01</date> <employee-id type="integer" nil="true"/> <expense-category-id type="integer">1</expense-category-id> <id type="integer">2013</id> <is-paid type="boolean">true</is-paid> <notes nil="true"/> <payee-id type="integer" nil="true"/> <title>Test 111</title> <transfer-fund-id type="integer" nil="true"/> <updated-at type="datetime">2006-01-01T00:00:00Z</updated-at> <years-holding-value type="integer">0</years-holding-value> </expense-item> </expense-items> </expense> <expense> <amount type="decimal">1.06</amount> <bank-account-id type="integer">1</bank-account-id> <business-id type="integer">1</business-id> <check-number nil="true"/> <client-id type="integer">1</client-id> <contractor-id type="integer" nil="true"/> <created-at type="datetime">2006-01-01T00:00:00Z</created-at> <creator-id type="integer">1</creator-id> <date type="date">2006-01-01</date> <due-date type="date">2006-01-01</due-date> <employee-id type="integer" nil="true"/> <expense-category-id type="integer">1</expense-category-id> <id type="integer">2014</id> <is-paid type="boolean">true</is-paid> <notes nil="true"/> <paid-date type="date">2006-01-01</paid-date> <payee-id type="integer" nil="true"/> <title>Check Card 111</title> <transfer-fund-id type="integer" nil="true"/> <updated-at type="datetime">2006-01-01T00:00:00Z</updated-at> <updater-id type="integer">1</updater-id> <receipt-url></receipt-url> <expense-items type="array"> <expense-item> <amount type="decimal">1.06</amount> <bank-account-id type="integer" nil="true"/> <business-id type="integer">1</business-id> <contractor-id type="integer" nil="true"/> <created-at type="datetime">2006-01-01T00:00:00Z</created-at> <date type="date">2006-01-01</date> <employee-id type="integer" nil="true"/> <expense-category-id type="integer">1</expense-category-id> <id type="integer">2014</id> <is-paid type="boolean">true</is-paid> <notes nil="true"/> <payee-id type="integer" nil="true"/> <title>Check Card 111</title> <transfer-fund-id type="integer" nil="true"/> <updated-at type="datetime">2006-01-01T00:00:00Z</updated-at> <years-holding-value type="integer">0</years-holding-value> </expense-item> </expense-items> </expense> </expenses>

index (since)

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
Same as index String required Output Same as index

uncategorized

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com/expenses/uncategorized.xml
Business sub-domain required in url: true
Id parameter required in url: false
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
Same as index String required Output Same as index expect only shows expenses that are uncategorized

Example:

Request: https://{your_business}.lessaccounting.com/expenses/uncategorized.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
<?xml version="1.0" encoding="UTF-8"?> <nil-classes type="array"/>

Example:

Request: https://{your_business}.lessaccounting.com/expenses/uncategorized.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
[ ]

show

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com/expenses/1.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the expense.
since Integer Or Date optional Input Only return invoices that are newer than the expense id or date provided as the since value.
amount Decimal optional Both
bank_account_id Integer optional Both
title String optional Both
check_number String optional Both
created_at Datetime N/A Output
creator_id Integer N/A Output
updated_at Datetime N/A Output
updater_id Integer N/A Output
notes Text optional Both
business_id Integer N/A Output
date Date N/A Output Returns the paid date if this expense is paid or the due date if it is not paid.
expense_category_id Integer optional Both
contractor_id Integer optional Both
employee_id Integer optional Both
paid_date Date required Both Either due date or paid date is required.
is_paid Boolean optional Both NOTE: a boolean must be passed as either a 1 or a 0.
transfer_fund_id Integer optional Both The Transfer Fund that this expense is associated with.
payee_id Integer optional Both
due_date Date required Both Either due date or paid date is required.
client_id Integer optional Both
receipt_url Integer N/A Output

Example:

Request: https://{your_business}.lessaccounting.com/expenses/1.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
{ "amount": 1.06, "bank_account_id": 1, "business_id": 1, "check_number": null, "client_id": 1, "contractor_id": null, "created_at": "2006-01-01T00:00:00Z", "creator_id": 1, "date": "2006-01-01", "due_date": "2006-01-01", "employee_id": null, "expense_category_id": 1, "id": 1, "is_paid": true, "notes": null, "paid_date": "2006-01-01", "payee_id": null, "title": "Check 111", "transfer_fund_id": null, "updated_at": "2006-01-01T00:00:00Z", "updater_id": 1, "receipt_url": "", "expense_items": [ { "amount": 1.06, "bank_account_id": null, "business_id": 1, "contractor_id": null, "created_at": "2006-01-01T00:00:00Z", "date": "2006-01-01", "employee_id": null, "expense_category_id": 1, "expense_id": 1, "id": 1, "is_paid": true, "notes": null, "payee_id": null, "repeated_template": false, "title": "Check 111", "transfer_fund_id": null, "updated_at": "2006-01-01T00:00:00Z", "years_holding_value": 0 } ] }

Example:

Request: https://{your_business}.lessaccounting.com/expenses/1.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
<?xml version="1.0" encoding="UTF-8"?> <expense> <amount type="decimal">1.06</amount> <bank-account-id type="integer">1</bank-account-id> <business-id type="integer">1</business-id> <check-number nil="true"/> <client-id type="integer">1</client-id> <contractor-id type="integer" nil="true"/> <created-at type="datetime">2006-01-01T00:00:00Z</created-at> <creator-id type="integer">1</creator-id> <date type="date">2006-01-01</date> <due-date type="date">2006-01-01</due-date> <employee-id type="integer" nil="true"/> <expense-category-id type="integer">1</expense-category-id> <id type="integer">1</id> <is-paid type="boolean">true</is-paid> <notes nil="true"/> <paid-date type="date">2006-01-01</paid-date> <payee-id type="integer" nil="true"/> <title>Check 111</title> <transfer-fund-id type="integer" nil="true"/> <updated-at type="datetime">2006-01-01T00:00:00Z</updated-at> <updater-id type="integer">1</updater-id> <receipt-url></receipt-url> <expense-items type="array"> <expense-item> <amount type="decimal">1.06</amount> <bank-account-id type="integer" nil="true"/> <business-id type="integer">1</business-id> <contractor-id type="integer" nil="true"/> <created-at type="datetime">2006-01-01T00:00:00Z</created-at> <date type="date">2006-01-01</date> <employee-id type="integer" nil="true"/> <expense-category-id type="integer">1</expense-category-id> <id type="integer">1</id> <is-paid type="boolean">true</is-paid> <notes nil="true"/> <payee-id type="integer" nil="true"/> <title>Check 111</title> <transfer-fund-id type="integer" nil="true"/> <updated-at type="datetime">2006-01-01T00:00:00Z</updated-at> <years-holding-value type="integer">0</years-holding-value> </expense-item> </expense-items> </expense>

create

HTTP Verb/URL: POST https://<business_name>.lessaccounting.com/expenses.xml
Business sub-domain required in url: true
Id parameter required in url: false
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the expense.
since Integer Or Date optional Input Only return invoices that are newer than the expense id or date provided as the since value.
amount Decimal optional Both
bank_account_id Integer optional Both
title String optional Both
check_number String optional Both
created_at Datetime N/A Output
creator_id Integer N/A Output
updated_at Datetime N/A Output
updater_id Integer N/A Output
notes Text optional Both
business_id Integer N/A Output
date Date N/A Output Returns the paid date if this expense is paid or the due date if it is not paid.
expense_category_id Integer optional Both
contractor_id Integer optional Both
employee_id Integer optional Both
paid_date Date required Both Either due date or paid date is required.
is_paid Boolean optional Both NOTE: a boolean must be passed as either a 1 or a 0.
transfer_fund_id Integer optional Both The Transfer Fund that this expense is associated with.
payee_id Integer optional Both
due_date Date required Both Either due date or paid date is required.
client_id Integer optional Both
receipt_url Integer N/A Output

Example:

Request: https://{your_business}.lessaccounting.com/expenses.json?expense[title]=&expense[amount]=&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
{ "errors": { "expense_items.amount": [ "is not a number" ], "amount": [ "is not a number" ], "date": [ "either due date or paid date must be a valid date format." ] } }

Example:

Request: https://{your_business}.lessaccounting.com/expenses.json?expense[title]=Pizza&expense[amount]=15.87&expense[due_date]=2008-01-01&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 201
Response:
{ "amount": 15.87, "bank_account_id": null, "business_id": 1, "check_number": null, "client_id": null, "contractor_id": null, "created_at": "2008-05-15T07:00:31Z", "creator_id": 1, "date": "2008-01-01", "due_date": "2008-01-01", "employee_id": null, "expense_category_id": null, "id": 2382, "is_paid": false, "notes": "", "paid_date": null, "payee_id": null, "title": "Pizza", "transfer_fund_id": null, "updated_at": "2008-05-15T07:00:31Z", "updater_id": 1, "receipt_url": "", "expense_items": [ { "amount": 15.87, "bank_account_id": null, "business_id": 1, "contractor_id": null, "created_at": "2008-05-15T07:00:31Z", "date": "2008-01-01", "employee_id": null, "expense_category_id": null, "expense_id": 2382, "id": 2380, "is_paid": false, "notes": null, "payee_id": null, "repeated_template": false, "title": "Pizza", "transfer_fund_id": null, "updated_at": "2008-05-15T07:00:31Z", "years_holding_value": 0 } ] }

Example:

Request: https://{your_business}.lessaccounting.com/expenses.xml?expense[title]=Pizza&expense[amount]=15.87&expense[due_date]=2008-01-01&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 201
Response:
<?xml version="1.0" encoding="UTF-8"?> <expense> <amount type="decimal">15.87</amount> <bank-account-id type="integer" nil="true"/> <business-id type="integer">1</business-id> <check-number nil="true"/> <client-id type="integer" nil="true"/> <contractor-id type="integer" nil="true"/> <created-at type="datetime">2008-05-15T07:00:32Z</created-at> <creator-id type="integer">1</creator-id> <date type="date">2008-01-01</date> <due-date type="date">2008-01-01</due-date> <employee-id type="integer" nil="true"/> <expense-category-id type="integer" nil="true"/> <id type="integer">2383</id> <is-paid type="boolean">false</is-paid> <notes></notes> <paid-date type="date" nil="true"/> <payee-id type="integer" nil="true"/> <title>Pizza</title> <transfer-fund-id type="integer" nil="true"/> <updated-at type="datetime">2008-05-15T07:00:32Z</updated-at> <updater-id type="integer">1</updater-id> <receipt-url></receipt-url> <expense-items type="array"> <expense-item> <amount type="decimal">15.87</amount> <bank-account-id type="integer" nil="true"/> <business-id type="integer">1</business-id> <contractor-id type="integer" nil="true"/> <created-at type="datetime">2008-05-15T07:00:32Z</created-at> <date type="date">2008-01-01</date> <employee-id type="integer" nil="true"/> <expense-category-id type="integer" nil="true"/> <id type="integer">2381</id> <is-paid type="boolean">false</is-paid> <notes nil="true"/> <payee-id type="integer" nil="true"/> <title>Pizza</title> <transfer-fund-id type="integer" nil="true"/> <updated-at type="datetime">2008-05-15T07:00:32Z</updated-at> <years-holding-value type="integer">0</years-holding-value> </expense-item> </expense-items> </expense>

Example:

Request: https://{your_business}.lessaccounting.com/expenses.xml?expense[title]=&expense[amount]=&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
<?xml version="1.0" encoding="UTF-8"?> <errors> <error>Expense items amount is not a number</error> <error>Amount is not a number</error> <error>Date either due date or paid date must be a valid date format.</error> </errors>

update

HTTP Verb/URL: PUT https://<business_name>.lessaccounting.com/expenses/1.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
_method Must be supplied as: 'put'
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the expense.
since Integer Or Date optional Input Only return invoices that are newer than the expense id or date provided as the since value.
amount Decimal optional Both
bank_account_id Integer optional Both
title String optional Both
check_number String optional Both
created_at Datetime N/A Output
creator_id Integer N/A Output
updated_at Datetime N/A Output
updater_id Integer N/A Output
notes Text optional Both
business_id Integer N/A Output
date Date N/A Output Returns the paid date if this expense is paid or the due date if it is not paid.
expense_category_id Integer optional Both
contractor_id Integer optional Both
employee_id Integer optional Both
paid_date Date required Both Either due date or paid date is required.
is_paid Boolean optional Both NOTE: a boolean must be passed as either a 1 or a 0.
transfer_fund_id Integer optional Both The Transfer Fund that this expense is associated with.
payee_id Integer optional Both
due_date Date required Both Either due date or paid date is required.
client_id Integer optional Both
receipt_url Integer N/A Output

Example:

Request: https://{your_business}.lessaccounting.com/expenses/1.json?expense[title]=&expense[amount]=&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
{ "errors": { "expense_items.amount": [ "is not a number" ], "amount": [ "is not a number" ] } }

Example:

Request: https://{your_business}.lessaccounting.com/expenses/1.xml?expense[title]=Pizza&expense[amount]=15.87&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Example:

Request: https://{your_business}.lessaccounting.com/expenses/1.json?expense[title]=Pizza&expense[amount]=15.87&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Example:

Request: https://{your_business}.lessaccounting.com/expenses/1.xml?expense[title]=&expense[amount]=&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
<?xml version="1.0" encoding="UTF-8"?> <errors> <error>Expense items amount is not a number</error> <error>Amount is not a number</error> </errors>

destroy

HTTP Verb/URL: DELETE https://<business_name>.lessaccounting.com/expenses/1.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
_method Must be supplied as: 'delete'
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the expense.
since Integer Or Date optional Input Only return invoices that are newer than the expense id or date provided as the since value.
amount Decimal N/A Output
bank_account_id Integer N/A Output
title String N/A Output
check_number String N/A Output
created_at Datetime N/A Output
creator_id Integer N/A Output
updated_at Datetime N/A Output
updater_id Integer N/A Output
notes Text N/A Output
business_id Integer N/A Output
date Date N/A Output Returns the paid date if this expense is paid or the due date if it is not paid.
expense_category_id Integer N/A Output
contractor_id Integer N/A Output
employee_id Integer N/A Output
paid_date Date N/A Output Either due date or paid date is required.
is_paid Boolean N/A Output NOTE: a boolean must be passed as either a 1 or a 0.
transfer_fund_id Integer N/A Output The Transfer Fund that this expense is associated with.
payee_id Integer N/A Output
due_date Date N/A Output Either due date or paid date is required.
client_id Integer N/A Output
receipt_url Integer N/A Output

Example:

Request: https://{your_business}.lessaccounting.com/expenses/1.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Example:

Request: https://{your_business}.lessaccounting.com/expenses/1.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Currency Methods

index

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com/currencies.xml
Business sub-domain required in url: true
Id parameter required in url: false
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the currency.
name Integer N/A Output
code Integer N/A Output
html_symbol Integer N/A Output

Example:

Request: https://{your_business}.lessaccounting.com/currencies.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
<?xml version="1.0" encoding="UTF-8"?> <currencies type="array"> <currency> <code>USD</code> <html-symbol>$</html-symbol> <id type="integer">1</id> <name nil="true"/> </currency> <currency> <code>CAD</code> <html-symbol>$</html-symbol> <id type="integer">2</id> <name nil="true"/> </currency> <currency> <code>EUR</code> <html-symbol>4</html-symbol> <id type="integer">3</id> <name nil="true"/> </currency> <currency> <code>GBP</code> <html-symbol>5</html-symbol> <id type="integer">4</id> <name nil="true"/> </currency> <currency> <code>OTH</code> <html-symbol>$</html-symbol> <id type="integer">5</id> <name nil="true"/> </currency> </currencies>

Example:

Request: https://{your_business}.lessaccounting.com/currencies.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
[ { "code": "USD", "html_symbol": "$", "id": 1, "name": null }, { "code": "CAD", "html_symbol": "$", "id": 2, "name": null }, { "code": "EUR", "html_symbol": "4", "id": 3, "name": null }, { "code": "GBP", "html_symbol": "5", "id": 4, "name": null }, { "code": "OTH", "html_symbol": "$", "id": 5, "name": null } ]

show

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com/currencies/1.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the currency.
name Integer N/A Output
code Integer N/A Output
html_symbol Integer N/A Output

Example:

Request: https://{your_business}.lessaccounting.com/currencies/1.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
{ "code": "USD", "html_symbol": "$", "id": 1, "name": null }

Example:

Request: https://{your_business}.lessaccounting.com/currencies/1.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
<?xml version="1.0" encoding="UTF-8"?> <currency> <code>USD</code> <html-symbol>$</html-symbol> <id type="integer">1</id> <name nil="true"/> </currency>

Contact Methods

index

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com/contacts.xml
Business sub-domain required in url: true
Id parameter required in url: false
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the contact.
name String N/A Output The full name of the contact. This field is *deprecated* in favor of the new first_name and last_name fields. Setting it will *not* automatically set the first_name and last_name fields. When you want to switch your contacts to the new naming scheme (i.e. change all the contacts you've created to use first_name/last_name), get in touch with us. We can migrate the data for you.
first_name String N/A Output The first name of the contact.
last_name String N/A Output The last name of the contact.
company_name String N/A Output
created_at Datetime N/A Output
updated_at Datetime N/A Output
is_contractor Boolean N/A Output NOTE: a boolean must be passed as either a 1 or a 0.
is_employee Boolean N/A Output NOTE: a boolean must be passed as either a 1 or a 0.
active Boolean N/A Output NOTE: a boolean must be passed as either a 1 or a 0.
note String N/A Output
address String N/A Output
email String N/A Output
phone_number_1 String N/A Output
phone_number_2 String N/A Output
basecamp_id Integer N/A Output The unique identifier for Basecamp.
highrise_id Integer N/A Output The unique identifier for Highrise.
google_id String N/A Output The unique identifier for Google.
q String optional Input The query to use in search.
page Integer optional Input The page of the search results to return. Default is 1. The number of items per page is 25.

Example:

Request: https://{your_business}.lessaccounting.com/contacts.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
[ { "active": true, "address": null, "basecamp_id": null, "company_name": null, "created_at": "2008-05-15T07:00:00Z", "first_name": "First", "google_id": null, "highrise_id": null, "id": 85, "is_contractor": null, "is_employee": true, "last_name": "a", "name": "a, First", "note": null, "updated_at": "2008-05-15T07:00:00Z", "email": "", "phone_number_1": null, "phone_number_2": null }, { "active": false, "address": null, "basecamp_id": null, "company_name": null, "created_at": "2008-05-15T07:00:00Z", "first_name": "First", "google_id": null, "highrise_id": null, "id": 86, "is_contractor": null, "is_employee": true, "last_name": "b", "name": "b, First", "note": null, "updated_at": "2008-05-15T07:00:00Z", "email": "", "phone_number_1": null, "phone_number_2": null }, { "active": true, "address": null, "basecamp_id": null, "company_name": null, "created_at": "2008-05-15T07:00:00Z", "first_name": "First", "google_id": null, "highrise_id": null, "id": 87, "is_contractor": null, "is_employee": true, "last_name": "c", "name": "c, First", "note": null, "updated_at": "2008-05-15T07:00:00Z", "email": "", "phone_number_1": null, "phone_number_2": null }, { "active": true, "address": null, "basecamp_id": null, "company_name": "company name", "created_at": "2008-05-15T07:00:00Z", "first_name": "first", "google_id": null, "highrise_id": null, "id": 1, "is_contractor": false, "is_employee": false, "last_name": "contact", "name": "contact, first", "note": null, "updated_at": "2008-05-15T07:00:00Z", "email": "sjdf@lsdjf.com", "phone_number_1": "555-555-1212", "phone_number_2": null }, { "active": true, "address": null, "basecamp_id": null, "company_name": null, "created_at": "2008-05-15T07:00:00Z", "first_name": "First", "google_id": null, "highrise_id": null, "id": 88, "is_contractor": null, "is_employee": true, "last_name": "d", "name": "d, First", "note": null, "updated_at": "2008-05-15T07:00:00Z", "email": "", "phone_number_1": null, "phone_number_2": null }, { "active": true, "address": null, "basecamp_id": null, "company_name": null, "created_at": "2008-05-15T07:00:00Z", "first_name": "First", "google_id": null, "highrise_id": null, "id": 89, "is_contractor": true, "is_employee": null, "last_name": "e", "name": "e, First", "note": null, "updated_at": "2008-05-15T07:00:00Z", "email": "", "phone_number_1": null, "phone_number_2": null }, { "active": true, "address": null, "basecamp_id": null, "company_name": null, "created_at": "2008-05-15T07:00:00Z", "first_name": "First", "google_id": null, "highrise_id": null, "id": 90, "is_contractor": true, "is_employee": null, "last_name": "f", "name": "f, First", "note": null, "updated_at": "2008-05-15T07:00:00Z", "email": "", "phone_number_1": null, "phone_number_2": null }, { "active": true, "address": null, "basecamp_id": null, "company_name": "The Ferret Freakatorium", "created_at": "2008-05-15T07:00:00Z", "first_name": "Freaky", "google_id": null, "highrise_id": null, "id": 93, "is_contractor": false, "is_employee": false, "last_name": "Ferret", "name": "Ferret, Freaky", "note": null, "updated_at": "2008-05-15T07:00:00Z", "email": "", "phone_number_1": null, "phone_number_2": null }, { "active": true, "address": null, "basecamp_id": null, "company_name": null, "created_at": "2008-05-15T07:00:00Z", "first_name": "First", "google_id": null, "highrise_id": null, "id": 91, "is_contractor": true, "is_employee": null, "last_name": "g", "name": "g, First", "note": null, "updated_at": "2008-05-15T07:00:00Z", "email": "", "phone_number_1": null, "phone_number_2": null }, { "active": true, "address": null, "basecamp_id": null, "company_name": null, "created_at": "2008-05-15T07:00:00Z", "first_name": "First", "google_id": null, "highrise_id": null, "id": 92, "is_contractor": true, "is_employee": null, "last_name": "h", "name": "h, First", "note": null, "updated_at": "2008-05-15T07:00:00Z", "email": "", "phone_number_1": null, "phone_number_2": null } ]

Example:

Request: https://{your_business}.lessaccounting.com/contacts.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
<?xml version="1.0" encoding="UTF-8"?> <contacts type="array"> <contact> <active type="boolean">true</active> <address nil="true"/> <basecamp-id type="integer" nil="true"/> <company-name nil="true"/> <created-at type="datetime">2008-05-15T07:00:00Z</created-at> <first-name>First</first-name> <google-id nil="true"/> <highrise-id type="integer" nil="true"/> <id type="integer">85</id> <is-contractor type="boolean" nil="true"/> <is-employee type="boolean">true</is-employee> <last-name>a</last-name> <name>a, First</name> <note nil="true"/> <updated-at type="datetime">2008-05-15T07:00:00Z</updated-at> <email></email> <phone-number-1 nil="true"/> <phone-number-2 nil="true"/> </contact> <contact> <active type="boolean">false</active> <address nil="true"/> <basecamp-id type="integer" nil="true"/> <company-name nil="true"/> <created-at type="datetime">2008-05-15T07:00:00Z</created-at> <first-name>First</first-name> <google-id nil="true"/> <highrise-id type="integer" nil="true"/> <id type="integer">86</id> <is-contractor type="boolean" nil="true"/> <is-employee type="boolean">true</is-employee> <last-name>b</last-name> <name>b, First</name> <note nil="true"/> <updated-at type="datetime">2008-05-15T07:00:00Z</updated-at> <email></email> <phone-number-1 nil="true"/> <phone-number-2 nil="true"/> </contact> <contact> <active type="boolean">true</active> <address nil="true"/> <basecamp-id type="integer" nil="true"/> <company-name nil="true"/> <created-at type="datetime">2008-05-15T07:00:00Z</created-at> <first-name>First</first-name> <google-id nil="true"/> <highrise-id type="integer" nil="true"/> <id type="integer">87</id> <is-contractor type="boolean" nil="true"/> <is-employee type="boolean">true</is-employee> <last-name>c</last-name> <name>c, First</name> <note nil="true"/> <updated-at type="datetime">2008-05-15T07:00:00Z</updated-at> <email></email> <phone-number-1 nil="true"/> <phone-number-2 nil="true"/> </contact> <contact> <active type="boolean">true</active> <address nil="true"/> <basecamp-id type="integer" nil="true"/> <company-name>company name</company-name> <created-at type="datetime">2008-05-15T07:00:00Z</created-at> <first-name>first</first-name> <google-id nil="true"/> <highrise-id type="integer" nil="true"/> <id type="integer">1</id> <is-contractor type="boolean">false</is-contractor> <is-employee type="boolean">false</is-employee> <last-name>contact</last-name> <name>contact, first</name> <note nil="true"/> <updated-at type="datetime">2008-05-15T07:00:00Z</updated-at> <email>sjdf@lsdjf.com</email> <phone-number-1>555-555-1212</phone-number-1> <phone-number-2 nil="true"/> </contact> <contact> <active type="boolean">true</active> <address nil="true"/> <basecamp-id type="integer" nil="true"/> <company-name nil="true"/> <created-at type="datetime">2008-05-15T07:00:00Z</created-at> <first-name>First</first-name> <google-id nil="true"/> <highrise-id type="integer" nil="true"/> <id type="integer">88</id> <is-contractor type="boolean" nil="true"/> <is-employee type="boolean">true</is-employee> <last-name>d</last-name> <name>d, First</name> <note nil="true"/> <updated-at type="datetime">2008-05-15T07:00:00Z</updated-at> <email></email> <phone-number-1 nil="true"/> <phone-number-2 nil="true"/> </contact> <contact> <active type="boolean">true</active> <address nil="true"/> <basecamp-id type="integer" nil="true"/> <company-name nil="true"/> <created-at type="datetime">2008-05-15T07:00:00Z</created-at> <first-name>First</first-name> <google-id nil="true"/> <highrise-id type="integer" nil="true"/> <id type="integer">89</id> <is-contractor type="boolean">true</is-contractor> <is-employee type="boolean" nil="true"/> <last-name>e</last-name> <name>e, First</name> <note nil="true"/> <updated-at type="datetime">2008-05-15T07:00:00Z</updated-at> <email></email> <phone-number-1 nil="true"/> <phone-number-2 nil="true"/> </contact> <contact> <active type="boolean">true</active> <address nil="true"/> <basecamp-id type="integer" nil="true"/> <company-name nil="true"/> <created-at type="datetime">2008-05-15T07:00:00Z</created-at> <first-name>First</first-name> <google-id nil="true"/> <highrise-id type="integer" nil="true"/> <id type="integer">90</id> <is-contractor type="boolean">true</is-contractor> <is-employee type="boolean" nil="true"/> <last-name>f</last-name> <name>f, First</name> <note nil="true"/> <updated-at type="datetime">2008-05-15T07:00:00Z</updated-at> <email></email> <phone-number-1 nil="true"/> <phone-number-2 nil="true"/> </contact> <contact> <active type="boolean">true</active> <address nil="true"/> <basecamp-id type="integer" nil="true"/> <company-name>The Ferret Freakatorium</company-name> <created-at type="datetime">2008-05-15T07:00:00Z</created-at> <first-name>Freaky</first-name> <google-id nil="true"/> <highrise-id type="integer" nil="true"/> <id type="integer">93</id> <is-contractor type="boolean">false</is-contractor> <is-employee type="boolean">false</is-employee> <last-name>Ferret</last-name> <name>Ferret, Freaky</name> <note nil="true"/> <updated-at type="datetime">2008-05-15T07:00:00Z</updated-at> <email></email> <phone-number-1 nil="true"/> <phone-number-2 nil="true"/> </contact> <contact> <active type="boolean">true</active> <address nil="true"/> <basecamp-id type="integer" nil="true"/> <company-name nil="true"/> <created-at type="datetime">2008-05-15T07:00:00Z</created-at> <first-name>First</first-name> <google-id nil="true"/> <highrise-id type="integer" nil="true"/> <id type="integer">91</id> <is-contractor type="boolean">true</is-contractor> <is-employee type="boolean" nil="true"/> <last-name>g</last-name> <name>g, First</name> <note nil="true"/> <updated-at type="datetime">2008-05-15T07:00:00Z</updated-at> <email></email> <phone-number-1 nil="true"/> <phone-number-2 nil="true"/> </contact> <contact> <active type="boolean">true</active> <address nil="true"/> <basecamp-id type="integer" nil="true"/> <company-name nil="true"/> <created-at type="datetime">2008-05-15T07:00:00Z</created-at> <first-name>First</first-name> <google-id nil="true"/> <highrise-id type="integer" nil="true"/> <id type="integer">92</id> <is-contractor type="boolean">true</is-contractor> <is-employee type="boolean" nil="true"/> <last-name>h</last-name> <name>h, First</name> <note nil="true"/> <updated-at type="datetime">2008-05-15T07:00:00Z</updated-at> <email></email> <phone-number-1 nil="true"/> <phone-number-2 nil="true"/> </contact> </contacts>

show

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com/contacts/1.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the contact.
name String optional Both The full name of the contact. This field is *deprecated* in favor of the new first_name and last_name fields. Setting it will *not* automatically set the first_name and last_name fields. When you want to switch your contacts to the new naming scheme (i.e. change all the contacts you've created to use first_name/last_name), get in touch with us. We can migrate the data for you.
first_name String required Both The first name of the contact.
last_name String required Both The last name of the contact.
company_name String N/A Output
created_at Datetime N/A Output
updated_at Datetime N/A Output
is_contractor Boolean optional Both NOTE: a boolean must be passed as either a 1 or a 0.
is_employee Boolean optional Both NOTE: a boolean must be passed as either a 1 or a 0.
active Boolean optional Both NOTE: a boolean must be passed as either a 1 or a 0.
note String optional Both
address String optional Both
email String optional Both
phone_number_1 String optional Both
phone_number_2 String optional Both
basecamp_id Integer N/A Output The unique identifier for Basecamp.
highrise_id Integer N/A Output The unique identifier for Highrise.
google_id String N/A Output The unique identifier for Google.

Example:

Request: https://{your_business}.lessaccounting.com/contacts/1.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
<?xml version="1.0" encoding="UTF-8"?> <contact> <active type="boolean">true</active> <address nil="true"/> <basecamp-id type="integer" nil="true"/> <company-name>company name</company-name> <created-at type="datetime">2008-05-15T07:00:00Z</created-at> <first-name>first</first-name> <google-id nil="true"/> <highrise-id type="integer" nil="true"/> <id type="integer">1</id> <is-contractor type="boolean">false</is-contractor> <is-employee type="boolean">false</is-employee> <last-name>contact</last-name> <name>contact, first</name> <note nil="true"/> <updated-at type="datetime">2008-05-15T07:00:00Z</updated-at> <email>sjdf@lsdjf.com</email> <phone-number-1>555-555-1212</phone-number-1> <phone-number-2 nil="true"/> </contact>

Example:

Request: https://{your_business}.lessaccounting.com/contacts/1.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
{ "active": true, "address": null, "basecamp_id": null, "company_name": "company name", "created_at": "2008-05-15T07:00:00Z", "first_name": "first", "google_id": null, "highrise_id": null, "id": 1, "is_contractor": false, "is_employee": false, "last_name": "contact", "name": "contact, first", "note": null, "updated_at": "2008-05-15T07:00:00Z", "email": "sjdf@lsdjf.com", "phone_number_1": "555-555-1212", "phone_number_2": null }

create

HTTP Verb/URL: POST https://<business_name>.lessaccounting.com/contacts.xml
Business sub-domain required in url: true
Id parameter required in url: false
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the contact.
name String optional Both The full name of the contact. This field is *deprecated* in favor of the new first_name and last_name fields. Setting it will *not* automatically set the first_name and last_name fields. When you want to switch your contacts to the new naming scheme (i.e. change all the contacts you've created to use first_name/last_name), get in touch with us. We can migrate the data for you.
first_name String required Both The first name of the contact.
last_name String required Both The last name of the contact.
company_name String N/A Output
created_at Datetime N/A Output
updated_at Datetime N/A Output
is_contractor Boolean optional Both NOTE: a boolean must be passed as either a 1 or a 0.
is_employee Boolean optional Both NOTE: a boolean must be passed as either a 1 or a 0.
active Boolean optional Both NOTE: a boolean must be passed as either a 1 or a 0.
note String optional Both
address String optional Both
email String optional Both
phone_number_1 String optional Both
phone_number_2 String optional Both
basecamp_id Integer N/A Output The unique identifier for Basecamp.
highrise_id Integer N/A Output The unique identifier for Highrise.
google_id String N/A Output The unique identifier for Google.

Example:

Request: https://{your_business}.lessaccounting.com/contacts.json?contact[first_name]=&contact[last_name]=&contact[email]=alsjdf@&contact[phone_number_1]=&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
{ "errors": { "emails": [ "is invalid" ], "last_name": [ "or company name is required" ] } }

Example:

Request: https://{your_business}.lessaccounting.com/contacts.xml?contact[first_name]=John&contact[last_name]=Alibastar&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 201
Response:
<?xml version="1.0" encoding="UTF-8"?> <contact> <active type="boolean">true</active> <address nil="true"/> <basecamp-id type="integer" nil="true"/> <company-name nil="true"/> <created-at type="datetime">2008-05-15T07:00:28Z</created-at> <first-name>John</first-name> <google-id nil="true"/> <highrise-id type="integer" nil="true"/> <id type="integer">121</id> <is-contractor type="boolean" nil="true"/> <is-employee type="boolean" nil="true"/> <last-name>Alibastar</last-name> <name>Alibastar, John</name> <note nil="true"/> <updated-at type="datetime">2008-05-15T07:00:28Z</updated-at> <email></email> <phone-number-1 nil="true"/> <phone-number-2 nil="true"/> </contact>

Example:

Request: https://{your_business}.lessaccounting.com/contacts.xml?contact[first_name]=&contact[last_name]=&contact[email]=alsjdf@&contact[phone_number_1]=&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
<?xml version="1.0" encoding="UTF-8"?> <errors> <error>Emails is invalid</error> <error>Last name or company name is required</error> </errors>

Example:

Request: https://{your_business}.lessaccounting.com/contacts.json?contact[first_name]=John&contact[last_name]=Alibastar&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 201
Response:
{ "active": true, "address": null, "basecamp_id": null, "company_name": null, "created_at": "2008-05-15T07:00:27Z", "first_name": "John", "google_id": null, "highrise_id": null, "id": 120, "is_contractor": null, "is_employee": null, "last_name": "Alibastar", "name": "Alibastar, John", "note": null, "updated_at": "2008-05-15T07:00:27Z", "email": "", "phone_number_1": null, "phone_number_2": null }

update

HTTP Verb/URL: PUT https://<business_name>.lessaccounting.com/contacts/1.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
_method Must be supplied as: 'put'
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the contact.
name String optional Both The full name of the contact. This field is *deprecated* in favor of the new first_name and last_name fields. Setting it will *not* automatically set the first_name and last_name fields. When you want to switch your contacts to the new naming scheme (i.e. change all the contacts you've created to use first_name/last_name), get in touch with us. We can migrate the data for you.
first_name String required Both The first name of the contact.
last_name String required Both The last name of the contact.
company_name String N/A Output
created_at Datetime N/A Output
updated_at Datetime N/A Output
is_contractor Boolean optional Both NOTE: a boolean must be passed as either a 1 or a 0.
is_employee Boolean optional Both NOTE: a boolean must be passed as either a 1 or a 0.
active Boolean optional Both NOTE: a boolean must be passed as either a 1 or a 0.
note String optional Both
address String optional Both
email String optional Both
phone_number_1 String optional Both
phone_number_2 String optional Both
basecamp_id Integer N/A Output The unique identifier for Basecamp.
highrise_id Integer N/A Output The unique identifier for Highrise.
google_id String N/A Output The unique identifier for Google.

Example:

Request: https://{your_business}.lessaccounting.com/contacts/1.json?contact[name]=John&contact[last_name]=Alibastar&&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Example:

Request: https://{your_business}.lessaccounting.com/contacts/1.xml?contact[name]=&contact[first_name]=&contact[last_name]=&contact[company_name]=&&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
<?xml version="1.0" encoding="UTF-8"?> <errors> <error>Last name or company name is required</error> </errors>

Example:

Request: https://{your_business}.lessaccounting.com/contacts/1.json?contact[name]=&contact[first_name]=&contact[last_name]=&contact[company_name]=&&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
{ "errors": { "last_name": [ "or company name is required" ] } }

Example:

Request: https://{your_business}.lessaccounting.com/contacts/1.xml?contact[name]=John&contact[last_name]=Alibastar&&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

destroy

HTTP Verb/URL: DELETE https://<business_name>.lessaccounting.com/contacts/1.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
_method Must be supplied as: 'delete'
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the contact.
name String N/A Output The full name of the contact. This field is *deprecated* in favor of the new first_name and last_name fields. Setting it will *not* automatically set the first_name and last_name fields. When you want to switch your contacts to the new naming scheme (i.e. change all the contacts you've created to use first_name/last_name), get in touch with us. We can migrate the data for you.
first_name String N/A Output The first name of the contact.
last_name String N/A Output The last name of the contact.
company_name String N/A Output
created_at Datetime N/A Output
updated_at Datetime N/A Output
is_contractor Boolean N/A Output NOTE: a boolean must be passed as either a 1 or a 0.
is_employee Boolean N/A Output NOTE: a boolean must be passed as either a 1 or a 0.
active Boolean N/A Output NOTE: a boolean must be passed as either a 1 or a 0.
note String N/A Output
address String N/A Output
email String N/A Output
phone_number_1 String N/A Output
phone_number_2 String N/A Output
basecamp_id Integer N/A Output The unique identifier for Basecamp.
highrise_id Integer N/A Output The unique identifier for Highrise.
google_id String N/A Output The unique identifier for Google.

Example:

Request: https://{your_business}.lessaccounting.com/contacts/1.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Example:

Request: https://{your_business}.lessaccounting.com/contacts/1.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Invoice Methods

index

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com/invoices.xml
Business sub-domain required in url: true
Id parameter required in url: false
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the invoice.
since Integer Or Date optional Input Only return invoices that are newer than the invoice id or invoiced date provided as the since value.
order String optional Input Sort results based on either created_at (default) or updated_at time.
reference_name_number String N/A Output This value will be auto-generated if it is omitted.
created_at Datetime N/A Output
updated_at Datetime N/A Output
proposal_template_id Integer N/A Output
header Text N/A Output
first_sent Datetime N/A Output The first datetime that this invoice was sent (or marked as sent).
sent_at Datetime N/A Output The most recent datetime that this invoice was sent.
sent_to Text N/A Output A comma separated list of email addresses that this invoice was sent to. This list is who a receipt will be sent to.
email_heading Text N/A Output
email_subject String N/A Output
proposal_id Integer N/A Output The unique identifier of the Proposal that this invoice was converted from. If this invoice was not converted from a proposal, this value will be nil.
bank_account_id Integer N/A Output The Bank Account that this invoice's Payments should be deposited into by default. Note that the true Bank Account is determined by the Payment items associated with this invoice. This Id is meant to be used as a cached default value.
sales_tax_amount Decimal N/A Output The total sales tax amount applied from the Line Items of this invoice.
sales_tax_percentage Decimal N/A Output The percentage of sales tax applied to this invoice. When an invoice is created, this value is pulled from the Business object, and it is cached here.
total Decimal N/A Output The total of the Line Items.
payment_total Decimal N/A Output The total amount of Payments that have been made so far.
business_id Integer N/A Output The Id of the Business that this invoice is associated with.
contact_id Integer N/A Output The Id of the Contact that this invoice is associated with.
due_on Date N/A Output The due date of the invoice. This defaults to today plus the "default due date" integer value of the Business object.
show_paypal Boolean N/A Output Whether or no to display the paypal button in the emailed invoice. The Business must have a paypal account setup (via the Business object) for this filed to be recognized. NOTE: a boolean must be passed as either a 1 or a 0.
currency_id Integer N/A Output The id for the currency type that this business uses. See the Currency object for details.
amount_due Decimal N/A Output The amount that is due for the invoice. If none is specified, it will be set to the total unpaid amount.
q String optional Input The query to use in search.
page Integer optional Input The page of the search results to return. Default is 1. The number of items per page is 25.

Example:

Request: https://{your_business}.lessaccounting.com/invoices.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
<?xml version="1.0" encoding="UTF-8"?> <invoices type="array"> <invoice> <amount-due type="decimal">85.2</amount-due> <bank-account-id type="integer">1</bank-account-id> <business-id type="integer">1</business-id> <contact-id type="integer">1</contact-id> <created-at type="datetime">2007-01-01T00:00:00Z</created-at> <currency-id type="integer">1</currency-id> <due-on type="date">2007-01-01</due-on> <email-heading>Please see the attached invoice.</email-heading> <email-subject>Invoice from bus1 - invoice 1</email-subject> <first-sent type="datetime">2007-01-01T00:00:00Z</first-sent> <header nil="true"/> <id type="integer">11</id> <payment-total type="decimal">0.0</payment-total> <proposal-id type="integer" nil="true"/> <proposal-template-id type="integer">1</proposal-template-id> <reference-name-number>invoice 1</reference-name-number> <sales-tax-amount type="decimal">0.0</sales-tax-amount> <sent-at type="datetime">2007-01-01T00:00:00Z</sent-at> <sent-to nil="true"/> <show-paypal type="boolean">true</show-paypal> <total type="decimal">85.2</total> <updated-at type="datetime">2007-01-01T00:00:00Z</updated-at> </invoice> <invoice> <amount-due type="decimal">85.2</amount-due> <bank-account-id type="integer" nil="true"/> <business-id type="integer">1</business-id> <contact-id type="integer">1</contact-id> <created-at type="datetime">2007-01-01T00:00:00Z</created-at> <currency-id type="integer">1</currency-id> <due-on type="date" nil="true"/> <email-heading>Please see the attached invoice.</email-heading> <email-subject>Invoice from bus1 - proposal 1</email-subject> <first-sent type="datetime" nil="true"/> <header nil="true"/> <id type="integer">122</id> <payment-total type="decimal">0.0</payment-total> <proposal-id type="integer" nil="true"/> <proposal-template-id type="integer">102</proposal-template-id> <reference-name-number>proposal 1</reference-name-number> <sales-tax-amount type="decimal">0.0</sales-tax-amount> <sent-at type="datetime" nil="true"/> <sent-to nil="true"/> <show-paypal type="boolean">true</show-paypal> <total type="decimal">85.2</total> <updated-at type="datetime">2007-01-01T00:00:00Z</updated-at> </invoice> <invoice> <amount-due type="decimal">85.2</amount-due> <bank-account-id type="integer" nil="true"/> <business-id type="integer">1</business-id> <contact-id type="integer">1</contact-id> <created-at type="datetime">2007-01-01T00:00:00Z</created-at> <currency-id type="integer">1</currency-id> <due-on type="date" nil="true"/> <email-heading>Please see the attached invoice.</email-heading> <email-subject>Invoice from bus1 - proposal 1</email-subject> <first-sent type="datetime" nil="true"/> <header nil="true"/> <id type="integer">123</id> <payment-total type="decimal">0.0</payment-total> <proposal-id type="integer" nil="true"/> <proposal-template-id type="integer">103</proposal-template-id> <reference-name-number>proposal 1</reference-name-number> <sales-tax-amount type="decimal">0.0</sales-tax-amount> <sent-at type="datetime" nil="true"/> <sent-to nil="true"/> <show-paypal type="boolean">true</show-paypal> <total type="decimal">85.2</total> <updated-at type="datetime">2007-01-01T00:00:00Z</updated-at> </invoice> <invoice> <amount-due type="decimal">85.2</amount-due> <bank-account-id type="integer" nil="true"/> <business-id type="integer">1</business-id> <contact-id type="integer">1</contact-id> <created-at type="datetime">2007-01-01T00:00:00Z</created-at> <currency-id type="integer">1</currency-id> <due-on type="date" nil="true"/> <email-heading>Please see the attached invoice.</email-heading> <email-subject>Invoice from bus1 - proposal 1</email-subject> <first-sent type="datetime" nil="true"/> <header nil="true"/> <id type="integer">124</id> <payment-total type="decimal">0.0</payment-total> <proposal-id type="integer" nil="true"/> <proposal-template-id type="integer">104</proposal-template-id> <reference-name-number>proposal 1</reference-name-number> <sales-tax-amount type="decimal">0.0</sales-tax-amount> <sent-at type="datetime" nil="true"/> <sent-to nil="true"/> <show-paypal type="boolean">true</show-paypal> <total type="decimal">85.2</total> <updated-at type="datetime">2007-01-01T00:00:00Z</updated-at> </invoice> <invoice> <amount-due type="decimal">85.2</amount-due> <bank-account-id type="integer" nil="true"/> <business-id type="integer">1</business-id> <contact-id type="integer">1</contact-id> <created-at type="datetime">2007-01-01T00:00:00Z</created-at> <currency-id type="integer">1</currency-id> <due-on type="date" nil="true"/> <email-heading>Please see the attached invoice.</email-heading> <email-subject>Invoice from bus1 - proposal 1</email-subject> <first-sent type="datetime" nil="true"/> <header nil="true"/> <id type="integer">125</id> <payment-total type="decimal">0.0</payment-total> <proposal-id type="integer" nil="true"/> <proposal-template-id type="integer">105</proposal-template-id> <reference-name-number>proposal 1</reference-name-number> <sales-tax-amount type="decimal">0.0</sales-tax-amount> <sent-at type="datetime" nil="true"/> <sent-to nil="true"/> <show-paypal type="boolean">true</show-paypal> <total type="decimal">85.2</total> <updated-at type="datetime">2007-01-01T00:00:00Z</updated-at> </invoice> <invoice> <amount-due type="decimal">85.2</amount-due> <bank-account-id type="integer" nil="true"/> <business-id type="integer">1</business-id> <contact-id type="integer">1</contact-id> <created-at type="datetime">2007-01-01T00:00:00Z</created-at> <currency-id type="integer">1</currency-id> <due-on type="date" nil="true"/> <email-heading>Please see the attached invoice.</email-heading> <email-subject>Invoice from bus1 - proposal 1</email-subject> <first-sent type="datetime" nil="true"/> <header nil="true"/> <id type="integer">126</id> <payment-total type="decimal">0.0</payment-total> <proposal-id type="integer" nil="true"/> <proposal-template-id type="integer">106</proposal-template-id> <reference-name-number>proposal 1</reference-name-number> <sales-tax-amount type="decimal">0.0</sales-tax-amount> <sent-at type="datetime" nil="true"/> <sent-to nil="true"/> <show-paypal type="boolean">true</show-paypal> <total type="decimal">85.2</total> <updated-at type="datetime">2007-01-01T00:00:00Z</updated-at> </invoice> <invoice> <amount-due type="decimal">85.2</amount-due> <bank-account-id type="integer" nil="true"/> <business-id type="integer">1</business-id> <contact-id type="integer">1</contact-id> <created-at type="datetime">2007-01-01T00:00:00Z</created-at> <currency-id type="integer">1</currency-id> <due-on type="date" nil="true"/> <email-heading>Please see the attached invoice.</email-heading> <email-subject>Invoice from bus1 - proposal 1</email-subject> <first-sent type="datetime" nil="true"/> <header nil="true"/> <id type="integer">127</id> <payment-total type="decimal">0.0</payment-total> <proposal-id type="integer" nil="true"/> <proposal-template-id type="integer">107</proposal-template-id> <reference-name-number>proposal 1</reference-name-number> <sales-tax-amount type="decimal">0.0</sales-tax-amount> <sent-at type="datetime" nil="true"/> <sent-to nil="true"/> <show-paypal type="boolean">true</show-paypal> <total type="decimal">85.2</total> <updated-at type="datetime">2007-01-01T00:00:00Z</updated-at> </invoice> <invoice> <amount-due type="decimal">85.2</amount-due> <bank-account-id type="integer" nil="true"/> <business-id type="integer">1</business-id> <contact-id type="integer">92</contact-id> <created-at type="datetime">2007-01-01T00:00:00Z</created-at> <currency-id type="integer">1</currency-id> <due-on type="date" nil="true"/> <email-heading>Please see the attached invoice.</email-heading> <email-subject>Invoice from bus1 - Mangy Mongoose</email-subject> <first-sent type="datetime" nil="true"/> <header nil="true"/> <id type="integer">129</id> <payment-total type="decimal">0.0</payment-total> <proposal-id type="integer" nil="true"/> <proposal-template-id type="integer">1</proposal-template-id> <reference-name-number>Mangy Mongoose</reference-name-number> <sales-tax-amount type="decimal">0.0</sales-tax-amount> <sent-at type="datetime" nil="true"/> <sent-to nil="true"/> <show-paypal type="boolean">true</show-paypal> <total type="decimal">85.2</total> <updated-at type="datetime">2007-01-01T00:00:00Z</updated-at> </invoice> </invoices>

Example:

Request: https://{your_business}.lessaccounting.com/invoices.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
[ { "amount_due": 85.2, "bank_account_id": 1, "business_id": 1, "contact_id": 1, "created_at": "2007-01-01T00:00:00Z", "currency_id": 1, "due_on": "2007-01-01", "email_heading": "Please see the attached invoice.", "email_subject": "Invoice from bus1 - invoice 1", "first_sent": "2007-01-01T00:00:00Z", "header": null, "id": 11, "payment_total": 0.0, "proposal_id": null, "proposal_template_id": 1, "reference_name_number": "invoice 1", "sales_tax_amount": 0.0, "sent_at": "2007-01-01T00:00:00Z", "sent_to": null, "show_paypal": true, "total": 85.2, "updated_at": "2007-01-01T00:00:00Z" }, { "amount_due": 85.2, "bank_account_id": null, "business_id": 1, "contact_id": 1, "created_at": "2007-01-01T00:00:00Z", "currency_id": 1, "due_on": null, "email_heading": "Please see the attached invoice.", "email_subject": "Invoice from bus1 - proposal 1", "first_sent": null, "header": null, "id": 122, "payment_total": 0.0, "proposal_id": null, "proposal_template_id": 102, "reference_name_number": "proposal 1", "sales_tax_amount": 0.0, "sent_at": null, "sent_to": null, "show_paypal": true, "total": 85.2, "updated_at": "2007-01-01T00:00:00Z" }, { "amount_due": 85.2, "bank_account_id": null, "business_id": 1, "contact_id": 1, "created_at": "2007-01-01T00:00:00Z", "currency_id": 1, "due_on": null, "email_heading": "Please see the attached invoice.", "email_subject": "Invoice from bus1 - proposal 1", "first_sent": null, "header": null, "id": 123, "payment_total": 0.0, "proposal_id": null, "proposal_template_id": 103, "reference_name_number": "proposal 1", "sales_tax_amount": 0.0, "sent_at": null, "sent_to": null, "show_paypal": true, "total": 85.2, "updated_at": "2007-01-01T00:00:00Z" }, { "amount_due": 85.2, "bank_account_id": null, "business_id": 1, "contact_id": 1, "created_at": "2007-01-01T00:00:00Z", "currency_id": 1, "due_on": null, "email_heading": "Please see the attached invoice.", "email_subject": "Invoice from bus1 - proposal 1", "first_sent": null, "header": null, "id": 124, "payment_total": 0.0, "proposal_id": null, "proposal_template_id": 104, "reference_name_number": "proposal 1", "sales_tax_amount": 0.0, "sent_at": null, "sent_to": null, "show_paypal": true, "total": 85.2, "updated_at": "2007-01-01T00:00:00Z" }, { "amount_due": 85.2, "bank_account_id": null, "business_id": 1, "contact_id": 1, "created_at": "2007-01-01T00:00:00Z", "currency_id": 1, "due_on": null, "email_heading": "Please see the attached invoice.", "email_subject": "Invoice from bus1 - proposal 1", "first_sent": null, "header": null, "id": 125, "payment_total": 0.0, "proposal_id": null, "proposal_template_id": 105, "reference_name_number": "proposal 1", "sales_tax_amount": 0.0, "sent_at": null, "sent_to": null, "show_paypal": true, "total": 85.2, "updated_at": "2007-01-01T00:00:00Z" }, { "amount_due": 85.2, "bank_account_id": null, "business_id": 1, "contact_id": 1, "created_at": "2007-01-01T00:00:00Z", "currency_id": 1, "due_on": null, "email_heading": "Please see the attached invoice.", "email_subject": "Invoice from bus1 - proposal 1", "first_sent": null, "header": null, "id": 126, "payment_total": 0.0, "proposal_id": null, "proposal_template_id": 106, "reference_name_number": "proposal 1", "sales_tax_amount": 0.0, "sent_at": null, "sent_to": null, "show_paypal": true, "total": 85.2, "updated_at": "2007-01-01T00:00:00Z" }, { "amount_due": 85.2, "bank_account_id": null, "business_id": 1, "contact_id": 1, "created_at": "2007-01-01T00:00:00Z", "currency_id": 1, "due_on": null, "email_heading": "Please see the attached invoice.", "email_subject": "Invoice from bus1 - proposal 1", "first_sent": null, "header": null, "id": 127, "payment_total": 0.0, "proposal_id": null, "proposal_template_id": 107, "reference_name_number": "proposal 1", "sales_tax_amount": 0.0, "sent_at": null, "sent_to": null, "show_paypal": true, "total": 85.2, "updated_at": "2007-01-01T00:00:00Z" }, { "amount_due": 85.2, "bank_account_id": null, "business_id": 1, "contact_id": 92, "created_at": "2007-01-01T00:00:00Z", "currency_id": 1, "due_on": null, "email_heading": "Please see the attached invoice.", "email_subject": "Invoice from bus1 - Mangy Mongoose", "first_sent": null, "header": null, "id": 129, "payment_total": 0.0, "proposal_id": null, "proposal_template_id": 1, "reference_name_number": "Mangy Mongoose", "sales_tax_amount": 0.0, "sent_at": null, "sent_to": null, "show_paypal": true, "total": 85.2, "updated_at": "2007-01-01T00:00:00Z" } ]

index (since)

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
Same as index String required Output Same as index

index/paid (since)

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
Same as index String required Output Same as index

index/unpaid (since)

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
Same as index String required Output Same as index

index/overdue (since)

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
Same as index String required Output Same as index

show

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com/invoices/1.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the invoice.
since Integer Or Date optional Input Only return invoices that are newer than the invoice id or invoiced date provided as the since value.
order String optional Input Sort results based on either created_at (default) or updated_at time.
reference_name_number String required Both This value will be auto-generated if it is omitted.
created_at Datetime N/A Output
updated_at Datetime N/A Output
proposal_template_id Integer N/A Output
header Text optional Both
first_sent Datetime N/A Output The first datetime that this invoice was sent (or marked as sent).
sent_at Datetime N/A Output The most recent datetime that this invoice was sent.
sent_to Text N/A Output A comma separated list of email addresses that this invoice was sent to. This list is who a receipt will be sent to.
email_heading Text optional Both
email_subject String optional Both
proposal_id Integer N/A Output The unique identifier of the Proposal that this invoice was converted from. If this invoice was not converted from a proposal, this value will be nil.
bank_account_id Integer N/A Output The Bank Account that this invoice's Payments should be deposited into by default. Note that the true Bank Account is determined by the Payment items associated with this invoice. This Id is meant to be used as a cached default value.
sales_tax_amount Decimal N/A Output The total sales tax amount applied from the Line Items of this invoice.
sales_tax_percentage Decimal N/A Output The percentage of sales tax applied to this invoice. When an invoice is created, this value is pulled from the Business object, and it is cached here.
total Decimal N/A Output The total of the Line Items.
payment_total Decimal N/A Output The total amount of Payments that have been made so far.
business_id Integer N/A Output The Id of the Business that this invoice is associated with.
contact_id Integer optional Both The Id of the Contact that this invoice is associated with.
due_on Date N/A Output The due date of the invoice. This defaults to today plus the "default due date" integer value of the Business object.
show_paypal Boolean N/A Output Whether or no to display the paypal button in the emailed invoice. The Business must have a paypal account setup (via the Business object) for this filed to be recognized. NOTE: a boolean must be passed as either a 1 or a 0.
currency_id Integer optional Both The id for the currency type that this business uses. See the Currency object for details.
amount_due Decimal optional Both The amount that is due for the invoice. If none is specified, it will be set to the total unpaid amount.

Example:

Request: https://{your_business}.lessaccounting.com/invoices/11.pdf?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
[Empty Response]

Example:

Request: https://{your_business}.lessaccounting.com/invoices/11.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
<?xml version="1.0" encoding="UTF-8"?> <invoice> <amount-due type="decimal">85.2</amount-due> <bank-account-id type="integer">1</bank-account-id> <business-id type="integer">1</business-id> <contact-id type="integer">1</contact-id> <created-at type="datetime">2007-01-01T00:00:00Z</created-at> <currency-id type="integer">1</currency-id> <due-on type="date">2007-01-01</due-on> <email-heading>Please see the attached invoice.</email-heading> <email-subject>Invoice from bus1 - invoice 1</email-subject> <first-sent type="datetime">2007-01-01T00:00:00Z</first-sent> <header nil="true"/> <id type="integer">11</id> <payment-total type="decimal">0.0</payment-total> <proposal-id type="integer" nil="true"/> <proposal-template-id type="integer">1</proposal-template-id> <reference-name-number>invoice 1</reference-name-number> <sales-tax-amount type="decimal">0.0</sales-tax-amount> <sent-at type="datetime">2007-01-01T00:00:00Z</sent-at> <sent-to nil="true"/> <show-paypal type="boolean">true</show-paypal> <total type="decimal">85.2</total> <updated-at type="datetime">2007-01-01T00:00:00Z</updated-at> </invoice>

Example:

Request: https://{your_business}.lessaccounting.com/invoices/11.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
{ "amount_due": 85.2, "bank_account_id": 1, "business_id": 1, "contact_id": 1, "created_at": "2007-01-01T00:00:00Z", "currency_id": 1, "due_on": "2007-01-01", "email_heading": "Please see the attached invoice.", "email_subject": "Invoice from bus1 - invoice 1", "first_sent": "2007-01-01T00:00:00Z", "header": null, "id": 11, "payment_total": 0.0, "proposal_id": null, "proposal_template_id": 1, "reference_name_number": "invoice 1", "sales_tax_amount": 0.0, "sent_at": "2007-01-01T00:00:00Z", "sent_to": null, "show_paypal": true, "total": 85.2, "updated_at": "2007-01-01T00:00:00Z" }

create

HTTP Verb/URL: POST https://<business_name>.lessaccounting.com/invoices.xml
Business sub-domain required in url: true
Id parameter required in url: false
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the invoice.
since Integer Or Date optional Input Only return invoices that are newer than the invoice id or invoiced date provided as the since value.
order String optional Input Sort results based on either created_at (default) or updated_at time.
reference_name_number String required Both This value will be auto-generated if it is omitted.
created_at Datetime N/A Output
updated_at Datetime N/A Output
proposal_template_id Integer N/A Output
header Text optional Both
first_sent Datetime N/A Output The first datetime that this invoice was sent (or marked as sent).
sent_at Datetime N/A Output The most recent datetime that this invoice was sent.
sent_to Text N/A Output A comma separated list of email addresses that this invoice was sent to. This list is who a receipt will be sent to.
email_heading Text optional Both
email_subject String optional Both
proposal_id Integer N/A Output The unique identifier of the Proposal that this invoice was converted from. If this invoice was not converted from a proposal, this value will be nil.
bank_account_id Integer N/A Output The Bank Account that this invoice's Payments should be deposited into by default. Note that the true Bank Account is determined by the Payment items associated with this invoice. This Id is meant to be used as a cached default value.
sales_tax_amount Decimal N/A Output The total sales tax amount applied from the Line Items of this invoice.
sales_tax_percentage Decimal N/A Output The percentage of sales tax applied to this invoice. When an invoice is created, this value is pulled from the Business object, and it is cached here.
total Decimal N/A Output The total of the Line Items.
payment_total Decimal N/A Output The total amount of Payments that have been made so far.
business_id Integer N/A Output The Id of the Business that this invoice is associated with.
contact_id Integer optional Both The Id of the Contact that this invoice is associated with.
due_on Date N/A Output The due date of the invoice. This defaults to today plus the "default due date" integer value of the Business object.
show_paypal Boolean N/A Output Whether or no to display the paypal button in the emailed invoice. The Business must have a paypal account setup (via the Business object) for this filed to be recognized. NOTE: a boolean must be passed as either a 1 or a 0.
currency_id Integer optional Both The id for the currency type that this business uses. See the Currency object for details.
amount_due Decimal optional Both The amount that is due for the invoice. If none is specified, it will be set to the total unpaid amount.

Example:

Request: https://{your_business}.lessaccounting.com/invoices.json?invoice[reference_name_number]=&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
{ "errors": { "reference_name_number": [ "is too short (minimum is 1 characters)" ] } }

Example:

Request: https://{your_business}.lessaccounting.com/invoices.xml?invoice[reference_name_number]=1&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 201
Response:
<?xml version="1.0" encoding="UTF-8"?> <invoice> <amount-due type="decimal">0.0</amount-due> <bank-account-id type="integer" nil="true"/> <business-id type="integer">1</business-id> <contact-id type="integer" nil="true"/> <created-at type="datetime">2008-05-15T07:00:35Z</created-at> <currency-id type="integer">1</currency-id> <due-on type="date">2008-05-15</due-on> <email-heading>Please see the attached invoice.</email-heading> <email-subject>Invoice from bus1 - 1</email-subject> <first-sent type="datetime" nil="true"/> <header></header> <id type="integer">1319</id> <payment-total type="decimal">0.0</payment-total> <proposal-id type="integer" nil="true"/> <proposal-template-id type="integer" nil="true"/> <reference-name-number>1</reference-name-number> <sales-tax-amount type="decimal">0.0</sales-tax-amount> <sent-at type="datetime" nil="true"/> <sent-to nil="true"/> <show-paypal type="boolean">true</show-paypal> <total type="decimal">0.0</total> <updated-at type="datetime">2008-05-15T07:00:35Z</updated-at> </invoice>

Example:

Request: https://{your_business}.lessaccounting.com/invoices.xml?invoice[reference_name_number]=&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
<?xml version="1.0" encoding="UTF-8"?> <errors> <error>Reference name number is too short (minimum is 1 characters)</error> </errors>

Example:

Request: https://{your_business}.lessaccounting.com/invoices.json?invoice[reference_name_number]=1&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 201
Response:
{ "amount_due": 0.0, "bank_account_id": null, "business_id": 1, "contact_id": null, "created_at": "2008-05-15T07:00:34Z", "currency_id": 1, "due_on": "2008-05-15", "email_heading": "Please see the attached invoice.", "email_subject": "Invoice from bus1 - 1", "first_sent": null, "header": "", "id": 1318, "payment_total": 0.0, "proposal_id": null, "proposal_template_id": null, "reference_name_number": "1", "sales_tax_amount": 0.0, "sent_at": null, "sent_to": null, "show_paypal": true, "total": 0.0, "updated_at": "2008-05-15T07:00:34Z" }

update

HTTP Verb/URL: PUT https://<business_name>.lessaccounting.com/invoices/1.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
_method Must be supplied as: 'put'
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the invoice.
since Integer Or Date optional Input Only return invoices that are newer than the invoice id or invoiced date provided as the since value.
order String optional Input Sort results based on either created_at (default) or updated_at time.
reference_name_number String required Both This value will be auto-generated if it is omitted.
created_at Datetime N/A Output
updated_at Datetime N/A Output
proposal_template_id Integer N/A Output
header Text optional Both
first_sent Datetime N/A Output The first datetime that this invoice was sent (or marked as sent).
sent_at Datetime N/A Output The most recent datetime that this invoice was sent.
sent_to Text N/A Output A comma separated list of email addresses that this invoice was sent to. This list is who a receipt will be sent to.
email_heading Text optional Both
email_subject String optional Both
proposal_id Integer N/A Output The unique identifier of the Proposal that this invoice was converted from. If this invoice was not converted from a proposal, this value will be nil.
bank_account_id Integer N/A Output The Bank Account that this invoice's Payments should be deposited into by default. Note that the true Bank Account is determined by the Payment items associated with this invoice. This Id is meant to be used as a cached default value.
sales_tax_amount Decimal N/A Output The total sales tax amount applied from the Line Items of this invoice.
sales_tax_percentage Decimal N/A Output The percentage of sales tax applied to this invoice. When an invoice is created, this value is pulled from the Business object, and it is cached here.
total Decimal N/A Output The total of the Line Items.
payment_total Decimal N/A Output The total amount of Payments that have been made so far.
business_id Integer N/A Output The Id of the Business that this invoice is associated with.
contact_id Integer optional Both The Id of the Contact that this invoice is associated with.
due_on Date N/A Output The due date of the invoice. This defaults to today plus the "default due date" integer value of the Business object.
show_paypal Boolean N/A Output Whether or no to display the paypal button in the emailed invoice. The Business must have a paypal account setup (via the Business object) for this filed to be recognized. NOTE: a boolean must be passed as either a 1 or a 0.
currency_id Integer optional Both The id for the currency type that this business uses. See the Currency object for details.
amount_due Decimal optional Both The amount that is due for the invoice. If none is specified, it will be set to the total unpaid amount.

Example:

Request: https://{your_business}.lessaccounting.com/invoices/11.xml?invoice[contact_id]=1&invoice[first_sent]=2008-01-01&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Example:

Request: https://{your_business}.lessaccounting.com/invoices/11.xml?invoice[reference_name_number]=&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
<?xml version="1.0" encoding="UTF-8"?> <errors> <error>Reference name number is too short (minimum is 1 characters)</error> </errors>

Example:

Request: https://{your_business}.lessaccounting.com/invoices/11.json?invoice[contact_id]=1&invoice[first_sent]=2008-01-01&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Example:

Request: https://{your_business}.lessaccounting.com/invoices/11.json?invoice[reference_name_number]=&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
{ "errors": { "reference_name_number": [ "is too short (minimum is 1 characters)" ] } }

destroy

HTTP Verb/URL: DELETE https://<business_name>.lessaccounting.com/invoices/1.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
_method Must be supplied as: 'delete'
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the invoice.
since Integer Or Date optional Input Only return invoices that are newer than the invoice id or invoiced date provided as the since value.
order String optional Input Sort results based on either created_at (default) or updated_at time.
reference_name_number String N/A Output This value will be auto-generated if it is omitted.
created_at Datetime N/A Output
updated_at Datetime N/A Output
proposal_template_id Integer N/A Output
header Text N/A Output
first_sent Datetime N/A Output The first datetime that this invoice was sent (or marked as sent).
sent_at Datetime N/A Output The most recent datetime that this invoice was sent.
sent_to Text N/A Output A comma separated list of email addresses that this invoice was sent to. This list is who a receipt will be sent to.
email_heading Text N/A Output
email_subject String N/A Output
proposal_id Integer N/A Output The unique identifier of the Proposal that this invoice was converted from. If this invoice was not converted from a proposal, this value will be nil.
bank_account_id Integer N/A Output The Bank Account that this invoice's Payments should be deposited into by default. Note that the true Bank Account is determined by the Payment items associated with this invoice. This Id is meant to be used as a cached default value.
sales_tax_amount Decimal N/A Output The total sales tax amount applied from the Line Items of this invoice.
sales_tax_percentage Decimal N/A Output The percentage of sales tax applied to this invoice. When an invoice is created, this value is pulled from the Business object, and it is cached here.
total Decimal N/A Output The total of the Line Items.
payment_total Decimal N/A Output The total amount of Payments that have been made so far.
business_id Integer N/A Output The Id of the Business that this invoice is associated with.
contact_id Integer N/A Output The Id of the Contact that this invoice is associated with.
due_on Date N/A Output The due date of the invoice. This defaults to today plus the "default due date" integer value of the Business object.
show_paypal Boolean N/A Output Whether or no to display the paypal button in the emailed invoice. The Business must have a paypal account setup (via the Business object) for this filed to be recognized. NOTE: a boolean must be passed as either a 1 or a 0.
currency_id Integer N/A Output The id for the currency type that this business uses. See the Currency object for details.
amount_due Decimal N/A Output The amount that is due for the invoice. If none is specified, it will be set to the total unpaid amount.

Example:

Request: https://{your_business}.lessaccounting.com/invoices/11.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Example:

Request: https://{your_business}.lessaccounting.com/invoices/11.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

sending

HTTP Verb/URL: POST https://<business_name>.lessaccounting.com/invoices/1/sending.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
method_of_sending String optional Input How the invoice is sent. Allowed values are: email, email_attachment, pdf_download, none
email_self Boolean optional Input Send a copy of the invoice to the user? NOTE: a boolean must be passed as either a 1 or a 0.
send_to_contact Boolean optional Input Send a copy of the invoice to the contact? NOTE: a boolean must be passed as either a 1 or a 0.

Example:

Request: https://{your_business}.lessaccounting.com/invoices/11/sending.xml?method_of_sending=email_attachment&email_self=true&send_to_contact=true&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
<?xml version="1.0" encoding="UTF-8"?> <hash> <message>Invoice sent and recorded as a note.</message> </hash>

Example:

Request: https://{your_business}.lessaccounting.com/invoices/11/sending.json?method_of_sending=email_attachment&email_self=true&send_to_contact=true&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
{ "message": "Invoice sent and recorded as a note." }

Line Item Methods

All the methods for the Line Item object must be called with the nested resource "proposals." This is true regardless of whether or not the Line Item is associated with a Proposal or an Invoice, the nested resource is to "proposals." Please see the examples.

index

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com/proposals/1/line_items.xml
Business sub-domain required in url: true
Id parameter required in url: false
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the line item.
created_at Datetime N/A Output
updated_at Datetime N/A Output
proposal_id Integer N/A Output The Id of the Proposal or Invoice that this line item is associated with.
unit_price Decimal N/A Output The price of one of this line item.
line Text N/A Output The name of the thing this line item is referring to.
additional_description Text N/A Output Any additional descriptive text to go along with this line item. Some HTML markup is allowed. Textile is supported, see http://hobix.com/textile/ for details.
quantity Decimal N/A Output
position Integer N/A Output The ordinal position of this line item. This is in relation to the other line items.
business_id Integer N/A Output The Id of the business that this line item/invoice/proposal is associated with.
total Decimal N/A Output The total of this line item. It is calculated as the unit_price * quantity.
subtotal Decimal N/A Output The subtotal of this line item.
taxes_total Decimal N/A Output The total taxes of this line item.
sales_tax_ids Array Of Integers N/A Output The sales tax ids that should be applied to this line item.
q String optional Input The query to use in search.
page Integer optional Input The page of the search results to return. Default is 1. The number of items per page is 25.

Example:

Request: https://{your_business}.lessaccounting.com/proposals/11/line_items.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
[ { "additional_description": null, "business_id": 1, "created_at": "2008-05-15T07:00:00Z", "id": 11, "line": "sdf", "position": 0, "proposal_id": 11, "quantity": 1.0, "subtotal": 392.32, "taxes_total": 0.0, "total": 392.32, "unit_price": 392.32, "updated_at": "2008-05-15T07:00:00Z", "sales_tax_ids": [ ] } ]

Example:

Request: https://{your_business}.lessaccounting.com/proposals/11/line_items.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
<?xml version="1.0" encoding="UTF-8"?> <line-items type="array"> <line-item> <additional-description nil="true"/> <business-id type="integer">1</business-id> <created-at type="datetime">2008-05-15T07:00:00Z</created-at> <id type="integer">11</id> <line>sdf</line> <position type="integer">0</position> <proposal-id type="integer">11</proposal-id> <quantity type="decimal">1.0</quantity> <subtotal type="decimal">392.32</subtotal> <taxes-total type="decimal">0.0</taxes-total> <total type="decimal">392.32</total> <unit-price type="decimal">392.32</unit-price> <updated-at type="datetime">2008-05-15T07:00:00Z</updated-at> <sales-tax-ids type="array"/> </line-item> </line-items>

show

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com/proposals/1/line_items.xml
Business sub-domain required in url: true
Id parameter required in url: false
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the line item.
created_at Datetime N/A Output
updated_at Datetime N/A Output
proposal_id Integer optional Both The Id of the Proposal or Invoice that this line item is associated with.
unit_price Decimal optional Both The price of one of this line item.
line Text optional Both The name of the thing this line item is referring to.
additional_description Text optional Both Any additional descriptive text to go along with this line item. Some HTML markup is allowed. Textile is supported, see http://hobix.com/textile/ for details.
quantity Decimal optional Both
position Integer optional Both The ordinal position of this line item. This is in relation to the other line items.
business_id Integer N/A Output The Id of the business that this line item/invoice/proposal is associated with.
total Decimal N/A Output The total of this line item. It is calculated as the unit_price * quantity.
subtotal Decimal N/A Output The subtotal of this line item.
taxes_total Decimal N/A Output The total taxes of this line item.
sales_tax_ids Array Of Integers optional Both The sales tax ids that should be applied to this line item.

Example:

Request: https://{your_business}.lessaccounting.com/proposals/1200/line_items/1103.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
{ "additional_description": null, "business_id": 1, "created_at": "2008-05-15T07:00:00Z", "id": 1103, "line": "fdsa", "position": 1, "proposal_id": 1200, "quantity": 1.0, "subtotal": 0.0, "taxes_total": 0.0, "total": 8.34, "unit_price": 8.34, "updated_at": "2008-05-15T07:00:00Z", "sales_tax_ids": [ 1, 2 ] }

Example:

Request: https://{your_business}.lessaccounting.com/proposals/1200/line_items/1103.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
<?xml version="1.0" encoding="UTF-8"?> <line-item> <additional-description nil="true"/> <business-id type="integer">1</business-id> <created-at type="datetime">2008-05-15T07:00:00Z</created-at> <id type="integer">1103</id> <line>fdsa</line> <position type="integer">1</position> <proposal-id type="integer">1200</proposal-id> <quantity type="decimal">1.0</quantity> <subtotal type="decimal">0.0</subtotal> <taxes-total type="decimal">0.0</taxes-total> <total type="decimal">8.34</total> <unit-price type="decimal">8.34</unit-price> <updated-at type="datetime">2008-05-15T07:00:00Z</updated-at> <sales-tax-ids type="array"> <sales-tax-id>1</sales-tax-id> <sales-tax-id>2</sales-tax-id> </sales-tax-ids> </line-item>

create

HTTP Verb/URL: POST https://<business_name>.lessaccounting.com/proposals/1/line_items.xml
Business sub-domain required in url: true
Id parameter required in url: false
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the line item.
created_at Datetime N/A Output
updated_at Datetime N/A Output
proposal_id Integer optional Both The Id of the Proposal or Invoice that this line item is associated with.
unit_price Decimal optional Both The price of one of this line item.
line Text optional Both The name of the thing this line item is referring to.
additional_description Text optional Both Any additional descriptive text to go along with this line item. Some HTML markup is allowed. Textile is supported, see http://hobix.com/textile/ for details.
quantity Decimal optional Both
position Integer optional Both The ordinal position of this line item. This is in relation to the other line items.
business_id Integer N/A Output The Id of the business that this line item/invoice/proposal is associated with.
total Decimal N/A Output The total of this line item. It is calculated as the unit_price * quantity.
subtotal Decimal N/A Output The subtotal of this line item.
taxes_total Decimal N/A Output The total taxes of this line item.
sales_tax_ids Array Of Integers optional Both The sales tax ids that should be applied to this line item.

Example:

Request: https://{your_business}.lessaccounting.com/proposals/11/line_items.xml?line_item[unit_price]=7.32&line_item[line]=line%20title&line_item[sales_tax_ids][]=1&line_item[sales_tax_ids][]=2&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 201
Response:
<?xml version="1.0" encoding="UTF-8"?> <line-item> <additional-description nil="true"/> <business-id type="integer">1</business-id> <created-at type="datetime">2008-05-15T07:00:38Z</created-at> <id type="integer">1210</id> <line>line title</line> <position type="integer">999</position> <proposal-id type="integer">11</proposal-id> <quantity type="decimal">1.0</quantity> <subtotal type="decimal">7.32</subtotal> <taxes-total type="decimal">1.1</taxes-total> <total type="decimal">8.42</total> <unit-price type="decimal">7.32</unit-price> <updated-at type="datetime">2008-05-15T07:00:38Z</updated-at> <sales-tax-ids type="array"> <sales-tax-id>1</sales-tax-id> <sales-tax-id>2</sales-tax-id> </sales-tax-ids> </line-item>

Example:

Request: https://{your_business}.lessaccounting.com/proposals/11/line_items.json?line_item[unit_price]=7.32&line_item[line]=line%20title&line_item[sales_tax_ids][]=1&line_item[sales_tax_ids][]=2&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 201
Response:
{ "additional_description": null, "business_id": 1, "created_at": "2008-05-15T07:00:37Z", "id": 1209, "line": "line title", "position": 999, "proposal_id": 11, "quantity": 1.0, "subtotal": 7.32, "taxes_total": 1.1, "total": 8.42, "unit_price": 7.32, "updated_at": "2008-05-15T07:00:37Z", "sales_tax_ids": [ 1, 2 ] }

Example:

Request: https://{your_business}.lessaccounting.com/proposals/11/line_items.json?line_item[unit_price]=non-number&line_item[line]=&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
{ "errors": { "unit_price": [ "can't be blank", "is not a number" ] } }

Example:

Request: https://{your_business}.lessaccounting.com/proposals/11/line_items.xml?line_item[unit_price]=non-number&line_item[line]=&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
<?xml version="1.0" encoding="UTF-8"?> <errors> <error>Unit price can't be blank</error> <error>Unit price is not a number</error> </errors>

update

HTTP Verb/URL: PUT https://<business_name>.lessaccounting.com/proposals/1/line_items.xml
Business sub-domain required in url: true
Id parameter required in url: false
API Key (api_key) parameter required: true
_method Must be supplied as: 'put'
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the line item.
created_at Datetime N/A Output
updated_at Datetime N/A Output
proposal_id Integer optional Both The Id of the Proposal or Invoice that this line item is associated with.
unit_price Decimal optional Both The price of one of this line item.
line Text optional Both The name of the thing this line item is referring to.
additional_description Text optional Both Any additional descriptive text to go along with this line item. Some HTML markup is allowed. Textile is supported, see http://hobix.com/textile/ for details.
quantity Decimal optional Both
position Integer optional Both The ordinal position of this line item. This is in relation to the other line items.
business_id Integer N/A Output The Id of the business that this line item/invoice/proposal is associated with.
total Decimal N/A Output The total of this line item. It is calculated as the unit_price * quantity.
subtotal Decimal N/A Output The subtotal of this line item.
taxes_total Decimal N/A Output The total taxes of this line item.
sales_tax_ids Array Of Integers optional Both The sales tax ids that should be applied to this line item.

Example:

Request: https://{your_business}.lessaccounting.com/proposals/11/line_items/11.json?line_item[unit_price]=non-number&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
{ "errors": { "unit_price": [ "can't be blank", "is not a number" ] } }

Example:

Request: https://{your_business}.lessaccounting.com/proposals/11/line_items/11.xml?line_item[unit_price]=321.12&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Example:

Request: https://{your_business}.lessaccounting.com/proposals/11/line_items/11.xml?line_item[unit_price]=non-number&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
<?xml version="1.0" encoding="UTF-8"?> <errors> <error>Unit price can't be blank</error> <error>Unit price is not a number</error> </errors>

Example:

Request: https://{your_business}.lessaccounting.com/proposals/11/line_items/11.json?line_item[unit_price]=321.12&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

destroy

HTTP Verb/URL: DELETE https://<business_name>.lessaccounting.com/proposals/1/line_items.xml
Business sub-domain required in url: true
Id parameter required in url: false
API Key (api_key) parameter required: true
_method Must be supplied as: 'delete'
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the line item.
created_at Datetime N/A Output
updated_at Datetime N/A Output
proposal_id Integer N/A Output The Id of the Proposal or Invoice that this line item is associated with.
unit_price Decimal N/A Output The price of one of this line item.
line Text N/A Output The name of the thing this line item is referring to.
additional_description Text N/A Output Any additional descriptive text to go along with this line item. Some HTML markup is allowed. Textile is supported, see http://hobix.com/textile/ for details.
quantity Decimal N/A Output
position Integer N/A Output The ordinal position of this line item. This is in relation to the other line items.
business_id Integer N/A Output The Id of the business that this line item/invoice/proposal is associated with.
total Decimal N/A Output The total of this line item. It is calculated as the unit_price * quantity.
subtotal Decimal N/A Output The subtotal of this line item.
taxes_total Decimal N/A Output The total taxes of this line item.
sales_tax_ids Array Of Integers N/A Output The sales tax ids that should be applied to this line item.

Example:

Request: https://{your_business}.lessaccounting.com/proposals/11/line_items/11.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Example:

Request: https://{your_business}.lessaccounting.com/proposals/11/line_items/11.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Note Methods

index

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com/notes.xml
Business sub-domain required in url: true
Id parameter required in url: false
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the note.
created_at Datetime N/A Output
updated_at Datetime N/A Output
business_id Integer N/A Output The Business this note is associated with.
contact_id Integer N/A Output The contact this note is associated with.
body Text N/A Output
is_system Boolean N/A Output Was this note created by the system NOTE: a boolean must be passed as either a 1 or a 0.
q String optional Input The query to use in search.
page Integer optional Input The page of the search results to return. Default is 1. The number of items per page is 25.

Example:

Request: https://{your_business}.lessaccounting.com/notes.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
[ { "body": "Proposal sent to allan@speedymediagroup.com, stevenbristol@gmail.com, at 2007-03-04 23:41:02\n\nProposal:\n\n\n\n\n
\n
\n

Hi Allan,

\n\n

Here is the proposal we talked about. Let me know if you have any questions. Please send the check asap, so we can start work.

\n\n

Thanks!

\n
\n
", "business_id": 1, "contact_id": 1, "created_at": "2007-01-01T00:00:00Z", "id": 7, "is_system": true, "updated_at": "2007-01-01T00:00:00Z" }, { "body": "Ferrets are freaky. Mongeese are mean.", "business_id": 1, "contact_id": 92, "created_at": "2007-01-01T00:00:00Z", "id": 8, "is_system": true, "updated_at": "2007-01-01T00:00:00Z" }, { "body": "Proposal sent to allan@speedymediagroup.com, stevenbristol@gmail.com, at 2007-03-04 23:41:02\n\nProposal:\n\n\n\n\n
\n
\n

Hi Allan,

\n\n

Here is the proposal we talked about. Let me know if you have any questions. Please send the check asap, so we can start work.

\n\n

Thanks!

\n
\n
", "business_id": 1, "contact_id": 1, "created_at": "2001-11-01T00:00:00Z", "id": 1, "is_system": null, "updated_at": "2001-11-01T00:00:00Z" }, { "body": "Proposal sent to allan@speedymediagroup.com, stevenbristol@gmail.com, at 2007-03-04 23:41:02\n\nProposal:\n\n\n\n\n
\n
\n

Hi Allan,

\n\n

Here is the proposal we talked about. Let me know if you have any questions. Please send the check asap, so we can start work.

\n\n

Thanks!

\n
\n
", "business_id": 1, "contact_id": 1, "created_at": "2001-11-01T00:00:00Z", "id": 5, "is_system": null, "updated_at": "2001-11-01T00:00:00Z" }, { "body": "Proposal sent to allan@speedymediagroup.com, stevenbristol@gmail.com, at 2007-03-04 23:41:02\n\nProposal:\n\n\n\n\n
\n
\n

Hi Allan,

\n\n

Here is the proposal we talked about. Let me know if you have any questions. Please send the check asap, so we can start work.

\n\n

Thanks!

\n
\n
", "business_id": 1, "contact_id": 1, "created_at": "2001-11-01T00:00:00Z", "id": 6, "is_system": null, "updated_at": "2001-11-01T00:00:00Z" } ]

Example:

Request: https://{your_business}.lessaccounting.com/notes.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
<?xml version="1.0" encoding="UTF-8"?> <notes type="array"> <note> <body>Proposal sent to allan@speedymediagroup.com, stevenbristol@gmail.com, at 2007-03-04 23:41:02 Proposal: <div class="send_header"> <div id="email_heading_preview"> <p>Hi Allan,</p> <p>Here is the proposal we talked about. Let me know if you have any questions. Please send <strong>the check</strong> asap, so we can start work.</p> <p>Thanks!</p> </div> </div></body> <business-id type="integer">1</business-id> <contact-id type="integer">1</contact-id> <created-at type="datetime">2007-01-01T00:00:00Z</created-at> <id type="integer">7</id> <is-system type="boolean">true</is-system> <updated-at type="datetime">2007-01-01T00:00:00Z</updated-at> </note> <note> <body>Ferrets are freaky. Mongeese are mean.</body> <business-id type="integer">1</business-id> <contact-id type="integer">92</contact-id> <created-at type="datetime">2007-01-01T00:00:00Z</created-at> <id type="integer">8</id> <is-system type="boolean">true</is-system> <updated-at type="datetime">2007-01-01T00:00:00Z</updated-at> </note> <note> <body>Proposal sent to allan@speedymediagroup.com, stevenbristol@gmail.com, at 2007-03-04 23:41:02 Proposal: <div class="send_header"> <div id="email_heading_preview"> <p>Hi Allan,</p> <p>Here is the proposal we talked about. Let me know if you have any questions. Please send <strong>the check</strong> asap, so we can start work.</p> <p>Thanks!</p> </div> </div></body> <business-id type="integer">1</business-id> <contact-id type="integer">1</contact-id> <created-at type="datetime">2001-11-01T00:00:00Z</created-at> <id type="integer">1</id> <is-system type="boolean" nil="true"/> <updated-at type="datetime">2001-11-01T00:00:00Z</updated-at> </note> <note> <body>Proposal sent to allan@speedymediagroup.com, stevenbristol@gmail.com, at 2007-03-04 23:41:02 Proposal: <div class="send_header"> <div id="email_heading_preview"> <p>Hi Allan,</p> <p>Here is the proposal we talked about. Let me know if you have any questions. Please send <strong>the check</strong> asap, so we can start work.</p> <p>Thanks!</p> </div> </div></body> <business-id type="integer">1</business-id> <contact-id type="integer">1</contact-id> <created-at type="datetime">2001-11-01T00:00:00Z</created-at> <id type="integer">5</id> <is-system type="boolean" nil="true"/> <updated-at type="datetime">2001-11-01T00:00:00Z</updated-at> </note> <note> <body>Proposal sent to allan@speedymediagroup.com, stevenbristol@gmail.com, at 2007-03-04 23:41:02 Proposal: <div class="send_header"> <div id="email_heading_preview"> <p>Hi Allan,</p> <p>Here is the proposal we talked about. Let me know if you have any questions. Please send <strong>the check</strong> asap, so we can start work.</p> <p>Thanks!</p> </div> </div></body> <business-id type="integer">1</business-id> <contact-id type="integer">1</contact-id> <created-at type="datetime">2001-11-01T00:00:00Z</created-at> <id type="integer">6</id> <is-system type="boolean" nil="true"/> <updated-at type="datetime">2001-11-01T00:00:00Z</updated-at> </note> </notes>

show

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com/notes/1.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the note.
created_at Datetime N/A Output
updated_at Datetime N/A Output
business_id Integer N/A Output The Business this note is associated with.
contact_id Integer optional Both The contact this note is associated with.
body Text optional Both
is_system Boolean N/A Output Was this note created by the system NOTE: a boolean must be passed as either a 1 or a 0.

Example:

Request: https://{your_business}.lessaccounting.com/notes/1.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
{ "body": "Proposal sent to allan@speedymediagroup.com, stevenbristol@gmail.com, at 2007-03-04 23:41:02\n\nProposal:\n\n\n\n\n
\n
\n

Hi Allan,

\n\n

Here is the proposal we talked about. Let me know if you have any questions. Please send the check asap, so we can start work.

\n\n

Thanks!

\n
\n
", "business_id": 1, "contact_id": 1, "created_at": "2001-11-01T00:00:00Z", "id": 1, "is_system": null, "updated_at": "2001-11-01T00:00:00Z" }

Example:

Request: https://{your_business}.lessaccounting.com/notes/1.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
<?xml version="1.0" encoding="UTF-8"?> <note> <body>Proposal sent to allan@speedymediagroup.com, stevenbristol@gmail.com, at 2007-03-04 23:41:02 Proposal: <div class="send_header"> <div id="email_heading_preview"> <p>Hi Allan,</p> <p>Here is the proposal we talked about. Let me know if you have any questions. Please send <strong>the check</strong> asap, so we can start work.</p> <p>Thanks!</p> </div> </div></body> <business-id type="integer">1</business-id> <contact-id type="integer">1</contact-id> <created-at type="datetime">2001-11-01T00:00:00Z</created-at> <id type="integer">1</id> <is-system type="boolean" nil="true"/> <updated-at type="datetime">2001-11-01T00:00:00Z</updated-at> </note>

create

HTTP Verb/URL: POST https://<business_name>.lessaccounting.com/notes.xml
Business sub-domain required in url: true
Id parameter required in url: false
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the note.
created_at Datetime N/A Output
updated_at Datetime N/A Output
business_id Integer N/A Output The Business this note is associated with.
contact_id Integer optional Both The contact this note is associated with.
body Text optional Both
is_system Boolean N/A Output Was this note created by the system NOTE: a boolean must be passed as either a 1 or a 0.

Example:

Request: https://{your_business}.lessaccounting.com/notes.xml?note[body]=note¬e[contact_id]=1&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 201
Response:
<?xml version="1.0" encoding="UTF-8"?> <note> <body>note</body> <business-id type="integer">1</business-id> <contact-id type="integer">1</contact-id> <created-at type="datetime">2008-05-15T07:00:39Z</created-at> <id type="integer">49</id> <is-system type="boolean" nil="true"/> <updated-at type="datetime">2008-05-15T07:00:39Z</updated-at> </note>

Example:

Request: https://{your_business}.lessaccounting.com/notes.xml?note[body]=&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
<?xml version="1.0" encoding="UTF-8"?> <errors> <error>Body can't be blank</error> </errors>

Example:

Request: https://{your_business}.lessaccounting.com/notes.json?note[body]=&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
{ "errors": { "body": [ "can't be blank" ] } }

Example:

Request: https://{your_business}.lessaccounting.com/notes.json?note[body]=note¬e[contact_id]=1&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 201
Response:
{ "body": "note", "business_id": 1, "contact_id": 1, "created_at": "2008-05-15T07:00:39Z", "id": 48, "is_system": null, "updated_at": "2008-05-15T07:00:39Z" }

update

HTTP Verb/URL: PUT https://<business_name>.lessaccounting.com/notes/1.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
_method Must be supplied as: 'put'
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the note.
created_at Datetime N/A Output
updated_at Datetime N/A Output
business_id Integer N/A Output The Business this note is associated with.
contact_id Integer optional Both The contact this note is associated with.
body Text optional Both
is_system Boolean N/A Output Was this note created by the system NOTE: a boolean must be passed as either a 1 or a 0.

Example:

Request: https://{your_business}.lessaccounting.com/notes/1.xml?note[body]=note&&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Example:

Request: https://{your_business}.lessaccounting.com/notes/1.xml?note[body]=&&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
<?xml version="1.0" encoding="UTF-8"?> <errors> <error>Body can't be blank</error> </errors>

Example:

Request: https://{your_business}.lessaccounting.com/notes/1.json?note[body]=&&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
{ "errors": { "body": [ "can't be blank" ] } }

Example:

Request: https://{your_business}.lessaccounting.com/notes/1.json?note[body]=note&&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

destroy

HTTP Verb/URL: DELETE https://<business_name>.lessaccounting.com/notes/1.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
_method Must be supplied as: 'delete'
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the note.
created_at Datetime N/A Output
updated_at Datetime N/A Output
business_id Integer N/A Output The Business this note is associated with.
contact_id Integer N/A Output The contact this note is associated with.
body Text N/A Output
is_system Boolean N/A Output Was this note created by the system NOTE: a boolean must be passed as either a 1 or a 0.

Example:

Request: https://{your_business}.lessaccounting.com/notes/1.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Example:

Request: https://{your_business}.lessaccounting.com/notes/1.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Payment Methods

index

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com/payments.xml
Business sub-domain required in url: true
Id parameter required in url: false
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the payment.
since Integer Or Date optional Input Only return invoices that are newer than the payment id or date provided as the since value.
created_at Datetime N/A Output
updated_at Datetime N/A Output
amount Decimal N/A Output
invoice_id Integer N/A Output The Invoice this payment is associated with.
bank_account_id Integer N/A Output The Bank Account that this payment is associated with.
date Date N/A Output The date this payment was deposited.
business_id Integer N/A Output The Business this payment is associated with.
notes Text N/A Output
is_paid Boolean N/A Output This field is deprecated. It is still available to preserve backwards compatibility and its value will always be true. NOTE: a boolean must be passed as either a 1 or a 0.
expense_category_id Integer N/A Output The Expense Category this payment is associated with.
is_other_income Boolean N/A Output Is this payment from Other Income? This is not set directly. NOTE: a boolean must be passed as either a 1 or a 0.
is_interest_income Boolean N/A Output Is this payment from Interest Income? This is not set directly. NOTE: a boolean must be passed as either a 1 or a 0.
is_regular_income Boolean N/A Output Is this payment from Regular Income, like and invoice? This is not set directly. NOTE: a boolean must be passed as either a 1 or a 0.
is_expense Boolean N/A Output Is this payment a refund from an Expense? This is not set directly. NOTE: a boolean must be passed as either a 1 or a 0.
is_transfer Boolean N/A Output The Transfer Fund that this payment is associated with. NOTE: a boolean must be passed as either a 1 or a 0.
payment_type String N/A Output The string describing the type of payment this payment is. Allowed values are "expense refund," "regular income," "interest income" or "other income." The proper boolean flag is set automatically based on this string value.
q String optional Input The query to use in search.
page Integer optional Input The page of the search results to return. Default is 1. The number of items per page is 25.

Example:

Request: https://{your_business}.lessaccounting.com/payments.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
<?xml version="1.0" encoding="UTF-8"?> <payments type="array"> <payment> <amount type="decimal">10.0</amount> <bank-account-id type="integer">1</bank-account-id> <business-id type="integer">1</business-id> <created-at type="datetime">2008-05-15T07:00:01Z</created-at> <date type="date">2007-01-01</date> <expense-category-id type="integer" nil="true"/> <id type="integer">1</id> <invoice-id type="integer">11</invoice-id> <is-expense type="boolean" nil="true"/> <is-interest-income type="boolean" nil="true"/> <is-other-income type="boolean" nil="true"/> <is-regular-income type="boolean">true</is-regular-income> <is-transfer type="boolean" nil="true"/> <notes nil="true"/> <payment-type>Regular Income</payment-type> <updated-at type="datetime">2008-05-15T07:00:01Z</updated-at> <is-paid type="boolean">true</is-paid> </payment> <payment> <amount type="decimal">85.24</amount> <bank-account-id type="integer" nil="true"/> <business-id type="integer">1</business-id> <created-at type="datetime">2008-05-15T07:00:01Z</created-at> <date type="date">2007-01-01</date> <expense-category-id type="integer" nil="true"/> <id type="integer">100</id> <invoice-id type="integer" nil="true"/> <is-expense type="boolean" nil="true"/> <is-interest-income type="boolean" nil="true"/> <is-other-income type="boolean">true</is-other-income> <is-regular-income type="boolean" nil="true"/> <is-transfer type="boolean" nil="true"/> <notes nil="true"/> <payment-type>Other Income</payment-type> <updated-at type="datetime">2008-05-15T07:00:01Z</updated-at> <is-paid type="boolean">true</is-paid> </payment> <payment> <amount type="decimal">1000.0</amount> <bank-account-id type="integer">101</bank-account-id> <business-id type="integer">1</business-id> <created-at type="datetime">2008-05-15T07:00:01Z</created-at> <date type="date">2007-01-01</date> <expense-category-id type="integer" nil="true"/> <id type="integer">101</id> <invoice-id type="integer" nil="true"/> <is-expense type="boolean" nil="true"/> <is-interest-income type="boolean" nil="true"/> <is-other-income type="boolean" nil="true"/> <is-regular-income type="boolean" nil="true"/> <is-transfer type="boolean">true</is-transfer> <notes nil="true"/> <payment-type>Transfer Funds</payment-type> <updated-at type="datetime">2008-05-15T07:00:01Z</updated-at> <is-paid type="boolean">true</is-paid> </payment> </payments>

Example:

Request: https://{your_business}.lessaccounting.com/payments.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
[ { "amount": 10.0, "bank_account_id": 1, "business_id": 1, "created_at": "2008-05-15T07:00:01Z", "date": "2007-01-01", "expense_category_id": null, "id": 1, "invoice_id": 11, "is_expense": null, "is_interest_income": null, "is_other_income": null, "is_regular_income": true, "is_transfer": null, "notes": null, "payment_type": "Regular Income", "updated_at": "2008-05-15T07:00:01Z", "is_paid": true }, { "amount": 85.24, "bank_account_id": null, "business_id": 1, "created_at": "2008-05-15T07:00:01Z", "date": "2007-01-01", "expense_category_id": null, "id": 100, "invoice_id": null, "is_expense": null, "is_interest_income": null, "is_other_income": true, "is_regular_income": null, "is_transfer": null, "notes": null, "payment_type": "Other Income", "updated_at": "2008-05-15T07:00:01Z", "is_paid": true }, { "amount": 1000.0, "bank_account_id": 101, "business_id": 1, "created_at": "2008-05-15T07:00:01Z", "date": "2007-01-01", "expense_category_id": null, "id": 101, "invoice_id": null, "is_expense": null, "is_interest_income": null, "is_other_income": null, "is_regular_income": null, "is_transfer": true, "notes": null, "payment_type": "Transfer Funds", "updated_at": "2008-05-15T07:00:01Z", "is_paid": true } ]

index (since)

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
Same as index String required Output Same as index

show

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com/payments/1.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the payment.
since Integer Or Date optional Input Only return invoices that are newer than the payment id or date provided as the since value.
created_at Datetime N/A Output
updated_at Datetime N/A Output
amount Decimal required Both
invoice_id Integer optional Both The Invoice this payment is associated with.
bank_account_id Integer optional Both The Bank Account that this payment is associated with.
date Date optional Both The date this payment was deposited.
business_id Integer N/A Output The Business this payment is associated with.
notes Text optional Both
is_paid Boolean optional Both This field is deprecated. It is still available to preserve backwards compatibility and its value will always be true. NOTE: a boolean must be passed as either a 1 or a 0.
expense_category_id Integer optional Both The Expense Category this payment is associated with.
is_other_income Boolean N/A Output Is this payment from Other Income? This is not set directly. NOTE: a boolean must be passed as either a 1 or a 0.
is_interest_income Boolean N/A Output Is this payment from Interest Income? This is not set directly. NOTE: a boolean must be passed as either a 1 or a 0.
is_regular_income Boolean N/A Output Is this payment from Regular Income, like and invoice? This is not set directly. NOTE: a boolean must be passed as either a 1 or a 0.
is_expense Boolean N/A Output Is this payment a refund from an Expense? This is not set directly. NOTE: a boolean must be passed as either a 1 or a 0.
is_transfer Boolean optional Both The Transfer Fund that this payment is associated with. NOTE: a boolean must be passed as either a 1 or a 0.
payment_type String required Both The string describing the type of payment this payment is. Allowed values are "expense refund," "regular income," "interest income" or "other income." The proper boolean flag is set automatically based on this string value.

Example:

Request: https://{your_business}.lessaccounting.com/payments/1.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
<?xml version="1.0" encoding="UTF-8"?> <payment> <amount type="decimal">10.0</amount> <bank-account-id type="integer">1</bank-account-id> <business-id type="integer">1</business-id> <created-at type="datetime">2008-05-15T07:00:01Z</created-at> <date type="date">2007-01-01</date> <expense-category-id type="integer" nil="true"/> <id type="integer">1</id> <invoice-id type="integer">11</invoice-id> <is-expense type="boolean" nil="true"/> <is-interest-income type="boolean" nil="true"/> <is-other-income type="boolean" nil="true"/> <is-regular-income type="boolean">true</is-regular-income> <is-transfer type="boolean" nil="true"/> <notes nil="true"/> <payment-type>Regular Income</payment-type> <updated-at type="datetime">2008-05-15T07:00:01Z</updated-at> <is-paid type="boolean">true</is-paid> </payment>

Example:

Request: https://{your_business}.lessaccounting.com/payments/1.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
{ "amount": 10.0, "bank_account_id": 1, "business_id": 1, "created_at": "2008-05-15T07:00:01Z", "date": "2007-01-01", "expense_category_id": null, "id": 1, "invoice_id": 11, "is_expense": null, "is_interest_income": null, "is_other_income": null, "is_regular_income": true, "is_transfer": null, "notes": null, "payment_type": "Regular Income", "updated_at": "2008-05-15T07:00:01Z", "is_paid": true }

create

HTTP Verb/URL: POST https://<business_name>.lessaccounting.com/payments.xml
Business sub-domain required in url: true
Id parameter required in url: false
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the payment.
since Integer Or Date optional Input Only return invoices that are newer than the payment id or date provided as the since value.
created_at Datetime N/A Output
updated_at Datetime N/A Output
amount Decimal required Both
invoice_id Integer optional Both The Invoice this payment is associated with.
bank_account_id Integer optional Both The Bank Account that this payment is associated with.
date Date optional Both The date this payment was deposited.
business_id Integer N/A Output The Business this payment is associated with.
notes Text optional Both
is_paid Boolean optional Both This field is deprecated. It is still available to preserve backwards compatibility and its value will always be true. NOTE: a boolean must be passed as either a 1 or a 0.
expense_category_id Integer optional Both The Expense Category this payment is associated with.
is_other_income Boolean N/A Output Is this payment from Other Income? This is not set directly. NOTE: a boolean must be passed as either a 1 or a 0.
is_interest_income Boolean N/A Output Is this payment from Interest Income? This is not set directly. NOTE: a boolean must be passed as either a 1 or a 0.
is_regular_income Boolean N/A Output Is this payment from Regular Income, like and invoice? This is not set directly. NOTE: a boolean must be passed as either a 1 or a 0.
is_expense Boolean N/A Output Is this payment a refund from an Expense? This is not set directly. NOTE: a boolean must be passed as either a 1 or a 0.
is_transfer Boolean optional Both The Transfer Fund that this payment is associated with. NOTE: a boolean must be passed as either a 1 or a 0.
payment_type String required Both The string describing the type of payment this payment is. Allowed values are "expense refund," "regular income," "interest income" or "other income." The proper boolean flag is set automatically based on this string value.

Example:

Request: https://{your_business}.lessaccounting.com/payments.xml?payment[amount]=10.12&payment[date]=2008-01-01&payment[payment_type]=regular%20income&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 201
Response:
<?xml version="1.0" encoding="UTF-8"?> <payment> <amount type="decimal">10.12</amount> <bank-account-id type="integer" nil="true"/> <business-id type="integer">1</business-id> <created-at type="datetime">2008-05-15T07:00:41Z</created-at> <date type="date">2008-01-01</date> <expense-category-id type="integer" nil="true"/> <id type="integer">289</id> <invoice-id type="integer" nil="true"/> <is-expense type="boolean">false</is-expense> <is-interest-income type="boolean">false</is-interest-income> <is-other-income type="boolean">false</is-other-income> <is-regular-income type="boolean">true</is-regular-income> <is-transfer type="boolean">false</is-transfer> <notes nil="true"/> <payment-type>Regular Income</payment-type> <updated-at type="datetime">2008-05-15T07:00:41Z</updated-at> <is-paid type="boolean">true</is-paid> </payment>

Example:

Request: https://{your_business}.lessaccounting.com/payments.xml?payment[amount]=&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
<?xml version="1.0" encoding="UTF-8"?> <errors> <error>Amount is not a number</error> <error>Date may not be blank</error> </errors>

Example:

Request: https://{your_business}.lessaccounting.com/payments.json?payment[amount]=&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
{ "errors": { "amount": [ "is not a number" ], "date": [ "may not be blank" ] } }

Example:

Request: https://{your_business}.lessaccounting.com/payments.json?payment[amount]=10.12&payment[date]=2008-01-01&payment[payment_type]=regular%20income&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 201
Response:
{ "amount": 10.12, "bank_account_id": null, "business_id": 1, "created_at": "2008-05-15T07:00:40Z", "date": "2008-01-01", "expense_category_id": null, "id": 288, "invoice_id": null, "is_expense": false, "is_interest_income": false, "is_other_income": false, "is_regular_income": true, "is_transfer": false, "notes": null, "payment_type": "Regular Income", "updated_at": "2008-05-15T07:00:40Z", "is_paid": true }

update

HTTP Verb/URL: PUT https://<business_name>.lessaccounting.com/payments/1.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
_method Must be supplied as: 'put'
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the payment.
since Integer Or Date optional Input Only return invoices that are newer than the payment id or date provided as the since value.
created_at Datetime N/A Output
updated_at Datetime N/A Output
amount Decimal required Both
invoice_id Integer optional Both The Invoice this payment is associated with.
bank_account_id Integer optional Both The Bank Account that this payment is associated with.
date Date optional Both The date this payment was deposited.
business_id Integer N/A Output The Business this payment is associated with.
notes Text optional Both
is_paid Boolean optional Both This field is deprecated. It is still available to preserve backwards compatibility and its value will always be true. NOTE: a boolean must be passed as either a 1 or a 0.
expense_category_id Integer optional Both The Expense Category this payment is associated with.
is_other_income Boolean N/A Output Is this payment from Other Income? This is not set directly. NOTE: a boolean must be passed as either a 1 or a 0.
is_interest_income Boolean N/A Output Is this payment from Interest Income? This is not set directly. NOTE: a boolean must be passed as either a 1 or a 0.
is_regular_income Boolean N/A Output Is this payment from Regular Income, like and invoice? This is not set directly. NOTE: a boolean must be passed as either a 1 or a 0.
is_expense Boolean N/A Output Is this payment a refund from an Expense? This is not set directly. NOTE: a boolean must be passed as either a 1 or a 0.
is_transfer Boolean optional Both The Transfer Fund that this payment is associated with. NOTE: a boolean must be passed as either a 1 or a 0.
payment_type String required Both The string describing the type of payment this payment is. Allowed values are "expense refund," "regular income," "interest income" or "other income." The proper boolean flag is set automatically based on this string value.

Example:

Request: https://{your_business}.lessaccounting.com/payments/1.xml?payment[amount]=15.83&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Example:

Request: https://{your_business}.lessaccounting.com/payments/1.json?payment[amount]=15.83&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Example:

Request: https://{your_business}.lessaccounting.com/payments/1.json?payment[amount]=&&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
{ "errors": { "amount": [ "is not a number" ] } }

Example:

Request: https://{your_business}.lessaccounting.com/payments/1.xml?payment[amount]=&&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
<?xml version="1.0" encoding="UTF-8"?> <errors> <error>Amount is not a number</error> </errors>

destroy

HTTP Verb/URL: DELETE https://<business_name>.lessaccounting.com/payments/1.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
_method Must be supplied as: 'delete'
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the payment.
since Integer Or Date optional Input Only return invoices that are newer than the payment id or date provided as the since value.
created_at Datetime N/A Output
updated_at Datetime N/A Output
amount Decimal N/A Output
invoice_id Integer N/A Output The Invoice this payment is associated with.
bank_account_id Integer N/A Output The Bank Account that this payment is associated with.
date Date N/A Output The date this payment was deposited.
business_id Integer N/A Output The Business this payment is associated with.
notes Text N/A Output
is_paid Boolean N/A Output This field is deprecated. It is still available to preserve backwards compatibility and its value will always be true. NOTE: a boolean must be passed as either a 1 or a 0.
expense_category_id Integer N/A Output The Expense Category this payment is associated with.
is_other_income Boolean N/A Output Is this payment from Other Income? This is not set directly. NOTE: a boolean must be passed as either a 1 or a 0.
is_interest_income Boolean N/A Output Is this payment from Interest Income? This is not set directly. NOTE: a boolean must be passed as either a 1 or a 0.
is_regular_income Boolean N/A Output Is this payment from Regular Income, like and invoice? This is not set directly. NOTE: a boolean must be passed as either a 1 or a 0.
is_expense Boolean N/A Output Is this payment a refund from an Expense? This is not set directly. NOTE: a boolean must be passed as either a 1 or a 0.
is_transfer Boolean N/A Output The Transfer Fund that this payment is associated with. NOTE: a boolean must be passed as either a 1 or a 0.
payment_type String N/A Output The string describing the type of payment this payment is. Allowed values are "expense refund," "regular income," "interest income" or "other income." The proper boolean flag is set automatically based on this string value.

Example:

Request: https://{your_business}.lessaccounting.com/payments/1.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Example:

Request: https://{your_business}.lessaccounting.com/payments/1.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Sales Tax Methods

index

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com/sales_taxes.xml
Business sub-domain required in url: true
Id parameter required in url: false
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the sales tax.
created_at Datetime N/A Output
updated_at Datetime N/A Output
percentage Decimal N/A Output
business_id Integer N/A Output The Business this sales tax is associated with.
name Text N/A Output

Example:

Request: https://{your_business}.lessaccounting.com/sales_taxes.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
[ { "business_id": 1, "created_at": "2008-05-15T07:00:01Z", "id": 1, "name": "s tax 10", "percentage": 10.0, "updated_at": "2008-05-15T07:00:01Z" }, { "business_id": 1, "created_at": "2008-05-15T07:00:01Z", "id": 2, "name": "s tax 5", "percentage": 5.0, "updated_at": "2008-05-15T07:00:01Z" }, { "business_id": 1, "created_at": "2008-05-15T07:00:01Z", "id": 20, "name": "tax 20", "percentage": 20.0, "updated_at": "2008-05-15T07:00:01Z" } ]

Example:

Request: https://{your_business}.lessaccounting.com/sales_taxes.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
<?xml version="1.0" encoding="UTF-8"?> <sales-taxes type="array"> <sales-tax> <business-id type="integer">1</business-id> <created-at type="datetime">2008-05-15T07:00:01Z</created-at> <id type="integer">1</id> <name>s tax 10</name> <percentage type="decimal">10.0</percentage> <updated-at type="datetime">2008-05-15T07:00:01Z</updated-at> </sales-tax> <sales-tax> <business-id type="integer">1</business-id> <created-at type="datetime">2008-05-15T07:00:01Z</created-at> <id type="integer">2</id> <name>s tax 5</name> <percentage type="decimal">5.0</percentage> <updated-at type="datetime">2008-05-15T07:00:01Z</updated-at> </sales-tax> <sales-tax> <business-id type="integer">1</business-id> <created-at type="datetime">2008-05-15T07:00:01Z</created-at> <id type="integer">20</id> <name>tax 20</name> <percentage type="decimal">20.0</percentage> <updated-at type="datetime">2008-05-15T07:00:01Z</updated-at> </sales-tax> </sales-taxes>

show

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com/sales_taxes/1.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the sales tax.
created_at Datetime N/A Output
updated_at Datetime N/A Output
percentage Decimal required Both
business_id Integer N/A Output The Business this sales tax is associated with.
name Text optional Both

Example:

Request: https://{your_business}.lessaccounting.com/sales_taxes/1.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
{ "business_id": 1, "created_at": "2008-05-15T07:00:01Z", "id": 1, "name": "s tax 10", "percentage": 10.0, "updated_at": "2008-05-15T07:00:01Z" }

Example:

Request: https://{your_business}.lessaccounting.com/sales_taxes/1.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
<?xml version="1.0" encoding="UTF-8"?> <sales-tax> <business-id type="integer">1</business-id> <created-at type="datetime">2008-05-15T07:00:01Z</created-at> <id type="integer">1</id> <name>s tax 10</name> <percentage type="decimal">10.0</percentage> <updated-at type="datetime">2008-05-15T07:00:01Z</updated-at> </sales-tax>

create

HTTP Verb/URL: POST https://<business_name>.lessaccounting.com/sales_taxes.xml
Business sub-domain required in url: true
Id parameter required in url: false
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the sales tax.
created_at Datetime N/A Output
updated_at Datetime N/A Output
percentage Decimal required Both
business_id Integer N/A Output The Business this sales tax is associated with.
name Text optional Both

Example:

Request: https://{your_business}.lessaccounting.com/sales_taxes.json?sales_tax[percentage]=asdf&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
{ "errors": { "percentage": [ "is not a number" ], "name": [ "can't be blank" ] } }

Example:

Request: https://{your_business}.lessaccounting.com/sales_taxes.xml?sales_tax[percentage]=asdf&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
<?xml version="1.0" encoding="UTF-8"?> <errors> <error>Percentage is not a number</error> <error>Name can't be blank</error> </errors>

Example:

Request: https://{your_business}.lessaccounting.com/sales_taxes.xml?sales_tax[percentage]=10.12&sales_tax[name]=sales%20tax&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 201
Response:
<?xml version="1.0" encoding="UTF-8"?> <sales-tax> <business-id type="integer">1</business-id> <created-at type="datetime">2008-05-15T07:00:46Z</created-at> <id type="integer">173</id> <name>sales tax</name> <percentage type="decimal">10.12</percentage> <updated-at type="datetime">2008-05-15T07:00:46Z</updated-at> </sales-tax>

Example:

Request: https://{your_business}.lessaccounting.com/sales_taxes.json?sales_tax[percentage]=10.12&sales_tax[name]=sales%20tax&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 201
Response:
{ "business_id": 1, "created_at": "2008-05-15T07:00:45Z", "id": 172, "name": "sales tax", "percentage": 10.12, "updated_at": "2008-05-15T07:00:45Z" }

update

HTTP Verb/URL: PUT https://<business_name>.lessaccounting.com/sales_taxes/1.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
_method Must be supplied as: 'put'
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the sales tax.
created_at Datetime N/A Output
updated_at Datetime N/A Output
percentage Decimal required Both
business_id Integer N/A Output The Business this sales tax is associated with.
name Text optional Both

Example:

Request: https://{your_business}.lessaccounting.com/sales_taxes/1.xml?sales_tax[percentage]=&sales_tax[name]=&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
<?xml version="1.0" encoding="UTF-8"?> <errors> <error>Percentage is not a number</error> <error>Name can't be blank</error> </errors>

Example:

Request: https://{your_business}.lessaccounting.com/sales_taxes/1.json?sales_tax[percentage]=15.83&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Example:

Request: https://{your_business}.lessaccounting.com/sales_taxes/1.json?sales_tax[percentage]=&sales_tax[name]=&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 422
Response:
{ "errors": { "percentage": [ "is not a number" ], "name": [ "can't be blank" ] } }

Example:

Request: https://{your_business}.lessaccounting.com/sales_taxes/1.xml?sales_tax[percentage]=15.83&api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

destroy

HTTP Verb/URL: DELETE https://<business_name>.lessaccounting.com/sales_taxes/1.xml
Business sub-domain required in url: true
Id parameter required in url: true
API Key (api_key) parameter required: true
_method Must be supplied as: 'delete'
Parameter Data Type Required Input/Output param Description
id Integer N/A Output The unique identifier of the sales tax.
created_at Datetime N/A Output
updated_at Datetime N/A Output
percentage Decimal N/A Output
business_id Integer N/A Output The Business this sales tax is associated with.
name Text N/A Output

Example:

Request: https://{your_business}.lessaccounting.com/sales_taxes/1.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Example:

Request: https://{your_business}.lessaccounting.com/sales_taxes/1.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 204
Response:
[Empty Response]

Tag Methods

index

HTTP Verb/URL: GET https://<business_name>.lessaccounting.com/tags.xml
Business sub-domain required in url: true
Id parameter required in url: false
API Key (api_key) parameter required: true
Parameter Data Type Required Input/Output param Description
name Text N/A Output The name of the tag.
count Integer N/A Output The number of items this tag is associated with.

Example:

Request: https://{your_business}.lessaccounting.com/tags.xml?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
<?xml version="1.0" encoding="UTF-8"?> <tags type="array"> <tag> <count type="integer">6</count> <name>project 1</name> </tag> <tag> <count type="integer">5</count> <name>project 2</name> </tag> </tags>

Example:

Request: https://{your_business}.lessaccounting.com/tags.json?api_key=89341988-6b36-4128-b3d5-deab427132a7
Response Status: 200
Response:
[ { "count": 6, "name": "project 1" }, { "count": 5, "name": "project 2" } ]

Report Methods

All the reports are now available via the API. Just look through the app and append '.xml' or '.json' to the url, before the '?' and get the results.

"https://.lessaccounting.com/account_summaries/profit_and_loss"
would become
"https://.lessaccounting.com/account_summaries/profit_and_loss.xml"

"https://.lessaccounting.com/account_summaries/profit_and_loss?receivables_date=&sales_tax_type_filter=&tags=&range=this_month&accrual=&sales_tax_filter="
would become
"https://.lessaccounting.com/account_summaries/profit_and_loss.xml?receivables_date=&sales_tax_type_filter=&tags=&range=this_month&accrual=&sales_tax_filter="