Use the HTTP GET method to retrieve data from the application. This includes both lists and individual records. For example, you would use the GET method to retrieve a list of invoices made, or the contact details of a customer. API responses are returned in JSON format.
A GET on resource with id returns single resource.
A GET on a collection returns a list of all resources in that collection.
items
is the list of entities returned from the endpoint_links
is a list of navigable linkspage
is the paging metadata for this requestsize
is the page size of the current requesttotalElements
is total number of elements in the result settotalPages
is total number of pages in the result setnumber
is the page number of the current request
{
"items":[
...
{ ... },
{ ... },
{ ... }
...
],
"_links":[
{
"rel":"self",
"href":"{self_uri}"
}
],
"page":{
"size":1,
"totalElements":9,
"totalPages":9,
"number":2
}
}
You can control the number of results returned by specifying the page size
. The default page size is 400 results and the max page size is 1000 results.
You can also jump to a page by specifying the page
number.
Note the URI to the next and previous pages are returned in the _links
field (if applicable).
https://api.myob.com/au/essentials/businesses/19/contacts?page=2&size=10
You can filter results by adding the filter params to API calls where applicable. This option is used with the following syntax:
filterName=filter_value
Where filterName
is the endpoint filter param and filter_value
is the value to be filtered by.
Filter params will be documented where available on an endpoint.
https://api.myob.com/au/essentials/businesses/19/sale/invoices?invoiceNumber=INV00001
The Open Data Protocol (OData) is not supported in the Essentials API at this time.
Copyright © 2020 MYOB Technology Pty Ltd