Contract-Based REST API of a Web Service Endpoint

MYOB Advanced provides you with the contract-based REST APIs of web service endpoints and with the contract-based REST API of an MYOB Advanced instance. The methods of a REST API are provided in a swagger.json file, which is an OpenAPI 2.0 (formerly known as Swagger 2.0) file. For more information about the OpenAPI specification, see https://www.openapis.org. You can use the swagger.json files to review the APIs of the instance and endpoints and build the client applications for MYOB Advanced based on these files.

You can retrieve the swagger.json file of a web service endpoint by clicking View Endpoint Service > OpenAPI 2.0 on the Web Service Endpoints (SM207060) form or by using the following URL.

http://<Base endpoint URL>/swagger.json

In this URL, <Base endpoint URL> is the URL of the contract-based endpoint through which you are going to work with MYOB Advanced. This URL has the following format.

http://<MYOB Advanced instance URL>/entity/<Endpoint name>/<Endpoint version>/

You can specify the company URL parameter to obtain information on the API of the endpoint available in a particular company. For example, suppose that you want to retrieve the API reference of the custom endpoint with the name MyEndpoint and Version 18.200.001 available in the MyCompany company from a local MYOB Advanced instance with the name AcumaticaDB. You would use the following URL to obtain the swagger.json file: http://localhost/AcumaticaDB/entity/MyEndpoint/18.200.001/swagger.json?company=MyCompany.

If no company is specified, the API of the endpoint available in the company to which the user is currently logged in is returned.