Working API is mandatory for all the functionality of the mobile app. We are pulling data to present in your app from your store via the API. In this section we use a 3rd party API call maker to see if it returns a valid response.

In this tutorial, we use a free API tester named Postman. Please download it here,

https://www.getpostman.com

See https://www.getpostman.com/docs/introduction to learn how to install and setup Postman.

Import the Postman test project

  1. Once you successfully installed the Postman app, you can import the i2CSMobile_API_FullTest.json
  2. Import environments (i2CSMobile_API_Environment.json), and change the url value to your OpenCart instance. See https://www.getpostman.com/docs/environments to learn how to set environment variables.
  3. Run the test collection to see what API methods needs to be fixed
  4. Ideally you should get 100% pass rate. Otherwise there can be faild test cases depending on the data. For example, one test case might fail if your store doesn’t support Cash on delivery payment. But if you are getting a 200 OK status code for all the tests, you are too good to go ahead with i2CSMobile.

Common issues

  1. I'm getting "No route was found matching the URL and request method"

Please check if your plugin is correctly installed and is activated. And also double check the url is correct in the POSTMAN environment.

Did this answer your question?