Obtener datos relacionados del GPS para eliminación
curl --request GET \
--url https://api.raul.ugps.io/api/v1/gps/related-data/{gps_details_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.raul.ugps.io/api/v1/gps/related-data/{gps_details_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.raul.ugps.io/api/v1/gps/related-data/{gps_details_id}', 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.raul.ugps.io/api/v1/gps/related-data/{gps_details_id}",
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.raul.ugps.io/api/v1/gps/related-data/{gps_details_id}"
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.raul.ugps.io/api/v1/gps/related-data/{gps_details_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raul.ugps.io/api/v1/gps/related-data/{gps_details_id}")
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{
"gps_details_id": "<string>",
"gps_name": {},
"imei": {},
"subscriptions": [
{
"subscription_detail_id": "<string>",
"subscription_id": {},
"client_name": {},
"asset_name": {},
"plan_name": {},
"status": {}
}
],
"visits": [
{
"visit_detail_id": "<string>",
"visit_date": {},
"technician_name": {},
"visit_type_name": {},
"visit_status_name": {}
}
],
"history_count": 123,
"can_delete": true,
"deletion_blocked_reason": {}
}GPS Details
Obtener datos relacionados del GPS para eliminación
Retorna suscripciones, visitas e historial asociados al GPS para mostrar antes de eliminar
GET
/
api
/
v1
/
gps
/
related-data
/
{gps_details_id}
Obtener datos relacionados del GPS para eliminación
curl --request GET \
--url https://api.raul.ugps.io/api/v1/gps/related-data/{gps_details_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.raul.ugps.io/api/v1/gps/related-data/{gps_details_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.raul.ugps.io/api/v1/gps/related-data/{gps_details_id}', 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.raul.ugps.io/api/v1/gps/related-data/{gps_details_id}",
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.raul.ugps.io/api/v1/gps/related-data/{gps_details_id}"
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.raul.ugps.io/api/v1/gps/related-data/{gps_details_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raul.ugps.io/api/v1/gps/related-data/{gps_details_id}")
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{
"gps_details_id": "<string>",
"gps_name": {},
"imei": {},
"subscriptions": [
{
"subscription_detail_id": "<string>",
"subscription_id": {},
"client_name": {},
"asset_name": {},
"plan_name": {},
"status": {}
}
],
"visits": [
{
"visit_detail_id": "<string>",
"visit_date": {},
"technician_name": {},
"visit_type_name": {},
"visit_status_name": {}
}
],
"history_count": 123,
"can_delete": true,
"deletion_blocked_reason": {}
}Authorizations
Bearer token authentication
Path Parameters
ID del GPS (UUID)
Response
Datos relacionados obtenidos exitosamente
ID del GPS
Nombre del GPS
IMEI del GPS
Suscripciones asociadas al GPS
Show child attributes
Show child attributes
Visitas asociadas al GPS (últimas 10)
Show child attributes
Show child attributes
Cantidad de registros en historial
Indica si el GPS puede ser eliminado
Razón por la cual no se puede eliminar