Skip to main content

Is it possible to filter records by external IDs?

Written by Petr Pech

You can filter by an external identifier just like by any other field — the value must be provided including its prefix.


Filter

GET /c/{firma}/faktura-vydana/(id='ext:EXTERNI_ID').xml

Using a double equals sign (id=='ext:…') also works — both forms are equivalent.


Direct access

If you're after a single record, you don't need a filter — the external identifier can be used directly in the address:

GET /c/{firma}/faktura-vydana/ext:EXTERNI_ID.xml

ℹ️ For a non-internal identifier, the server responds with a redirect 301 to the address with the numeric ID, so the client must be able to follow redirects. A filter, on the other hand, returns a list directly — even an empty one, if nothing matches.

⚠️ The filter in the address must be encoded. Apostrophes are fine, but spaces and characters such as > need to be converted to %20 and %3E — otherwise you'll get an HTML page instead of data, see Error 400 when sending a URL.


Related

Did this answer your question?