Listar turnos - getShift
POST https://api.service24gps.com/api/v1/onservice/getShift
Lista todos los turnos creados.
Ver parámetros de solicitud:
Parámetros | Descripción | Ejemplo |
---|---|---|
apikey | Llave de autorización para uso de los Servicios Web. | 25sdsd234234aa93sdsdsd37c70118e72 |
token | Token devuelto por el método getToken. | wfszR/oPIQKjt5HT5NgjDnZ2SAZQ== |
Solicitud de ejemplo:
curl --location --request POST 'api.service24gps.com/api/v1/onservice/getShift' \
--form 'apikey="25sdsd234234aa93sdsdsd37c70118e72"' \
--form 'token="wfszR/oPIQKjt5HT5NgjDnZ2SAZQ=="'
Respuesta de ejemplo:
{
"status": 200,
"data": [
{
"id": "1",
"name": "Turno 1",
"start_hour": "16:00:00",
"end_hour": "20:00:00",
"shifts": {
"lu": "0",
"ma": "0",
"mi": "0",
"ju": "1",
"vi": "1",
"sa": "1",
"do": "0"
},
"days": "Ju-Vi-Sa",
"schedule": "16:00 / 20:00"
},
{
"id": "2",
"name": "Turno 2",
"start_hour": "00:00:00",
"end_hour": "23:00:00",
"shifts": {
"lu": "1",
"ma": "1",
"mi": "1",
"ju": "1",
"vi": "1",
"sa": "1",
"do": "0"
},
"days": "Lu-Ma-Mi-Ju-Vi-Sa",
"schedule": "00:00 / 23:00"
},
{
"id": "4",
"name": "Turno 4",
"start_hour": "05:00:00",
"end_hour": "10:00:00",
"shifts": {
"lu": "0",
"ma": "0",
"mi": "0",
"ju": "1",
"vi": "1",
"sa": "0",
"do": "0"
},
"days": "Ju-Vi",
"schedule": "05:00 / 10:00"
},
{
"id": "21",
"name": "24 horas",
"start_hour": "08:00:00",
"end_hour": "08:00:00",
"shifts": {
"lu": "0",
"ma": "0",
"mi": "0",
"ju": "1",
"vi": "0",
"sa": "0",
"do": "0"
},
"days": "Ju",
"schedule": "08:00 / 08:00"
}
]
}
Ver campos de respuesta:
Campo |
Descripción |
Formato |
---|---|---|
id | Identificador único del turno. | Entero |
name | Nombre del turno. | Cadena de texto |
star_hour |
Inicio del turno. |
timestamp |
end_hour
|
Fin del turno. |
timestamp |
shifts |
Dias Seleccionados. |
JSON |
days |
Días. |
Cadena de texto |
schedule |
Rango de horas. |
Cadena de texto |