Connect Yendo Accounting to Other Applications
The Yendo Accounts developer API allows registered 3rd party applications to share data with Yendo. Typically it is used to send invoices and/or contacts into Yendo from applications such as CRM, inventory management or payroll.
To use our API some technical knowledge is required. It is implemented as XML over HTTP using the REST prinicples.
There are two different URL's one to send data to Yendo and another to retrieve data back from Yendo. The system us used by sending a request to the appropriate URL which will then send back the data in the response.
Authentication
To use the API you will first need to enable the API for your organisation. This is done in the 'Settings' section of Yendo Accounts. once this is done you will be issued with two API keys which are then used for authenticating all requests.
All fields are mandatory and must have values specified in the request XML.
| Field | Max Length | Type | Notes |
|---|---|---|---|
| customer_public_key | 50 | String | Unique customer code assigned by Yendo Accounts |
| customer_secret_key | 50 | String | Unique customer code assigned by Yendo Accounts. To be kept secret. |
| username | 50 | String | Username of an active user for the specified customer |
Get Data
The URL for getting data is:
https://apps.yendo.com/api/accounts/v01/get.aspx
To retrieve data from Yendo a request must be sent specifying the fields below.
| Field | Max Length | Type | Notes |
|---|---|---|---|
| request_type | 20 | String | The type of data being requested. Value must be one of:
invoices contacts payments accounts bankaccounts users countries currencies |
| request_ref | 20 | String | Filter the data for items with specified reference code. Typically the code used on 3rd party system. |
| request_uid | 20 | String | Filter the data for items with the specified unique identifier |
| search_term | 20 | String | Filter the data for items containing the specified search term |
383f5b04c995434 9f119dd3f431234 testco contacts
Response Codes
If the request for data fails, Yendo will return one of the error codes listed below.
| Code | Notes |
|---|---|
| 1 | No Data The request was correct but no data was retrieved. |
| 2 | Request XML not in correct format. The request XML could not be parsed. Occurs if a field is missing or incorrectly named. |
| 3 | Login Failed. The login credentials were incorrect. |
| 4 | Too Many Requests. The number of requests submitted has exceeded the throttle limit. |
| 5 | Not Processed. The request was processed but no response was generated. |
| 6 | Processing Error. The request was processed but an unspecified error occurred. |
| 7 | Invalid Request Type. The request type specified as invalid |
Sample Responses
Sample error:
3Login Failed
Contacts
BBFED29F-6223-4D46-ADC4-A7SD882123 2 Contact Name Company Name info@company.com The Number The Street The District The City US 1234567890 1234567890 1234567890 0 0 1 12345
Invoices
D820EBC3-A463-489A-9547-184D2E0F0A 1 HNFED29F-6102-4D46-ADC6-A7BE882077 49 1 1 2010-01-10T00:00:00 2010-02-10T00:00:00 2010-02-10T00:00:00 Item 222 71.6000 333.0000 404.6000 404.6000 1 1 17 87 14DC7E87-5E5C-4652-4335-8AFA073098 35FE89F0-4F33-4E9C-9639-38472DF9E5 0 1 an item 71.6000 333.0000 404.6000 1 333.0000 0.2150 1
Bank Accounts
53CA0B15-B0E8-4SD3-9FC6-4073A790C2 1 Current AC 22 Current AC22 1112233 1234567890 0 1234567890 22.0000 103 49 1
Payments
2 966B2D6E-911A-4613-89D8-1AE8E06E99 ss 43.0000 200.0000 243.0000 dsds 2009-10-08T00:00:00 14DC7E87-5E5C-4652-9235-8D0AFA0098 0.2200 1715292A-1301-4650-8D29-33B9F5F99D 1 59881F18-A26D-472E-A58E-8C0DC30110 400 F6C87284-3CF6-4233-962A-0877D7E5A5
Accounts
35FE89F0-4F12-4E9C-9459-3D472DF9E5 13 200 Sales Normal Business Sales 1
Users
8443315-8DF9-9AB9-847A-4FE9F8099E John Smith info@yendo.com 103
Countries
11 AALAND ISLANDS Mariehamn ALA Aaland Islands 0 12 AFGHANISTAN Kabul AFG Afghanistan AF 0
Currencies
TGO West African CFA franc Fr AFA AFGAHANI ؋
Sending Data To Yendo
If you want to submit data to Yendo it must be sent in the format below. This may require retrieving lookup data beforehand.
A new item is added to the system whenever the relevant UID field is left blank. If a UID is provided then the system will attempt to update whichever item uses that UID.
Country Codes are in the ISO2 format
The URL for posting data is:
https://apps.yendo.com/api/accounts/v01/post.aspx
Adding a new Contact
245b04c99505b75abed2f71234 9f102d3f955ba0eeeb0e83458 myusername 2 added With API Company Name aa@aa.com 3 4 5 6 US 7 8 9 0 0 1 12345
Adding a new Invoice
Each request can contain several 'invoice' nodes within the 'invoices' node. Within each 'invoice' several 'invoice_item' nodes may also be included each representing an invoice line item. Dates should be in the format YYYY-MM-DD.
245b04c9954505b75abed71234 9f102d3f96455ba0eeeb0e458 myusername 1 49 1 3 2010-4-25 2010-05-25 2010-05-25 test invoice 21.5000 100.0000 121.5000 134.8700 1 0 B9443529F-6102-4D46-A5C4-A7B2882077 test 0 0 1 zzz 21.5000 100.0000 121.5000 1 100.0000 0.2150 1 14DC7E87-5E5C-4652-9235-8D0A0098 35FE89F0-4F33-4E9C-9459-389DF9E5
Adding a Payment
Payments can be added as standalone bank account transactions or can be linked to a sales/purchase invoice. Dates should be in the format YYYY-MM-DD.
245b04c9954505b75abed2f734 9f102d3f96455ba0eeeb0e858 myusername 2 abc 44.0000 200.0000 244.0000 my notes 2010-04-08 14DC7E87-5E5C-4652-9235-8D0AFA073098 0.2150 1715292A-1301-4650-8D29-33B9F5F99D 1 59881F18-A26D-45BE-A58E-8C0DC30110 daf9a4cd-6e40-42fa-be22-98e8f13f69 F6C87284-3CF6-4F2C-962A-0877D7E5A5
Lookup Data
Invoice types (invoice_typeID)
| ID | Description |
|---|---|
| 1 | Sales invoice |
| 2 | Sales Credit Note |
| 3 | Purchase Invoice |
| 4 | Purchase Credit Note |
Invoice Status (invoice_statusID)
| ID | Description |
|---|---|
| 1 | Awaiting Payment |
| 2 | Paid |
| 3 | Draft |
Account Types (account_typeID)
| ID | Type | Description |
|---|---|---|
| 1 | 1 | Current Asset |
| 2 | 1 | Fixed Asset |
| 3 | 1 | Prepayment |
| 4 | 2 | Current Liability |
| 5 | 2 | Liability |
| 6 | 2 | Term Liability |
| 7 | 3 | Depreciation |
| 8 | 6 | Direct Costs |
| 9 | 3 | Expense |
| 10 | 3 | Overhead |
| 11 | 4 | Equity |
| 12 | 5 | Other Income |
| 13 | 5 | Revenue |
| 14 | 5 | Sale |
Approval Status (approvalID)
| ID | Description |
|---|---|
| 1 | Approved |
| 2 | Pending/Draft |
| 5 | Deleted |
Bank Account Type (bank_account_typeID)
| ID | Description |
|---|---|
| 1 | Asset |
| 2 | Equity |
| 3 | Loan |
| 4 | PayPal |
Contact Type (contact_typeID)
| ID | Description |
|---|---|
| 1 | Customer |
| 2 | Supplier |
Payment Type (payment_typeID)
| ID | Description |
|---|---|
| 1 | Money Out (Debit) |
| 2 | Money In (Credit) |