curl --request GET \
--url https://api.ugps.io/api/driving-shifts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ugps.io/api/driving-shifts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ugps.io/api/driving-shifts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ugps.io/api/driving-shifts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ugps.io/api/driving-shifts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ugps.io/api/driving-shifts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ugps.io/api/driving-shifts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"items": [
{
"id": "6733a1f2c4b5d6e7f8a9b0c1",
"driverId": "6733a1f2c4b5d6e7f8a9b0c3",
"assetId": "6733a1f2c4b5d6e7f8a9b0c2",
"status": "open",
"driver": {
"name": "Ana Pérez",
"rut": "12.345.678-5"
},
"asset": {
"name": "Camión 1",
"plate": "ABCD12"
},
"start": {
"at": "2023-11-07T05:31:56Z",
"suspiciousReasons": [
"no_phone_location"
],
"location": {
"latitude": -33.4489,
"longitude": -70.6693,
"accuracyMeters": 12,
"mocked": true
},
"tracker": {
"latitude": -33.4491,
"longitude": -70.669,
"at": "2023-11-07T05:31:56Z"
},
"distanceMeters": 42.5,
"address": "Av. Libertador Bernardo O'Higgins 1234, Santiago"
},
"end": {
"at": "2023-11-07T05:31:56Z",
"suspiciousReasons": [
"no_phone_location"
],
"reason": "ended",
"location": {
"latitude": -33.4489,
"longitude": -70.6693,
"accuracyMeters": 12,
"mocked": true
},
"tracker": {
"latitude": -33.4491,
"longitude": -70.669,
"at": "2023-11-07T05:31:56Z"
},
"distanceMeters": 42.5,
"address": "Av. Libertador Bernardo O'Higgins 1234, Santiago"
}
}
],
"total": 1,
"page": 1,
"pageSize": 25
}
}{
"error": "El email es requerido"
}{
"error": "Token inválido o expirado"
}{
"error": "No tiene permisos para realizar esta acción"
}{
"message": "Error interno del servidor"
}Listar turnos de conducción
Grilla «Turnos» de la web (#3986): los turnos de la empresa, del inicio más reciente al más
viejo, paginados y acotados a los activos permitidos del usuario. Conductor, RUT y activo
salen del snapshot del inicio. El rango filtra por el inicio del turno y va en instantes
ISO 8601 con zona (la web manda los bordes del día en la zona del usuario); los turnos
olvidados que empezaron antes se encuentran con status=open. Un activo fuera del alcance
del usuario devuelve una página vacía.
Permisos requeridos: access_driving_shifts (la restricción «Turnos» lo quita)
curl --request GET \
--url https://api.ugps.io/api/driving-shifts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ugps.io/api/driving-shifts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ugps.io/api/driving-shifts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ugps.io/api/driving-shifts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ugps.io/api/driving-shifts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ugps.io/api/driving-shifts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ugps.io/api/driving-shifts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"items": [
{
"id": "6733a1f2c4b5d6e7f8a9b0c1",
"driverId": "6733a1f2c4b5d6e7f8a9b0c3",
"assetId": "6733a1f2c4b5d6e7f8a9b0c2",
"status": "open",
"driver": {
"name": "Ana Pérez",
"rut": "12.345.678-5"
},
"asset": {
"name": "Camión 1",
"plate": "ABCD12"
},
"start": {
"at": "2023-11-07T05:31:56Z",
"suspiciousReasons": [
"no_phone_location"
],
"location": {
"latitude": -33.4489,
"longitude": -70.6693,
"accuracyMeters": 12,
"mocked": true
},
"tracker": {
"latitude": -33.4491,
"longitude": -70.669,
"at": "2023-11-07T05:31:56Z"
},
"distanceMeters": 42.5,
"address": "Av. Libertador Bernardo O'Higgins 1234, Santiago"
},
"end": {
"at": "2023-11-07T05:31:56Z",
"suspiciousReasons": [
"no_phone_location"
],
"reason": "ended",
"location": {
"latitude": -33.4489,
"longitude": -70.6693,
"accuracyMeters": 12,
"mocked": true
},
"tracker": {
"latitude": -33.4491,
"longitude": -70.669,
"at": "2023-11-07T05:31:56Z"
},
"distanceMeters": 42.5,
"address": "Av. Libertador Bernardo O'Higgins 1234, Santiago"
}
}
],
"total": 1,
"page": 1,
"pageSize": 25
}
}{
"error": "El email es requerido"
}{
"error": "Token inválido o expirado"
}{
"error": "No tiene permisos para realizar esta acción"
}{
"message": "Error interno del servidor"
}Authorizations
Token de sesión Better Auth o API token (atk_...) en el header Authorization: Bearer <token>. Los JWT legacy ya no son válidos.
Query Parameters
open, closed Inicio del rango (incluido), con zona horaria.
"2026-11-12T00:00:00.000-03:00"
Fin del rango (incluido), con zona horaria. No puede ser anterior a from.
"2026-11-12T23:59:59.999-03:00"
x >= 11 <= x <= 100
