Objetivo

Determinar os serviços que serão consumidos pelo aplicativo Meu Posto de Trabalho.

POST / rest / checkings / attendant

Request


{            
	"cAttendant": "matheus",              
	"cPswd": "matheus"
}

Exemplo: ...rest/CHECKINGS/attendant


POST / rest / checkings / MailForAttendant

Request


{            
	"cAttendant": "matheus",              
	"cBeginDate": "20191105",
  	"cEndDate": "20191105"
}

Exemplo: ...rest/CHECKINGS/MailForAttendant


GET / rest / checkings / getAppointments

Response


{
    "appointments": [
        {
            "data": "20180420",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "hrini": "08:00",
                    "hrfim": "12:00"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "hrini": "13:12",
                    "hrfim": "18:00"
                }
            ]
        },
        {
            "data": "20180423",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "hrini": "08:00",
                    "hrfim": "12:00"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "hrini": "13:12",
                    "hrfim": "18:00"
                }
            ]
        },
        {
            "data": "20180424",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "hrini": "08:00",
                    "hrfim": "12:00"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "hrini": "13:12",
                    "hrfim": "18:00"
                }
            ]
        },
        {
            "data": "20180425",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "hrini": "08:00",
                    "hrfim": "12:00"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "hrini": "13:12",
                    "hrfim": "18:00"
                }
            ]
        },
        {
            "data": "20180426",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "hrini": "08:00",
                    "hrfim": "12:00"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "hrini": "13:12",
                    "hrfim": "18:00"
                }
            ]
        }
    ],
    "count": 10
}

Exemplo: ... rest/CHECKINGS/getAppointments?cAttendant=matheus&cBeginDate=2018042&cEndDate=20180426


GET / rest / checkings / getAppointmentsbyScale

Response


{
    "appointments": [
        {
            "data": "20180426",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "08:00",
                    "inout": "1",
                    "executed": "2"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "12:00",
                    "inout": "2",
                    "executed": "2"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "13:12",
                    "inout": "1",
                    "executed": "2"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "18:00",
                    "inout": "2",
                    "executed": "2"
                }
            ]
        },
        {
            "data": "20180425",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "08:00",
                    "inout": "1",
                    "executed": "2"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "12:00",
                    "inout": "2",
                    "executed": "2"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "13:12",
                    "inout": "1",
                    "executed": "2"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "18:00",
                    "inout": "2",
                    "executed": "2"
                }
            ]
        },
        {
            "data": "20180424",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "08:00",
                    "inout": "1",
                    "executed": "2"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "12:00",
                    "inout": "2",
                    "executed": "2"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "13:12",
                    "inout": "1",
                    "executed": "2"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "18:00",
                    "inout": "2",
                    "executed": "2"
                }
            ]
        },
        {
            "data": "20180423",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "08:00",
                    "inout": "1",
                    "executed": "2"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "12:00",
                    "inout": "2",
                    "executed": "2"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "13:12",
                    "inout": "1",
                    "executed": "2"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "18:00",
                    "inout": "2",
                    "executed": "2"
                }
            ]
        },
        {
            "data": "20180420",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "08:00",
                    "inout": "1",
                    "executed": "2"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "12:00",
                    "inout": "2",
                    "executed": "2"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "13:12",
                    "inout": "1",
                    "executed": "2"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "18:00",
                    "inout": "2",
                    "executed": "2"
                }
            ]
        }
    ],
    "count": 20
}

Exemplo: ... /rest/CHECKINGS/getAppointmentsByScale?cAttendant=matheus&cBeginDate=2018042&cEndDate=20180426



GET / rest / checkings / getStationsbyDay

Response


{
    "stations": [
        {
            "id": "00000040",
            "requiredPhoto": "1",
            "station": "TOTVS MATRIZ"
        }
    ],
    "count": 1
}

Exemplo: .../rest/CHECKINGS/getStationsByDay?cAttendant=matheus&cDate=20180426


GET / rest / checkings / getHistoricCheckIns

Response


{
    "appointments": [
        {
            "data": "20180417",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "08:00",
                    "inout": "1"
                }
            ]
        },
        {
            "data": "20180416",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "08:00",
                    "inout": "1"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "12:00",
                    "inout": "2"
                }
            ]
        },
        {
            "data": "20180413",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "08:00",
                    "inout": "1"
                }
            ]
        },
        {
            "data": "20180411",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "08:00",
                    "inout": "1"
                }
            ]
        },
        {
            "data": "20180406",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "08:00",
                    "inout": "1"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "12:00",
                    "inout": "2"
                }
            ]
        },
        {
            "data": "20180404",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "08:00",
                    "inout": "1"
                }
            ]
        },
        {
            "data": "20180223",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "08:00",
                    "inout": "1"
                }
            ]
        },
        {
            "data": "20180219",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "08:00",
                    "inout": "1"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "12:00",
                    "inout": "2"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "13:12",
                    "inout": "1"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "18:00",
                    "inout": "2"
                }
            ]
        },
        {
            "data": "20180215",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "08:00",
                    "inout": "1"
                }
            ]
        },
        {
            "data": "20180214",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "08:00",
                    "inout": "1"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "12:00",
                    "inout": "2"
                }
            ]
        },
        {
            "data": "20180212",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "08:00",
                    "inout": "1"
                }
            ]
        },
        {
            "data": "20180206",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "08:00",
                    "inout": "1"
                }
            ]
        },
        {
            "data": "20180205",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "08:00",
                    "inout": "1"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "12:00",
                    "inout": "2"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "13:12",
                    "inout": "1"
                }
            ]
        },
        {
            "data": "20180124",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "08:00",
                    "inout": "1"
                }
            ]
        },
        {
            "data": "20180123",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "08:00",
                    "inout": "1"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "12:00",
                    "inout": "2"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "13:12",
                    "inout": "1"
                }
            ]
        },
        {
            "data": "20180122",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "08:00",
                    "inout": "1"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "13:12",
                    "inout": "1"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "18:00",
                    "inout": "2"
                }
            ]
        },
        {
            "data": "20180119",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "08:00",
                    "inout": "1"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "12:00",
                    "inout": "2"
                }
            ]
        },
        {
            "data": "20180115",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "08:00",
                    "inout": "1"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "12:00",
                    "inout": "2"
                }
            ]
        },
        {
            "data": "20180111",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "08:00",
                    "inout": "1"
                }
            ]
        },
        {
            "data": "20180105",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "08:00",
                    "inout": "1"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "12:00",
                    "inout": "2"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "13:12",
                    "inout": "1"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "18:00",
                    "inout": "2"
                }
            ]
        },
        {
            "data": "20180104",
            "stations": [
                {
                    "station": "POSTO - RUA VERGUEIRO, 2577 - VILA MARIANA",
                    "schedule": "08:00",
                    "inout": "1"
                },
                {
                    "station": "POSTO - RUA VERGUEIRO, 2577 - VILA MARIANA",
                    "schedule": "12:00",
                    "inout": "2"
                },
                {
                    "station": "POSTO - RUA VERGUEIRO, 2577 - VILA MARIANA",
                    "schedule": "13:12",
                    "inout": "1"
                },
                {
                    "station": "POSTO - RUA VERGUEIRO, 2577 - VILA MARIANA",
                    "schedule": "18:00",
                    "inout": "2"
                }
            ]
        },
        {
            "data": "20180103",
            "stations": [
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "08:00",
                    "inout": "1"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "12:00",
                    "inout": "2"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "13:12",
                    "inout": "1"
                },
                {
                    "station": "TOTVS MATRIZ",
                    "schedule": "18:00",
                    "inout": "2"
                }
            ]
        }
    ],
    "count": 45
}


Exemplo: ... rest/CHECKINGS/getHistoricCheckIns?cAttendant=matheus&cBeginDate=2018042&cEndDate=20180426


GET / rest / checkings / getSchedules

Response


{
    "schedules": [
        {
            "schedule": "08:00",
            "code": "000000005902"
        },
        {
            "schedule": "13:12",
            "code": "000000005903"
        }
    ],
    "count": 2
}

Exemplo: .../rest/CHECKINGS/getSchedules?cAttendant=matheus&cDate=20180426&cIdStation=00000040&cInOut=1


GET / rest / checkings / getCheckin

Response


{
    "checkin": [
        {
            "idschedule": "000000005902",
            "inout": "1",
            "schedule": "08:00"
        }
    ],
    "count": 1
}

Exemplo: ... /rest/CHECKINGS/getCheckIn?cAttendant=matheus&cDate=20180426&cIdStation=00000040


PUT / rest / checkings / putCheckin

Request


{
                "cIdSchedule": "00000040",
                "cInOut": "1",
                "cComments": "Check-in",
                "nLatitude": -23.5094222,
                "nLongitude": -46.6463977,
                "cRealTime": "08:00",
                "oSelfie": {"image": "imagem", "path": "path"},  
                "aImages": [{"image": "imagem", "path": "path"}]
}

Exemplo: ... rest/putCheckIn/