With the POST method, you supply a URL to request data from MiX Integrate and you also need to supply additional information in the “Request Body”. This method can be used to retrieve data (with additional filters), but also to send data to, for example, add an asset or driver to an organization.
Example endpoint in Swagger:
- Click on the endpoint to expand and see what the endpoint expects (note the required text fields):
In this example, the “eventFilter” is a required parameter, and you will use its body example (as highlighted in red to the right) and copy it to Postman to use in the “Request Body” section. The quantity needs to be specified in the path, thus you will specify this in the URL. The “cachedSince” parameter is not required. Note that you must complete the authorization within Postman and make sure the token is stored in the request header.
- Change the method type to POST.
- Supply the relevant URL and complete the “request body” to be able to execute the endpoint.
- In this example, the “EntityIds” section in the body refers to the AssetId(s), the “EventTypeIds” is optional (see the description next to eventFilter), so you can remove it if you want ALL event types to be returned or keep it filtered by specific event types. The "MenuId" field relates to terminal data events and can be ignored (or removed).
- If you have entered everything the endpoint requires, click the blue send button to execute the request:
The POST method can also be used to add resources to MiX Fleet Manager such as (but not limited to) assets and drivers.
See the example below an asset will be added by supplying the POST method with a URL and message body (the properties of the new asset which need to be defined).
Example method in Swagger:
- Click on the endpoint to expand and see what the endpoint expects:
- In Postman, change the method type to POST.
- Complete the URL and supply the method with the request body (you may only completed the required fields).
- Note that nothing will be indicated in the Response Body, but the status indicates that the asset has been created and added to MiX Fleet Manager: