Smarty Accounting API
Introduction
The Smarty Accounting API allows you to perform all the operations that you do with our web client.
Smarty Accounting API is built using REST principles which ensures predictable URLs that makes writing applications easy. This API follows HTTP rules, enabling a wide range of HTTP clients can be used to interact with the API.
Every resource is exposed as a URL. The URL of each resource can be obtained by accessing the API Root Endpoint.
OAuth
Smarty Accounting REST APIs uses the OAuth 2.0 protocol to authorize and authenticate calls. It provides secure access to protect resources thereby reducing the hassle of asking for a username and password everytime a user logs in. Follow the steps listed here, to access Accounting’s APIs using OAuth 2.0
API URL : https://acc.smartysoftware.net/api/v1
Step 1: Registering New Client
You will have to first sign up in Smarty Accounting and then register your application in order to get your Client ID and Client Secret.
To register your application, Please contact us at support-accounting@smartysoftware.net
We will give you OAuth 2.0 credentials such as a Client ID and Client Secret that are known to both Smarty Accounting and your application. Do not share this credentials anywhere.
Step 2: Generate Access and Refresh Token
After Client ID and Client Secret from the above step, make a POST request for the following URL with given params, to generate the access_token.
API : https://oauth.smartysoftware.net/authenticate/accesstoken
Parameter | Description |
---|---|
client_id | Client ID obtained during Client Registration. |
client_secret | Client secret obtained during Client Registration. |
username | Email of user. |
password | Password of user. |
POST
Request Example
$ curl https://oauth.smartysoftware.net/authenticate/accesstoken
-X POST
-H "Content-Type: application/json"
In the response, you will get both access_token and refresh_token.
1. The access_token will expire after a particular period (as given in expires_in param in the response).
2. The refresh_token is permanent and will be used to regenerate new access_token, if the current access token is expired.
Step 3: Generate Access Token From Refresh Token
Access Tokens have limited validity. In most general cases the access tokens expire in one hour. Until then, the access token has unlimited usage. Once it expires, your app will have to use the refresh token to request for a new access token. Redirect to the following POST URL with the given params to get a new access token
API : https://oauth.smartysoftware.net/authenticate/refreshtoken
Parameter | Description |
---|---|
client_id | Client ID obtained during Client Registration. |
client_secret | Client secret obtained during Client Registration. |
refresh_token | refresh token which is obtained in the above step |
POST
Request Example
$ curl https://oauth.smartysoftware.net/authenticate/refreshtoken
-X POST
-H "Content-Type: application/json"
Step 4: Calling An API
Access Token can be passed only in header and cannot be passed in the request param.
Header name should be Access-Token: {access_token}
List of scopes available in Smarty Accounting :
Item | Description | Scope | Scope ID Name |
---|---|---|---|
Contact | To access contacts related APIs. Availabe requests: Create, Update, Delete, Read Contact. | contacts | contact_id |
Item | To access items related APIs. Availabe requests: Create, Update, Delete, Read Item. | items | item_id |
Estimate | To access estimates related APIs. Availabe requests: Create, Update, Delete, Read, Email Estimate. | estimates | estimate_id |
Sales Invoice | To access sales invoices related APIs. Availabe requests: Create, Update, Delete, Read, Email, Record Payment Invoice. | invoices | invoice_id |
Sales Credit Note | To access credit notes related APIs. Availabe requests: Create, Update, Delete, Read, Email, Refund, Apply to invoices Credit Note. | creditnotes | credit_note_id |
Recurring Sales Invoice | To access recurring sales invoices related APIs. Availabe requests: Create, Update, Delete, Read Recurring Sales Invoice. | recurringinvoices | recurring_invoice_id |
Customer Payment | To access customer payments related APIs. Availabe requests: Create, Update, Delete, Read, Email Customer Payment. | customerpayments | payment_id |
Bill | To access bills related APIs. Availabe requests: Create, Update, Delete, Read, Record Payment Bill. | bills | bill_id |
Supplier Credit Notes | To access supplier credit notes related APIs. Availabe requests: Create, Update, Delete, Read, Refund, Apply to bills Supplier Credit Notes. | suppliercredits | supplier_credit_id |
Recurring Bill | To access recurring bills related APIs. Availabe requests: Create, Update, Delete, Read Recurring Bill. | recurringbills | recurring_bill_id |
Supplier Payment | To access supplier payments related APIs. Availabe requests: Create, Update, Delete, Read Supplier Payment. | supplierpayments | payment_id |
Bank Accounts | To access bank accounts related APIs. Availabe requests: Create, Update, Delete, Read Bank Accounts. | banktransactions | transaction_id |
Bank Transaction | To access bank transactions related APIs. Availabe requests: Create, Update, Delete, Read Bank Transaction. | banktransactions | transaction_id |
Bank Transfer | To access bank transfers related APIs. Availabe requests: Create, Update, Delete, Read Bank Transfer. | banktransfers | transfer_id |
Manual Journal | To access manual journals related APIs. Availabe requests: Create, Update, Delete, Read Manual Journal. | journals | journal_id |
Recurring Journal | To access recurring journals related APIs. Availabe requests: Create, Update, Delete, Read Recurring Journal. | recurringjournals | recurring_journal_id |
Chart Of Accounts | To access chart of accounts related APIs. Availabe requests: Create, Update, Delete, Read Chart Of Accounts. | accounts | account_id |
Users | To access users related APIs. Availabe requests: Create, Update, Delete, Read User. | users | user_id |
Currency | To access currencies related APIs. Availabe requests: Create, Read Currency. | currencies | currency_id |
Organisations | To access organisations related APIs. Availabe requests: Create, Update, Delete, Read Organisation. | organisations | organisation_id |
Vat Rates | To access VAT rates related APIs. Availabe requests: Create, Update, Delete, Read Vat Rates. | vatrates | vat_id |
Organization ID
In Smarty Accounting, your business is termed as an organization. If you have multiple businesses, you simply set each of those up as an individual organization. Each organization is an independent Smarty Accounting Organization with it’s own organization ID, base currency, contacts, reports, etc.
The parameter organization_id along with the organization ID should be sent in with every API request to identify the organization.
The organization_id can be obtained from the GET /organizations API’s JSON response. Alternatively, it can be obtained from the Manage Organizations page in the admin console:
Login to the Smarty Accounting. Click the drop down with organization’s name as the label and click Manage Organizations.

Now you’ll be able to find Organization IDs for each of your organizations.

HTTP Methods
Smarty Accounting API uses appropriate HTTP verbs for every action.
Method | Description |
---|---|
GET | Used for retrieving resources. |
POST | Used for creating resources and performing resource actions. |
PUT | Used for updating resources. |
DELETE | Used for deleting resources. |
Response
Responses will be in the JSON format.
Node Name | Description |
---|---|
status | The status of request. This will be success for a success response and error in case of an error. |
message | Message for the invoked API. |
resource name | Comprises the invoked API’s Data. |
Errors
Smarty Accounting uses HTTP status codes to indicate success or failure of an API call. In general, status codes in the 2xx range means success, 4xx range means there was an error in the provided information, and those in the 5xx range indicate server side errors. Commonly used HTTP status codes are listed below.
HTTP Status Codes
Status Code | Descriptions |
---|---|
2xx | Success |
4xx | Bad request sent to server |
5xx | Server side error |
Status Code | Description |
---|---|
200 | SuccessThe request was successfully completed. |
201 | CreatedThe request was a success and one or more resources have been created. |
400 | Bad requestThe request cannot be performed. Usually because of malformed parameter or missing parameter. |
401 | Unauthorized (Invalid AuthToken)Request was rejected because of invalid AuthToken. |
403 | ForbiddenThe user does not have enough permission or possibly not an user of the respective organization to access the resource. |
404 | URL Not FoundThe URL you’ve sent is wrong. It’s possible that the resource you’ve requested has been moved to another URL. |
405 | Method Not AllowedThe requested resource does not support the HTTP method used. For example, requesting List of all customers API with PUT as the HTTP method. |
406 | Not AcceptableThe requested response type is not supported by the client. |
429 | Too many requestsToo many requests within a certain time frame. |
500 | Server errorSmarty Accounting server encountered an error which prevents it from fulfilling the request. Although this rarely happens, we recommend you to contact us at support-accounting@smartysoftware.net if you receive this error. |
Pagination
Smarty Accounting provides APIs to retrieve lists of contacts, transactions and other resources - paginated to 10 items by default. The pagination information will be included in the list API response under the node name page_setting.
- By default first page will be listed. For navigating through pages, use the page parameter.
- Set page_number to 2 or more if there is any more data.
- The page_size parameter can be used to set the number of records that you want to receive in response.
- The sort_type parameter can be used to sort based on valid column. by default you have received the list in descending .Allowed values: desc,asc.
Create a Contact
Create a contact with given information.
ARGUMENTS
display_name | Required - String Display Name of the contact. Max-length [200] |
contact_type | Required - String Contact type of the contact. Supplier or Customer |
first_name | Optional - String |
last_name | Optional - String |
Optional - String Email address of the contact. | |
company_name | Optional - String Company Name of the contact. |
contact_currency | Optional - String Currency Code of the contact. |
contact_vatmode | Optional - String VAT treatment of the contact. |
contact_account_id | Optional - Integer Default account_id of the contact. |
contact_vat | Optional - String VAT rate of the contact. |
contact_postcode | Optional - String Post code of the customer’s billing address. |
contact_state | Optional - String State of the customer’s billing address. |
address_line1 | Optional - String Billing address of the contact. |
contact_country | Optional - String Country of the customer’s billing address. |
contact_city | Optional - String City of the customer’s billing address. |
address_line2 | Optional - String |
home_phone | Optional - String |
mobile | Optional - String |
business_phone | Optional - String |
fax | Optional - String |
description | Optional - String |
POST /contacts
Request Example
$ curl https://acc.smartysoftware.net/api/v1/contacts?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"display_name": "Spencer_Ford"
"contact_type": "Customer"
"first_name": "Spencer"
"last_name": "Ford"
"email": "SpencerFord@fordcompany.com"
"company_name": "David Weis"
"contact_currency": "GBP"
"contact_vatmode": "Exclusive"
"contact_vat": "20% (VAT on Income)"
"contact_account_id": :contact_account_id
"contact_postcode": "SA10 2FQ"
"contact_state": "London"
"contact_city": "London"
"contact_country": "UK"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
"business_phone": "077 0009 9975"
"fax": ""
"home_phone": ""
"mobile": ""
"description": ""
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
contact: {
"contact_id": {contact_id}
"display_name": "Spencer_Ford"
"contact_type": "Customer"
"first_name": "Spencer"
"last_name": "Ford"
"email": "SpencerFord@fordcompany.com"
"company_name": "David Weis"
"contact_currency": "GBP"
"contact_vatmode": "Exclusive"
"contact_vat": "20% (VAT on Income)"
"contact_account_id": :contact_account_id
"contact_postcode": "SA10 2FQ"
"contact_state": "London"
"contact_city": "London"
"contact_country": "UK"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
"business_phone": "077 0009 9975"
"fax": ""
"home_phone": ""
"mobile": ""
"description": ""
},
message:
status: "success"
Update a Contact
Update an existing contact.
ARGUMENTS
display_name | Required - String Display Name of the contact. Max-length [200] |
contact_type | Required - String Contact type of the contact. Supplier or Customer |
first_name | Optional - String |
last_name | Optional - String |
Optional - String Email address of the contact. | |
company_name | Optional - String Company Name of the contact. |
contact_currency | Optional - String Currency Code of the contact. |
contact_vatmode | Optional - String VAT treatment of the contact. |
contact_account_id | Optional - Integer Default account_id of the contact. |
contact_vat | Optional - String VAT rate of the contact. |
contact_postcode | Optional - String Post code of the customer’s billing address. |
contact_state | Optional - String State of the customer’s billing address. |
address_line1 | Optional - String Billing address of the contact. |
contact_country | Optional - String Country of the customer’s billing address. |
contact_city | Optional - String City of the customer’s billing address. |
address_line2 | Optional - String |
home_phone | Optional - String |
mobile | Optional - String |
business_phone | Optional - String |
fax | Optional - String |
description | Optional - String |
PUT /contacts/{contact_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/contacts/{contact_id}?organization_id={organization_id}
-X PUT
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"display_name": "Spencer_Ford"
"contact_type": "Customer"
"first_name": "Spencer"
"last_name": "Ford"
"email": "SpencerFord@fordcompany.com"
"company_name": "David Weis"
"contact_currency": "GBP"
"contact_vatmode": "Exclusive"
"contact_vat": "20% (VAT on Income)"
"contact_account_id": :contact_account_id
"contact_postcode": "SA10 2FQ"
"contact_state": ""
"contact_city": "London"
"contact_country": "UK"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
"business_phone": "077 0009 9975"
"fax": ""
"home_phone": ""
"mobile": ""
"description": ""
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
contact: {
"contact_id": {contact_id}
"display_name": "Spencer_Ford"
"contact_type": "Customer"
"first_name": "Spencer"
"last_name": "Ford"
"email": "SpencerFord@fordcompany.com"
"company_name": "David Weis"
"contact_currency": "GBP"
"contact_vatmode": "Exclusive"
"contact_vat": "20% (VAT on Income)"
"contact_account_id": :contact_account_id
"contact_postcode": "SA10 2FQ"
"contact_state": ""
"contact_city": "London"
"contact_country": "UK"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
"business_phone": "077 0009 9975"
"fax": ""
"home_phone": ""
"mobile": ""
"description": ""
},
message:
status: "success"
List Contacts
List all contacts with pagination.
Query Params
page_number | Required - Integer |
page_size | Required - Integer |
sort_type | Required - String Allowed values: desc,asc |
sort_column | Required - String |
search_text | Optional - String Search in contact name, email or company. |
display_name | Optional - String Search contacts by display name. |
contact_type | Optional - String Search contacts by contact type of the contact. Supplier or Customer |
first_name | Optional - String Search contacts by first name of the contact person. |
last_name | Optional - String Search contacts by last name of the contact person. |
Optional - String Search contacts by email of the contact person. | |
company_name | Optional - String Search contacts by company name. |
GET /contacts
Request Example
$ curl https://acc.smartysoftware.net/api/v1/contacts?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
contacts:[ {
"contact_id": {contact_id}
"display_name": "Spencer_Ford"
"contact_type": "Customer"
"first_name": "Spencer"
"last_name": "Ford"
"email": "SpencerFord@fordcompany.com"
"company_name": "David Weis"
"contact_currency": "GBP"
"contact_vatmode": "Exclusive"
"contact_vat": "20% (VAT on Income)"
"contact_account_id": :contact_account_id
"contact_postcode": "SA10 2FQ"
"contact_state": ""
"contact_city": "London"
"contact_country": "UK"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
"business_phone": "077 0009 9975"
"fax": ""
"home_phone": ""
"mobile": ""
"description": ""
},
...
],
status: "success",
page_setting: {page: 1, size: 10, total: 48}
Get Contact
Get details of a contact.
GET /contacts/{contact_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/contacts/{contact_id}?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
contact: {
"contact_id": {contact_id}
"display_name": "Spencer_Ford"
"contact_type": "Customer"
"first_name": "Spencer"
"last_name": "Ford"
"email": "SpencerFord@fordcompany.com"
"company_name": "David Weis"
"contact_currency": "GBP"
"contact_vatmode": "Exclusive"
"contact_vat": "20% (VAT on Income)"
"contact_account_id": :contact_account_id
"contact_postcode": "SA10 2FQ"
"contact_state": ""
"contact_city": "London"
"contact_country": "UK"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
"business_phone": "077 0009 9975"
"fax": ""
"home_phone": ""
"mobile": ""
"description": ""
},
status: "success"
Delete a Contact
Delete an existing contact.
DELETE /contacts/{contact_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/contacts/{contact_id}?organization_id={organization_id}
-X DELETE
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Add Contact Email
Add new email to contact.
ARGUMENTS
contact_email | Required - String Email address of the contact. |
POST /contacts/{contact_id}/email
Request Example
$ curl https://acc.smartysoftware.net/api/v1/contacts/{contact_id}/email?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"contact_email": "SpencerFord@fordcompany.com"
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
contact: {
"contact_id": {contact_id}
"email": "SpencerFord@fordcompany.com"
},
message:
status: "success"
Contact Statements
List all contact statement with pagination.
Query Params
contact_id | Required - Integer Id of the contact. |
start_date | Optional - String Start date of Contact statement. |
end_date | Optional - String End date of Contact statement |
page_number | Optional - Integer |
page_size | Optional - Integer |
sort_column | Optional - String |
sort_type | Optional - String |
GET /contacts/statement
Request Example
$ curl https://acc.smartysoftware.net/api/v1/contacts/statement?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
statement:[ {
"transaction_id": 70882
"transaction_number": "PAY_178"
"date": "2020-04-04"
"amount": 0
"journal_unique_id": 5736
"transaction_type": "Customer Payment"
"files": []
"payment": -220
"balance": 6159
},
...
],
"total":{
"opening_balance":6379.00,
"amount":"0.00",
"payment":220,
"balance":6159
},
"status": "success",
"page_setting": {page: 1, size: 10, total: 40}
Contact transactions
List all contact transactions with pagination.
Query Params
contact_id | Required - Integer Id of the contact. |
account | Required - String Type of account (receivable or payable). |
start_date | Optional - String Start date of Contact transactions. |
end_date | Optional - String End date of Contact transactions |
page_number | Optional - Integer |
page_size | Optional - Integer |
sort_column | Optional - String |
sort_type | Optional - String |
GET /contacts/transactions
Request Example
$ curl https://acc.smartysoftware.net/api/v1/contacts/transactions?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
transactions:[ {
transaction_id: 85561
state: "Void"
transaction_number: "EXP_135"
date: "2020-01-09"
due_date: "2020-01-09"
reference: ""
"transaction_type": "Bill"
sub"total": "120.00"
"total": "120.00"
"balance": "120.00"
tax: "0.00"
tax_mode: "NO VAT"
currency: "GBP"
"exchange_rate": "1.000000"
"labour": "0.00"
is_writeoff: 0
create_source: ""
total_labour: "120.00"
state_text: "Void"
},
...
],
"status": "success",
"page_setting": {page: 1, size: 10, total: 40}
Create an Item
Create a new item.
ARGUMENTS
item_name | Required - String Name of the item. |
item_type | Required - String Specify the type of an item. Allowed values: Service,Goods,Labour (CIS),Material (CIS) |
purchase_account_id | Optional - Integer ID of the expense account to which the item has to be associated with. |
purchase_description | Optional - String Purchase description for the item. |
purchase_price | Optional - String Purchase price of the item. |
purchase_vat | Optional - String Purchase VAT of the item. |
sale_account_id | Optional - Integer ID of the sales account to which the item has to be associated with. |
sale_description | Optional - String Description for the item. |
sale_price | Optional - String Sales price of the item. |
sale_vat | Optional - String VAT rate of the item. |
track_account_id | Optional - Integer ID of the stock account to which the item has to be associated with. |
track_inventory | Optional - String True for items that are tracked as inventory. |
POST /items
Request Example
$ curl https://acc.smartysoftware.net/api/v1/items?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"item_name": "Cell phone"
"item_type": "Goods"
"purchase_account_id": {purchase_account_id}
"purchase_description": ""
"purchase_price": "320.00"
"purchase_vat": "20% (VAT on Expenses)"
"sale_account_id": {sale_account_id}
"sale_description": ""
"sale_price": "300.00"
"sale_vat": "10% (VAT on Income)"
"track_account_id": {track_account_id}
"track_inventory": true
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
item: {
"item_id": {item_id}
"item_name": "Cell phone"
"item_type": "Goods"
"purchase_account_id": {purchase_account_id}
"purchase_description": ""
"purchase_price": "320.00"
"purchase_vat": "20% (VAT on Expenses)"
"sale_account_id": {sale_account_id}
"sale_description": ""
"sale_price": "300.00"
"sale_vat": "10% (VAT on Income)"
"track_account_id": {track_account_id}
"track_inventory": true
},
message:
status: "success"
Update an Item
Update the details of an item.
ARGUMENTS
item_name | Required - String Name of the item. |
item_type | Required - String Specify the type of an item. Allowed values: Service,Goods,Labour (CIS),Material (CIS) |
purchase_account_id | Optional - Integer ID of the expense account to which the item has to be associated with. |
purchase_description | Optional - String Purchase description for the item. |
purchase_price | Optional - String Purchase price of the item. |
purchase_vat | Optional - String Purchase VAT of the item. |
sale_account_id | Optional - Integer ID of the sales account to which the item has to be associated with. |
sale_description | Optional - String Description for the item. |
sale_price | Optional - String Sales price of the item. |
sale_vat | Optional - String VAT rate of the item. |
track_account_id | Optional - Integer ID of the stock account to which the item has to be associated with. |
track_inventory | Optional - String True for items that are tracked as inventory. |
PUT /items/{item_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/items/{item_id}?organization_id={organization_id}
-X PUT
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"item_name": "Cell phone"
"item_type": "Goods"
"purchase_account_id": {purchase_account_id}
"purchase_description": ""
"purchase_price": "320.00"
"purchase_vat": "20% (VAT on Expenses)"
"sale_account_id": {sale_account_id}
"sale_description": ""
"sale_price": "300.00"
"sale_vat": "10% (VAT on Income)"
"track_account_id": {track_account_id}
"track_inventory": true
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
item: {
"item_id": {item_id}
"item_name": "Cell phone"
"item_type": "Goods"
"purchase_account_id": {purchase_account_id}
"purchase_description": ""
"purchase_price": "320.00"
"purchase_vat": "20% (VAT on Expenses)"
"sale_account_id": {sale_account_id}
"sale_description": ""
"sale_price": "300.00"
"sale_vat": "10% (VAT on Income)"
"track_account_id": {track_account_id}
"track_inventory": true
},
message:
status: "success"
List Items
Get the list all items with pagination.
Query Params
page_number | Required - Integer |
page_size | Required - Integer |
sort_type | Required - String Allowed values: desc,asc |
sort_column | Required - String |
search_text | Optional - String Search in item name or item type. |
item_name | Optional - String Search items by name. |
item_type | Optional - String Search items by item type. Allowed values: Service,Goods,Labour (CIS),Material (CIS) |
price | Optional - Decimal Search items by sales price or purchase price. |
description | Optional - String Search items by sales description or purchase description. |
is_track_inventory | Optional - String Search items which tracked. |
GET /items
Request Example
$ curl https://acc.smartysoftware.net/api/v1/items?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
items:[ {
"item_id": {item_id}
"item_name": "Cell phone"
"item_type": "Goods"
"purchase_account_id": {purchase_account_id}
"purchase_description": ""
"purchase_price": "320.00"
"purchase_vat": "20% (VAT on Expenses)"
"sale_account_id": {sale_account_id}
"sale_description": ""
"sale_price": "300.00"
"sale_vat": "10% (VAT on Income)"
"track_account_id": {track_account_id}
"track_inventory": true
},
...
],
status: "success",
page_setting: {page: 1, size: 10, total: 48}
Get Item
Details of an existing item.
GET /items/{item_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/items/{item_id}?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
item: {
"item_id": {item_id}
"item_name": "Cell phone"
"item_type": "Goods"
"purchase_account_id": {purchase_account_id}
"purchase_description": ""
"purchase_price": "320.00"
"purchase_vat": "20% (VAT on Expenses)"
"sale_account_id": {sale_account_id}
"sale_description": ""
"sale_price": "300.00"
"sale_vat": "10% (VAT on Income)"
"track_account_id": {track_account_id}
"track_inventory": true
"track_account_name":"Stock"
"sale_account_name": "Sales Income",
"purchase_account_name": "Printing",
"track_account_code": "589 ",
"sale_account_code": "400",
"purchase_account_code": "1102",
"quantity_on_hand": 2,
"total_value": 1933.33,
"average_cost": 966.665,
"histories": [...]
},
status: "success"
Delete an Item
Delete the item created.items that are part of transaction cannot be deleted.
DELETE /items/{item_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/items/{item_id}?organization_id={organization_id}
-X DELETE
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Create an Estimate
Create an estimate for your customer.
ARGUMENTS
estimate_number | Required - String The estimate number. |
date | Required - String The date the estimate was created. [yyyy-mm-dd] |
due_date | Required - String Date estimate is expire. [yyyy-mm-dd] |
contact_id | Required - Integer Id of contact. |
reference | Optional - String Reference for the estimate. |
currency | Required - String Currency used for the estimate. |
exchange_rate | Required - Decimal Exchange rate used for the estimate, if estimate is on foreign currencies. |
tax_mode | Required - String Allowed values: Exclusive,Inclusive,NO VAT. |
customer_note | Optional - String The notes added below expressing gratitude or for conveying some information. |
term_condition | Optional - String |
auto_number_creation | Optional - String If set false, the number don't increase automatically. default value is true |
items | Required - String Line items in estimate.
|
POST /estimates
Request Example
$ curl https://acc.smartysoftware.net/api/v1/estimates?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"estimate_number": "EST_1000"
"date": "2019-02-01"
"due_date": "2019-03-01"
"contact_id": "{contact_id}"
"reference": ""
"currency": "GBP"
"exchange_rate": "1.000000"
"tax_mode": "Exclusive"
"customer_note": ""
"term_condition": ""
"auto_number_creation": true
items:[{
"item_id": {item_id}
"description": "",
"account_id": {account_id}
"quantity": "1"
"price": 100
"discount": ""
"discount_type": ""
"vat": "20% (VAT on Income)"
},
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
estimate: {
"estimate_id": {estimate_id}
"contact_id": {contact_id}
"estimate_number": "EST_1000"
"date": "2019-02-01"
"due_date": "2019-03-01"
"reference": ""
"currency": "GBP"
"tax_mode": "Exclusive"
"state":"Draft"
"customer_note": ""
"term_condition": ""
"auto_number_creation": true
"transaction_type": "Estimate"
"subtotal": "100.00"
"total": "120.00"
"total_before_cis": "120.00"
"balance": "120.00"
"tax": "20.00"
"exchange_rate": "1.000000"
"labour": "0.00"
"display_name": "Spencer_Ford"
"email": "SpencerFord@fordcompany.com"
"contact_country": "UK"
"contact_city": "London"
"contact_state": "London"
"contact_postcode": "SA10 2FQ"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
"create_source": ""
"source_create_id": "0"
items:[{
"item_id": {item_id}
"description": ""
"account_id": {account_id}
"quantity": "1"
"price": 100
"discount": "0"
"discount_type": ""
"vat": "20% (VAT on Income)"
},
...
]
},
message:
status: "success"
Update an Estimate
Update an existing estimate. To delete a line item just remove it from the items list.
ARGUMENTS
estimate_number | Required - String The estimate number. |
date | Required - String The date the estimate was created. [yyyy-mm-dd] |
due_date | Required - String Date estimate is expire. [yyyy-mm-dd] |
contact_id | Required - Integer Id of contact. |
reference | Optional - String Reference for the estimate. |
currency | Required - String Currency used for the estimate. |
exchange_rate | Required - Decimal Exchange rate used for the estimate, if estimate is on foreign currencies. |
tax_mode | Required - String Allowed values: Exclusive,Inclusive,NO VAT. |
customer_note | Optional - String The notes added below expressing gratitude or for conveying some information. |
term_condition | Optional - String |
auto_number_creation | Optional - String If set false, the number don't increase automatically. default value is true |
items | Required - String Line items in estimate.
|
PUT /estimates/{estimate_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/estimates/{estimate_id}?organization_id={organization_id}
-X PUT
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"estimate_number": "EST_1000"
"date": "2019-02-01"
"due_date": "2019-03-01"
"contact_id": "{contact_id}"
"reference": ""
"currency": "GBP"
"exchange_rate": "1.000000"
"tax_mode": "Exclusive"
"customer_note": ""
"term_condition": ""
"auto_number_creation": true
items:[{
"item_id": {item_id}
"description": "",
"account_id": {account_id}
"quantity": "1"
"price": 100
"discount": ""
"discount_type": ""
"vat": "20% (VAT on Income)"
},
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
estimate: {
"estimate_id": {estimate_id}
"contact_id": {contact_id}
"estimate_number": "EST_1000"
"date": "2019-02-01"
"due_date": "2019-03-01"
"reference": ""
"currency": "GBP"
"tax_mode": "Exclusive"
"state":"Draft"
"customer_note": ""
"term_condition": ""
"auto_number_creation": true
"transaction_type": "Estimate"
"subtotal": "100.00"
"total": "120.00"
"total_before_cis": "120.00"
"balance": "120.00"
"tax": "20.00"
"exchange_rate": "1.000000"
"labour": "0.00"
"display_name": "Spencer_Ford"
"email": "SpencerFord@fordcompany.com"
"contact_country": "UK"
"contact_city": "London"
"contact_state": "London"
"contact_postcode": "SA10 2FQ"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
"create_source": ""
"source_create_id": "0"
items:[{
"item_id": {item_id}
"description": ""
"account_id": {account_id}
"quantity": "1"
"price": 100
"discount": "0"
"discount_type": ""
"vat": "20% (VAT on Income)"
},
...
]
},
message:
status: "success"
Get Estimate
Get details of an estimate.
GET /estimates/{estimate_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/estimates/{estimate_id}?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
estimate: {
"estimate_id": {estimate_id}
"contact_id": {contact_id}
"estimate_number": "EST_1000"
"date": "2019-02-01"
"due_date": "2019-03-01"
"reference": ""
"currency": "GBP"
"tax_mode": "Exclusive"
"state":"Draft"
"customer_note": ""
"term_condition": ""
"auto_number_creation": true
"transaction_type": "Estimate"
"subtotal": "100.00"
"total": "120.00"
"total_before_cis": "120.00"
"balance": "120.00"
"tax": "20.00"
"exchange_rate": "1.000000"
"labour": "0.00"
is_labour: false
"display_name": "Spencer_Ford"
"email": "SpencerFord@fordcompany.com"
"contact_country": "UK"
"contact_city": "London"
"contact_state": "London"
"contact_postcode": "SA10 2FQ"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
"create_source": ""
"source_create_id": "0"
items:[{
"item_id": {item_id}
"description": ""
"account_id": {account_id}
"quantity": "1"
"price": 100
"discount": "0"
"discount_type": ""
"vat": "20% (VAT on Income)"
},
...
],
histories:[{
creator: ""
date: "30/04/20 7:24 am"
text: "Estimate created for 120"
title: "Created"
},
...
],
files:[{
extension: "pdf"
file_code: "0c492652-f329-50ec-9b76-01b1ad09d209"
file_name: "doc.pdf"
file_size: 618
file_status: "success"
},
...
]
},
status: "success"
List Estimates
List all estimates with pagination.
Query Params
page_number | Required - Integer |
page_size | Required - Integer |
sort_type | Required - String Allowed values: desc,asc |
sort_column | Required - String |
search_text | Optional - String Search in estimate number, reference, contact or total Amount. |
search_states | Optional - String Comma separated estimate states which are to be search. Draft,Expired,Sent,Invoiced |
start_date | Optional - String Search estimates from date. |
end_date | Optional - String Search estimates to date. |
report_by | Optional - String Get estimates base on date or due_date. Allowed values:start_date,end_date. |
GET /estimates
Request Example
$ curl https://acc.smartysoftware.net/api/v1/estimates?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
estimates:[ {
estimate_id: {estimate_id}
contact_id: {contact_id}
estimate_number: "EST_1000"
contact_name: "Spencer_Ford"
currency: "GBP"
date: "2019-02-01"
due_date: "2019-03-01"
"exchange_rate": "1.000000"
"labour": "0.00"
reference: ""
state: "Draft"
"subtotal": "100.00"
"tax": "20.00"
"total": "120.00"
tax_mode: "Exclusive"
customer_note: "Customer Notes"
term_condition: "Terms & Conditions"
total_labour: "120.00"
"transaction_type": "Estimate"
"create_source": ""
"source_create_id": "0"
},
...
],
status: "success",
page_setting: {page: 1, size: 10, total: 48}
Delete an Estimate
Delete an existing estimate.
DELETE /estimates/{estimate_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/estimates/{estimate_id}?organization_id={organization_id}
-X DELETE
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Email an Estimate
Email an estimate to the customer.
ARGUMENTS
to_emails | Required - String Array of email address of the recipients. |
cc_email | Optional - String Email address of the recipients to be cced. |
subject | Required - String Subject of an email has to be sent. |
body | Optional - String Body of an email has to be sent. |
file_name | Optional - String file name of estimate PDF attachment has to be sent. default value is estimate number. |
is_attach_pdf | Optional - Boolean Set true if you want to attach PDF of estimate to email. |
is_attach_payment_history | Optional - String Set true if you want to attach PDF of customer payment history to email. |
is_attach_statement | Optional - String Set true if you want to attach PDF of customer statement to email. |
POST /estimates/{estimate_id}/email
Request Example
$ curl https://acc.smartysoftware.net/api/v1/estimates/{estimate_id}/email?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Create an Invoice
Create an invoice for your customer.
ARGUMENTS
invoice_number | Required - String The invoice number. |
date | Required - String The date the invoice was created. [yyyy-mm-dd] |
payment_terms | Optional - String Payment terms in days e.g. 15, 30, 60. Invoice due date will be calculated based on this. |
due_date | Required - String Due date of invoice. [yyyy-mm-dd] |
contact_id | Required - Integer Id of contact. |
reference | Optional - String Reference for the invoice. |
currency | Required - String Currency used for the invoice. |
exchange_rate | Required - Decimal Exchange rate used for the invoice, if invoice is on foreign currencies. |
tax_mode | Required - String Allowed values: Exclusive,Inclusive,NO VAT. |
customer_note | Optional - String The notes added below expressing gratitude or for conveying some information. |
term_condition | Optional - String |
auto_number_creation | Optional - String If set false, the number don't increase automatically. default value is true |
items | Required - String Line items in invoice.
|
POST /invoices
Request Example
$ curl https://acc.smartysoftware.net/api/v1/invoices?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"invoice_number": "INV_1000"
"date": "2019-05-02"
"payment_terms":15,
"due_date": "2019-05-17"
"contact_id": "{contact_id}"
"reference": ""
"currency": "GBP"
"exchange_rate": "1.000000"
"tax_mode": "Exclusive"
"customer_note": ""
"term_condition": ""
"auto_number_creation": true
items:[{
"item_id": {item_id}
"description": "",
"account_id": {account_id}
"quantity": "1"
"price": 100
"discount": ""
"discount_type": ""
"vat": "20% (VAT on Income)"
},
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
invoice: {
"invoice_id": {invoice_id}
"contact_id": {contact_id}
"invoice_number": "INV_1000"
"date": "2019-05-02"
"payment_terms":15,
"due_date": "2019-05-17"
"reference": ""
"currency": "GBP"
"tax_mode": "Exclusive"
"state":"Draft"
"customer_note": ""
"term_condition": ""
"auto_number_creation": true
"transaction_type": "Invoice"
"subtotal": "100.00"
"total": "120.00"
"total_before_cis": "120.00"
"balance": "120.00"
"tax": "20.00"
"exchange_rate": "1.000000"
"labour": "0.00"
"display_name": "Spencer_Ford"
"email": "SpencerFord@fordcompany.com"
"contact_country": "UK"
"contact_city": "London"
"contact_state": "London"
"contact_postcode": "SA10 2FQ"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
"is_writeoff": false
"write_off_amount": 0
"write_off_date": ""
"has_payment": false,
"reminder_status": "Start"
"create_source": ""
"source_create_id": "0"
items:[{
"item_id": {item_id}
"description": ""
"account_id": {account_id}
"quantity": "1"
"price": 100
"discount": "0"
"discount_type": ""
"vat": "20% (VAT on Income)"
},
...
]
},
message:
status: "success"
Update an Invoice
Update an existing invoice. To delete a line item just remove it from the items list.
ARGUMENTS
invoice_number | Required - String The invoice number. |
date | Required - String The date the invoice was created. [yyyy-mm-dd] |
payment_terms | Optional - String Payment terms in days e.g. 15, 30, 60. Invoice due date will be calculated based on this. |
due_date | Required - String Due date of invoice. [yyyy-mm-dd] |
contact_id | Required - Integer Id of contact. |
reference | Optional - String Reference for the invoice. |
currency | Required - String Currency used for the invoice. |
exchange_rate | Required - Decimal Exchange rate used for the invoice, if invoice is on foreign currencies. |
tax_mode | Required - String Allowed values: Exclusive,Inclusive,NO VAT. |
customer_note | Optional - String The notes added below expressing gratitude or for conveying some information. |
term_condition | Optional - String |
auto_number_creation | Optional - String If set false, the number don't increase automatically. default value is true |
items | Required - String Line items in invoice.
|
PUT /invoices/{invoice_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/invoices/{invoice_id}?organization_id={organization_id}
-X PUT
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"invoice_number": "INV_1000"
"date": "2019-05-02"
"payment_terms":15,
"due_date": "2019-05-17"
"contact_id": "{contact_id}"
"reference": ""
"currency": "GBP"
"exchange_rate": "1.000000"
"tax_mode": "Exclusive"
"customer_note": ""
"term_condition": ""
"auto_number_creation": true
items:[{
"item_id": {item_id}
"description": "",
"account_id": {account_id}
"quantity": "1"
"price": 100
"discount": ""
"discount_type": ""
"vat": "20% (VAT on Income)"
},
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
invoice: {
"invoice_id": {invoice_id}
"contact_id": {contact_id}
"invoice_number": "INV_1000"
"date": "2019-05-02"
"payment_terms":15,
"due_date": "2019-05-17"
"reference": ""
"currency": "GBP"
"tax_mode": "Exclusive"
"state":"Draft"
"customer_note": ""
"term_condition": ""
"auto_number_creation": true
"transaction_type": "Invoice"
"subtotal": "100.00"
"total": "120.00"
"total_before_cis": "120.00"
"balance": "120.00"
"tax": "20.00"
"exchange_rate": "1.000000"
"labour": "0.00"
"display_name": "Spencer_Ford"
"email": "SpencerFord@fordcompany.com"
"contact_country": "UK"
"contact_city": "London"
"contact_state": "London"
"contact_postcode": "SA10 2FQ"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
"is_writeoff": false
"write_off_amount": 0
"write_off_date": ""
"has_payment": false,
"reminder_status": "Start"
"create_source": ""
"source_create_id": "0"
items:[{
"item_id": {item_id}
"description": ""
"account_id": {account_id}
"quantity": "1"
"price": 100
"discount": "0"
"discount_type": ""
"vat": "20% (VAT on Income)"
},
...
]
},
message:
status: "success"
Get Invoice
Get details of an invoice.
GET /invoices/{invoice_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/invoices/{invoice_id}?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
invoice: {
"invoice_id": {invoice_id}
"contact_id": {contact_id}
"invoice_number": "INV_1000"
"date": "2019-05-02"
"payment_terms":15,
"due_date": "2019-05-17"
"reference": ""
"currency": "GBP"
"tax_mode": "Exclusive"
"state":"Draft"
"customer_note": ""
"term_condition": ""
"auto_number_creation": true
"transaction_type": "Invoice"
"subtotal": "100.00"
"total": "120.00"
"total_before_cis": "120.00"
"balance": "120.00"
"tax": "20.00"
"exchange_rate": "1.000000"
"labour": "0.00"
is_labour: false
"display_name": "Spencer_Ford"
"email": "SpencerFord@fordcompany.com"
"contact_country": "UK"
"contact_city": "London"
"contact_state": "London"
"contact_postcode": "SA10 2FQ"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
"is_writeoff": false
"write_off_amount": 0
"write_off_date": ""
"has_payment": false,
"reminder_status": "Start"
credits_applied: [],
payment_options: [],
payments: [],
sum_credit_apply: 0,
sum_payment: 0,
unused_credit: 0,
"create_source": ""
"source_create_id": "0"
items:[{
"item_id": {item_id}
"description": ""
"account_id": {account_id}
"quantity": "1"
"price": 100
"discount": "0"
"discount_type": ""
"vat": "20% (VAT on Income)"
},
...
],
histories:[{
creator: ""
date: "30/04/20 7:24 am"
text: "Invoice created for 120"
title: "Created"
},
...
],
files:[{
extension: "pdf"
file_code: "0c492652-f329-50ec-9b76-01b1ad09d209"
file_name: "doc.pdf"
file_size: 618
file_status: "success"
},
...
]
},
status: "success"
List Invoices
List all invoices with pagination.
Query Params
page_number | Required - integer |
page_size | Required - integer |
sort_type | Required - String Allowed values: desc,asc |
sort_column | Required - String |
search_text | Optional - String Search in invoice number, reference, contact or total Amount. |
search_states | Optional - String Comma separated invoice states which are to be search. Draft,Void,Sent,Overdue,Partialpaid,Paid |
start_date | Optional - String Search invoices from date. |
end_date | Optional - String Search invoices to date. |
report_by | Optional - String Get invoices base on date or due_date. Allowed values:start_date,end_date. |
GET /invoices
Request Example
$ curl https://acc.smartysoftware.net/api/v1/invoices?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
invoices:[ {
invoice_id: {invoice_id}
contact_id: {contact_id}
invoice_number: "INV_1000"
contact_name: "Spencer_Ford"
currency: "GBP"
date: "2019-05-02"
payment_terms: 15,
due_date: "2019-05-17"
"exchange_rate": "1.000000"
"labour": "0.00"
reference: ""
state: "Draft"
"subtotal": "100.00"
"tax": "20.00"
"total": "120.00"
"balance": "120.00"
tax_mode: "Exclusive"
customer_note: "Customer Notes"
term_condition: "Terms & Conditions"
total_labour: "120.00"
"transaction_type": "Invoice"
"is_writeoff": false
"write_off_amount": 0
"write_off_date": ""
"has_payment": false,
"reminder_status": "Start"
"create_source": ""
"source_create_id": "0"
},
...
],
status: "success",
page_setting: {page: 1, size: 10, total: 48}
Delete an Invoice
Delete an existing invoice.
DELETE /invoices/{invoice_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/invoices/{invoice_id}?organization_id={organization_id}
-X DELETE
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Email an Invoice
Email an invoice to the customer.
ARGUMENTS
to_emails | Required - String Array of email address of the recipients. |
cc_email | Optional - String Email address of the recipients to be cced. |
subject | Required - String Subject of an email has to be sent. |
body | Optional - String Body of an email has to be sent. |
file_name | Optional - String file name of invoice PDF attachment has to be sent. default value is invoice number. |
is_attach_pdf | Optional - Boolean Set true if you want to attach PDF of invoice to email. |
is_attach_payment_history | Optional - String Set true if you want to attach PDF of customer payment history to email. |
is_attach_statement | Optional - String Set true if you want to attach PDF of customer statement to email. |
POST /invoices/{invoice_id}/email
Request Example
$ curl https://acc.smartysoftware.net/api/v1/invoices/{invoice_id}/email?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Mark an Invoice as Sent
Mark a draft invoice as sent.
GET /invoices/{invoice_id}/state/sent
Request Example
$ curl https://acc.smartysoftware.net/api/v1/invoices/{invoice_id}/state/sent?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
invoice: {
...
},
message:
status: "success"
Mark as Draft
Mark a voided invoice as draft.
GET /invoices/{invoice_id}/state/draft
Request Example
$ curl https://acc.smartysoftware.net/api/v1/invoices/{invoice_id}/state/draft?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
invoice: {
...
},
message:
status: "success"
Write off Invoice
Write off the invoice balance amount of an invoice.
GET /invoices/{invoice_id}/state/writeoff
Request Example
$ curl https://acc.smartysoftware.net/api/v1/invoices/{invoice_id}/state/writeoff?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
invoice: {
...
},
message:
status: "success"
Cancel Write off
Cancel the write off amount of an invoice.
GET /invoices/{invoice_id}/state/cancelwriteoff
Request Example
$ curl https://acc.smartysoftware.net/api/v1/invoices/{invoice_id}/state/cancelwriteoff?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
invoice: {
...
},
message:
status: "success"
Void an Invoice
Void an invoice.
GET /invoices/{invoice_id}/state/void
Request Example
$ curl https://acc.smartysoftware.net/api/v1/invoices/{invoice_id}/state/void?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
invoice: {
...
},
message:
status: "success"
Record Invoice Payment
Record a payment for invoice.
ARGUMENTS
amount | Required - Decimal Amount of payment. |
account_id | Required - Integer ID of account. |
date | Required - String Date of payment. |
reference | Optional - String Reference of payment. |
exchange_rate | Optional - Decimal Exchange rate of payment. |
POST /invoices/{invoice_id}/payments
Request Example
$ curl https://acc.smartysoftware.net/api/v1/invoices/{invoice_id}/payments?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Delete a Payment
Delete a payment made to an invoice.
DELETE /invoices/{invoice_id}/payments/{invoice_payment_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/invoices/{invoice_id}/payments/{invoice_payment_id}?organization_id={organization_id}
-X DELETE
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
invoice: {
...
},
message:
status: "success"
Apply Credits
Apply the customer credits either from credit notes to an invoice. Multiple credits can be applied at once.
ARGUMENTS
unused_credits | Required - String |
POST /invoices/{invoice_id}/applycredits
Request Example
$ curl https://acc.smartysoftware.net/api/v1/invoices/{invoice_id}/applycredits?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
unused_credits:[{
"transaction_id": {transaction_id}
"amount_applied": "1",
},
{
"transaction_id": {transaction_id}
"amount_applied": "2",
},
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
invoice: {
...
},
message:
status: "success"
Delete Applied credit
Delete a particular credit applied to an invoice.
DELETE /invoices/{invoice_id}/applycredits/{apply_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/invoices/{invoice_id}/applycredits/{apply_id}?organization_id={organization_id}
-X DELETE
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
invoice: {
...
},
message:
status: "success"
List Invoice payments and Credits applied
Get the list of payments made and credits applied for an invoice.
GET /invoices/{invoice_id}/payments
Request Example
$ curl https://acc.smartysoftware.net/api/v1/invoices/{invoice_id}/payments?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
payments:[ {
account_id: {account_id}
invoice_id: {invoice_id}
payment_id: {payment_id}
invoice_payment_id: {invoice_payment_id}
account_name: ""
amount_applied: "10"
date: "2019-05-17"
"exchange_rate": "1.000000"
payment_number: "PAY_1"
reference: ""
vat_applied: "2"
},
...
],
credits_applied:[ {
apply_id: {apply_id}
invoice_id: {invoice_id}
credit_note_id: {credit_note_id}
amount_applied: "10"
date: "2019-05-17"
},
...
],
status: "success"
Add Attachment to an Invoice
Attach a file to an invoice.
ARGUMENTS
file | Required - String The file to be attached. |
POST /invoices/files/{invoice_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/invoices/files/{invoice_id}?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
file: {
file_name: ""
file_size: ""
file_code: ""
extension: ""
file_status: ""
},
message:
status: "success"
Get an Invoice Attachments
Returns the file attached to the invoice.
GET /invoices/{invoice_id}/files
Request Example
$ curl https://acc.smartysoftware.net/api/v1/invoices/{invoice_id}/files?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
files:[{
extension: "pdf"
file_code: "0c492652-f329-50ec-9b76-01b1ad09d209"
file_name: "doc.pdf"
file_size: 618
file_status: "success"
},
...
],
status: "success"
Create a Credit note
Create a credit note for your customer.
ARGUMENTS
creditnote_number | Required - String The credit note number. |
date | Required - String The date the credit note was created. [yyyy-mm-dd] |
contact_id | Required - Integer Id of contact. |
reference | Optional - String Reference for the credit note. |
currency | Required - String Currency used for the credit note. |
exchange_rate | Required - Decimal Exchange rate used for the credit note, if credit note is on foreign currencies. |
tax_mode | Required - String Allowed values: Exclusive,Inclusive,NO VAT. |
customer_note | Optional - String The notes added below expressing gratitude or for conveying some information. |
term_condition | Optional - String |
auto_number_creation | Optional - String If set false, the number don't increase automatically. default value is true |
items | Required - String Line items in credit note.
|
POST /creditnotes
Request Example
$ curl https://acc.smartysoftware.net/api/v1/creditnotes?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"creditnote_number": "CN_1000"
"date": "2019-05-02"
"contact_id": "{contact_id}"
"reference": ""
"currency": "GBP"
"exchange_rate": "1.000000"
"tax_mode": "Exclusive"
"customer_note": ""
"term_condition": ""
"auto_number_creation": true
items:[{
"item_id": {item_id}
"description": "",
"account_id": {account_id}
"quantity": "1"
"price": 100
"vat": "20% (VAT on Income)"
},
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
credit_note: {
"credit_note_id": {credit_note_id}
"contact_id": {contact_id}
"creditnote_number": "CN_1000"
"date": "2019-05-02"
"reference": ""
"currency": "GBP"
"tax_mode": "Exclusive"
"state":"Draft"
"customer_note": ""
"term_condition": ""
"auto_number_creation": true
"transaction_type": "Credit Note"
"subtotal": "100.00"
"total": "120.00"
"total_before_cis": "120.00"
"balance": "120.00"
"tax": "20.00"
"exchange_rate": "1.000000"
"labour": "0.00"
"display_name": "Spencer_Ford"
"email": "SpencerFord@fordcompany.com"
"contact_country": "UK"
"contact_city": "London"
"contact_state": "London"
"contact_postcode": "SA10 2FQ"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
"has_payment": false,
"create_source": ""
"source_create_id": "0"
items:[{
"item_id": {item_id}
"description": ""
"account_id": {account_id}
"quantity": "1"
"price": 100
"vat": "20% (VAT on Income)"
},
...
]
},
message:
status: "success"
Update a Credit note
Update an existing credit note. To delete a line item just remove it from the items list.
ARGUMENTS
creditnote_number | Required - String The credit note number. |
date | Required - String The date the credit note was created. [yyyy-mm-dd] |
contact_id | Required - Integer Id of contact. |
reference | Optional - String Reference for the credit note. |
currency | Required - String Currency used for the credit note. |
exchange_rate | Required - Decimal Exchange rate used for the credit note, if credit note is on foreign currencies. |
tax_mode | Required - String Allowed values: Exclusive,Inclusive,NO VAT. |
customer_note | Optional - String The notes added below expressing gratitude or for conveying some information. |
term_condition | Optional - String |
auto_number_creation | Optional - String If set false, the number don't increase automatically. default value is true |
items | Required - String Line items in credit note.
|
PUT /creditnotes/{credit_note_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/creditnotes/{credit_note_id}?organization_id={organization_id}
-X PUT
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"creditnote_number": "CN_1000"
"date": "2019-05-02"
"contact_id": "{contact_id}"
"reference": ""
"currency": "GBP"
"exchange_rate": "1.000000"
"tax_mode": "Exclusive"
"customer_note": ""
"term_condition": ""
"auto_number_creation": true
items:[{
"item_id": {item_id}
"description": "",
"account_id": {account_id}
"quantity": "1"
"price": 100
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
credit_note: {
"credit_note_id": {credit_note_id}
"contact_id": {contact_id}
"creditnote_number": "CN_1000"
"date": "2019-05-02"
"reference": ""
"currency": "GBP"
"tax_mode": "Exclusive"
"state":"Draft"
"customer_note": ""
"term_condition": ""
"auto_number_creation": true
"transaction_type": "Credit Note"
"subtotal": "100.00"
"total": "120.00"
"total_before_cis": "120.00"
"balance": "120.00"
"tax": "20.00"
"exchange_rate": "1.000000"
"labour": "0.00"
"display_name": "Spencer_Ford"
"email": "SpencerFord@fordcompany.com"
"contact_country": "UK"
"contact_city": "London"
"contact_state": "London"
"contact_postcode": "SA10 2FQ"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
"has_payment": false,
"create_source": ""
"source_create_id": "0"
items:[{
"item_id": {item_id}
"description": ""
"account_id": {account_id}
"quantity": "1"
"price": 100
"vat": "20% (VAT on Income)"
},
...
]
},
message:
status: "success"
Get Credit note
Get details of a credit note.
GET /creditnotes/{credit_note_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/creditnotes/{credit_note_id}?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
credit_note: {
"credit_note_id": {credit_note_id}
"contact_id": {contact_id}
"creditnote_number": "CN_1000"
"date": "2019-05-02"
"reference": ""
"currency": "GBP"
"tax_mode": "Exclusive"
"state":"Draft"
"customer_note": ""
"term_condition": ""
"auto_number_creation": true
"transaction_type": "Credit Note"
"subtotal": "100.00"
"total": "120.00"
"total_before_cis": "120.00"
"balance": "120.00"
"tax": "20.00"
"exchange_rate": "1.000000"
"labour": "0.00"
is_labour: false
"display_name": "Spencer_Ford"
"email": "SpencerFord@fordcompany.com"
"contact_country": "UK"
"contact_city": "London"
"contact_state": "London"
"contact_postcode": "SA10 2FQ"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
"has_payment": false,
invoices_credited: [],
refunds: [],
sum_credit_apply: 0,
sum_payment: 0,
unused_credit: 0,
"create_source": ""
"source_create_id": "0"
items:[{
"item_id": {item_id}
"description": ""
"account_id": {account_id}
"quantity": "1"
"price": 100
"vat": "20% (VAT on Income)"
},
...
],
histories:[{
creator: ""
date: "30/04/20 7:24 am"
text: "credit note created for 120"
title: "Created"
},
...
],
files:[{
extension: "pdf"
file_code: "0c492652-f329-50ec-9b76-01b1ad09d209"
file_name: "doc.pdf"
file_size: 618
file_status: "success"
},
...
]
},
status: "success"
List Credit notes
List all credit notes with pagination.
Query Params
page_number | Required - Integer |
page_size | Required - Integer |
sort_type | Required - String Allowed values: desc,asc |
sort_column | Required - String |
search_text | Optional - String Search in credit note number, reference, contact or total Amount. |
search_states | Optional - String Comma separated credit note states which are to be search. Draft,Open,Closed,Void |
start_date | Optional - String Search credit notes from date. |
end_date | Optional - String Search credit notes to date. |
GET /creditnotes
Request Example
$ curl https://acc.smartysoftware.net/api/v1/creditnotes?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
creditnotes:[ {
credit_note_id: {credit_note_id}
contact_id: {contact_id}
creditnote_number: "CN_1000"
contact_name: "Spencer_Ford"
currency: "GBP"
date: "2019-05-02"
"exchange_rate": "1.000000"
"labour": "0.00"
reference: ""
state: "Draft"
"subtotal": "100.00"
"tax": "20.00"
"total": "120.00"
"balance": "120.00"
tax_mode: "Exclusive"
customer_note: "Customer Notes"
term_condition: "Terms & Conditions"
total_labour: "120.00"
"transaction_type": "Credit Note"
"has_payment": false,
"create_source": ""
"source_create_id": "0"
},
...
],
status: "success",
page_setting: {page: 1, size: 10, total: 48}
Delete Credit notes
Delete an existing credit note.
DELETE /creditnotes/{credit_note_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/creditnotes/{credit_note_id}?organization_id={organization_id}
-X DELETE
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Email a Credit note
Email a credit note to the customer.
ARGUMENTS
to_emails | Required - String Array of email address of the recipients. |
cc_email | Optional - String Email address of the recipients to be cced. |
subject | Required - String Subject of an email has to be sent. |
body | Optional - String Body of an email has to be sent. |
file_name | Optional - String file name of credit note PDF attachment has to be sent. default value is credit note number. |
is_attach_pdf | Optional - Boolean Set true if you want to attach PDF of credit note to email. |
POST /creditnotes/{credit_note_id}/email
Request Example
$ curl https://acc.smartysoftware.net/api/v1/creditnotes/{credit_note_id}/email?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Mark a Credit note as Open
Mark a draft credit note as open.
GET /creditnotes/{credit_note_id}/state/open
Request Example
$ curl https://acc.smartysoftware.net/api/v1/creditnotes/{credit_note_id}/state/open?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
credit_note: {
...
},
message:
status: "success"
Mark as Draft
Mark a voided credit note as draft.
GET /creditnotes/{credit_note_id}/state/draft
Request Example
$ curl https://acc.smartysoftware.net/api/v1/creditnotes/{credit_note_id}/state/draft?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
credit_note: {
...
},
message:
status: "success"
Void a Credit note
Void a credit note.
GET /creditnotes/{credit_note_id}/state/void
Request Example
$ curl https://acc.smartysoftware.net/api/v1/creditnotes/{credit_note_id}/state/void?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
credit_note: {
...
},
message:
status: "success"
Refund a Credit note
Refund credit note amount.
ARGUMENTS
amount | Required - Decimal Amount of refund. |
account_id | Required - Integer ID of account. |
date | Required - String Date of refund. |
reference | Optional - String Reference of refund. |
exchange_rate | Optional - Decimal Exchange rate of refund. |
POST /creditnotes/{credit_note_id}/refunds
Request Example
$ curl https://acc.smartysoftware.net/api/v1/creditnotes/{credit_note_id}/refunds?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Get Credit note refunds and invoices credited
Get the list of refunds and invoices to which the credit note is applied.
GET /creditnotes/{credit_note_id}/refunds
Request Example
$ curl https://acc.smartysoftware.net/api/v1/creditnotes/{credit_note_id}/refunds?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
refunds:[ {
account_id: {account_id}
credit_note_id: {credit_note_id}
refund_id: {refund_id}
creditnote_refund_id: {creditnote_refund_id}
account_name: ""
amount_applied: "10"
date: "2019-05-17"
"exchange_rate": "1.000000"
payment_number: "PAY_1"
reference: ""
vat_applied: "2"
},
...
],
invoices_credited:[ {
apply_id: {apply_id}
credit_note_id: {credit_note_id}
invoice_id: {invoice_id}
amount_applied: "10"
date: "2019-05-17"
},
...
],
status: "success"
Delete a Refund
Delete a credit note refund.
DELETE /creditnotes/{credit_note_id}/refunds/{creditnote_refund_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/creditnotes/{credit_note_id}/refunds/{creditnote_refund_id}?organization_id={organization_id}
-X DELETE
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
credit_note: {
...
},
message:
status: "success"
Update a Refund
Update the refunded transaction.
ARGUMENTS
amount | Required - Decimal Amount of refund. |
account_id | Required - Integer ID of account. |
date | Required - String Date of refund. |
reference | Optional - String Reference of refund. |
exchange_rate | Optional - Decimal Exchange rate of refund. |
GET /creditnotes/{credit_note_id}/refunds/{refund_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/creditnotes/{credit_note_id}/refunds/{refund_id}?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
credit_note: {
...
},
message:
status: "success"
Credit to Invoices
Apply credit note to existing invoices.
ARGUMENTS
invoices | Required - String |
POST /creditnotes/{credit_note_id}/applycredit
Request Example
$ curl https://acc.smartysoftware.net/api/v1/creditnotes/{credit_note_id}/applycredit?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
invoices:[{
"transaction_id": {transaction_id}
"amount_applied": "1",
},
{
"transaction_id": {transaction_id}
"amount_applied": "2",
},
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
credit_note: {
...
},
message:
status: "success"
Delete Invoices Credited
Delete the credits applied to an invoice.
DELETE /creditnotes/{credit_note_id}/applycredit/{apply_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/creditnotes/{credit_note_id}/applycredit/{apply_id}?organization_id={organization_id}
-X DELETE
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
credit_note: {
...
},
message:
status: "success"
Get a Credit note Attachments
Returns the file attached to the credit note.
GET /creditnotes/{credit_note_id}/files
Request Example
$ curl https://acc.smartysoftware.net/api/v1/creditnotes/{credit_note_id}/files?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
files:[{
extension: "pdf"
file_code: "0c492652-f329-50ec-9b76-01b1ad09d209"
file_name: "doc.pdf"
file_size: 618
file_status: "success"
},
...
],
status: "success"
Add Attachment to a Credit note
Attach a file to a credit note.
ARGUMENTS
file | Required - String The file to be attached. |
POST /creditnotes/files/{credit_note_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/creditnotes/files/{credit_note_id}?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
file: {
file_name: ""
file_size: ""
file_code: ""
extension: ""
file_status: ""
},
message:
status: "success"
Create a Recurring Invoice
Create a new recurring invoice.
ARGUMENTS
profile_name | Required - String Unique name for the recurring profile given by the user. |
frequency | Required - String The frequency of time interval at which the invoice is to be generated. Allowed values: daily,weekly,monthly,yearly |
repeat_every | Required - String The period between every recurrency frequency. |
never_expire | Required - String If set true the recurring invoice does not expire. Allowed values: true,false |
create_invoice_state | Required - String The state of invoice which created from recurring. Allowed values: Draft,Sent,sentEmail |
start_date | Required - String The date on which the recurring invoice starts. [yyyy-mm-dd] |
end_date | Required - String The date on which the recurring invoice expires. [yyyy-mm-dd] |
payment_terms | Optional - String Payment terms in days e.g. 15, 30, 60. Invoice due date will be calculated based on this. |
contact_id | Required - Integer Id of contact. |
reference | Optional - String Reference for the recurring invoice. |
currency | Required - String Currency used for the recurring invoice. |
tax_mode | Required - String Allowed values: Exclusive,Inclusive,NO VAT. |
customer_note | Optional - String The notes added below expressing gratitude or for conveying some information. |
term_condition | Optional - String |
items | Required - String Line items in recurring invoice.
|
POST /recurringinvoices
Request Example
$ curl https://acc.smartysoftware.net/api/v1/recurringinvoices?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"profile_name": "SpencerFord"
"frequency": "monthly"
"repeat_every": 1
"never_expire": false
"create_invoice_state": "Draft"
"start_date": "2019-05-02"
"end_date": "2020-05-02"
"payment_terms":15,
"contact_id": "{contact_id}"
"reference": ""
"currency": "GBP"
"tax_mode": "Exclusive"
"customer_note": ""
"term_condition": ""
items:[{
"item_id": {item_id}
"description": "",
"account_id": {account_id}
"quantity": "1"
"price": 100
"vat": "20% (VAT on Income)"
},
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
recurring_invoice: {
"recurring_invoice_id": {recurring_invoice_id}
"contact_id": {contact_id}
"profile_name": "SpencerFord"
"frequency": "monthly"
"repeat_every": 1
"never_expire": false
"create_invoice_state": "Draft"
"start_date": "2019-05-02"
"end_date": "2020-05-02"
"last_invoice_date":"2019-05-02"
"next_invoice_date":"2019-06-02"
"payment_terms":15,
"reference": ""
"currency": "GBP"
"tax_mode": "Exclusive"
"state":"Active"
"customer_note": ""
"term_condition": ""
"transaction_type": "Recurring Invoice"
"subtotal": "100.00"
"total": "120.00"
"balance": "120.00"
"tax": "20.00"
"labour": "0.00"
items:[{
"item_id": {item_id}
"description": ""
"account_id": {account_id}
"quantity": "1"
"price": 100
"vat": "20% (VAT on Income)"
},
...
]
},
message:
status: "success"
Update a Recurring Invoice
Update an existing recurring invoice. To delete a line item just remove it from the items list.
ARGUMENTS
profile_name | Required - String Unique name for the recurring profile given by the user. |
frequency | Required - String The frequency of time interval at which the invoice is to be generated. Allowed values: daily,weekly,monthly,yearly |
repeat_every | Required - String The period between every recurrency frequency. |
never_expire | Required - String If set true the recurring invoice does not expire. Allowed values: true,false |
create_invoice_state | Required - String The state of invoice which created from recurring. Allowed values: Draft,Sent,sentEmail |
start_date | Required - String The date on which the recurring invoice starts. [yyyy-mm-dd] |
end_date | Required - String The date on which the recurring invoice expires. [yyyy-mm-dd] |
payment_terms | Optional - String Payment terms in days e.g. 15, 30, 60. Invoice due date will be calculated based on this. |
contact_id | Required - Integer Id of contact. |
reference | Optional - String Reference for the recurring invoice. |
currency | Required - String Currency used for the recurring invoice. |
tax_mode | Required - String Allowed values: Exclusive,Inclusive,NO VAT. |
customer_note | Optional - String The notes added below expressing gratitude or for conveying some information. |
term_condition | Optional - String |
items | Required - String Line items in recurring invoice.
|
PUT /recurringinvoices/{recurring_invoice_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/recurringinvoices/{recurring_invoice_id}?organization_id={organization_id}
-X PUT
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"profile_name": "SpencerFord"
"frequency": "monthly"
"repeat_every": 1
"never_expire": false
"create_invoice_state": "Draft"
"start_date": "2019-05-02"
"end_date": "2020-05-02"
"payment_terms":15,
"contact_id": "{contact_id}"
"reference": ""
"currency": "GBP"
"tax_mode": "Exclusive"
"customer_note": ""
"term_condition": ""
items:[{
"item_id": {item_id}
"description": "",
"account_id": {account_id}
"quantity": "1"
"price": 100
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
recurring_invoice: {
"recurring_invoice_id": {recurring_invoice_id}
"contact_id": {contact_id}
"profile_name": "SpencerFord"
"frequency": "monthly"
"repeat_every": 1
"create_invoice_state": "Draft"
"start_date": "2019-05-02"
"end_date": "2020-05-02"
"last_invoice_date": "2019-05-02"
"next_invoice_date": "2019-06-02"
"payment_terms":15,
"reference": ""
"currency": "GBP"
"tax_mode": "Exclusive"
"state":"Active"
"customer_note": ""
"term_condition": ""
"transaction_type": "Recurring Invoice"
"subtotal": "100.00"
"total": "120.00"
"balance": "120.00"
"tax": "20.00"
"labour": "0.00"
items:[{
"item_id": {item_id}
"description": ""
"account_id": {account_id}
"quantity": "1"
"price": 100
"vat": "20% (VAT on Income)"
},
...
]
},
message:
status: "success"
Get Recurring Invoice
Get details of a recurring invoice.
GET /recurringinvoices/{recurring_invoice_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/recurringinvoices/{recurring_invoice_id}?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
recurring_invoice: {
"recurring_invoice_id": {recurring_invoice_id}
"contact_id": {contact_id}
"profile_name": "SpencerFord"
"frequency": "monthly"
"repeat_every": 1
"create_invoice_state": "Draft"
"start_date": "2019-05-02"
"end_date": "2020-05-02"
"payment_terms":15,
"reference": ""
"currency": "GBP"
"tax_mode": "Exclusive"
"state":"Active"
"customer_note": ""
"term_condition": ""
"last_invoice_date":"2019-05-02"
"next_invoice_date":"2019-06-02"
"transaction_type": "Recurring Invoice"
"subtotal": "100.00"
"total": "120.00"
"balance": "120.00"
"tax": "20.00"
"labour": "0.00"
is_labour: false
"display_name": "Spencer_Ford"
"email": "SpencerFord@fordcompany.com"
"contact_country": "UK"
"contact_city": "London"
"contact_state": "London"
"contact_postcode": "SA10 2FQ"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
items:[{
"item_id": {item_id}
"description": ""
"account_id": {account_id}
"quantity": "1"
"price": 100
"vat": "20% (VAT on Income)"
},
...
],
histories:[{
creator: ""
date: "30/04/20 7:24 am"
text: "recurring invoice created for 120"
title: "Created"
},
...
],
},
status: "success"
List Recurring Invoices
List all recurring invoices with pagination.
Query Params
page_number | Required - Integer |
page_size | Required - Integer |
sort_type | Required - String Allowed values: desc,asc |
sort_column | Required - String |
search_text | Optional - String Search in Profile Name, Contact or Total Amount. |
search_states | Optional - String Comma separated recurring invoice states which are to be search. Stopped,Active,Expired |
start_date | Optional - String Search recurring invoices from date. |
end_date | Optional - String Search recurring invoices to date. |
GET /recurringinvoices
Request Example
$ curl https://acc.smartysoftware.net/api/v1/recurringinvoices?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
recurringinvoices:[ {
recurring_invoice_id: {recurring_invoice_id}
contact_id: {contact_id}
profile_name: "SpencerFord"
frequency: "monthly"
repeat_every: 1
create_invoice_state: "Draft"
currency: "GBP"
start_date: "2019-05-02"
end_date: "2020-05-02"
last_invoice_date:"2019-05-02"
next_invoice_date:"2019-06-02"
payment_terms:15,
"labour": "0.00"
reference: ""
state: "Draft"
"subtotal": "100.00"
"tax": "20.00"
"total": "120.00"
"balance": "120.00"
tax_mode: "Exclusive"
customer_note: "Customer Notes"
term_condition: "Terms & Conditions"
"transaction_type": "Recurring Invoice"
contact_name: "c1"
},
...
],
status: "success",
page_setting: {page: 1, size: 10, total: 48}
Delete Recurring Invoice
Delete an existing recurring invoice.
DELETE /recurringinvoices/{recurring_invoice_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/recurringinvoices/{recurring_invoice_id}?organization_id={organization_id}
-X DELETE
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Stop a Recurring Invoice
Stop a Recurring Invoice.
GET /recurringinvoices/{recurring_invoice_id}/state/Stop
Request Example
$ curl https://acc.smartysoftware.net/api/v1/recurringinvoices/{recurring_invoice_id}/state/Stop?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
recurring_invoice: {
...
},
message:
status: "success"
Active a Recurring Invoice
Active a Recurring Invoice.
GET /recurringinvoices/{recurring_invoice_id}/state/Active
Request Example
$ curl https://acc.smartysoftware.net/api/v1/recurringinvoices/{recurring_invoice_id}/state/Active?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
recurring_invoice: {
...
},
message:
status: "success"
Create a Payment
Create a new payment.
ARGUMENTS
date | Required - String Date on which payment is made. [yyyy-mm-dd] |
amount | Required - Decimal Amount paid in the respective payment. |
contact_id | Required - Integer Id of contact. |
account_id | Required - Integer Id of account |
reference | Optional - String Reference for the payment. |
payment_note | Optional - String A brief description about the transaction. |
exchange_rate | Required - Decimal Exchange rate when payment is received. Only used for non base currency invoices and credit notes. |
invoices | Required - String List of invoices associated with the payment.
|
POST /customerpayments
Request Example
$ curl https://acc.smartysoftware.net/api/v1/customerpayments?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"account_id": {account_id}
"contact_id": {contact_id}
"date": "2019-05-17"
"amount": "120.00"
"reference": ""
"payment_note": ""
"exchange_rate": "1.000000"
"invoices":[{
"transaction_id": {transaction_id}
"amount_applied": "120.00",
},
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
customer_payment: {
"payment_id": {payment_id}
"contact_id": {contact_id}
"account_id": {account_id}
"payment_number": "PAY_1"
"date": "2019-05-17"
"amount": "120.00"
"unused_amount":"0.00",
"payment_type":"Customer Payment",
"reference": ""
"payment_note": ""
"exchange_rate": "1.000000"
"invoices":[{
"transaction_id": {transaction_id}
"transaction_payment_id": {transaction_payment_id}
"amount_applied": "120.00",
"vat_applied":"0.00",
},
...
],
"contact_name": "Spencer_Ford"
"email": "SpencerFord@fordcompany.com"
"contact_country": "UK"
"contact_city": "London"
"contact_state": "London"
"contact_postcode": "SA10 2FQ"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
"create_source": ""
"source_create_id": "0"
},
message:
status: "success"
Update a Payment
Update an existing payment information.
ARGUMENTS
date | Required - String Date on which payment is made. [yyyy-mm-dd] |
amount | Required - Decimal Amount paid in the respective payment. |
contact_id | Required - Integer Id of contact. |
account_id | Required - Integer Id of account |
reference | Optional - String Reference for the payment. |
payment_note | Optional - String A brief description about the transaction. |
exchange_rate | Required - Decimal Exchange rate when payment is received. Only used for non base currency invoices and credit notes. |
invoices | Required - String List of invoices associated with the payment.
|
PUT /customerpayments/{payment_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/customerpayments/{payment_id}?organization_id={organization_id}
-X PUT
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"account_id": {account_id}
"contact_id": {contact_id}
"date": "2019-05-17"
"amount": "120.00"
"reference": ""
"payment_note": ""
"exchange_rate": "1.000000"
"invoices":[{
"transaction_id": {transaction_id}
"amount_applied": "120.00",
},
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
customer_payment: {
"payment_id": {payment_id}
"contact_id": {contact_id}
"account_id": {account_id}
"payment_number": "PAY_1"
"date": "2019-05-17"
"amount": "120.00"
"unused_amount":"0.00",
"payment_type":"Customer Payment",
"reference": ""
"payment_note": ""
"exchange_rate": "1.000000"
"invoices":[{
"transaction_id": {transaction_id}
"transaction_payment_id": {transaction_payment_id}
"amount_applied": "120.00",
"vat_applied":"0.00",
},
...
],
"contact_name": "Spencer_Ford"
"email": "SpencerFord@fordcompany.com"
"contact_country": "UK"
"contact_city": "London"
"contact_state": "London"
"contact_postcode": "SA10 2FQ"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
"create_source": ""
"source_create_id": "0"
},
message:
status: "success"
Get Payment
Get details of a payment.
GET /customerpayments/{payment_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/customerpayments/{payment_id}?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
customer_payment: {
"payment_id": {payment_id}
"contact_id": {contact_id}
"account_id": {account_id}
"account_name": {account_name},
"display_name": "Spencer_Ford,
"payment_number": "PAY_1"
"date": "2019-05-17"
"amount": "120.00"
"unused_amount":"0.00",
"payment_type":"Customer Payment",
"reference": ""
"payment_note": ""
"exchange_rate": "1.000000"
"create_source": ""
"source_create_id": "0"
"invoices":[{
"transaction_id": {transaction_id}
"transaction_payment_id": {transaction_payment_id}
"amount_applied": "120.00",
"vat_applied":"0.00",
},
...
],
histories:[{
creator: ""
date: "30/04/20 7:24 am"
text: "Invoice created for 120"
title: "Created"
},
...
],
files:[{
extension: "pdf"
file_code: "0c492652-f329-50ec-9b76-01b1ad09d209"
file_name: "doc.pdf"
file_size: 618
file_status: "success"
},
...
]
},
status: "success"
List Payments
List all payments with pagination.
Query Params
page_number | Required - Integer |
page_size | Required - Integer |
sort_type | Required - String Allowed values: desc,asc |
sort_column | Required - String |
search_text | Optional - String Search in payment number, reference, contact or amount. |
start_date | Optional - String Search payments from date. |
end_date | Optional - String Search payments to date. |
GET /customerpayments
Request Example
$ curl https://acc.smartysoftware.net/api/v1/customerpayments?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
customer_payments:[ {
"payment_id": {payment_id}
"contact_id": {contact_id}
"account_id": {account_id}
"account_name": {account_name},
"contact_name": "Spencer_Ford,
"payment_number": "PAY_1"
"date": "2019-05-17"
"amount": "120.00"
"unused_amount":"0.00",
"payment_type":"Customer Payment",
"reference": ""
"payment_note": ""
"exchange_rate": "1.000000"
"create_source": ""
"source_create_id": "0"
},
...
],
status: "success",
page_setting: {page: 1, size: 10, total: 48}
Delete Payment
Delete an existing payment.
DELETE /customerpayments/{payment_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/customerpayments/{payment_id}?organization_id={organization_id}
-X DELETE
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Email a Payment
Email a payment to the customer.
ARGUMENTS
to_emails | Required - String Array of email address of the recipients. |
cc_email | Optional - String Email address of the recipients to be cced. |
subject | Required - String Subject of an email has to be sent. |
body | Optional - String Body of an email has to be sent. |
file_name | Optional - String file name of payment PDF attachment has to be sent. default value is payment number. |
is_attach_pdf | Optional - Boolean Set true if you want to attach PDF of payment to email. |
POST /customerpayments/{payment_id}/email
Request Example
$ curl https://acc.smartysoftware.net/api/v1/customerpayments/{payment_id}/email?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Unreconcile a Payment
Unreconcile a payment.
GET /customerpayments/{payment_id}/unreconcile
Request Example
$ curl https://acc.smartysoftware.net/api/v1/customerpayments/{payment_id}/unreconcile?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
customer_payment: {
...
},
message:
status: "success"
Create a Bill
Create a bill for your contact.
ARGUMENTS
state | Optional - String Allowed values: Draft,Approve. |
date | Required - String The date the bill was created. [yyyy-mm-dd] |
due_date | Required - String Due date of bill. [yyyy-mm-dd] |
contact_id | Required - Integer Id of contact. |
reference | Optional - String Reference for the bill. |
currency | Required - String Currency used for the bill. |
exchange_rate | Required - Decimal Exchange rate used for the bill, if bill is on foreign currencies. |
tax_mode | Required - String Allowed values: Exclusive,Inclusive,NO VAT. |
customer_note | Optional - String The notes added below expressing gratitude or for conveying some information. |
items | Required - String Line items in bill.
|
POST /bills
Request Example
$ curl https://acc.smartysoftware.net/api/v1/bills?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"bill_number": "EXP_1"
"date": "2019-05-02"
"due_date": "2019-05-17"
"contact_id": "{contact_id}"
"reference": ""
"currency": "GBP"
"exchange_rate": "1.000000"
"tax_mode": "Exclusive"
"customer_note": ""
items:[{
"item_id": {item_id}
"description": "",
"account_id": {account_id}
"quantity": "1"
"price": 100
"vat": "20% (VAT on Income)"
},
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
bill: {
"bill_id": {bill_id}
"contact_id": {contact_id}
"bill_number": "EXP_1"
"date": "2019-05-02"
"due_date": "2019-05-17"
"reference": ""
"currency": "GBP"
"tax_mode": "Exclusive"
"state":"Draft"
"customer_note": ""
"transaction_type": "Bill"
"subtotal": "100.00"
"total": "120.00"
"total_before_cis": "120.00"
"balance": "120.00"
"tax": "20.00"
"exchange_rate": "1.000000"
"labour": "0.00"
"display_name": "Spencer_Ford"
"email": "SpencerFord@fordcompany.com"
"contact_country": "UK"
"contact_city": "London"
"contact_state": "London"
"contact_postcode": "SA10 2FQ"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
"has_payment": false,
"create_source": ""
"source_create_id": "0"
items:[{
"item_id": {item_id}
"description": ""
"account_id": {account_id}
"quantity": "1"
"price": 100
"vat": "20% (VAT on Income)"
},
...
]
},
message:
status: "success"
Update a Bill
Update an existing bill. To delete a line item just remove it from the items list.
ARGUMENTS
date | Required - String The date the bill was created. [yyyy-mm-dd] |
due_date | Required - String Due date of bill. [yyyy-mm-dd] |
contact_id | Required - Integer Id of contact. |
reference | Optional - String Reference for the bill. |
currency | Required - String Currency used for the bill. |
exchange_rate | Required - Decimal Exchange rate used for the bill, if bill is on foreign currencies. |
tax_mode | Required - String Allowed values: Exclusive,Inclusive,NO VAT. |
customer_note | Optional - String The notes added below expressing gratitude or for conveying some information. |
items | Required - String Line items in bill.
|
PUT /bills/{bill_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/bills/{bill_id}?organization_id={organization_id}
-X PUT
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"bill_number": "EXP_1"
"date": "2019-05-02"
"due_date": "2019-05-17"
"contact_id": "{contact_id}"
"reference": ""
"currency": "GBP"
"exchange_rate": "1.000000"
"tax_mode": "Exclusive"
"customer_note": ""
items:[{
"item_id": {item_id}
"description": "",
"account_id": {account_id}
"quantity": "1"
"price": 100
"vat": "20% (VAT on Income)"
},
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
bill: {
"bill_id": {bill_id}
"contact_id": {contact_id}
"bill_number": "EXP_1"
"date": "2019-05-02"
"due_date": "2019-05-17"
"reference": ""
"currency": "GBP"
"tax_mode": "Exclusive"
"state":"Draft"
"customer_note": ""
"transaction_type": "Bill"
"subtotal": "100.00"
"total": "120.00"
"total_before_cis": "120.00"
"balance": "120.00"
"tax": "20.00"
"exchange_rate": "1.000000"
"labour": "0.00"
"display_name": "Spencer_Ford"
"email": "SpencerFord@fordcompany.com"
"contact_country": "UK"
"contact_city": "London"
"contact_state": "London"
"contact_postcode": "SA10 2FQ"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
"has_payment": false,
"create_source": ""
"source_create_id": "0"
items:[{
"item_id": {item_id}
"description": ""
"account_id": {account_id}
"quantity": "1"
"price": 100
"vat": "20% (VAT on Income)"
},
...
]
},
message:
status: "success"
Get Bill
Get details of a bill.
GET /bills/{bill_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/bills/{bill_id}?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
bill: {
"bill_id": {bill_id}
"contact_id": {contact_id}
"bill_number": "EXP_1"
"date": "2019-05-02"
"due_date": "2019-05-17"
"reference": ""
"currency": "GBP"
"tax_mode": "Exclusive"
"state":"Draft"
"customer_note": ""
"transaction_type": "Bill"
"subtotal": "100.00"
"total": "120.00"
"total_before_cis": "120.00"
"balance": "120.00"
"tax": "20.00"
"exchange_rate": "1.000000"
"labour": "0.00"
is_labour: false
"display_name": "Spencer_Ford"
"email": "SpencerFord@fordcompany.com"
"contact_country": "UK"
"contact_city": "London"
"contact_state": "London"
"contact_postcode": "SA10 2FQ"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
"has_payment": false,
credits_applied: [],
payment_options: [],
payments: [],
sum_credit_apply: 0,
sum_payment: 0,
unused_credit: 0,
"create_source": ""
"source_create_id": "0"
items:[{
"item_id": {item_id}
"description": ""
"account_id": {account_id}
"quantity": "1"
"price": 100
"vat": "20% (VAT on Income)"
},
...
],
histories:[{
creator: ""
date: "30/04/20 7:24 am"
text: "Bill created for 120"
title: "Created"
},
...
],
files:[{
extension: "pdf"
file_code: "0c492652-f329-50ec-9b76-01b1ad09d209"
file_name: "doc.pdf"
file_size: 618
file_status: "success"
},
...
]
},
status: "success"
List Bills
List all bills with pagination.
Query Params
page_number | Required - Integer |
page_size | Required - Integer |
sort_type | Required - String Allowed values: desc,asc |
sort_column | Required - String |
search_text | Optional - String Search in bill number, reference, contact or total Amount. |
search_states | Optional - String Comma separated bill states which are to be search. Draft,Void,Sent,Overdue,Partialpaid,Paid |
start_date | Optional - String Search bills from date. |
end_date | Optional - String Search bills to date. |
report_by | Optional - String Get bills base on date or due_date. Allowed values:start_date,end_date. |
GET /bills
Request Example
$ curl https://acc.smartysoftware.net/api/v1/bills?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
bills:[ {
bill_id: {bill_id}
contact_id: {contact_id}
bill_number: "EXP_1"
contact_name: "Spencer_Ford"
currency: "GBP"
date: "2019-05-02"
due_date: "2019-05-17"
"exchange_rate": "1.000000"
"labour": "0.00"
reference: ""
state: "Draft"
"subtotal": "100.00"
"tax": "20.00"
"total": "120.00"
"balance": "120.00"
tax_mode: "Exclusive"
customer_note: "Customer Notes"
total_labour: "120.00"
"transaction_type": "Bill"
"has_payment": false,
"create_source": ""
"source_create_id": "0"
},
...
],
status: "success",
page_setting: {page: 1, size: 10, total: 48}
Delete Bills
Delete an existing bill.
DELETE /bills/{bill_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/bills/{bill_id}?organization_id={organization_id}
-X DELETE
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Approve Bills
Mark a draft bill as sent.
GET /bills/{bill_id}/state/sent
Request Example
$ curl https://acc.smartysoftware.net/api/v1/bills/{bill_id}/state/sent?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
bill: {
...
},
message:
status: "success"
Mark as Draft
Mark a voided bill as draft.
GET /bills/{bill_id}/state/draft
Request Example
$ curl https://acc.smartysoftware.net/api/v1/bills/{bill_id}/state/draft?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
bill: {
...
},
message:
status: "success"
Void Bills
Mark a bill status as void.
GET /bills/{bill_id}/state/void
Request Example
$ curl https://acc.smartysoftware.net/api/v1/bills/{bill_id}/state/void?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
bill: {
...
},
message:
status: "success"
Record Bill Payment
Record a payment for bill.
ARGUMENTS
amount | Required - Decimal Amount of payment. |
account_id | Required - Integer ID of account. |
date | Required - String Date of payment. |
reference | Optional - String Reference of payment. |
exchange_rate | Optional - Decimal Exchange rate of payment. |
POST /bills/{bill_id}/payments
Request Example
$ curl https://acc.smartysoftware.net/api/v1/bills/{bill_id}/payments?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Delete a Payment
Delete a payment made to a bill.
DELETE /bills/{bill_id}/payments/{bill_payment_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/bills/{bill_id}/payments/{bill_payment_id}?organization_id={organization_id}
-X DELETE
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
bill: {
...
},
message:
status: "success"
Apply Credits
Apply the customer credits either from credit notes to a bill. Multiple credits can be applied at once.
ARGUMENTS
unused_credits | Required - String |
POST /bills/{bill_id}/applycredits
Request Example
$ curl https://acc.smartysoftware.net/api/v1/bills/{bill_id}/applycredits?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
unused_credits:[{
"transaction_id": {transaction_id}
"amount_applied": "1",
},
{
"transaction_id": {transaction_id}
"amount_applied": "2",
},
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
bill: {
...
},
message:
status: "success"
Delete Applied credit
Delete a particular credit applied to a bill.
DELETE /bills/{bill_id}/applycredits/{apply_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/bills/{bill_id}/applycredits/{apply_id}?organization_id={organization_id}
-X DELETE
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
bill: {
...
},
message:
status: "success"
List Bill payments and Credits applied
Get the list of payments made and credits applied for a bill.
GET /bills/{bill_id}/payments
Request Example
$ curl https://acc.smartysoftware.net/api/v1/bills/{bill_id}/payments?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
payments:[ {
account_id: {account_id}
bill_id: {bill_id}
payment_id: {payment_id}
bill_payment_id: {bill_payment_id}
account_name: ""
amount_applied: "10"
date: "2019-05-17"
"exchange_rate": "1.000000"
payment_number: "PAY_1"
reference: ""
vat_applied: "2"
},
...
],
credits_applied:[ {
apply_id: {apply_id}
bill_id: {bill_id}
credit_note_id: {credit_note_id}
amount_applied: "10"
date: "2019-05-17"
},
...
],
status: "success"
Add Attachment to a Bill
Attach a file to a bill.
ARGUMENTS
file | Required - String The file to be attached. |
POST /bills/files/{bill_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/bills/files/{bill_id}?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
file: {
file_name: ""
file_size: ""
file_code: ""
extension: ""
file_status: ""
},
message:
status: "success"
Get a Bill Attachment
Returns the file attached to the bill.
GET /bills/{bill_id}/files
Request Example
$ curl https://acc.smartysoftware.net/api/v1/bills/{bill_id}/files?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
files:[{
extension: "pdf"
file_code: "0c492652-f329-50ec-9b76-01b1ad09d209"
file_name: "doc.pdf"
file_size: 618
file_status: "success"
},
...
],
status: "success"
Create a Supplier credit
Create a supplier credit for your contact.
ARGUMENTS
date | Required - String The date the supplier credit was created. [yyyy-mm-dd] |
contact_id | Required - Integer Id of contact. |
reference | Optional - String Reference for the supplier credit. |
currency | Required - String Currency used for the supplier credit. |
exchange_rate | Required - Decimal Exchange rate used for the supplier credit, if supplier credit is on foreign currencies. |
tax_mode | Required - String Allowed values: Exclusive,Inclusive,NO VAT. |
customer_note | Optional - String The notes added below expressing gratitude or for conveying some information. |
items | Required - String Line items in supplier credit.
|
POST /suppliercredits
Request Example
$ curl https://acc.smartysoftware.net/api/v1/suppliercredits?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"suppliercredit_number": "SC_1000"
"date": "2019-05-02"
"contact_id": "{contact_id}"
"reference": ""
"currency": "GBP"
"exchange_rate": "1.000000"
"tax_mode": "Exclusive"
"customer_note": ""
items:[{
"item_id": {item_id}
"description": "",
"account_id": {account_id}
"quantity": "1"
"price": 100
"vat": "20% (VAT on Income)"
},
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
supplier_credit: {
"supplier_credit_id": {supplier_credit_id}
"contact_id": {contact_id}
"suppliercredit_number": "SC_1000"
"date": "2019-05-02"
"reference": ""
"currency": "GBP"
"tax_mode": "Exclusive"
"state":"Draft"
"transaction_type": "supplier credit"
"subtotal": "100.00"
"total": "120.00"
"total_before_cis": "120.00"
"balance": "120.00"
"tax": "20.00"
"exchange_rate": "1.000000"
"labour": "0.00"
"display_name": "Spencer_Ford"
"email": "SpencerFord@fordcompany.com"
"contact_country": "UK"
"contact_city": "London"
"contact_state": "London"
"contact_postcode": "SA10 2FQ"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
"has_payment": false,
"customer_note": ""
"create_source": ""
"source_create_id": "0"
items:[{
"item_id": {item_id}
"description": ""
"account_id": {account_id}
"quantity": "1"
"price": 100
"vat": "20% (VAT on Income)"
},
...
]
},
message:
status: "success"
Update a Supplier credit
Update an existing supplier credit. To delete a line item just remove it from the items list.
ARGUMENTS
date | Required - String The date the supplier credit was created. [yyyy-mm-dd] |
contact_id | Required - Integer Id of contact. |
reference | Optional - String Reference for the supplier credit. |
currency | Required - String Currency used for the supplier credit. |
exchange_rate | Required - Decimal Exchange rate used for the supplier credit, if supplier credit is on foreign currencies. |
tax_mode | Required - String Allowed values: Exclusive,Inclusive,NO VAT. |
customer_note | Optional - String The notes added below expressing gratitude or for conveying some information. |
items | Required - String Line items in supplier credit.
|
PUT /suppliercredits/{supplier_credit_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/suppliercredits/{supplier_credit_id}?organization_id={organization_id}
-X PUT
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"suppliercredit_number": "SC_1000"
"date": "2019-05-02"
"contact_id": "{contact_id}"
"reference": ""
"currency": "GBP"
"exchange_rate": "1.000000"
"tax_mode": "Exclusive"
"customer_note": ""
items:[{
"item_id": {item_id}
"description": "",
"account_id": {account_id}
"quantity": "1"
"price": 100
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
supplier_credit: {
"supplier_credit_id": {supplier_credit_id}
"contact_id": {contact_id}
"suppliercredit_number": "SC_1000"
"date": "2019-05-02"
"reference": ""
"currency": "GBP"
"tax_mode": "Exclusive"
"state":"Draft"
"transaction_type": "supplier credit"
"subtotal": "100.00"
"total": "120.00"
"total_before_cis": "120.00"
"balance": "120.00"
"tax": "20.00"
"exchange_rate": "1.000000"
"labour": "0.00"
"display_name": "Spencer_Ford"
"email": "SpencerFord@fordcompany.com"
"contact_country": "UK"
"contact_city": "London"
"contact_state": "London"
"contact_postcode": "SA10 2FQ"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
"has_payment": false,
"customer_note": ""
"create_source": ""
"source_create_id": "0"
items:[{
"item_id": {item_id}
"description": ""
"account_id": {account_id}
"quantity": "1"
"price": 100
"vat": "20% (VAT on Income)"
},
...
]
},
message:
status: "success"
Get Supplier credit
Get details of a supplier credit.
GET /suppliercredits/{supplier_credit_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/suppliercredits/{supplier_credit_id}?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
supplier_credit: {
"supplier_credit_id": {supplier_credit_id}
"contact_id": {contact_id}
"suppliercredit_number": "SC_1000"
"date": "2019-05-02"
"reference": ""
"currency": "GBP"
"tax_mode": "Exclusive"
"state":"Draft"
"customer_note": ""
"transaction_type": "supplier credit"
"subtotal": "100.00"
"total": "120.00"
"total_before_cis": "120.00"
"balance": "120.00"
"tax": "20.00"
"exchange_rate": "1.000000"
"labour": "0.00"
is_labour: false
"display_name": "Spencer_Ford"
"email": "SpencerFord@fordcompany.com"
"contact_country": "UK"
"contact_city": "London"
"contact_state": "London"
"contact_postcode": "SA10 2FQ"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
"has_payment": false,
invoices_credited: [],
refunds: [],
sum_credit_apply: 0,
sum_payment: 0,
unused_credit: 0,
"create_source": ""
"source_create_id": "0"
items:[{
"item_id": {item_id}
"description": ""
"account_id": {account_id}
"quantity": "1"
"price": 100
"vat": "20% (VAT on Income)"
},
...
],
histories:[{
creator: ""
date: "30/04/20 7:24 am"
text: "supplier credit created for 120"
title: "Created"
},
...
],
files:[{
extension: "pdf"
file_code: "0c492652-f329-50ec-9b76-01b1ad09d209"
file_name: "doc.pdf"
file_size: 618
file_status: "success"
},
...
]
},
status: "success"
List Supplier credits
List all supplier credits with pagination.
Query Params
page_number | Required - Integer |
page_size | Required - Integer |
sort_type | Required - String Allowed values: desc,asc |
sort_column | Required - String |
search_text | Optional - String Search in supplier credit number, reference, contact or total Amount. |
search_states | Optional - String Comma separated supplier credit states which are to be search. Draft,Open,Closed,Void |
start_date | Optional - String Search supplier credits from date. |
end_date | Optional - String Search supplier credits to date. |
GET /suppliercredits
Request Example
$ curl https://acc.smartysoftware.net/api/v1/suppliercredits?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
suppliercredits:[ {
supplier_credit_id: {supplier_credit_id}
contact_id: {contact_id}
suppliercredit_number: "SC_1000"
contact_name: "Spencer_Ford"
currency: "GBP"
date: "2019-05-02"
"exchange_rate": "1.000000"
"labour": "0.00"
reference: ""
state: "Draft"
"subtotal": "100.00"
"tax": "20.00"
"total": "120.00"
"balance": "120.00"
tax_mode: "Exclusive"
total_labour: "120.00"
"transaction_type": "supplier credit"
"has_payment": false,
"customer_note": ""
"create_source": ""
"source_create_id": "0"
},
...
],
status: "success",
page_setting: {page: 1, size: 10, total: 48}
Delete a Supplier credit
Delete an existing supplier credit.
DELETE /suppliercredits/{supplier_credit_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/suppliercredits/{supplier_credit_id}?organization_id={organization_id}
-X DELETE
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Mark a Supplier credit as Open
Mark a draft supplier credit as open.
GET /suppliercredits/{supplier_credit_id}/state/open
Request Example
$ curl https://acc.smartysoftware.net/api/v1/suppliercredits/{supplier_credit_id}/state/open?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
supplier_credit: {
...
},
message:
status: "success"
Mark as Draft
Mark a voided supplier credit as draft.
GET /suppliercredits/{supplier_credit_id}/state/draft
Request Example
$ curl https://acc.smartysoftware.net/api/v1/suppliercredits/{supplier_credit_id}/state/draft?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
supplier_credit: {
...
},
message:
status: "success"
Void a Supplier credit
Void a supplier credit.
GET /suppliercredits/{supplier_credit_id}/state/void
Request Example
$ curl https://acc.smartysoftware.net/api/v1/suppliercredits/{supplier_credit_id}/state/void?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
supplier_credit: {
...
},
message:
status: "success"
Refund a Supplier credit
Refund supplier credit amount.
ARGUMENTS
amount | Required - Decimal Amount of refund. |
account_id | Required - Integer ID of account. |
date | Required - String Date of refund. |
reference | Optional - String Reference of refund. |
exchange_rate | Optional - Decimal Exchange rate of refund. |
POST /suppliercredits/{supplier_credit_id}/refunds
Request Example
$ curl https://acc.smartysoftware.net/api/v1/suppliercredits/{supplier_credit_id}/refunds?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Get Supplier credit refunds and Invoices credited
Get the list of refunds and invoices to which the supplier credit is applied.
GET /suppliercredits/{supplier_credit_id}/refunds
Request Example
$ curl https://acc.smartysoftware.net/api/v1/suppliercredits/{supplier_credit_id}/refunds?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
refunds:[ {
account_id: {account_id}
supplier_credit_id: {supplier_credit_id}
refund_id: {refund_id}
suppliercredit_refund_id: {suppliercredit_refund_id}
account_name: ""
amount_applied: "10"
date: "2019-05-17"
"exchange_rate": "1.000000"
payment_number: "PAY_1"
reference: ""
vat_applied: "2"
},
...
],
invoices_credited:[ {
apply_id: {apply_id}
supplier_credit_id: {supplier_credit_id}
invoice_id: {invoice_id}
amount_applied: "10"
date: "2019-05-17"
},
...
],
status: "success"
Delete a Refund
Delete a supplier credit refund.
DELETE /suppliercredits/{supplier_credit_id}/refunds/{suppliercredit_refund_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/suppliercredits/{supplier_credit_id}/refunds/{suppliercredit_refund_id}?organization_id={organization_id}
-X DELETE
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
supplier_credit: {
...
},
message:
status: "success"
Update a Refund
Update the refunded transaction.
ARGUMENTS
amount | Required - Decimal Amount of refund. |
account_id | Required - Integer ID of account. |
date | Required - String Date of refund. |
reference | Optional - String Reference of refund. |
exchange_rate | Optional - Decimal Exchange rate of refund. |
GET /suppliercredits/{supplier_credit_id}/refunds/{refund_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/suppliercredits/{supplier_credit_id}/refunds/{refund_id}?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
supplier_credit: {
...
},
message:
status: "success"
Credit to Bills
Apply supplier credit to existing invoices.
ARGUMENTS
invoices | Required - String |
POST /suppliercredits/{supplier_credit_id}/applycredit
Request Example
$ curl https://acc.smartysoftware.net/api/v1/suppliercredits/{supplier_credit_id}/applycredit?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
invoices:[{
"transaction_id": {transaction_id}
"amount_applied": "1",
},
{
"transaction_id": {transaction_id}
"amount_applied": "2",
},
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
supplier_credit: {
...
},
message:
status: "success"
Delete Bills Credited
Delete the credits applied to an invoice.
DELETE /suppliercredits/{supplier_credit_id}/applycredit/{apply_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/suppliercredits/{supplier_credit_id}/applycredit/{apply_id}?organization_id={organization_id}
-X DELETE
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
supplier_credit: {
...
},
message:
status: "success"
Get a Supplier credit Attachments
Returns the file attached to the supplier credit.
GET /suppliercredits/{supplier_credit_id}/files
Request Example
$ curl https://acc.smartysoftware.net/api/v1/suppliercredits/{supplier_credit_id}/files?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
files:[{
extension: "pdf"
file_code: "0c492652-f329-50ec-9b76-01b1ad09d209"
file_name: "doc.pdf"
file_size: 618
file_status: "success"
},
...
],
status: "success"
Add Attachment to a Supplier credit
Attach a file to a supplier credit.
ARGUMENTS
file | Required - String The file to be attached. |
POST /suppliercredits/files/{supplier_credit_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/suppliercredits/files/{supplier_credit_id}?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
file: {
file_name: ""
file_size: ""
file_code: ""
extension: ""
file_status: ""
},
message:
status: "success"
Create a Recurring Bill
Create a new recurring bill.
ARGUMENTS
profile_name | Required - String Unique name for the recurring profile given by the user. |
frequency | Required - String The frequency of time interval at which the bill is to be generated. Allowed values: daily,weekly,monthly,yearly |
repeat_every | Required - String The period between every recurrency frequency. |
never_expire | Required - String If set true the recurring bill does not expire. Allowed values: true,false |
create_invoice_state | Required - String The state of bill which created from recurring. Allowed values: Draft,Sent,sentEmail |
start_date | Required - String The date on which the recurring bill starts. [yyyy-mm-dd] |
end_date | Required - String The date on which the recurring bill expires. [yyyy-mm-dd] |
contact_id | Required - Integer Id of contact. |
reference | Optional - String Reference for the recurring bill. |
currency | Required - String Currency used for the recurring bill. |
tax_mode | Required - String Allowed values: Exclusive,Inclusive,NO VAT. |
customer_note | Optional - String The notes added below expressing gratitude or for conveying some information. |
term_condition | Optional - String |
items | Required - String Line items in recurring bill.
|
POST /recurringbills
Request Example
$ curl https://acc.smartysoftware.net/api/v1/recurringbills?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"profile_name": "SpencerFord"
"frequency": "monthly"
"repeat_every": 1
"never_expire": false
"create_invoice_state": "Draft"
"start_date": "2019-05-02"
"end_date": "2020-05-02"
"contact_id": "{contact_id}"
"reference": ""
"currency": "GBP"
"tax_mode": "Exclusive"
"customer_note": ""
"term_condition": ""
items:[{
"item_id": {item_id}
"description": "",
"account_id": {account_id}
"quantity": "1"
"price": 100
"vat": "20% (VAT on Income)"
},
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
recurring_bill: {
"recurring_bill_id": {recurring_bill_id}
"contact_id": {contact_id}
"profile_name": "SpencerFord"
"frequency": "monthly"
"repeat_every": 1
"never_expire": false
"create_invoice_state": "Draft"
"start_date": "2019-05-02"
"end_date": "2020-05-02"
"last_invoice_date":"2019-05-02"
"next_invoice_date":"2019-06-02"
"reference": ""
"currency": "GBP"
"tax_mode": "Exclusive"
"state":"Active"
"customer_note": ""
"term_condition": ""
"transaction_type": "Recurring Bill"
"subtotal": "100.00"
"total": "120.00"
"balance": "120.00"
"tax": "20.00"
"labour": "0.00"
items:[{
"item_id": {item_id}
"description": ""
"account_id": {account_id}
"quantity": "1"
"price": 100
"vat": "20% (VAT on Income)"
},
...
]
},
message:
status: "success"
Update a Recurring Bill
Update an existing recurring bill. To delete a line item just remove it from the items list.
ARGUMENTS
profile_name | Required - String Unique name for the recurring profile given by the user. |
frequency | Required - String The frequency of time interval at which the invoice is to be generated. Allowed values: daily,weekly,monthly,yearly |
repeat_every | Required - String The period between every recurrency frequency. |
never_expire | Required - String If set true the recurring bill does not expire. Allowed values: true,false |
create_invoice_state | Required - String The state of invoice which created from recurring. Allowed values: Draft,Sent,sentEmail |
start_date | Required - String The date on which the recurring bill starts. [yyyy-mm-dd] |
end_date | Required - String The date on which the recurring bill expires. [yyyy-mm-dd] |
contact_id | Required - Integer Id of contact. |
reference | Optional - String Reference for the recurring bill. |
currency | Required - String Currency used for the recurring bill. |
tax_mode | Required - String Allowed values: Exclusive,Inclusive,NO VAT. |
customer_note | Optional - String The notes added below expressing gratitude or for conveying some information. |
term_condition | Optional - String |
items | Required - String Line items in recurring bill.
|
PUT /recurringbills/{recurring_bill_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/recurringbills/{recurring_bill_id}?organization_id={organization_id}
-X PUT
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"profile_name": "SpencerFord"
"frequency": "monthly"
"repeat_every": 1
"never_expire": false
"create_invoice_state": "Draft"
"start_date": "2019-05-02"
"end_date": "2020-05-02"
"contact_id": "{contact_id}"
"reference": ""
"currency": "GBP"
"tax_mode": "Exclusive"
"customer_note": ""
"term_condition": ""
items:[{
"item_id": {item_id}
"description": "",
"account_id": {account_id}
"quantity": "1"
"price": 100
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
recurring_bill: {
"recurring_bill_id": {recurring_bill_id}
"contact_id": {contact_id}
"profile_name": "SpencerFord"
"frequency": "monthly"
"repeat_every": 1
"create_invoice_state": "Draft"
"start_date": "2019-05-02"
"end_date": "2020-05-02"
"last_invoice_date": "2019-05-02"
"next_invoice_date": "2019-06-02"
"reference": ""
"currency": "GBP"
"tax_mode": "Exclusive"
"state":"Active"
"customer_note": ""
"term_condition": ""
"transaction_type": "Recurring Bill"
"subtotal": "100.00"
"total": "120.00"
"balance": "120.00"
"tax": "20.00"
"labour": "0.00"
items:[{
"item_id": {item_id}
"description": ""
"account_id": {account_id}
"quantity": "1"
"price": 100
"vat": "20% (VAT on Income)"
},
...
]
},
message:
status: "success"
Get Recurring Bill
Get details of a recurring bill.
GET /recurringbills/{recurring_bill_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/recurringbills/{recurring_bill_id}?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
recurring_bill: {
"recurring_bill_id": {recurring_bill_id}
"contact_id": {contact_id}
"profile_name": "SpencerFord"
"frequency": "monthly"
"repeat_every": 1
"create_invoice_state": "Draft"
"start_date": "2019-05-02"
"end_date": "2020-05-02"
"reference": ""
"currency": "GBP"
"tax_mode": "Exclusive"
"state":"Active"
"customer_note": ""
"term_condition": ""
"last_invoice_date":"2019-05-02"
"next_invoice_date":"2019-06-02"
"transaction_type": "Recurring Bill"
"subtotal": "100.00"
"total": "120.00"
"balance": "120.00"
"tax": "20.00"
"labour": "0.00"
is_labour: false
"display_name": "Spencer_Ford"
"email": "SpencerFord@fordcompany.com"
"contact_country": "UK"
"contact_city": "London"
"contact_state": "London"
"contact_postcode": "SA10 2FQ"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
items:[{
"item_id": {item_id}
"description": ""
"account_id": {account_id}
"quantity": "1"
"price": 100
"vat": "20% (VAT on Income)"
},
...
],
histories:[{
creator: ""
date: "30/04/20 7:24 am"
text: "recurring bill created for 120"
title: "Created"
},
...
],
},
status: "success"
List Recurring Bills
List all recurring bills with pagination.
Query Params
page_number | Required - Integer |
page_size | Required - Integer |
sort_type | Required - String Allowed values: desc,asc |
sort_column | Required - String |
search_text | Optional - String Search in Profile Name, Contact or Total Amount. |
search_states | Optional - String Comma separated recurring bill states which are to be search. Stopped,Active,Expired |
start_date | Optional - String Search recurring bills from date. |
end_date | Optional - String Search recurring bills to date. |
GET /recurringbills
Request Example
$ curl https://acc.smartysoftware.net/api/v1/recurringbills?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
recurringbills:[ {
recurring_bill_id: {recurring_bill_id}
contact_id: {contact_id}
profile_name: "SpencerFord"
frequency: "monthly"
repeat_every: 1
create_invoice_state: "Draft"
currency: "GBP"
start_date: "2019-05-02"
end_date: "2020-05-02"
last_invoice_date:"2019-05-02"
next_invoice_date:"2019-06-02"
"labour": "0.00"
reference: ""
state: "Draft"
"subtotal": "100.00"
"tax": "20.00"
"total": "120.00"
"balance": "120.00"
tax_mode: "Exclusive"
customer_note: "Customer Notes"
term_condition: "Terms & Conditions"
"transaction_type": "Recurring Bill"
contact_name: "c1"
},
...
],
status: "success",
page_setting: {page: 1, size: 10, total: 48}
Delete Recurring Bill
Delete an existing recurring bill.
DELETE /recurringbills/{recurring_bill_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/recurringbills/{recurring_bill_id}?organization_id={organization_id}
-X DELETE
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Stop a Recurring Bill
Stop a Recurring Bill.
GET /recurringbills/{recurring_bill_id}/state/Stop
Request Example
$ curl https://acc.smartysoftware.net/api/v1/recurringbills/{recurring_bill_id}/state/Stop?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
recurring_bill: {
...
},
message:
status: "success"
Active a Recurring Bill
Active a Recurring Bill.
GET /recurringbills/{recurring_bill_id}/state/Active
Request Example
$ curl https://acc.smartysoftware.net/api/v1/recurringbills/{recurring_bill_id}/state/Active?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
recurring_bill: {
...
},
message:
status: "success"
Create a Supplier payment
Create a new payment.
ARGUMENTS
date | Required - String Date on which payment is made. [yyyy-mm-dd] |
amount | Required - Decimal Amount paid in the respective payment. |
contact_id | Required - Integer Id of contact. |
account_id | Required - Integer Id of account |
reference | Optional - String Reference for the payment. |
payment_note | Optional - String A brief description about the transaction. |
exchange_rate | Required - Decimal Exchange rate when payment is received. Only used for non base currency invoices and credit notes. |
invoices | Required - String List of invoices associated with the payment.
|
POST /supplierpayments
Request Example
$ curl https://acc.smartysoftware.net/api/v1/supplierpayments?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"account_id": {account_id}
"contact_id": {contact_id}
"date": "2019-05-17"
"amount": "120.00"
"reference": ""
"payment_note": ""
"exchange_rate": "1.000000"
"invoices":[{
"transaction_id": {transaction_id}
"amount_applied": "120.00",
},
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
supplier_payment: {
"payment_id": {payment_id}
"contact_id": {contact_id}
"account_id": {account_id}
"payment_number": "PAY_1"
"date": "2019-05-17"
"amount": "120.00"
"unused_amount":"0.00",
"payment_type":"Supplier Payment",
"reference": ""
"payment_note": ""
"exchange_rate": "1.000000"
"invoices":[{
"transaction_id": {transaction_id}
"transaction_payment_id": {transaction_payment_id}
"amount_applied": "120.00",
"vat_applied":"0.00",
},
...
],
"contact_name": "Spencer_Ford"
"email": "SpencerFord@fordcompany.com"
"contact_country": "UK"
"contact_city": "London"
"contact_state": "London"
"contact_postcode": "SA10 2FQ"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
"create_source": ""
"source_create_id": "0"
},
message:
status: "success"
Update a Supplier payment
Update an existing payment information.
ARGUMENTS
date | Required - String Date on which payment is made. [yyyy-mm-dd] |
amount | Required - Decimal Amount paid in the respective payment. |
contact_id | Required - Integer Id of contact. |
account_id | Required - Integer Id of account |
reference | Optional - String Reference for the payment. |
payment_note | Optional - String A brief description about the transaction. |
exchange_rate | Required - Decimal Exchange rate when payment is received. Only used for non base currency invoices and credit notes. |
invoices | Required - String List of invoices associated with the payment.
|
PUT /supplierpayments/{payment_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/supplierpayments/{payment_id}?organization_id={organization_id}
-X PUT
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"account_id": {account_id}
"contact_id": {contact_id}
"date": "2019-05-17"
"amount": "120.00"
"reference": ""
"payment_note": ""
"exchange_rate": "1.000000"
"invoices":[{
"transaction_id": {transaction_id}
"amount_applied": "120.00",
},
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
supplier_payment: {
"payment_id": {payment_id}
"contact_id": {contact_id}
"account_id": {account_id}
"payment_number": "PAY_1"
"date": "2019-05-17"
"amount": "120.00"
"unused_amount":"0.00",
"payment_type":"Supplier Payment",
"reference": ""
"payment_note": ""
"exchange_rate": "1.000000"
"invoices":[{
"transaction_id": {transaction_id}
"transaction_payment_id": {transaction_payment_id}
"amount_applied": "120.00",
"vat_applied":"0.00",
},
...
],
"contact_name": "Spencer_Ford"
"email": "SpencerFord@fordcompany.com"
"contact_country": "UK"
"contact_city": "London"
"contact_state": "London"
"contact_postcode": "SA10 2FQ"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
"create_source": ""
"source_create_id": "0"
},
message:
status: "success"
Get Supplier payment
Get details of a payment.
GET /supplierpayments/{payment_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/supplierpayments/{payment_id}?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
supplier_payment: {
"payment_id": {payment_id}
"contact_id": {contact_id}
"account_id": {account_id}
"account_name": {account_name},
"display_name": "Spencer_Ford,
"payment_number": "PAY_1"
"date": "2019-05-17"
"amount": "120.00"
"unused_amount":"0.00",
"payment_type":"Supplier Payment",
"reference": ""
"payment_note": ""
"exchange_rate": "1.000000"
"create_source": ""
"source_create_id": "0"
"invoices":[{
"transaction_id": {transaction_id}
"transaction_payment_id": {transaction_payment_id}
"amount_applied": "120.00",
"vat_applied":"0.00",
},
...
],
histories:[{
creator: ""
date: "30/04/20 7:24 am"
text: "Invoice created for 120"
title: "Created"
},
...
],
files:[{
extension: "pdf"
file_code: "0c492652-f329-50ec-9b76-01b1ad09d209"
file_name: "doc.pdf"
file_size: 618
file_status: "success"
},
...
]
},
status: "success"
List Supplier payments
List all payments with pagination.
Query Params
page_number | Required - Integer |
page_size | Required - Integer |
sort_type | Required - String Allowed values: desc,asc |
sort_column | Required - String |
search_text | Optional - String Search in payment number, reference, contact or amount. |
start_date | Optional - String Search payments from date. |
end_date | Optional - String Search payments to date. |
GET /supplierpayments
Request Example
$ curl https://acc.smartysoftware.net/api/v1/supplierpayments?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
supplier_payments:[ {
"payment_id": {payment_id}
"contact_id": {contact_id}
"account_id": {account_id}
"account_name": {account_name},
"contact_name": "Spencer_Ford,
"payment_number": "PAY_1"
"date": "2019-05-17"
"amount": "120.00"
"unused_amount":"0.00",
"payment_type":"Supplier Payment",
"reference": ""
"payment_note": ""
"exchange_rate": "1.000000"
"create_source": ""
"source_create_id": "0"
},
...
],
status: "success",
page_setting: {page: 1, size: 10, total: 48}
Delete Supplier payment
Delete an existing payment.
DELETE /supplierpayments/{payment_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/supplierpayments/{payment_id}?organization_id={organization_id}
-X DELETE
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Unreconcile a Payment
Unreconcile a payment.
GET /supplierpayments/{payment_id}/unreconcile
Request Example
$ curl https://acc.smartysoftware.net/api/v1/supplierpayments/{payment_id}/unreconcile?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
supplier_payment: {
...
},
message:
status: "success"
Create a Bank account
Create a bank account and track your transactions, have manual and automatic feeds imported for your bank and credit card accounts.
ARGUMENTS
bank_name | Required - String Name of the Bank. |
account_name | Required - String Name of account |
account_code | Optional - String Code of account |
currency | Required - String Code of the currency associated with the Bank Account. |
POST /bankaccounts
Request Example
$ curl https://acc.smartysoftware.net/api/v1/bankaccounts?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"bank_name": "Barclays (UK) - Direct Feed"
"account_name": "Barclays Account"
"account_code": ""
"currency": "GBP"
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
bankaccount: {
"account_id": {account_id}
"bank_name": "Barclays (UK) - Direct Feed"
"account_name": "Barclays Account"
"account_code": ""
"currency": "GBP"
"is_sync":false
"enable_sync":true
"statement_balance":0
"smarty_balance":0
},
message:
status: "success"
Update a Bank account
Edit the account that was created
ARGUMENTS
bank_name | Required - String Name of the Bank. |
account_name | Required - String Name of account |
account_code | Optional - String Code of account |
PUT /bankaccounts/{account_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/bankaccounts/{account_id}?organization_id={organization_id}
-X PUT
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"bank_name": "Barclays (UK) - Direct Feed"
"account_name": "Barclays Account"
"account_code": ""
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
bankaccount: {
"account_id": {account_id}
"bank_name": "Barclays (UK) - Direct Feed"
"account_name": "Barclays Account"
"account_code": ""
"currency": "GBP"
"is_sync":false
"enable_sync":true
"statement_balance":0
"smarty_balance":0
},
message:
status: "success"
List of Banks
List of all banks.
Query Params
bank_name | Required - String name of bank |
GET /bankaccounts/bankname
Request Example
$ curl https://acc.smartysoftware.net/api/v1/bankaccounts/bankname?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
bank_names:[{
"bank_id": {bank_id}
"bank_name": "Barclays (UK) - Direct Feed"
"sync": "sync"
},
...
],
status: "success",
Get Bank account
Get details of a bank account.
GET /bankaccounts/{account_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/bankaccounts/{account_id}?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
bankaccount: {
"account_id": {account_id}
"bank_name": "Barclays (UK) - Direct Feed"
"account_name": "Barclays Account"
"account_code": ""
"currency": "GBP"
"is_sync":false
"enable_sync":true
"statement_balance":0
"smarty_balance":0
},
status: "success"
List Bank accounts
List all bank and credit card accounts for your organization.
GET /bankaccounts
Request Example
$ curl https://acc.smartysoftware.net/api/v1/bankaccounts?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
bankaccounts:[{
"account_id": {account_id}
"bank_name": "Barclays (UK) - Direct Feed"
"account_name": "Barclays Account"
"account_code": ""
"currency": "GBP"
"is_sync":false
"enable_sync":true
"statement_balance":0
"smarty_balance":0
},
...
],
status: "success",
Delete Bank account
Delete an existing bank account.
DELETE /accounts/{account_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/accounts/{account_id}?organization_id={organization_id}
-X DELETE
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Bank Transactions
Get transactions recorded of a bank account.
Query Params
account_id | Required - Integer ID of bank account |
page_number | Required - Integer |
page_size | Required - Integer |
sort_type | Required - String Allowed values: desc,asc |
sort_column | Required - String |
start_date | Optional - String Get transactions from date. |
end_date | Optional - String Get transactions to date. |
GET /bankaccounts/transactions
Request Example
$ curl https://acc.smartysoftware.net/api/v1/bankaccounts/transactions?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
transactions:[{
"transaction_id": {transaction_id}
"transaction_number":"{transaction_number}",
"date":"2020-05-03"
"debit_amount":"0.00"
"credit_amount":"54.00"
"description":"bills"
"journal_unique_id":359
"transaction_type":"Spend Money"
"balance":-850.55
"account_name":"aaa2222"
"currency":"GBP"
files:[{
extension: "pdf"
file_code: "0c492652-f329-50ec-9b76-01b1ad09d209"
file_name: "doc.pdf"
file_size: 618
file_status: "success"
},
...
]
},
...
],
status: "success",
Bank Statements
Get statements of a bank account that was imported manually or imported by online bank account.
Query Params
account_id | Required - Integer ID of bank account |
page_number | Required - Integer |
page_size | Required - Integer |
sort_type | Required - String Allowed values: desc,asc |
sort_column | Required - String |
start_date | Optional - String Get statements from date. |
end_date | Optional - String Get statements to date. |
GET /bankaccounts/statements
Request Example
$ curl https://acc.smartysoftware.net/api/v1/bankaccounts/statements?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
statements:[{
"statement_id": {statement_id}
"date":"2019-11-29",
"type":"",
"amount":"-684.99",
"payee":"",
"description":"",
"reference":"",
"cheque_number":"",
"discuss":"",
"spent":"-684.99",
"received":"",
"state":"Unreconciled"
},
...
],
status: "success",
Create a Transaction for an Account
Create a bank transaction based on the allowed transaction types.
ARGUMENTS
date | Required - String Date of transaction. [yyyy-mm-dd] |
contact_id | Required - Integer Id of contact. |
account_id | Required - Integer ID of the account to which the money gets transferred(Mandatory for specific type of transactions). |
transaction_type | Required - String Allowed values: Receive Money,Spend Money. |
reference | Optional - String Reference for the bank transaction. |
method | Required - String Currency used for the bank transaction. Allowed values: Direct Payment,Overpayment |
currency | Required - String Currency used for the bank transaction. |
exchange_rate | Required - Decimal Exchange rate used for the bank transaction, if bank transaction is on foreign currencies. |
tax_mode | Required - String Allowed values: Exclusive,Inclusive,NO VAT. |
items | Required - String Line items in bank transaction.
|
POST /banktransactions
Request Example
$ curl https://acc.smartysoftware.net/api/v1/banktransactions?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"date": "2019-02-01"
"account_id": "{account_id}"
"contact_id": "{contact_id}"
"transaction_type":"Spend Money"
"method": "Direct Payment"
"reference": ""
"currency": "GBP"
"exchange_rate": "1.000000"
"tax_mode": "Exclusive"
items:[{
"item_id": {item_id}
"description": "",
"account_id": {account_id}
"quantity": "1"
"price": 100
"vat": "20% (VAT on Income)"
},
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
bank_transaction: {
"transaction_id": {transaction_id}
"contact_id": {contact_id}
"account_id": {account_id}
"transaction_number": "TRM_1"
"state":"Post"
"date": "2019-02-01"
"reference": ""
"method":"Direct Payment"
"transaction_type":"Spend Money"
"subtotal": "100.00"
"total": "120.00"
"tax_mode": "Exclusive"
"tax": "20.00"
"currency": "GBP"
"exchange_rate": "1.000000"
"labour": "0.00"
"total_before_cis": "120.00"
"display_name": "Spencer_Ford"
"email": "SpencerFord@fordcompany.com"
"contact_country": "UK"
"contact_city": "London"
"contact_state": "London"
"contact_postcode": "SA10 2FQ"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
"create_source": ""
"source_create_id": "0"
items:[{
"item_id": {item_id}
"description": ""
"account_id": {account_id}
"quantity": "1"
"price": 100
"vat": "20% (VAT on Income)"
},
...
]
},
message:
status: "success"
Update a Transaction
Update an existing bank transaction. To delete a line item just remove it from the items list.
ARGUMENTS
date | Required - String Date of transaction. [yyyy-mm-dd] |
contact_id | Required - Integer Id of contact. |
account_id | Required - Integer ID of the account to which the money gets transferred(Mandatory for specific type of transactions). |
reference | Optional - String Reference for the bank transaction. |
method | Required - String Currency used for the bank transaction. Allowed values: Direct Payment,Overpayment |
currency | Required - String Currency used for the bank transaction. |
exchange_rate | Required - Decimal Exchange rate used for the bank transaction, if bank transaction is on foreign currencies. |
tax_mode | Required - String Allowed values: Exclusive,Inclusive,NO VAT. |
items | Required - String Line items in bank transaction.
|
PUT /banktransactions/{transaction_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/banktransactions/{transaction_id}?organization_id={organization_id}
-X PUT
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"date": "2019-02-01"
"account_id": "{account_id}"
"contact_id": "{contact_id}"
"method": "Direct Payment"
"reference": ""
"currency": "GBP"
"exchange_rate": "1.000000"
"tax_mode": "Exclusive"
items:[{
"item_id": {item_id}
"description": "",
"account_id": {account_id}
"quantity": "1"
"price": 100
"vat": "20% (VAT on Income)"
},
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
bank_transaction: {
"transaction_id": {transaction_id}
"contact_id": {contact_id}
"account_id": {account_id}
"transaction_number": "TRM_1"
"state":"Post"
"date": "2019-02-01"
"reference": ""
"method":"Direct Payment"
"transaction_type":"Spend Money"
"subtotal": "100.00"
"total": "120.00"
"tax_mode": "Exclusive"
"tax": "20.00"
"currency": "GBP"
"exchange_rate": "1.000000"
"labour": "0.00"
"total_before_cis": "120.00"
"display_name": "Spencer_Ford"
"email": "SpencerFord@fordcompany.com"
"contact_country": "UK"
"contact_city": "London"
"contact_state": "London"
"contact_postcode": "SA10 2FQ"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
"create_source": ""
"source_create_id": "0"
items:[{
"item_id": {item_id}
"description": ""
"account_id": {account_id}
"quantity": "1"
"price": 100
"vat": "20% (VAT on Income)"
},
...
]
},
message:
status: "success"
Get Transaction
Get details of a bank transaction.
GET /banktransactions/{transaction_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/banktransactions/{transaction_id}?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
bank_transaction: {
"transaction_id": {transaction_id}
"contact_id": {contact_id}
"account_id": {account_id}
"transaction_number": "TRM_1"
"state":"Post"
"date": "2019-02-01"
"reference": ""
"method":"Direct Payment"
"transaction_type":"Spend Money"
"subtotal": "100.00"
"total": "120.00"
"tax_mode": "Exclusive"
"tax": "20.00"
"currency": "GBP"
"exchange_rate": "1.000000"
"labour": "0.00"
"total_before_cis": "120.00"
"display_name": "Spencer_Ford"
"email": "SpencerFord@fordcompany.com"
"contact_country": "UK"
"contact_city": "London"
"contact_state": "London"
"contact_postcode": "SA10 2FQ"
"address_line1": "65 Uxbridge Road"
"address_line2": "SKEWEN"
"create_source": ""
"source_create_id": "0"
items:[{
"item_id": {item_id}
"description": ""
"account_id": {account_id}
"quantity": "1"
"price": 100
"vat": "20% (VAT on Income)"
},
...
],
histories:[{
creator: ""
date: "30/04/20 7:24 am"
text: "Bank Transaction created for 120"
title: "Created"
},
...
],
files:[{
extension: "pdf"
file_code: "0c492652-f329-50ec-9b76-01b1ad09d209"
file_name: "doc.pdf"
file_size: 618
file_status: "success"
},
...
]
},
status: "success"
Transactions list
List all bankt ransactions with pagination.
Query Params
page_number | Required - Integer |
page_size | Required - Integer |
sort_type | Required - String Allowed values: desc,asc |
sort_column | Required - String |
transaction_type | Required - String Allowed values: Receive Money,Spend Money. |
search_text | Optional - String Search in bank transaction number, reference, contact or total Amount. |
start_date | Optional - String Search banktransactions from date. |
end_date | Optional - String Search banktransactions to date. |
GET /banktransactions
Request Example
$ curl https://acc.smartysoftware.net/api/v1/banktransactions?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
bank_transactions:[ {
transaction_id: {transaction_id}
contact_id: {contact_id}
transaction_number: "TRM_1"
contact_name: "Spencer_Ford"
currency: "GBP"
date: "2019-02-01"
"exchange_rate": "1.000000"
"labour": "0.00"
reference: ""
state: "Draft"
"subtotal": "100.00"
"tax": "20.00"
"total": "120.00"
tax_mode: "Exclusive"
total_labour: "120.00"
"transaction_type": "Spend Money"
"create_source": ""
"source_create_id": "0"
},
...
],
status: "success",
page_setting: {page: 1, size: 10, total: 48}
Delete Transaction
Delete an existing bank transaction.
DELETE /banktransactions/{transaction_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/banktransactions/{transaction_id}?organization_id={organization_id}
-X DELETE
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Unreconcile Transaction
Unreconcile a bank transaction.
GET /banktransactions/{transaction_id}/unreconcile
Request Example
$ curl https://acc.smartysoftware.net/api/v1/banktransactions/{transaction_id}/unreconcile?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
bank_transaction: {
...
},
message:
status: "success"
Create a Bank Transfer
Create a bank transfer based on the allowed transaction types.
ARGUMENTS
date | Required - String Date of bank transfer. [yyyy-mm-dd] |
from_account_id | Required - Integer From bank account id. |
to_account_id | Required - Integer To bank account id |
amount | Required - Decimal |
exchange_rate | Required - Decimal Exchange rate used for the bank transfer, if from bank account and to bank account has different currencies. |
reference | Optional - String Reference for the bank transfer. |
POST /banktransfers
Request Example
$ curl https://acc.smartysoftware.net/api/v1/banktransfers?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"date": "2019-02-01"
"from_account_id": "{from_account_id}"
"to_account_id": "{to_account_id}"
"amount": "100"
"exchange_rate": "1.000000"
"reference": ""
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
bank_transfer: {
"transfer_id": {transfer_id}
"from_account_id": {from_account_id}
"to_account_id": {to_account_id}
"transfer_number": "TRF_1"
"date": "2019-02-01"
"amount": "100"
"exchange_rate": "1.000000"
"reference": ""
"create_source": ""
"source_create_id": "0"
},
message:
status: "success"
Update a Bank Transfer
Update an existing bank transfer. To delete a line item just remove it from the items list.
ARGUMENTS
date | Required - String Date of bank transfer. [yyyy-mm-dd] |
from_account_id | Required - Integer From bank account id. |
to_account_id | Required - Integer To bank account id |
amount | Required - Decimal |
exchange_rate | Required - Decimal Exchange rate used for the bank transfer, if from bank account and to bank account has different currencies. |
reference | Optional - String Reference for the bank transfer. |
PUT /banktransfers/{transfer_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/banktransfers/{transfer_id}?organization_id={organization_id}
-X PUT
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"date": "2019-02-01"
"from_account_id": "{from_account_id}"
"to_account_id": "{to_account_id}"
"amount": "100"
"exchange_rate": "1.000000"
"reference": ""
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
bank_transfer: {
"transfer_id": {transfer_id}
"from_account_id": {from_account_id}
"to_account_id": {to_account_id}
"transfer_number": "TRF_1"
"date": "2019-02-01"
"amount": "100"
"exchange_rate": "1.000000"
"reference": ""
"create_source": ""
"source_create_id": "0"
},
message:
status: "success"
Get Bank Transfer
Get details of a bank transfer.
GET /banktransfers/{transfer_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/banktransfers/{transfer_id}?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
bank_transfer: {
"transfer_id": {transfer_id}
"from_account_id": {from_account_id}
"to_account_id": {to_account_id}
"source_account": {source_account}
"destination_account": {destination_account}
"transfer_number": "TRF_1"
"date": "2019-02-01"
"amount": "100"
"exchange_rate": "1.000000"
"reference": ""
"create_source": ""
"source_create_id": "0"
histories:[{
creator: ""
date: "30/04/20 7:24 am"
text: "Bank Transaction created for 100"
title: "Created"
},
...
],
files:[{
extension: "pdf"
file_code: "0c492652-f329-50ec-9b76-01b1ad09d209"
file_name: "doc.pdf"
file_size: 618
file_status: "success"
},
...
]
},
status: "success"
Bank Transfers list
List all bankt ransactions with pagination.
Query Params
page_number | Required - Integer |
page_size | Required - Integer |
sort_type | Required - String Allowed values: desc,asc |
sort_column | Required - String |
search_text | Optional - String Search in bank transfer number, reference or amount. |
start_date | Optional - String Search bank transfers from date. |
end_date | Optional - String Search bank transfers to date. |
GET /banktransfers
Request Example
$ curl https://acc.smartysoftware.net/api/v1/banktransfers?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
bank_transfers:[ {
"transfer_id": {transfer_id}
"from_account_id": {from_account_id}
"to_account_id": {to_account_id}
"source_account": {source_account}
"destination_account": {destination_account}
"transfer_number": "TRF_1"
"date": "2019-02-01"
"amount": "100"
"exchange_rate": "1.000000"
"reference": ""
"create_source": ""
"source_create_id": "0"
},
...
],
status: "success",
page_setting: {page: 1, size: 10, total: 48}
Delete Bank Transfer
Delete an existing bank transfer.
DELETE /banktransfers/{transfer_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/banktransfers/{transfer_id}?organization_id={organization_id}
-X DELETE
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Unreconcile Bank Transfer
Unreconcile a bank transfer.
GET /banktransfers/{transfer_id}/unreconcile
Request Example
$ curl https://acc.smartysoftware.net/api/v1/banktransfers/{transfer_id}/unreconcile?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
bank_transfer: {
...
},
message:
status: "success"
Create a Journal
Create a journal based on the allowed transaction types.
ARGUMENTS
date | Required - String Date on which the journal to be recorded. [yyyy-mm-dd] |
narration | Required - String Description of journal being posted. |
state | Required - String Allowed values: Draft,Post |
auto_reversing_date | Required - String Date of reverse journal. [yyyy-mm-dd] |
is_cash_basis | Required - Boolean Set the true if you want to journal record in cash mode. |
tax_mode | Required - String Allowed values: Exclusive,Inclusive,NO VAT. |
items | Required - String Line items in journal.
|
POST /journals
Request Example
$ curl https://acc.smartysoftware.net/api/v1/journals?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"date": "2019-02-01"
"narration": ""
"state": "Post"
"auto_reversing_date": "2019-03-01"
"is_cash_basis": "false"
"tax_mode": "Exclusive"
items:[{
"account_id": {account_id}
"description": "",
"vat": "20% (VAT on Income)"
"debit_amount": "10.00"
"credit_amount": "0.00"
},
{
"account_id": {account_id}
"description": "",
"vat": "NO VAT"
"debit_amount": "0.00"
"credit_amount": "12.00"
},
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
journal: {
"journal_id": {journal_id}
"journal_number": "MJ_1"
"date": "2019-02-01"
"narration": ""
"state": "Post"
"auto_reversing_date": "2019-03-01"
"is_cash_basis": "false"
"tax_mode": "Exclusive"
"transaction_type":"Manual Journal"
"total":"100.00"
"create_source":"",
"source_create_id":0,
},
message:
status: "success"
Update a Journal
Update an existing journal. To delete a line item just remove it from the items list.
ARGUMENTS
date | Required - String Date on which the journal to be recorded. [yyyy-mm-dd] |
narration | Required - String Description of journal being posted. |
state | Required - String Allowed values: Draft,Post |
auto_reversing_date | Required - String Date of reverse journal. [yyyy-mm-dd] |
is_cash_basis | Required - Boolean Set the true if you want to journal record in cash mode. |
tax_mode | Required - String Allowed values: Exclusive,Inclusive,NO VAT. |
items | Required - String Line items in journal.
|
PUT /journals/{journal_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/journals/{journal_id}?organization_id={organization_id}
-X PUT
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"date": "2019-02-01"
"narration": ""
"state": "Post"
"auto_reversing_date": "2019-03-01"
"is_cash_basis": "false"
"tax_mode": "Exclusive"
items:[{
"account_id": {account_id}
"description": "",
"vat": "20% (VAT on Income)"
"debit_amount": "0.00"
"credit_amount": 100.00
},
{
"account_id": {account_id}
"description": "",
"vat": "20% (VAT on Income)"
"debit_amount": "100.00"
"credit_amount": 0.00
},
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
journal: {
"journal_id": {journal_id}
"journal_number": "MJ_1"
"date": "2019-02-01"
"narration": ""
"state": "Post"
"auto_reversing_date": "2019-03-01"
"is_cash_basis": "false"
"tax_mode": "Exclusive"
"transaction_type":"Manual Journal"
"total":"100.00"
"create_source":"",
"source_create_id":0,
},
message:
status: "success"
Get Journal
Get details of a journal.
GET /journals/{journal_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/journals/{journal_id}?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
journal: {
"journal_id": {journal_id}
"journal_number": "MJ_1"
"state":"Post"
"date": "2019-02-01"
"transaction_type":"Manual Journal"
"total": "12.00"
"tax_mode": "Exclusive"
"narration": ""
"auto_reversing_date": "2019-03-01"
"is_cash_basis": "false"
"sum_vat_debit": "2",
"sum_vat_credit": "0",
"subtotal_debit": "10",
"subtotal_credit": "12",
"total_credit": "12",
"total_debit": "12",
"create_source": ""
"source_create_id": "0"
items:[{
"account_id": {account_id}
"description": ""
"vat": "20% (VAT on Income)"
"vat_amount":"2.00"
"debit_amount": "10.00"
"credit_amount": "0.00"
"net_debit_amount": "10.00"
"net_credit_amount": "0.00"
"account_name": "Sales Income"
},
{
"account_id": {account_id}
"description": "",
"vat": "NO VAT"
"vat_amount":"0.00",
"debit_amount": "0.00"
"credit_amount": "12.00"
"net_debit_amount":"0.00",
"net_credit_amount":"12.00",
"account_name": "Foreign currency gains/losses"
},
...
],
histories:[{
creator: ""
date: "30/04/20 7:24 am"
text: "Manual Journal created for 12"
title: "Created"
},
...
],
files:[{
extension: "pdf"
file_code: "0c492652-f329-50ec-9b76-01b1ad09d209"
file_name: "doc.pdf"
file_size: 618
file_status: "success"
},
...
]
},
status: "success"
List Journals
List all bankt ransactions with pagination.
Query Params
page_number | Required - Integer |
page_size | Required - Integer |
sort_type | Required - String Allowed values: desc,asc |
sort_column | Required - String |
transaction_type | Required - String Allowed values: Receive Money,Spend Money. |
search_text | Optional - String Search in journal number, reference, contact or total Amount. |
start_date | Optional - String Search journals from date. |
end_date | Optional - String Search journals to date. |
GET /journals
Request Example
$ curl https://acc.smartysoftware.net/api/v1/journals?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
journals:[ {
"journal_id": {journal_id}
"journal_number": "MJ_1"
"date": "2019-02-01"
"narration": ""
"state": "Post"
"auto_reversing_date": "2019-03-01"
"is_cash_basis": "false"
"tax_mode": "Exclusive"
"transaction_type":"Manual Journal"
"total":"12.00"
"create_source":"",
"source_create_id":0,
},
...
],
status: "success",
page_setting: {page: 1, size: 10, total: 48}
Delete Journal
Delete an existing journal.
DELETE /journals/{journal_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/journals/{journal_id}?organization_id={organization_id}
-X DELETE
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Create a Recurring Journal
Create a new recurring journal.
ARGUMENTS
frequency | Required - String The frequency of time interval at which the journal is to be generated. Allowed values: daily,weekly,monthly,yearly |
repeat_every | Required - String The period between every recurrency frequency. |
never_expire | Required - String If set true the recurring journal does not expire. Allowed values: true,false |
create_invoice_state | Required - String The state of journal which created from recurring. Allowed values: Draft,Sent,sentEmail |
start_date | Required - String The date on which the recurring journal starts. [yyyy-mm-dd] |
end_date | Required - String The date on which the recurring journal expires. [yyyy-mm-dd] |
narration | Required - String Description of journal being created. |
is_cash_basis | Required - Boolean Set the true if you want to journal record in cash mode. |
tax_mode | Required - String Allowed values: Exclusive,Inclusive,NO VAT. |
items | Required - String Line items in recurring journal.
|
POST /recurringjournals
Request Example
$ curl https://acc.smartysoftware.net/api/v1/recurringjournals?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"frequency": "monthly"
"repeat_every": 1
"never_expire": false
"create_invoice_state": "Draft"
"start_date": "2019-05-02"
"end_date": "2020-05-02"
"narration": ""
"is_cash_basis": "false"
"tax_mode": "Exclusive"
items:[{
"account_id": {account_id}
"description": "",
"vat": "20% (VAT on Income)"
"debit_amount": "10.00"
"credit_amount": "0.00"
},
{
"account_id": {account_id}
"description": "",
"vat": "NO VAT"
"debit_amount": "0.00"
"credit_amount": "12.00"
},
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
recurring_journal: {
"recurring_journal_id": {recurring_journal_id}
"frequency": "monthly"
"repeat_every": 1
"never_expire": false
"create_invoice_state": "Draft"
"start_date": "2019-05-02"
"end_date": "2020-05-02"
"last_invoice_date":"2019-05-02"
"next_invoice_date":"2019-06-02"
"narration": ""
"is_cash_basis": "false"
"tax_mode": "Exclusive"
"state":"Active"
"transaction_type": "Recurring Journal"
"total": "12.00"
},
message:
status: "success"
Update a Recurring Journal
Update an existing recurring journal. To delete a line item just remove it from the items list.
ARGUMENTS
frequency | Required - String The frequency of time interval at which the journal is to be generated. Allowed values: daily,weekly,monthly,yearly |
repeat_every | Required - String The period between every recurrency frequency. |
never_expire | Required - String If set true the recurring journal does not expire. Allowed values: true,false |
create_invoice_state | Required - String The state of journal which created from recurring. Allowed values: Draft,Sent,sentEmail |
start_date | Required - String The date on which the recurring journal starts. [yyyy-mm-dd] |
end_date | Required - String The date on which the recurring journal expires. [yyyy-mm-dd] |
narration | Required - String Description of journal being created. |
is_cash_basis | Required - Boolean Set the true if you want to journal record in cash mode. |
tax_mode | Required - String Allowed values: Exclusive,Inclusive,NO VAT. |
items | Required - String Line items in recurring journal.
|
PUT /recurringjournals/{recurring_journal_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/recurringjournals/{recurring_journal_id}?organization_id={organization_id}
-X PUT
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"frequency": "monthly"
"repeat_every": 1
"never_expire": false
"create_invoice_state": "Draft"
"start_date": "2019-05-02"
"end_date": "2020-05-02"
"narration": ""
"is_cash_basis": "false"
"tax_mode": "Exclusive"
items:[{
"account_id": {account_id}
"description": "",
"vat": "20% (VAT on Income)"
"debit_amount": "10.00"
"credit_amount": "0.00"
},
{
"account_id": {account_id}
"description": "",
"vat": "NO VAT"
"debit_amount": "0.00"
"credit_amount": "12.00"
},
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
recurring_journal: {
"recurring_journal_id": {recurring_journal_id}
"frequency": "monthly"
"repeat_every": 1
"never_expire": false
"create_invoice_state": "Draft"
"start_date": "2019-05-02"
"end_date": "2020-05-02"
"last_invoice_date":"2019-05-02"
"next_invoice_date":"2019-06-02"
"narration": ""
"is_cash_basis": "false"
"tax_mode": "Exclusive"
"state":"Active"
"transaction_type": "Recurring Journal"
"total": "12.00"
},
message:
status: "success"
Get Recurring Journal
Get details of a recurring journal.
GET /recurringjournals/{recurring_journal_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/recurringjournals/{recurring_journal_id}?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
recurring_journal: {
"recurring_journal_id": {recurring_journal_id}
"frequency": "monthly"
"repeat_every": 1
"create_invoice_state": "Draft"
"start_date": "2019-05-02"
"end_date": "2020-05-02"
"narration": ""
"is_cash_basis": "false"
"tax_mode": "Exclusive"
"state":"Active"
"last_invoice_date":"2019-05-02"
"next_invoice_date":"2019-06-02"
"transaction_type": "Recurring Journal"
"sum_vat_debit": "2",
"sum_vat_credit": "0",
"subtotal_debit": "10",
"subtotal_credit": "12",
"total_credit": "12",
"total_debit": "12",
"create_source": ""
"source_create_id": "0"
items:[{
"account_id": {account_id}
"description": ""
"vat": "20% (VAT on Income)"
"vat_amount":"2.00"
"debit_amount": "10.00"
"credit_amount": "0.00"
"net_debit_amount": "10.00"
"net_credit_amount": "0.00"
"account_name": "Sales Income"
},
{
"account_id": {account_id}
"description": "",
"vat": "NO VAT"
"vat_amount":"0.00",
"debit_amount": "0.00"
"credit_amount": "12.00"
"net_debit_amount":"0.00",
"net_credit_amount":"12.00",
"account_name": "Foreign currency gains/losses"
},
...
],
histories:[{
creator: ""
date: "30/04/20 7:24 am"
text: "Recurring Journal created for 12"
title: "Created"
},
...
],
},
status: "success"
List Recurring Journals
List all recurring journals with pagination.
Query Params
page_number | Required - Integer |
page_size | Required - Integer |
sort_type | Required - String Allowed values: desc,asc |
sort_column | Required - String |
search_text | Optional - String Search in Narration or Total Amount. |
search_states | Optional - String Comma separated recurring journal states which are to be search. Stopped,Active,Expired |
start_date | Optional - String Search recurring journals from date. |
end_date | Optional - String Search recurring journals to date. |
GET /recurringjournals
Request Example
$ curl https://acc.smartysoftware.net/api/v1/recurringjournals?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
recurringjournals:[ {
recurring_journal_id: {recurring_journal_id}
frequency: "monthly"
repeat_every: 1
create_invoice_state: "Draft"
start_date: "2019-05-02"
end_date: "2020-05-02"
last_invoice_date:"2019-05-02"
next_invoice_date:"2019-06-02"
"narration": ""
"state": "Active"
"total": "12.00"
"tax_mode": "Exclusive"
"transaction_type": "Recurring Journal"
},
...
],
status: "success",
page_setting: {page: 1, size: 10, total: 48}
Delete Recurring Journal
Delete an existing recurring journal.
DELETE /recurringjournals/{recurring_journal_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/recurringjournals/{recurring_journal_id}?organization_id={organization_id}
-X DELETE
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Active a Recurring Journal
Active a Recurring Journal.
GET /recurringjournals/{recurring_journal_id}/state/Active
Request Example
$ curl https://acc.smartysoftware.net/api/v1/recurringjournals/{recurring_journal_id}/state/Active?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
recurring_journal: {
...
},
message:
status: "success"
Stop a Recurring Journal
Stop a Recurring Journal.
GET /recurringjournals/{recurring_journal_id}/state/Stop
Request Example
$ curl https://acc.smartysoftware.net/api/v1/recurringjournals/{recurring_journal_id}/state/Stop?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
recurring_journal: {
...
},
message:
status: "success"
Create an Account
Creates an account with the given account type.
ARGUMENTS
account_type | Required - String Type of the account. |
account_name | Required - String Name of account |
account_code | Required - String Code of account |
account_vat | Required - String VAT of Account. |
account_description | Optional - String Description of account |
is_enable_payment | Optional - Boolean Describes whether account can have payments applied to it. Allowed values: 1,0 |
POST /accounts
Request Example
$ curl https://acc.smartysoftware.net/api/v1/accounts?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"account_type": "Revenue"
"account_name": "New Account"
"account_code": "10001"
"account_vat": "20% (VAT on Income)"
"account_description": ""
"is_enable_payment":1
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
account: {
"account_id": {account_id}
"parent_account_type":"REVENUE"
"account_type": "Revenue"
"account_name": "New Account"
"account_code": "1001"
"account_name_formatted":"1001 - New Account"
"account_vat": "20% (VAT on Income)"
"account_description": ""
"is_enable_payment":1
"enable_payment":1
"default_account_name":""
"account_lock":0
"currency":"GBP"
"account_status":"Valid"
"source_create_id":0
"account_create_type":""
},
message:
status: "success"
Update an Account
Updates the account information.
ARGUMENTS
account_type | Required - String Type of the account. |
account_name | Required - String Name of account |
account_code | Required - String Code of account |
account_vat | Required - String VAT of Account. |
account_description | Optional - String Description of account |
is_enable_payment | Optional - Boolean Describes whether account can have payments applied to it. Allowed values: 1,0 |
PUT /accounts/{account_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/accounts/{account_id}?organization_id={organization_id}
-X PUT
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"account_type": "Revenue"
"account_name": "New Account"
"account_code": "10001"
"account_vat": "20% (VAT on Income)"
"account_description": ""
"is_enable_payment":1
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
account: {
"account_id": {account_id}
"parent_account_type":"REVENUE"
"account_type": "Revenue"
"account_name": "New Account"
"account_code": "1001"
"account_name_formatted":"1001 - New Account"
"account_vat": "20% (VAT on Income)"
"account_description": ""
"is_enable_payment":1
"enable_payment":1
"default_account_name":""
"account_lock":0
"currency":"GBP"
"account_status":"Valid"
"source_create_id":0
"account_create_type":""
},
message:
status: "success"
Get an Account
Get details of a account.
GET /accounts/{account_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/accounts/{account_id}?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
account: {
"account_id": {account_id}
"parent_account_type":"REVENUE"
"account_type": "Revenue"
"account_name": "New Account"
"account_code": "1001"
"account_vat": "20% (VAT on Income)"
"account_description": ""
"is_enable_payment":1
"enable_payment":1
"default_account_name":""
"account_lock":0
"currency":"GBP"
"account_status":"Valid"
"source_create_id":0
"account_create_type":""
},
status: "success"
Chart of Accounts
List all chart of accounts along with pagination.
Query Params
page_number | Required - Integer |
page_size | Required - Integer |
sort_type | Required - String Allowed values: desc,asc |
sort_column | Required - String |
search_text | Optional - String Search in account name, account code, account type or account vat. |
filter | Optional - String Search accounts by account state. Allowed values: Archive,Valid |
GET /accounts
Request Example
$ curl https://acc.smartysoftware.net/api/v1/accounts?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
accounts:[{
"account_id": {account_id}
"parent_account_type":"REVENUE"
"account_type": "Revenue"
"account_name": "New Account"
"account_code": "1001"
"account_vat": "20% (VAT on Income)"
"ytd":"0.00"
"account_description": ""
"is_enable_payment":1
"enable_payment":1
"default_account_name":""
"account_lock":0
"currency":"GBP"
"account_status":"Valid"
"source_create_id":0
"account_create_type":""
},
...
],
status: "success",
Delete an Account
Delete an existing account.
DELETE /accounts/{account_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/accounts/{account_id}?organization_id={organization_id}
-X DELETE
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Archive an Account
Update the status of account to Archive.
GET /accounts/{account_id}/state/Archive
Request Example
$ curl https://acc.smartysoftware.net/api/v1/accounts/{account_id}/state/Archive?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Restore an Account
Restore the status of account from Archive to Valid.
GET /accounts/{account_id}/state/Valid
Request Example
$ curl https://acc.smartysoftware.net/api/v1/accounts/{account_id}/state/Valid?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Create a User
Create a new user.
ARGUMENTS
first_name | Required - String First name of user. |
last_name | Required - String Last name of user. |
Required - String Email name of user | |
role_id | Required - Integer Id of role |
POST /users
Request Example
$ curl https://acc.smartysoftware.net/api/v1/users?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"role_id": "{role_id}"
"first_name": "Michael"
"last_name": "Scalf"
"email": "elroy1970@yahoo.com"
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Update a Pending User
Update an pending user.
ARGUMENTS
first_name | Required - String First name of user. |
last_name | Required - String Last name of user. |
Required - String Email name of user | |
role_id | Required - Integer Id of role |
user_status | Required - String User status. Allowed value: Pending |
PUT /users/{user_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/users/{user_id}?organization_id={organization_id}
-X PUT
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"first_name": "Michael"
"last_name": "Scalf"
"email": "elroy1970@yahoo.com"
"role_id": "{role_id}"
"user_status": "Pending"
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Update an Active User
Update an active user.
ARGUMENTS
role_id | Required - Integer Id of role |
user_status | Required - String User status. Allowed value: Active |
PUT /users/{user_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/users/{user_id}?organization_id={organization_id}
-X PUT
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"role_id": "{role_id}"
"user_status": "Active"
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Get a User
Get details of a invited user.
Query Params
user_status | Required - String User status. Allowed values: Active,Pending |
GET /users/{user_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/users/{user_id}?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
user: {
"user_id": {user_id}
"role_id": "{role_id}"
"first_name": "Michael"
"last_name": "Scalf"
"email": "elroy1970@yahoo.com"
"user_status":"Active"
"role":"Standard"
"role": "Refund 3",
"last_login": "2020-05-09 09:42:09",
},
status: "success"
List Users
List of all users you have invited.
Query Params
user_status | Optional - String User status. Allowed values: Active,Pending |
GET /users
Request Example
$ curl https://acc.smartysoftware.net/api/v1/users?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
users:[{
"user_id": {user_id}
"role_id": "{role_id}"
"first_name": "Michael"
"last_name": "Scalf"
"email": "elroy1970@yahoo.com"
"user_status":"Pending"
"role":"Standard"
},
...
],
status: "success",
Delete a User
Delete a user which you have invited.
DELETE /users/{user_id}/{user_status}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/users/{user_id}/{user_status}?organization_id={organization_id}
-X DELETE
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Create a Currency
Create a currency for transaction.
ARGUMENTS
currency_code | Required - String A unique standard code for the currency. |
POST /currencies
Request Example
$ curl https://acc.smartysoftware.net/api/v1/currencies?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"currency_code": "EUR"
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
currency: {
"currency_id": {currency_id}
"currency_code": "EUR"
"exchange_rate":""
"note":""
"currency_name_formatted":"EUR Euro"
},
message:
status: "success"
Get a Currency
Get details of a currency.
GET /currencies/{currency_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/currencies/{currency_id}?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
currency: {
"currency_id": {currency_id}
"currency_code": "EUR"
"exchange_rate":""
"note":""
"country":""
"currency_name_formatted":"EUR Euro"
},
status: "success"
List Currencies
Get list of currencies and exchange rates with pagination.
Query Params
page_number | Required - Integer |
page_size | Required - Integer |
sort_type | Required - String Allowed values: desc,asc |
sort_column | Required - String |
date | Optional - String Get exchange rates on date. |
GET /currencies
Request Example
$ curl https://acc.smartysoftware.net/api/v1/currencies?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
currencies:[{
"currency_id": {currency_id}
"country":""
"currency_name":"Euro"
"currency_code":"EUR"
"exchange_rate":""
"note":""
"currency_name_formatted":"EUR Euro"
"unit_base_currency":""
"base_currency_unit":""
},
...
],
status: "success",
Create an Organisation
Create a new organisation.
ARGUMENTS
name | Required - String Name of organisation. |
country_id | Required - Integer Country id for organisation. |
financial_year | Required - String |
is_subcontractor | Required - Boolean Boolean to describe if organisation subcontractor under CIS. Allowed values: true, false |
is_vat_registered | Required - Boolean Boolean to describe if organisation is registered VAT. Allowed values: true, false |
POST /organisations
Request Example
$ curl https://acc.smartysoftware.net/api/v1/organisations?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"name": "new organisation"
"country_id": "238"
"financial_year": "4"
"is_subcontractor": false
"is_vat_registered": true
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
organisation: {
"organisation_id": {organisation_id}
"contact_name": "{contact_name}"
"name": "new organisation"
"package_type":"Lifetime"
"phone": ""
"fax":""
"email":""
"file_email":""
"city":""
"state":""
"postcode":""
"website":""
"address":""
"register_number":""
"currency":"GBP"
"country":"United Kingdom"
"invoice_settings":{
"number":{"prefix":"INV_","number":1000,"mode":"auto"},
"customer_note":"hfygut",
"term_condition":""
},
"estimate_settings":{
"number":{"prefix":"EST_","number":1000,"mode":"auto"},
"customer_note":"",
"term_condition":""
},
"credit_note_settings":{
"number":{"prefix":"CN_","number":1000,"mode":"auto"},
"customer_note":"",
"term_condition":""
},
"financial_year":4,
"enable_lock":false,
"stop_except_advisor_date":"",
"stop_users_date":"",
"financial_year_start":"2020-04-01",
"financial_year_end":"2021-03-31",
"is_vat_registered":true,
"vat_number":"",
"vat_scheme":"cash_scheme",
"vat_mode_purchases":"Exclusive",
"vat_mode_sales":"Exclusive",
"vat_period":"Quarterly",
"flat_vat_rate":"",
"is_subcontractor":false,
"user_role":"Adviser",
"default_discount":"0.00",
"custom_fields":[],
"depreciation_start_date":"2019-04-01",
"depreciation_last_date":"2019-03-31",
},
message:
status: "success"
Update an Organisation
Update an existing organisation.
ARGUMENTS
name | Required - String Name of organisation. |
register_number | Required - String Register number of organisation. |
address | Required - String Address of organisation. |
state | Required - String State of organisation. |
city | Required - String City of organisation. |
postcode | Required - String Postcode of organisation. |
website | Required - String Website of organisation. |
phone | Required - String Phone of organisation. |
fax | Required - String Fax of organisation. |
default_discount | Required - String Base discount of organisation in invoices. |
is_subcontractor | Required - Boolean Boolean to describe if organisation subcontractor under CIS. Allowed values: true, false |
custom_fields | Required - String Array of custom fields about organization which not defined in fields and you want to appear in invoice. |
PUT /organisations/{organisation_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/organisations/{organisation_id}?organization_id={organization_id}
-X PUT
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"name": "new organisation"
"register_number": ""
"address": ""
"state": ""
"city": ""
"postcode": ""
"website": ""
"phone": ""
"fax": ""
"default_discount": ""
"is_subcontractor": false
"custom_fields": [
{
"label" : "Mobile"
"value" : "11112222"
},
...
]
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
organisation: {
"organisation_id": {organisation_id}
"contact_name": "{contact_name}"
"name": "new organisation"
"package_type":"Lifetime"
"phone": ""
"fax":""
"email":""
"file_email":""
"city":""
"state":""
"postcode":""
"website":""
"address":""
"register_number":""
"currency":"GBP"
"country":"United Kingdom"
"invoice_settings":{
"number":{"prefix":"INV_","number":1000,"mode":"auto"},
"customer_note":"hfygut",
"term_condition":""
},
"estimate_settings":{
"number":{"prefix":"EST_","number":1000,"mode":"auto"},
"customer_note":"",
"term_condition":""
},
"credit_note_settings":{
"number":{"prefix":"CN_","number":1000,"mode":"auto"},
"customer_note":"",
"term_condition":""
},
"financial_year":4,
"enable_lock":false,
"stop_except_advisor_date":"",
"stop_users_date":"",
"financial_year_start":"2020-04-01",
"financial_year_end":"2021-03-31",
"is_vat_registered":true,
"vat_number":"",
"vat_scheme":"cash_scheme",
"vat_mode_purchases":"Exclusive",
"vat_mode_sales":"Exclusive",
"vat_period":"Quarterly",
"flat_vat_rate":"",
"is_subcontractor":false,
"user_role":"Adviser",
"default_discount":"0.00",
"custom_fields":[],
"depreciation_start_date":"2019-04-01",
"depreciation_last_date":"2019-03-31",
},
message:
status: "success"
Get an Organisation
Get details of a organisation.
GET /organisations/{organisation_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/organisations/{organisation_id}?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
organisation: {
"organisation_id": {organisation_id}
"contact_name": "{contact_name}"
"name": "new organisation"
"package_type":"Lifetime"
"phone": ""
"fax":""
"email":""
"file_email":""
"city":""
"state":""
"postcode":""
"website":""
"address":""
"register_number":""
"currency":"GBP"
"country":"United Kingdom"
"invoice_settings":{
"number":{"prefix":"INV_","number":1000,"mode":"auto"},
"customer_note":"hfygut",
"term_condition":""
},
"estimate_settings":{
"number":{"prefix":"EST_","number":1000,"mode":"auto"},
"customer_note":"",
"term_condition":""
},
"credit_note_settings":{
"number":{"prefix":"CN_","number":1000,"mode":"auto"},
"customer_note":"",
"term_condition":""
},
"financial_year":4,
"enable_lock":false,
"stop_except_advisor_date":"",
"stop_users_date":"",
"financial_year_start":"2020-04-01",
"financial_year_end":"2021-03-31",
"is_vat_registered":true,
"vat_number":"",
"vat_scheme":"cash_scheme",
"vat_mode_purchases":"Exclusive",
"vat_mode_sales":"Exclusive",
"vat_period":"Quarterly",
"flat_vat_rate":"",
"is_subcontractor":false,
"user_role":"Adviser",
"default_discount":"0.00",
"custom_fields": [
{
"label" : "Mobile"
"value" : "11112222"
},
...
]
"depreciation_start_date":"2019-04-01",
"depreciation_last_date":"2019-03-31",
},
status: "success"
List Organisations
List of all organisation which you are in.
GET /organisations
Request Example
$ curl https://acc.smartysoftware.net/api/v1/organisations?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
organisations:[{
"organisation_id": {organisation_id}
"name": "new organisation"
country: "Australia"
created_at: "2020-04-25 1:36 pm"
has_logo: false
last_login: "2020-05-09 7:57 am"
organisation_status: "Active"
package_type: "Charging"
user_type: "Admin"
},
...
],
status: "success",
Delete an Organisation
Delete an organisation which you are created or you are admin on it.
DELETE /organisations/{organisation_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/organisations/{organisation_id}?organization_id={organization_id}
-X DELETE
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
Create a VAT Rate
Create a VAT which can be associated with an item.
ARGUMENTS
vat_type | Required - String Type of the VAT. (Define how the VAT rate will be reported in your VAT return.) |
vat_rate | Required - String Rate of VAT. (decimal) |
vat_name | Required - String Display name of VAT. (limited to 50 characters) |
POST /vatrates
Request Example
$ curl https://acc.smartysoftware.net/api/v1/vatrates?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"vat_type": "Sales"
"vat_rate": "12"
"vat_name": ""
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
vat_rate: {
"vat_id": {vat_id}
"vat_type": "Sales"
"vat_rate": "12"
"vat_name": ""
},
message:
status: "success"
Update a VAT Rate
Updates the VAT rate information.
ARGUMENTS
vat_type | Required - String Type of the VAT. (Define how the VAT rate will be reported in your VAT return.) |
vat_rate | Required - String Rate of VAT. (decimal) |
vat_name | Required - String Display name of VAT. (limited to 50 characters) |
PUT /vatrates/{vat_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/vatrates/{vat_id}?organization_id={organization_id}
-X PUT
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
-F 'JSONString="{
"vat_type": "Sales"
"vat_rate": "12"
"vat_name": ""
}"'
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
vat_rate: {
"vat_id": {vat_id}
"vat_type": "Sales"
"vat_rate": "12"
"vat_name": ""
},
message:
status: "success"
Get a VAT Rate
Get details of a VAT.
GET /vatrates/{vat_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/vatrates/{vat_id}?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
vat_rate: {
"vat_id": {vat_id}
"vat_type": "Sales"
"vat_rate": "12"
"vat_name": ""
},
status: "success"
List VAT Rate
List all chart of VAT rates along with pagination.
GET /vatrates
Request Example
$ curl https://acc.smartysoftware.net/api/v1/vatrates?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
vat_rates:[{
"vat_id": {vat_id}
"vat_type": "Sales"
"vat_rate": "12"
"vat_name": ""
},
...
],
status: "success",
Delete a VAT Rate
Delete an existing VAT.
DELETE /vatrates/{vat_id}
Request Example
$ curl https://acc.smartysoftware.net/api/v1/vatrates/{vat_id}?organization_id={organization_id}
-X DELETE
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
message:
status: "success"
History and Notes
Get History and Notes with pagination.
Query Params
page_number | Required - Integer |
page_size | Required - Integer |
sort_type | Required - String Allowed values: desc,asc |
sort_column | Required - String |
start_date | Optional - String Get History and Notes from date. |
end_date | Optional - String Get History and Notes to date. |
item | Optional - String Get History and Notes base on item. Allowed values: Payment,Bill,Purchase Credit Note,Sales Credit Note,Estimate,Asset,Sales Invoice, Bank Transaction,Manual Journal,Recurring Bill,Recurring Sales invoice, Recurring Journal,Contact,Item |
Optional - String Get History and Notes base on email of user. |
GET /activities
Request Example
$ curl https://acc.smartysoftware.net/api/v1/activities?organization_id={organization_id}
-X GET
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
activities:[{
activity_id: {activity_id}
transaction_id: {transaction_id}
creator: ""
date: "2020-05-10 10:57:56"
history_item: "Sales Invoice"
text: "Sales Invoice created for 66.00"
title: "Created"
transaction: "transaction"
}
...
],
status: "success"
Add Comment
Add a comment for item.
ARGUMENTS
text | Required - String Text of comment. |
Items which you can add comment :
Scope Title | Item | Item ID Name |
---|---|---|
Contact | contacts | contact_id |
Bank Transaction | banktransactions | transaction_id |
Bank Transfer | banktransfers | transfer_id |
Estimate | estimates | estimate_id |
Sales Invoice | invoices | invoice_id |
Sales Credit Note | creditnotes | credit_note_id |
Bill | bills | bill_id |
Supplier Credit Notes | suppliercredits | supplier_credit_id |
Item | items | item_id |
Manual Journal | journals | journal_id |
Supplier Payment | supplierpayments | payment_id |
Customer Payment | customerpayments | payment_id |
Recurring Bill | recurringbills | recurring_bill_id |
Recurring Sales Invoice | recurringinvoices | recurring_invoice_id |
Recurring Journal | recurringjournals | recurring_journal_id |
Asset | fixedassets | fixed_asset_id |
POST /{item}/{item_id}/comments
Request Example
$ curl https://acc.smartysoftware.net/api/v1/{item}/{item_id}/comments?organization_id={organization_id}
-X POST
-H "Access-Token: {access_token}"
-H "Content-Type: application/json"
Response Example
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
history: {
date: "2020-04-14 10:49:56"
creator: "by patrick jones"
text: "test command"
title: "Comment"
},
message:
status: "success"