In ABRA Flexi, it is possible to retrieve basic data from the application. In general, we distinguish between a list and a detail.
Records can also be listed using /query. If you are interested in the details and want to proceed this way, please refer to our other guide. A brief example can also be found at the end of this guide.
List
This is a listing of multiple records. It can be paginated, filtered, sorted, and you can define the level of detail. The output can be returned in multiple formats.
Detail
A detail always represents a single record, which can be identified in various ways and returned in multiple formats.
Retrieving multiple specific records
If you need to retrieve multiple specific records for which you know the identifier (typically an external ID), you have several options.
1. You can retrieve each record individually, as follows:
GET /c/firma/faktura-vydana/1
GET /c/firma/faktura-vydana/code:2
GET /c/firma/faktura-vydana/ext:SYS:3
Please note that in this example, the first response to the second and third requests will be a redirect to a URL containing the numeric ID. A new request must then be sent to that URL. HTTP client libraries typically support following redirects automatically, but this feature may need to be enabled explicitly.
2. You can use filtering, as follows:
GET /c/firma/faktura-vydana/(id in (1, 'code:2', 'ext:SYS:3'))
Please note that excessively long URLs can cause issues — both in web browsers and on various proxy servers.
3. You can use the bulk record retrieval feature by specifying IDs in an XML document.
POST /c/firma/faktura-vydana/get.xml
Content-Type: application/xml
<winstrom>
<id>1</id>
<id>code:2</id>
<id>ext:SYS:3</id>
</winstrom>
There is no URL length issue here, so this method can be used to retrieve several hundred or even thousands of records at once.
If a non-existent identifier is provided, it will be ignored. If the same identifier is specified more than once, or if multiple identifiers point to the same record, duplicates will appear in the output.
In addition to XML, JSON can also be used; in addition to POST, PUT is also supported:
PUT /c/firma/faktura-vydana/get.json
Content-Type: application/json
"winstrom": {
"id": [1, "code:2", "ext:SYS:3"]
}
}
Finally, it is worth mentioning again that records can also be retrieved from ABRA Flexi using the so-called /query endpoint, where the relevant parameters are sent in the request body.
Standard JSON call
Request body
{ "winstrom": { ... filtry, detail, parametry } }
For all available options and details, please refer to our comprehensive guide.
