I have an external application that calls zabbix API to check statuses.
There is no such thing as "status of the systems". If by "systems" you mean "hosts". In zabbix you have hosts that have monitored items. Items are constantly getting values that are saved into history. The data received passes triggers mechanisms that can raise alerts.
Now, what you mention that you see in dashboard is probably a mix of a host availability statuses and alerts. Let us call the whole picture you see in the dashboard "system health". To understand the system health you may want:
Check if there are any hosts with unavailable agent, that's it, hosts you monitor with zabbix agent installed and zabbix server can't reach the agent. To do that you can use host.get with filter on "available" property.
Check if there are any alerts, that's it, if you use alerts, this is the simplest way to get the red stuff from the dashboard. you can do that with alert.get. I've never used it, so check if you need any filters there to get active alerts.
Probably you can also check events coming from triggers using event.get but I've never used this method either.
What works for me and what you may be forced to do if you have agentless hosts without alerts in the system health, is checking specific items history. To do it you need to use history.get to get the values, usually last N values or values for the last N minutes, which you can analyze in your code. This approach probably moves the monitoring and alerting purpose from zabbix to your app leaving zabbix server to only to gather the data.
Just keep experimenting, but read how zabbix works and what the concepts are first. The knowledge of the platform will save you lots of time that you'd better invest in writing code.