Topic: Session handling for module/add on

I am attempting to build a REST API for FA.  What is the easiest way to authenticate a user and initiate a database connection for a module/add on?  I would like to use as many FA functions and classes as possible (ex.  purch_order(), add_po(), etc.).  It would be great if someone could point me to an example.

Re: Session handling for module/add on

Hi civil777,

   I have share the FA REST API with the community. You can downloads it from https://frontaccounting.com/wbt/pages/d … se-2.3.php. The REST API already build in with user authentication and database connection. This REST API bundle with FA Mobile Edition for FREE. You should download it.

  If you need further function like Create Categories, Products, Account, Contacts, Purchase Order, Sales Order, Quotation, Sales Invoices, you can easily extend from the existing modules.

We do offer a ready build for some of the functions with some fees. The listing below are the functionalities that we have build in our FA REST API:

- get_record_by_module:
- get_all_account:
- get_account_by_id:
- get_all_contact:
- get_contact_by_account:
- get_contact_by_id:
- get_person_by_account:
- get_all_supplier:
- get_supplier_by_id:
- get_contact_by_supplier_id:
- get_supplier_contact_by_id:
- get_all_stock:
- get_stock_by_stock_id:
- get_price:
- get_all_stock_status:
- get_stock_status:
- get_all_purchase_order:
- get_purchase_order_by_order_no:
- get_purchase_order_item_details_by_order_no:
- get_purchase_order_item_details:
- get_all_sales_order: //order_no, trans_type
- get_sales_order_by_order_no://order_no, trans_type
- get_sales_order_item_details_by_order_no://order_no, trans_type
- get_sales_order_item_details:
- get_all_invoice: //trans_no, trans_type
- get_invoice_by_trans_no://trans_no, trans_type
- get_invoice_item_details_by_trans_no://order_no, trans_type
- get_invoice_item_details:
- get_sys_prefs:
- sync_currency:
- sync_price:
- sync_item_category:
- sync_item:
- sync_customer:
- sync_person:
- sync_supplier:
- sync_supplier_contact:
- sync_transaction:
- sync_purchase_order_transaction:

Cheers,

tclim

3 (edited by civil777 09/13/2011 04:07:56 pm)

Re: Session handling for module/add on

Thanks tclim.  It is not clear on the forums or in the FA downloads section that the "FA Mobile Edition" contains a REST API.  Hopefully someone wil label it more accurately. 

I took a look at what tclim created, and it is a very good start for a REST API.  I am going to develop it further by adding a few more functions.  If I get them working, I will let you guys know.  Thanks tclim for doing all the work to put together the REST API and making it available.

Re: Session handling for module/add on

Hi civil777,

    You are welcome. You can extend the API as you need. I agree that the Downloads section for "FA Mobile Edition" should be rename to "REST API & Mobile Edition".

  Hi Joe, please help to rename and make it clear for all developers who wish to get started with REST API. Thanks You.

Cheers,

tclim