api_v2/schedule/get_workload
API endpoint pentru extragerea numarlui total de ore pontate per ora la nivel de magazin(locatie) pentru un interval de timp.
Full url
https://app.iflow.ro/api/api_v2/schedule/get_workload
CURL request
Method: POST
curl -X POST -H "Authorization: Bearer {ACCES TOKEN}" -d "start_date={VALUE}&end_date={VALUE}&team_name={VALUE}" https://app.iflow.ro/api/api_v2/schedule/get_workload
Parametrii:
Access token
API access tokenul este generat din aplicatia Iflow, cu etichetă și atribuit unui administrator din cadrul companiei.
Start date
"start_date" stabileste data de inceput a intervalului de timp pentru care sunt extrase datele.
End date
"end_date" stabileste data de sfarsit a intervalului de timp pentru care sunt extrase datele.
Team Name
"team_name" reprezinta numele magazinului(locatiei) pentru care sunt extrase datele. Numele magazinelor se regasesc in lista cu structura locatiilor.
Raspuns:
raspuns Ok:
Daca totul este in regula, API ul va raspunde cu o lista care contine un total de minute planificate pentru fiecare bucket si pentru fiecare zi din intervalul selectat.
{ "2025-05-01": { "00:00": 0, "01:00": 0, "02:00": 0, "03:00": 0, "04:00": 0, "05:00": 0, "06:00": 0, "07:00": 0, "08:00": 0, "09:00": 0, "10:00": 0, "11:00": 0, "12:00": 0, "13:00": 0, "14:00": 0, "15:00": 0, "16:00": 0, "17:00": 0, "18:00": 0, "19:00": 0, "20:00": 0, "21:00": 0, "22:00": 0, "23:00": 0 }, "2025-05-02": { "00:00": 0, "01:00": 0, "02:00": 0, "03:00": 0, "04:00": 0, "05:00": 0, "06:00": 0, "07:00": 0, "08:00": 120, "09:00": 120, "10:00": 120, "11:00": 120, "12:00": 60, "13:00": 120, "14:00": 120, "15:00": 120, "16:00": 60, "17:00": 0, "18:00": 0, "19:00": 0, "20:00": 0, "21:00": 0, "22:00": 0, "23:00": 0 }, ... ... ... ... "2025-05-30": { "00:00": 0, "01:00": 0, "02:00": 0, "03:00": 0, "04:00": 0, "05:00": 0, "06:00": 0, "07:00": 0, "08:00": 120, "09:00": 120, "10:00": 120, "11:00": 120, "12:00": 60, "13:00": 120, "14:00": 120, "15:00": 120, "16:00": 60, "17:00": 0, "18:00": 0, "19:00": 0, "20:00": 0, "21:00": 0, "22:00": 0, "23:00": 0 }, "2025-05-31": { "00:00": 0, "01:00": 0, "02:00": 0, "03:00": 0, "04:00": 0, "05:00": 0, "06:00": 0, "07:00": 0, "08:00": 0, "09:00": 0, "10:00": 0, "11:00": 0, "12:00": 0, "13:00": 0, "14:00": 0, "15:00": 0, "16:00": 0, "17:00": 0, "18:00": 0, "19:00": 0, "20:00": 0, "21:00": 0, "22:00": 0, "23:00": 0 } }
Exemple de erori pe care le puteți primi:
Răspuns de eroare:
{ "error": "Invalid API Key!" }
{ "error": "Start/End date not set." }
{ "error": "Invalid start/end date: 2022-10-112, correct format is yyyy-mm-dd, ex: 2022-10-25" }
{ "error": "The start/end date interval may not exceed one year(365 days). Limit exceeded by: 7 days." }
{ "error": "Team name not set." }
{ "error": "Invalid team name. The team name: `Nume Magazin` was not found." }