this openbravo tutorial will share how to use openbravo web service. openbravo have standard web service object and can be used as API from 3rd party application. you may do CRUD (create retrieve update delete) operation using this out of the box web service object. alregistered entity inside openbravo can be accessed using standard web service object. you may refer to this wiki link for complete reference.if you using google chrome browser, you need to install postman extention. if you using mozila firefox, you need to install poster extention. in this tutorial, I will show you how to use openbravo web service using google chrome browser.
open postman in your chrome browser, and write address: http://localhost:8080/openbravo/ws/dal/Country you will get output like below:

based on screenshot above, you get all row inside Country object. please make note that you allowed to retrieve country list because your role allowed.
you can get all available entity using URL: http://localhost:8080/openbravo/ws/dal/

based on those output, you can seen there are entity called BusinessPartner, you can retrieve all business partner (supplier/customer) that authorized for you: http://localhost:8080/openbravo/ws/dal/BusinessPartner

now you have enough trial on accessing openbravo web service and get familiar with it. next, we will show how to determine what entity that match with your requirement. for instance, you need to retrieve a sales order that exist inside openbravo. first you need to know menu path that store desired entity. for sales order, menu path is application || sales management || transaction || sales order. login to Openbravo System Administrator, then load Menu window.

search Sales order menu item, then change to edit mode by double click founded record.

click link at window field, openbravo will open window definition of sales order window.

double click sub tab header

click link at table field, openbravo will open table definition of table that store sales order header tab.

now you see table definition that match with your requirement. based on screenshot above, now you know that entity that should be retrieved is Order. you can access web service for sales order: http://localhost:8080/openbravo/ws/dal/Order

however, order table not only store sales order, but also purchase order. Openbravo determine sales order using flag issotrx. if issotrx=Y than those record is sales order. then you need to filter your URL to retrive sales order only http://localhost:8080/openbravo/ws/dal/Order?salesTransaction=true

added parameter isSalesTransaction=Y is used to filter retireved entity, you may also filter it based on order date http://localhost:8080/openbravo/ws/dal/Order?salesTransaction=true?orderDate>=’2011-08-01&#8242;?orderDate<=2011-08-31′

eventually, if you know exact primary key for the record you want, you can access it using http://localhost:8080/openbravo/ws/dal/Order/00247EB519C941DDA87A7F5630421924 where 00247EB519C941DDA87A7F5630421924 sales order primary key


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s