Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

UI Expand
titleHow to Test an API Method

We recommend using In the next example, we use Postman to test API methods. Postman is a API Development Environment which can be used for free.. Other API Development Environment include Insomnia, SoapUI, curl, etc.


Within Komet, there are
three two basic types of request: POST and GET.


Instructions to test POST methods

UI Steps
sizesmall

POST methods are used to send data to a server to create/update a resource.

UI Step

Open the Postman App.


UI Step

Choose the request type (POST).


UI Step

Select the format. This can be selected from the Body Type. In this case, is JSON.


UI Step

Click on the Body tab. Check the raw option. The "Text" dropdown menu and select JSON (application/json).


UI Step

Enter the URL of the request and then proceed to enter the parameters.


UI Step

To enter the parameters, you can copy and paste the sample request. Click on Beautify so the format is corrected.


UI Step

Verify the parameters and once you have finished click on Send. The method should return the results, as it is shown on the documentation response sample.


Instructions to test GET methods


UI Steps
sizesmall

GET methods are used to request data from a specified resource.

UI Step

Open the Postman App.


UI Step

Choose the request type (GET).


UI Step

Enter the URL that correspond to the request.


UI Step

For GET methods, you must enter the URL params.



UI Step

Click on Params. Proceed to enter each input parameter required (e.g. authentication token). Once you have finished, click on Send.



Info
titleInformation

Some methods will require additional information on the header, such as X-SALES-CHANNEL, X-ACCOUNT. This information must be entered in the same way the input parameters are entered.



...