Skip to main content

How to Get Started with the Flexi API (2/6)

What program can I use to test a REST API?

Written by Petr Pech

For Flexi support, we recommend and conduct all testing in Postman. Let's take a look at how to work with it. It is available for free download at GetPostman, or it can be added as an extension to Google Chrome (we recommend the desktop application instead). Connecting Flexi with other software will be done via a custom script; however, for our testing purposes, Postman is sufficient.

For any operation, user authentication is required first — you can do this on the Auth tab. For testing purposes, Basic Auth type is sufficient.
If you want to use a specific user solely for access via REST API, we recommend using an "API user" — a more affordable option without access to the desktop application — see Pricing.

We support additional authentication methods — see our documentation: Authentication

We will now go through the Postman interface point by point on the Body tab.

1) Selecting the HTTP operation (GET, POST, PUT, DELETE, …)

  • Postman offers a wide range of supported operations; however, for working with Flexi, the 4 operations listed above are currently sufficient.

  • The meaning of these operations will be explained in the article HTTP Operations.

2) Field for entering the URL that Postman will work with

  • How to construct a URL will be explained in the article Building URLs.

3) Selecting the format in which data will be sent to the given URL

  • NOTE – the URL extension must match the format of the data being sent.

4) Selecting the form of the request being created (raw by default)

5) After sending a request to the given URL, the response will be displayed here

  • for a GET operation – Flexi's response in the requested format (XML/JSON)

  • for a POST, PUT, DELETE operation – Flexi's response with the result of the operation, e.g.:

¨

6) Request body

  • Body in XML/JSON format

  • Example:

  • Creates an issued invoice with the code "TESTFAKTURA", document type FAKTURA (standard invoice), issued on January 1, 2018, with variable symbol "20180101"

Did this answer your question?