Skip to main content
PATCH
/
api
/
v1
/
quoter
/
devices
/
{id}
Update a GPS device
curl --request PATCH \
  --url https://api.raul.ugps.io/api/v1/quoter/devices/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "gps_model_name": "<string>",
  "brand_id": 123,
  "category_id": 123,
  "sale_price": 123,
  "installation_cost": 123,
  "installation_cost_venta": 123,
  "installation_cost_comodato": 123,
  "monthly_rental": 123,
  "monthly_service": 123,
  "monthly_platform": 123,
  "internal_notes": "<string>",
  "images": [
    "<string>"
  ],
  "datasheets": [
    "<string>"
  ],
  "is_legacy": true
}
'
import requests

url = "https://api.raul.ugps.io/api/v1/quoter/devices/{id}"

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

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

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

fetch('https://api.raul.ugps.io/api/v1/quoter/devices/{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/quoter/devices/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'gps_model_name' => '<string>',
'brand_id' => 123,
'category_id' => 123,
'sale_price' => 123,
'installation_cost' => 123,
'installation_cost_venta' => 123,
'installation_cost_comodato' => 123,
'monthly_rental' => 123,
'monthly_service' => 123,
'monthly_platform' => 123,
'internal_notes' => '<string>',
'images' => [
'<string>'
],
'datasheets' => [
'<string>'
],
'is_legacy' => true
]),
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/quoter/devices/{id}"

payload := strings.NewReader("{\n \"gps_model_name\": \"<string>\",\n \"brand_id\": 123,\n \"category_id\": 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_service\": 123,\n \"monthly_platform\": 123,\n \"internal_notes\": \"<string>\",\n \"images\": [\n \"<string>\"\n ],\n \"datasheets\": [\n \"<string>\"\n ],\n \"is_legacy\": true\n}")

req, _ := http.NewRequest("PATCH", 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.patch("https://api.raul.ugps.io/api/v1/quoter/devices/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"gps_model_name\": \"<string>\",\n \"brand_id\": 123,\n \"category_id\": 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_service\": 123,\n \"monthly_platform\": 123,\n \"internal_notes\": \"<string>\",\n \"images\": [\n \"<string>\"\n ],\n \"datasheets\": [\n \"<string>\"\n ],\n \"is_legacy\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.raul.ugps.io/api/v1/quoter/devices/{id}")

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

request = Net::HTTP::Patch.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 \"sale_price\": 123,\n \"installation_cost\": 123,\n \"installation_cost_venta\": 123,\n \"installation_cost_comodato\": 123,\n \"monthly_rental\": 123,\n \"monthly_service\": 123,\n \"monthly_platform\": 123,\n \"internal_notes\": \"<string>\",\n \"images\": [\n \"<string>\"\n ],\n \"datasheets\": [\n \"<string>\"\n ],\n \"is_legacy\": true\n}"

response = http.request(request)
puts response.read_body

Authorizations

Authorization
string
header
required

Bearer token authentication

Path Parameters

id
number
required

Body

application/json
gps_model_name
string

Device model name

brand_id
number

Brand ID

category_id
number

Category ID

sale_price
number

Sale price

installation_cost
number

Installation cost

installation_cost_venta
number

Installation cost for SALE modality

installation_cost_comodato
number

Installation cost for COMODATO modality

monthly_rental
number

Monthly rental

monthly_service
number

Monthly service

monthly_platform
number

Monthly platform

internal_notes
string

Internal notes

images
string[]

Image URLs array

datasheets
string[]

Datasheet URLs array

is_legacy
boolean

Legacy flag

Response

Device updated successfully