Date Updated: November 14th 2014
Use the HTTP GET method to retrieve data from the database. This includes both lists and individual records. For example, you would use the GET method to retrieve a list of sales made in a particular month, or the contact details of a customer. By default, successful API responses are returned in JSON format.
A GET on resource with id returns single resource.
A GET on a collection returns a list or all resources in that collection.
On some endpoints you can search using EXO's inbuilt searching patterns.
To search, add the search query to the endpoint being called using the format {URI}/{endpoint}/search?q={query}
Requests that return multiple items will be paginated to 10 items by default. You can jump to a page using the page
parameter. In this case, the URIs for the next and previous pages are returned in the header.
https://exo.api.myob.com/debtor?page=7
Note: Page numbering is 1-based. Omitting this parameter returns the first page.
You can customise the page size using the pagesize
parameter, up to a maximum of 100:
https://exo.api.myob.com/debtor?pagesize=25
Many objects contain the ID of another object in their response properties. Those objects can be expanded inline with the $expand
request parameter.
https://exo.api.myob.com/contact/1?$expand
This parameter is available on all API requests and applies to the response of that request only.
Note: PUT and POST works with both expanded and non-expanded subobjects.
You can filter results by adding the $filter
option to API calls. This option is used with the following syntax:
$filter=Attribute operator value
Where Attribute
is the endpoint attribute to filter by and operator
is one of the supported operators:
The and
and or
operators can be used to build a filter string that contains multiple filtering conditions:
https://exo.api.myob.com/debtor?$filter=Active eq true and Balance gt 0
Filtering is available for the following endpoints and attributes:
Note: Make sure to filter by API attribute names, not by the corresponding fields in the EXO Business database.
Although out-of-the-box filtering in EXO API is only supported for limited attributes, you can use a workaround to filter on the other attributes available against a specific endpoint. Three rules apply:
Below are a few examples of how you would filter on the last_updated field in stockitem, debtor and salesorder endpoints:
Endpoint | Alias | Sample request |
---|---|---|
stockitem | S | https://exo.api.myob.com/stockitem?$filter=s.last_updated+ge+'2016-01-01' |
debtor | A | https://exo.api.myob.com/debtor?$filter=a.last_updated+ge+'2016-01-01' |
salesorder | H | https://exo.api.myob.com/salesorder?$filter=h.last_updated+ge+'2016-01-01' |
prospect | P | https://exo.api.myob.com/prospect?$filter=p.last_updated+ge+'2016-01-01' |
company | C | https://exo.api.myob.com/company?$filter=c.last_updated+ge+'2016-01-01' |
contact | C | https://exo.api.myob.com/contact?$filter=c.last_updated+ge+'2016-01-01' |
You can order results by adding the $orderby
option to API calls. This option is used with the following syntax:
$orderby=Attribute {direction}
Where Attribute
is the endpoint attribute to order results by and direction
is either asc
or desc
to specify ascending or descending order. If no direction is specified, the ordering defaults to ascending.
Multiple attributes can be specified, separated by commas—the returned results will be ordered by the first attribute specified, then by the second and so on. For example:
https://exo.api.myob.com/salesorder?$orderby=Status asc, Id asc
Ordering is available for the following endpoints and attributes:
The Open Data Protocol (OData) is not supported in the EXO API at this time. However, because MYOB Exo Business runs as a SQL Server database, if your aim was to use OData for reporting, we would generally recommend a direct SQL connection instead. Schema references are available on the Exo Business Education Centre.