F2X Instructions

Basic Overview

The F2X Pro plug-in for FileMaker Pro enables a simple to use scripted connectivity between FileMaker solutions and the Xero online accounting application.

Tested For:
  • Mac OS X Versions 10.8+ , Windows 8, Windows 10
  • FileMaker Pro (and FileMaker Pro Advanced) versions 13 and 14

Contents

  1. Installation
  2. Setting up the plug-in
  3. Functions
  4. Errors


Installation

How to install the F2X Pro plug-in

  • Ensure all instances of every version of FileMaker are closed before continuing.
  • Copy the plug-in file (‘ConnectF2X.fmplugin’ on Mac OSX, ‘ConnectF2XPro.fmx’ on Windows) into the following location:
    Mac OS X:/Users/{user}/Library/Application Support/FileMaker/Extensions
    Windows: C:\Users\{user}\AppData\Local\FileMaker\Extensions

To check the plug-in has been installed properly, do the following:
  • Launch FileMaker.
  • Open the ‘FileMaker Pro’ (or ‘FileMaker Pro Advanced’) menu on Mac OS X, or the ‘Edit’ menu on Windows
  • Select ‘Preferences’ from the drop-down menu.
  • Select the ‘Plug-ins’ tab.
  • Make sure ‘Connect F2X Pro’ is listed and checked.
Note: Windows users may need to install the Microsoft Visual C++ 2015 Redistributable Package (x86) in order to get the plug-in to work. The installer can be downloaded here: https://www.microsoft.com/en-us/download/details.aspx?id=48145

Setting up the plug-in

Entering your license details

  • With the Preferences dialog already open and the ‘Plug-ins’ tab selected, select ‘Connect F2X Pro’ in the plug-ins list and click ‘Configure…’.
  • Select the ‘License’ tab in the ‘Connect F2X Pro Preferences’ dialog.
  • Enter your F2X Pro license details here and click the ‘Validate’ button to test your credentials.

How to generate a Public Certificate for Xero

  • With the ‘Connect F2X Pro’ already open, select the ‘Xero API’ tab.
  • In the ‘Unique Identifier’ field, enter an easy to remember reference for this organisation.
  • In the ‘Organisation Name’ field, enter the name of your organisation as found on Xero (case-sensitive).
  • Click the ‘Generate’ button next to ‘Private Key File’. This will generate a Private Key for the organisation to communicate with Xero’s API.
  • Click the ‘Copy to clipboard’ button next to ‘Public Certificate’. This will copy the contents of the Public Certificate file which was also generated. You will need this for step 12.
  • Open a web browser and navigate to http://api.xero.com and if required, enter your Xero login details.
  • Click the ‘My Applications’ tab towards the top of the web page.
  • Click ‘Add Application’.
  • Select ‘Private – just for use with my own organisation’.
  • Enter anything for the Application Name.
  • Select the organisation that you want to link to the plug-in.
  • Paste the contents of the Public Certificate into the large field under ‘X509 Public Key Certificate’.
  • Click ‘Save’.
  • Copy the ‘Consumer Key’ generated by Xero and paste it into the field in the plug-in preferences dialog and click ‘Close’ to save.

You are now ready to start using the plug-in!

Functions

All functions are prepended with ‘CF2X_’ in FileMaker. List is in alphabetical order.

Primary end point functions

AddAccount ( code ; name ; type )
Usage Create or update a new account.
Put The parameter ‘usePut’ defaults to 1 when UploadToXero() is called for manual journals.
Type Type of bank transaction; must be either RECEIVE or SPEND.
AddBankTransaction ( type )
Usage Create or update a SPEND MONEY or RECEIVE MONEY bank transaction.
Put If ‘usePut’ is set to 1 when UploadToXero() is called, this method will only be able to create new bank transactions.
Type Type of bank transaction; must be either RECEIVE or SPEND.
AddBankTransfer ( fromBankAccountCode ; toBankAccountCode ; amount )
Usage Create a bank transfer.
Put The parameter ‘usePut’ defaults to 1 when UploadToXero() is called for manual journals.
FromBankAccountCode The account code of the bank account transferred from.
ToBankAccountCode The account code of the bank account transferred from.
Amount The amount transferred.
AddContact ( name {; contactNumber )
Usage Create or update a contact.
Put If ‘usePut’ is set to 1 when UploadToXero() is called, this method will only be able to create new contacts. If an existing contact matches the ContactName or ContactNumber provided then an error will be returned.
Name Name of contact organisation ( maximum length of 500 characters).
Contact Number Number of contact organisation ( only accessable via API).
AddCreditNote ( type {; invoiceID ; appliedAmount ; date } )
Usage Create or update a credit note.
Put If ‘usePut’ is set to 1 when UploadToXero() is called, this method will only be able to create new credit notes. Can also be used to allocate part or full amounts of credit notes to outstanding invoices.
Type Type of credit note; must be either ACCPAYCREDIT or ACCRECCREDIT.
InvoiceID (optional) The Invoice ID to apply the credit to. To allocate a credit note, InvoiceID and AppliedAmount must both be set.
AppliedAmount (optional) The amount of credit to apply to the Invoice. To allocate a credit note, InvoiceID and AppliedAmount must both be set.
Date (optional): The date of the credit note allocation.
AddEmployee ( firstName ; lastName )
Usage Create or update an employee record.
Put If ‘usePut’ is set to 1 when UploadToXero() is called, this method will only be able to create a new employee records. If an existing employee matches the FirstName and LastName provided then an error will be returned.
FirstName First name of an employee (maximum length of 255 characters).
LastName Last name of an employee (maximum length of 255 characters).
AddExpenseClaim ( userID ; receiptID )
Usage Create or update an expense claim.
Put If ‘usePut’ is set to 1 when UploadToXero() is called, this method will do nothing different.
UserID The Xero identifier for an user.
ReceiptID The Xero identifier for a receipt.
AddInvoice ( type {; status ; date ; dueDate } )
Usage Create or update an invoice.
Put If ‘usePut’ is set to 1 when UploadToXero() is called, this method will only be able to create a new invoice.
Type Type of invoice; must be either ACCPAY or ACCREC.
Status (optional) The invoice status, must be either DRAFT, SUBMITTED, AUTHORISED, DELETED or VOIDED. Default is DRAFT.
Date (optional): The invoice date. If the Status is not DRAFT, this field requires a valid date.
DueDate (optional) The invoice due date. If the Status is not DRAFT, this field requires a valid date.
AddItem ( code )
Usage Create or update an item.
Put If ‘usePut’ is set to 1 when UploadToXero() is called, this method will only be able to create a new item.
Code User defined item code (maximum length of 30 characters).
AddManualJournal ( narration )
Usage Create or update a manual journal.
Put If ‘usePut’ is set to 1 when UploadToXero() is called, this method will only be able to create a new manual journal.
Narration A description of the journal being posted.
AddPayment ( invoiceID ; invoiceNumber ; creditNoteID ; creditNoteNumber ; accountID ; accountCode ; date ; amount )
Usage Create or update a payment. Either the InvoiceID, InvoiceNumber, CreditNoteID or CreditNoteNumber must be specified, while the rest can be passed an empty string. Also, either the AccountID or AccountCode must be specified, while the other can be passed an empty string.
Put If ‘usePut’ is set to 1 when UploadToXero() is called, this method will only be able to create a new payment.
InvoiceID The Xero identifier for an invoice to be applied to the payment.
InvoiceNumber The number of an invoice to be applied to the payment.
CreditNoteID The Xero identifier for a credit note to be applied to the payment.
CreditNoteNumber The number of a credit note to be applied to the payment.
AccountID The Xero identifier for an account to be used to make the payment.
AccountCode The code of an account to be used to make the payment.
Date The date the payment is being made. YYYY-MM-DD
Amount The amount of the payment.
AddPurchaseOrder ( contactNumber )
Usage Create a new Purchase Order. A ContactNumber must be specified. If the Contact does not exist in Xero yet, create it first.
Put The current Xero API only supports creating New Purchase Orders, via Put. Make sure ‘usePut’ is set to 1 when UploadToXero() is called. Until
ContactNumber The ContactNumber of the Supplier this Purchase Order is being created against.
AddReceipt ( date ; userID )
Usage Create or update a DRAFT receipt.
Put If ‘usePut’ is set to 1 when UploadToXero() is called, this method will only be able to create a new receipt.
Date The date of the receipt. YYYY-MM-DD
UserID The User in the Organisation that the expense claim receipt is for.

Child object functions

These functions are used to add child objects to the main end points. e.g adding phone numbers to a contact.
AddAddress ( addressType )
End point(s) Contacts
Usage Multiple addresses may be added to a Contact.
AddressType Type of address; must be either POBOX or STREET.
AddBankAccount ( code )
End point(s) BankTransactions
Usage A bank account is a mandatory child for BankTransactions. Type must be BANK.
Code The code of the bank account.
AddContactPerson ( firstName ; lastName {; emailAddress ; includeInEmails } )
End point(s) Contacts
Usage A Contact may have up to 5 ContactPersons.
FirstName The first name of the ContactPerson.
LastName The last name of the ContactPerson.
EmailAddress (optional) The ContactPersons email address.
IncludeInEmails (optional) Indicate whether to include on invoice emails etc, true or false.
AddExternalLink ( url ; description )
End point(s) Employees
Usage A link to an external resource.
URL The URL of the external resource.
Description A description of the link.
AddLineItem ( description ; quantity ; unitAmount {; accountCode } )
End point(s) BankTransactions, CreditNotes, Invoices, Receipts, PurchaseOrders
Usage At least one line item is required to complete a bank transaction, invoice, purchase order or receipt.
Description A description of the item (minimum length of 1 character).
Quantity The line item quantity.
UnitAmount The line item unit amount.
AccountCode (optional): The account code for the line item; must be active for the organisation.
AddManualJournalLine ( lineAmount ; accountCode )
End point(s) Employees
Usage At least two journal lines are required to complete a manual journal.
LineAmount The journal line total. Debits are positive, credits are negative value.
AccountCode The account code for the journal line.
AddOptionalField ( fieldName ; fieldValue )
Usage Add any optional field to an current end point or recently created child object.
FieldName Name of the field to be set for the current end point.
FieldValue Value to set the field to.
AddPhone ( phoneType {; phoneNumber ; phoneAreaCode ; phoneCountryCode } )
End point(s) Contacts
Usage Multiple phone numbers may be added to a Contact.
PhoneType Type of phone; must be either DEFAULT, DDI, MOBILE or FAX.
PhoneNumber (optional) The phone number.
PhoneAreaCode (optional) The phone numbers area code.
PhoneCountryCode (optional) The phone numbers country code.
AddPurchaseDetails ( unitPrice ; accountCode ; taxType )
End point(s) Items
Usage Add purchase details to an item.
UnitPrice The unit price of an item.
AccountCode The account code to be used for the item.
TaxType Specify a tax type to override the default tax code from the selected account code.
AddSalesDetails ( unitPrice ; accountCode ; taxType )
End point(s) Items
Usage Add sales details to an item.
UnitPrice The unit price of an item.
AccountCode The account code to be used for the item.
TaxType Specify a tax type to override the default tax code from the selected account code.
AddTaxComponent ( name ; rate ; isCompound )
End point(s) TaxRates
Usage Multiple tax components may be added to a TaxRate.
Name The name of the tax component.
Rate The tax rate (maximum of 4 decimal points).
IsCompound A boolean to describe if the tax rate is compounded.
AddTrackingCategory ( name )
End point(s) LineItems, ManualJournalLines
Usage Maximum of 2 tracking categories may be added to line items and manual journal lines.
Name The name of the tracking category e.g. department, region.
AddTrackingOption ( name )
End point(s) TrackingCategories
Usage Multiple tracking options may be added to a tracking category.
Name The name of the tracking option.

Other functions

ClearData ( returnType )
Usage Resets the current session and clear all objects. Does not reset the current organisation.
ReturnType Specify whether to return a boolean (‘1’ or ‘0’ depending on result) or ‘Success.’ To return a boolean, the parameter must be boolean in the form of ‘1’ (true) to return the boolean result or ‘0’ (false) to return the result string.
CheckForUpdate ( 1 )
Usage Checks the version of the installed plug-in against the latest released version. Returns 1 if a new update is available, 0 if it is the current version.
GetFieldByID ( endPoint {; id ; fieldName ; page } )
Usage Performs a download from Xero based on the specified end point. If no id or field name is specified, a list of field names will be returned for that end point. If an id is specified with an empty string as the field name, a list of values will be returned for that object in the same order as the field names list. If all 3 parameters are specified, the value for the field name will be returned.
EndPoint The end point to download from.
Id (optional) The id of the specific object to return.
FieldName (optional) The field name of the element to return.
Page (optional) Which page of results to return Ð only works for Invoices.
GetFieldByIndex ( endPoint {; index ; fieldName ; page } )
Usage Performs a download from Xero based on the specified end point. If no index or field name is specified, a list of field names will be returned for that end point. If an index is specified with an empty string as the field name, a list of values will be returned for that object in the same order as the field names list. If all 3 parameters are specified, the value for the field name will be returned.
EndPoint The end point to download from.
Index (optional): The index of the object to return from a list.
FieldName (optional) The field name of the element to return.
Page (optional) Which page of results to return Ð only works for Invoices.
GetLastUploadIDs ( returnType )
Usage Returns either a list of IDs for the most recently uploaded objects (in the same order they were uploaded) or returns the total amount of IDs stored from the recent upload set.
ReturnType Specify whether to return the amount of IDs returned or a list of the IDs. To return the total, the parameter must be boolean in the form of ‘0’ (false) or to return the list of IDs the parameter must be in the form of ‘1’ (true).
GetXML ( 1 )
Usage Returns the XML for the current objects that you have created. This can be used to check your data for errors.
SetCurrentOrganisation ( uniqueKey )
Usage Sets the organisation in which the plug-in functions will use to interact with Xero, based on the unique key of an organisation set in the plug-in preferences dialog.
UniqueKey The unique key of the organisation you wish to use.
TestCredentials ( uniqueKey )
Usage Tests the credentials that have been saved in the plug-in preferences dialog.
UniqueKey The unique key of the organisation you wish to test.
UploadToXero ( returnType { ; usePut } )
Usage Uploads the current object(s) to Xero.
ReturnType Specify whether to return a boolean (‘1’ or ‘0’ depending on result) or the response string from the request. The parameter must be boolean in the form of ‘1’ (true) to return the boolean result or ‘0’ (false) to return the result string.
UsePut (optional) Force the upload request to Xero to use a PUT request type instead of the default POST type. This parameter is optional, and must be boolean in the form of ‘1’ for true or ‘0’ for false.

Preferences functions

GetPrivateKeyForOrganisation ( uniqueKey )
Usage Returns the Private Key in plain text for the Organisation that matches the Unique Key.
UniqueKey The unique key of the Organisation.
GetPublicCertificateForOrganisation ( uniqueKey )
Usage Returns the Public Certificate in plain text for the Organisation that matches the Unique Key.
UniqueKey The unique key of the Organisation.
ListOrganisations ( returnType )
Usage Returns either the amount of Organisations set up or a list of the Unique Keys for all Organisations that have been set up.
ReturnType pecify whether to return the total amount of Organisations set up or a list of the Unique Keys for all the Organisations that have been set up. To return the total, the parameter must be boolean in the form of ‘0’ (false) or to return the list of Unique keys the boolean must be set to ‘1’ (true).
RegisterLicense ( licenseEmail ; licenseKey )
Usage Assigns the license email and key to use for the plug-in.
LicenseEmail The email address associated with your F2X Pro license.
LicenseKey The license key for your F2X Pro license.
RemoveOrganisation ( uniqueKey )
Usage Deletes an Organisation from the list of Organisations saved.
UniqueKey The Unique Key associated with the Organisation you wish to delete.
SetConsumerKey ( uniqueKey ; consumerKey )
Usage Assigns a Xero-provided Consumer Key to an Organisation already saved.
UniqueKey The Unique Key associated with the Organisation you wish to assign the Consumer Key to.
ConsumerKey The Consumer Key generated by the Xero API upon creating an application.
SetupOrganisation ( uniqueKey ; organisationName )
Usage Sets up and saves an Organisation, whilst generating a Private Key and saving it to the Organisation, as well as generating a Public Key. The Public Key is returned. This can be used to create an application on the Xero API.
UniqueKey The Unique Key to be associated with the Organisation for referencing in other functions.
OrganisationName The name of the Organisation as found on Xero. This is case-sensitive and must match in order to use the plug-in.
SetPublicCertificateForOrganisation ( uniqueKey ; privateKey )
Usage Stores a public certificate to an Organisation already saved.
UniqueKey The Unique Key associated with the Organisation you wish to assign the Public Certificate to.
PublicCert The Public Certificate you wish to save.

Header functions

SetIdentifierHeader ( identifier )
Usage Return a specific item or resource by its Xero Identifier.
Identifier The Xero Identifier of the item you wish to Get.
For Example:
// Get a specific Contact
CF2X_SetIdentifierHeader ( “fe61ead1-8afc-4f0b-beda-066620227aad” )
CF2X_GetFieldByID ( “Contacts” )
ModifiedAfterHeader ( modifiedAfter )
Usage A list of items can be returned based on their last modified date. Can be used to manipulate the headers when downloading from Xero, to help get more precise data. This function needs to be called prior to a download. Once the header has been set, it remains set until the ClearData function is called.
ModifiedAfter The Modification date in UTC format. Only items created or updated since the specified timestamp will be returned.
For example: CF2X_SetModifiedAfterHeader ( “2014-01-01T00:00:00” )
OrderByHeader ( orderBy )
Usage A list of items can be returned in a specific order. Can be used to manipulate the headers when downloading from Xero, to help get more precise data. This function needs to be called prior to a download. Once the header has been set, it remains set until the ClearData function is called.
OrderBy Order results by the specific Xero Field Name. For example:
// Order the results by their email alphabetically
CF2X_SetOrderByHeader ( “EmailAddress” )
// Order the results by their email alphabetically in Descending order
CF2X_SetOrderByHeader ( “EmailAddress%20DESC” )
WhereHeader ( where )
Usage Can be used to manipulate the headers when downloading from Xero, to help get more precise data. This function needs to be called prior to a download. Once the header has been set, it remains set until the ClearData function is called.
Where The Xero Field Name and validation required for the WhereHeader.
Examples:
//Only return Payments with a PaymentType of accounts receivable:
CF2X_SetWhereHeader ( “PaymentType=\”ACCRECPAYMENT\”” )
CF2X_GetFieldByID( “Payments”)
//Retrieve invoices with an invoice date between a date range
CF2X_SetWhereHeader ( “Date >= DateTime(2015, 01, 01) && Date < DateTime(2015, 12, 31)”)
CF2X_GetFieldByID( “Invoices”)

Errors

001: No Organisation is set. Use SetCurrentOrganisation() to set your organisation and try again.
Before calling any functions (with the exception of ClearData and TestCredentials), a default Organisation to interact with Xero must be set. Use the function SetCurrentOrganisation ( uniqueKey ) to do this.
001: UniqueKey does not match any Organisations.
This is returned when the UniqueKey parameter (which can be passed to a variety of functions) does not match the unique key of any saved Organisations.
002: Parameter ‘ReturnResponse’ is invalid.
The UploadToXero function requires the parameter ‘ReturnResponse’ to be passed a boolean in the form of ‘1’ (true) or ‘0’ (false).
003: The End Point ‘[endpoint]’ does not allow a PUT request.
This error is returned when the current end point does not support a PUT request. Set ‘usePut’ to ‘0’ (false) or leave the parameter out completely as it is optional.
004: One or more ‘[endpoint]’ are not ready for upload Ð one or more required fields are missing.
This error is returned when the current object or a recently prepared object has not had all required fields set with a valid value.
005: Nothing has been prepared for upload.
This error is returned when no objects have been prepared to upload to Xero.
Parameter ‘UniqueKey’ must be 3 or more characters.
The SetupOrganisation and SetConsumerKeyForOrganisation functions require the parameter ‘UniqueKey’ to be at least 3 characters long.
006: Parameter ‘OrganisationName’ is invalid.
The SetupOrganisation function requires the parameter ‘UniqueKey’ to not be empty.
006: Parameter ‘ConsumerKey’ is invalid.
The SetConsumerKeyForOrganisation function requires the parameter ‘ConsumerKey’ to not be empty.
006: Parameter ‘ReturnType’ is invalid.
The ListOrganisations function requires the parameter ‘ReturnType’ to not be empty.
007: An error occurred while generating the Private and Public keys.
This error may occur after calling SetupOrganisation. If it does occur, please contact us at Foundation Data.
008: The UniqueKey ‘[uniquekey]’ already exists.
The SetupOrganisation function requires the parameter ‘UniqueKey’ to be a unique value that doesn’t match the Unique Key for an already saved Organisation.
201: Parameter ‘Type’ must be one of the following: ‘RECEIVE’ or ‘SPEND’.
The AddBankTransaction function requires the parameter ‘Type’ to be passed one of the following strings:
RECEIVE
SPEND
202: The current BankTransaction is not ready for upload.
This error is returned when the current Bank Transaction has not had all required fields set with a valid value. Bank Transactions require a ‘Type’ to be passed upon creation, a Contact to be added (using AddContact), at least 1 Line Item to be added (using AddLineItem) and a Bank Account to be added (using AddBankAccount).
203: Can not add a BankTransaction to a [endpoint].
This error is returned when trying to add a Bank Transaction to another object.
401: Parameter ‘Name’ or ‘ContactNumber’ is invalid.
Either a ‘ContactNumber’ or ‘Name’ must be passed to create a Contact.
If creating a Contact by ContactNumber: ‘ContactNumber’ must not be empty and to consist of 50 characters or less.
If creating a Contact by Name: ‘Name’ must not be empty and to consist of 500 characters or less.
402: The current Contact is not ready for upload.
This error is returned when the current Contact has not had all required fields set with a valid value. Contacts require a ‘Name’ or ‘ContactNumber’ to be passed upon creation.
403: Can not add a Contact to a [endpoint].
This error is returned when trying to add a Contact to another object that does not allow a Contact as a field. End points that allow Contacts to be added are Bank Transactions, Credit Notes, Invoices and Receipts.
501: Parameter ‘Type’ must be one of the following: ‘ACCPAYCREDIT’ or ‘ACCRECCREDIT’
The AddCreditNote function requires the parameter ‘Type’ to be passed one of the following strings:
ACCPAYCREDIT
ACCRECCREDIT
502: The current CreditNote is not ready for upload.
This error is returned when the current Credit Note has not had all required fields set with a valid value. Credit Notes require a ‘Type’ to be passed upon creation and a Contact to be added (using AddContact).
503: Can not add a Credit Note to a [endpoint].
This error is returned when trying to add a Credit Note to another object that does not allow a Credit Note as a field. Only Invoices allow Credit Notes to be added.
701: Parameter ‘FirstName’ is invalid.
The AddEmployee function requires the parameter ‘FirstName’ to not be empty and to consist of 255 characters or less.
701: Parameter ‘LastName’ is invalid.
The AddEmployee function requires the parameter ‘LastName’ to not be empty and to consist of 255 characters or less.
702: The current Employee is not ready for upload.
This error is returned when the current Employee has not had all required fields set with a valid value. Credit Notes require a ‘FirstName’ and ‘LastName’ to be passed upon creation.
703: Can not add an Employee to a [endpoint].
This error is returned when trying to add an Employee to another object.
801: Parameter ‘UserID’ is invalid.
The AddExpenseClaim function requires the parameter ‘UserID’ to not be empty.
801: Parameter ‘ReceiptID’ is invalid.
The AddExpenseClaim function requires the parameter ‘ReceiptID’ to not be empty.
802: The current ExpenseClaim is not ready for upload.
This error is returned when the current Expense Claim has not had all required fields set with a valid value. Expense Claims require a ‘UserID’ and ‘ReceiptID’ to be passed upon creation.
803: Can not add an ExpenseClaim to a [endpoint]
This error is returned when trying to add an Expense Claim to another object.
901: Parameter ‘Type’ must be one of the following: ‘ACCPAY’ or ‘ACCREC’
The AddInvoice function requires the parameter ‘Type’ to be passed one of the following strings:
ACCPAY
ACCREC
901: Parameter ‘Status’ must be one of the following: ‘DRAFT’, ‘SUBMITTED’, ‘AUTHORISED’, ‘DELETED’ or ‘VOIDED’
The AddInvoice function requires the parameter ‘Status’ to be passed one of the following strings:
DRAFT
SUBMITTED
AUTHORISED
DELETED
VOIDED
901: Parameter ‘Date’ must be set if status is not set to ‘DRAFT’.
The AddInvoice function requires the parameter ‘Date’ to not be empty if the parameter ‘Status’ is not set to ‘DRAFT’.
901: Parameter ‘DueDate’ must be set if status is not set to ‘DRAFT’.
The AddInvoice function requires the parameter ‘DueDate’ to not be empty if the parameter ‘Status’ is not set to ‘DRAFT’.
902: The current Invoice is not ready for upload.
This error is returned when the current Invoice has not had all required fields set with a valid value. Invoices require a ‘Type’ and ‘LastName’ to be passed upon creation, a Contact to be added (using AddContact) and at least 1 Line Item to be added (using AddLineItem). Also, if the ‘Status’ of the Invoice is set to anything other than ‘DRAFT’, then the ‘Date’ and ‘DueDate’ fields must also be set.
902: The current Purchase Order is not ready for upload.
This error is returned when the current Purchase Order has not had all required fields set with a valid value. Purchase Orders require a ‘ContactNumber’ to be passed upon creation and at least 1 Line Item to be added (using AddLineItem).
903: Can not add an Invoice to a [endpoint].
This error is returned when trying to add an Invoice to another object.
903: Can not add a Purchase Order to a [endpoint].
This error is returned when trying to add a Purchase Order to another object.
1001: Parameter ‘Code’ is invalid.
The AddItem function requires the parameter ‘Code’ to not be empty and to consist of 30 characters or less.
1002: The current Item is not ready for upload.
This error is returned when the current Item has not had all required fields set with a valid value. Items require a ‘Code’ to be passed upon creation.
1003: Can not add an Item to a [endpoint].
This error is returned when trying to add an Item to another object that does not allow an Item as a field.
1101: Parameters must not be empty.
The AddLineItem function requires all parameters (excluding Account Code) to not be empty.
1102: The current LineItem is not ready for upload.
This error is returned when the current Line Item has not had all required fields set with a valid value. Line Items require a ‘Description’, ‘Quantity’ and ‘UnitAmount’ to be passed upon creation.
1103: Can not add a LineItem to a [endpoint].
This error is returned when trying to add a Line Item to another object that does not allow a Line Item as a field. End points that allow Line Items to be added are Bank Transactions, Credit Notes, Invoices, Purchase Orders and Receipts.
1201: Parameter ‘Narration’ is invalid.
The AddManualJournal function requires the parameter ‘Narration’ to not be empty.
1202: The current ManualJournal is not ready for upload.
This error is returned when the current Manual Journal has not had all required fields set with a valid value. Manual Journals require a ‘Narration’ to be passed upon creation, and at least 1 Manual Journal Line to be added (using AddManualJournalLine).
1203: Can not add a ManualJournal to a [endpoint].
This error is returned when trying to add a Manual Journal to another object.
1401: Parameter ‘Amount’ is invalid.
The AddPayment function requires the parameter ‘Amount’ to not be empty and to be a numeric value.
1401: Parameter ‘Date’ is invalid.
The AddPayment function requires the parameter ‘Date’ to not be empty.
1401: Either ‘AccountID’ or ‘AccountCode’ needs to be set.
The AddPayment function requires one of the ‘AccountID’ or ‘AccountCode’ parameters to not be empty.
1401: Either ‘InvoiceID’, ‘InvoiceNumber’, ‘CreditNoteID’ or ‘CreditNoteNumber’ needs to be set.
The AddPayment function requires one of the ‘InvoiceID’, ‘InvoiceNumber’, ‘CreditNoteID’ or ‘CreditNoteNumber’ parameters to not be empty.
1402: The current Payment is not ready for upload.
This error is returned when the current Payment has not had all required fields set with a valid value. Payments require a ‘Date’ and Amount to be passed upon creation. Payments also require an Account to be added by setting either of the ‘AccountID’ or ‘AccountCode’ parameters upon creation. Also, Payments require either an Invoice to be added by setting either of the ‘InvoiceID’ or ‘InvoiceNumber’ parameters, or a Credit Note to be added by setting either of the ‘CreditNoteID’ or ‘CreditNoteNumber’ parameters. If adding a Payment to an Overpayment or Prepayment, ‘OverpaymentID’/’OverpaymentNumber’ or ‘PrepaymentID’/’PrepaymentNumber’ needs to be set via the AddOptionalField fuction.
1403: Can not add a Payment to a [endpoint].
This error is returned when trying to add a Payment to another object.
1501: Parameter ‘Date’ is invalid.
The AddReceipt function requires the parameter ‘Date’ to not be empty.
1501: Parameter ‘UserID’ is invalid.
The AddReceipt function requires the parameter ‘UserID’ to not be empty.
1502: The current Receipt is not ready for upload.
This error is returned when the current Receipt has not had all required fields set with a valid value. Receipts require a ‘Date’ and ‘UserID’ to be passed upon creation, a Contact to be added (using AddContact) and at least 1 Line Item to be added (using AddLineItem).
1503: Can not add a Receipt to a [endpoint].
This error is returned when trying to add a Receipt to another object.
1701: Parameter ‘Name’ is invalid.
The AddTaxRate function requires the parameter ‘Name’ to not be empty.
1702: The current TaxRate is not ready for upload.
This error is returned when the current Tax Rate has not had all required fields set with a valid value. Tax Rates require a ‘Name’ to be passed upon creation and at least 1 Tax Component to be added (using AddTaxComponent).
1703: Can not add a TaxRate to a [endpoint].
This error is returned when trying to add a Tax Rate to another object.
1901: Parameter ‘Code’ is invalid.
The AddAccount function requires the parameter ‘Code’ to not be empty.
1901: Parameter ‘Name’ is invalid.
The AddAccount function requires the parameter ‘Name’ to not be empty.
1901: Parameter ‘Type’ is invalid.
The AddAccount function requires the parameter ‘Type’ to not be empty.
1902: The current Account is not ready for upload.
This error is returned when the current Account has not had all required fields set with a valid value. Tax Rates require a ‘Code’, ‘Name’ and ‘Type’ to be passed upon creation.
1903: Can not add an Account to a [endpoint].
This error is returned when trying to add an Account to another object.
1904: Accounts can only be uploaded one at a time.
This error is returned when trying to upload more than one Account at a time.
2001: Parameter ‘FirstName’ is invalid.
The AddContactPerson function requires the parameter ‘FirstName’ to not be empty.
2001: Parameter ‘LastName’ is invalid.
The AddContactPerson function requires the parameter ‘FirstName’ to not be empty.
2003: Can not add an ContactPerson to a [endpoint].
This error is returned when trying to add a Contact Person to another object that does not allow a Contact Person as a field. Only Contacts allow Contact Persons to be added.
2101: Parameter ‘FromBankAccountCode’ is invalid.
The AddBankTransfer function requires the parameter ‘FromBankAccountCode’ to not be empty.
2101: Parameter ‘ToBankAccountCode’ is invalid.
The AddBankTransfer function requires the parameter ‘ToBankAccountCode’ to not be empty.
2101: Parameter ‘Amount’ is invalid.
The AddBankTransfer function requires the parameter ‘Amount’ to not be empty and to be a numeric value.
2102: The current BankTransfer is not ready for upload.
This error is returned when the current Bank Transfer has not had all required fields set with a valid value. Bank Transfers require a ‘FromBankAccountCode’, ‘ToBankAccountCode’ and ‘Amount’ to be passed upon creation.
2103: Can not add a BankTransfer to a [endpoint].
This error is returned when trying to add a Bank Transfer to another object.
2201: Parameter ‘ContactNumber’ is required for endpoint PurchaseOrders
The AddPurchaseOrder function requires the parameter ‘ContactNumber’ to not be empty.
3001: Invalid field name.
The AddOptionalField function requires the parameter ‘FieldName’ to not be empty.
3002: For the ‘Contacts’ end point, parameter ‘ContactStatus’ must be one of the following: ‘ACTIVE’ or ‘DELETED’
For the Contacts end point, if the parameter ‘FieldName’ is ‘ContactStatus’, the AddOptionalField function requires the parameter ‘FieldValue’ to be passed one of the following strings:
ACTIVE
DELETED
3002: For the ‘Employees’ end point, parameter ‘Status’ must be one of the following: ‘ACTIVE’ or ‘DELETED’
For the Employees end point, if the parameter ‘FieldName’ is ‘ContactStatus’, the AddOptionalField function requires the parameter ‘FieldValue’ to be passed one of the following strings:
ACTIVE
DELETED
3002: Field could not be added. Make sure the Field Name is valid and the Value is valid.
This error should only be returned if you have entered a Field Name that is not valid for the end point. In any other case, please contact us to report the error.
3003: An EndPoint object must be created before adding an optional field.
The AddOptionalField function should only be called after creating an object using the Add[objectname] functions.
3004: An unknown error occurred.
This should never occur! Please contact us to report the error.