Skip to main content
POST
/
api
/
v1
/
gps_models
/
create
Crear un nuevo modelo de GPS
curl --request POST \
  --url https://api.raul.ugps.io/api/v1/gps_models/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "gps_model_name": "<string>",
  "brand_id": 123,
  "category_id": 123,
  "purchase_price": 123,
  "sale_price": 123,
  "installation_cost": 123,
  "installation_cost_venta": 123,
  "installation_cost_comodato": 123,
  "monthly_rental": 123,
  "monthly_platform": 123,
  "monthly_service": 123,
  "tech_sheet_url": "<string>",
  "internal_notes": "<string>",
  "currency_id": 123,
  "is_active": true,
  "accessory_ids": [
    123
  ]
}
'
import requests

url = "https://api.raul.ugps.io/api/v1/gps_models/create"

payload = {
"gps_model_name": "<string>",
"brand_id": 123,
"category_id": 123,
"purchase_price": 123,
"sale_price": 123,
"installation_cost": 123,
"installation_cost_venta": 123,
"installation_cost_comodato": 123,
"monthly_rental": 123,
"monthly_platform": 123,
"monthly_service": 123,
"tech_sheet_url": "<string>",
"internal_notes": "<string>",
"currency_id": 123,
"is_active": True,
"accessory_ids": [123]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
gps_model_name: '<string>',
brand_id: 123,
category_id: 123,
purchase_price: 123,
sale_price: 123,
installation_cost: 123,
installation_cost_venta: 123,
installation_cost_comodato: 123,
monthly_rental: 123,
monthly_platform: 123,
monthly_service: 123,
tech_sheet_url: '<string>',
internal_notes: '<string>',
currency_id: 123,
is_active: true,
accessory_ids: [123]
})
};

fetch('https://api.raul.ugps.io/api/v1/gps_models/create', 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_models/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'gps_model_name' => '<string>',
'brand_id' => 123,
'category_id' => 123,
'purchase_price' => 123,
'sale_price' => 123,
'installation_cost' => 123,
'installation_cost_venta' => 123,
'installation_cost_comodato' => 123,
'monthly_rental' => 123,
'monthly_platform' => 123,
'monthly_service' => 123,
'tech_sheet_url' => '<string>',
'internal_notes' => '<string>',
'currency_id' => 123,
'is_active' => true,
'accessory_ids' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.raul.ugps.io/api/v1/gps_models/create"

payload := strings.NewReader("{\n \"gps_model_name\": \"<string>\",\n \"brand_id\": 123,\n \"category_id\": 123,\n \"purchase_price\": 123,\n \"sale_price\": 123,\n \"installation_cost\": 123,\n \"installation_cost_venta\": 123,\n \"installation_cost_comodato\": 123,\n \"monthly_rental\": 123,\n \"monthly_platform\": 123,\n \"monthly_service\": 123,\n \"tech_sheet_url\": \"<string>\",\n \"internal_notes\": \"<string>\",\n \"currency_id\": 123,\n \"is_active\": true,\n \"accessory_ids\": [\n 123\n ]\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.raul.ugps.io/api/v1/gps_models/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"gps_model_name\": \"<string>\",\n \"brand_id\": 123,\n \"category_id\": 123,\n \"purchase_price\": 123,\n \"sale_price\": 123,\n \"installation_cost\": 123,\n \"installation_cost_venta\": 123,\n \"installation_cost_comodato\": 123,\n \"monthly_rental\": 123,\n \"monthly_platform\": 123,\n \"monthly_service\": 123,\n \"tech_sheet_url\": \"<string>\",\n \"internal_notes\": \"<string>\",\n \"currency_id\": 123,\n \"is_active\": true,\n \"accessory_ids\": [\n 123\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.raul.ugps.io/api/v1/gps_models/create")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"gps_model_name\": \"<string>\",\n \"brand_id\": 123,\n \"category_id\": 123,\n \"purchase_price\": 123,\n \"sale_price\": 123,\n \"installation_cost\": 123,\n \"installation_cost_venta\": 123,\n \"installation_cost_comodato\": 123,\n \"monthly_rental\": 123,\n \"monthly_platform\": 123,\n \"monthly_service\": 123,\n \"tech_sheet_url\": \"<string>\",\n \"internal_notes\": \"<string>\",\n \"currency_id\": 123,\n \"is_active\": true,\n \"accessory_ids\": [\n 123\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "message": "<string>",
  "status": 123
}

Authorizations

Authorization
string
header
required

Bearer token authentication

Body

application/json
gps_model_name
string
required

Nombre del modelo de GPS

brand_id
number

ID de la marca

category_id
number

ID de la categoría

purchase_price
number

Precio de compra (UF)

sale_price
number

Precio de venta (UF)

installation_cost
number

Costo de instalación (UF) - DEPRECADO, usar installation_cost_venta/comodato

installation_cost_venta
number

Costo instalación modalidad VENTA (UF)

installation_cost_comodato
number

Costo instalación modalidad COMODATO (UF)

monthly_rental
number

Arriendo mensual (UF)

monthly_platform
number

Plataforma mensual (UF)

monthly_service
number

Servicio mensual (UF)

tech_sheet_url
string

URL de ficha técnica

internal_notes
string

Notas internas

currency_id
number

ID de moneda

is_active
boolean

Estado activo

accessory_ids
number[]

IDs de accesorios compatibles

Response

201 - application/json

Modelo creado exitosamente

message
string
required

Mensaje de respuesta

status
number

Código de estado