Update a visit cost
curl --request PUT \
--url https://api.raul.ugps.io/api/v1/visit_cost/{visitDetailId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"technician_cost": 123,
"cost_per_km_technician": 123,
"km_traveled": 123,
"tolls": 123,
"cost_km_per_km_traveled": 123,
"additional_cost": 123,
"cost_type_id": 123,
"technician_cost_status": true,
"client_cost_status": true,
"client_cost": 123,
"cost_per_km_client": 123,
"km_traveled_client": 123,
"client_currency": 123,
"technician_currency": 123,
"technician_payed": true
}
'import requests
url = "https://api.raul.ugps.io/api/v1/visit_cost/{visitDetailId}"
payload = {
"technician_cost": 123,
"cost_per_km_technician": 123,
"km_traveled": 123,
"tolls": 123,
"cost_km_per_km_traveled": 123,
"additional_cost": 123,
"cost_type_id": 123,
"technician_cost_status": True,
"client_cost_status": True,
"client_cost": 123,
"cost_per_km_client": 123,
"km_traveled_client": 123,
"client_currency": 123,
"technician_currency": 123,
"technician_payed": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
technician_cost: 123,
cost_per_km_technician: 123,
km_traveled: 123,
tolls: 123,
cost_km_per_km_traveled: 123,
additional_cost: 123,
cost_type_id: 123,
technician_cost_status: true,
client_cost_status: true,
client_cost: 123,
cost_per_km_client: 123,
km_traveled_client: 123,
client_currency: 123,
technician_currency: 123,
technician_payed: true
})
};
fetch('https://api.raul.ugps.io/api/v1/visit_cost/{visitDetailId}', 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/visit_cost/{visitDetailId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'technician_cost' => 123,
'cost_per_km_technician' => 123,
'km_traveled' => 123,
'tolls' => 123,
'cost_km_per_km_traveled' => 123,
'additional_cost' => 123,
'cost_type_id' => 123,
'technician_cost_status' => true,
'client_cost_status' => true,
'client_cost' => 123,
'cost_per_km_client' => 123,
'km_traveled_client' => 123,
'client_currency' => 123,
'technician_currency' => 123,
'technician_payed' => 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/visit_cost/{visitDetailId}"
payload := strings.NewReader("{\n \"technician_cost\": 123,\n \"cost_per_km_technician\": 123,\n \"km_traveled\": 123,\n \"tolls\": 123,\n \"cost_km_per_km_traveled\": 123,\n \"additional_cost\": 123,\n \"cost_type_id\": 123,\n \"technician_cost_status\": true,\n \"client_cost_status\": true,\n \"client_cost\": 123,\n \"cost_per_km_client\": 123,\n \"km_traveled_client\": 123,\n \"client_currency\": 123,\n \"technician_currency\": 123,\n \"technician_payed\": true\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.raul.ugps.io/api/v1/visit_cost/{visitDetailId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"technician_cost\": 123,\n \"cost_per_km_technician\": 123,\n \"km_traveled\": 123,\n \"tolls\": 123,\n \"cost_km_per_km_traveled\": 123,\n \"additional_cost\": 123,\n \"cost_type_id\": 123,\n \"technician_cost_status\": true,\n \"client_cost_status\": true,\n \"client_cost\": 123,\n \"cost_per_km_client\": 123,\n \"km_traveled_client\": 123,\n \"client_currency\": 123,\n \"technician_currency\": 123,\n \"technician_payed\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raul.ugps.io/api/v1/visit_cost/{visitDetailId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"technician_cost\": 123,\n \"cost_per_km_technician\": 123,\n \"km_traveled\": 123,\n \"tolls\": 123,\n \"cost_km_per_km_traveled\": 123,\n \"additional_cost\": 123,\n \"cost_type_id\": 123,\n \"technician_cost_status\": true,\n \"client_cost_status\": true,\n \"client_cost\": 123,\n \"cost_per_km_client\": 123,\n \"km_traveled_client\": 123,\n \"client_currency\": 123,\n \"technician_currency\": 123,\n \"technician_payed\": true\n}"
response = http.request(request)
puts response.read_body{
"visit_cost_id": 123,
"visit_detail_id": "<string>",
"technician_cost": {},
"cost_per_km_technician": {},
"km_traveled": {},
"tolls": {},
"cost_km_per_km_traveled": {},
"additional_cost": {},
"cost_type_id": {},
"technician_cost_status": {},
"client_cost_status": {},
"client_cost": {},
"cost_per_km_client": {},
"km_traveled_client": {},
"client_currency": {},
"technician_currency": {},
"technician_payed": {}
}Visit Costs
Update a visit cost
Operacion: Update a visit cost.
PUT
/
api
/
v1
/
visit_cost
/
{visitDetailId}
Update a visit cost
curl --request PUT \
--url https://api.raul.ugps.io/api/v1/visit_cost/{visitDetailId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"technician_cost": 123,
"cost_per_km_technician": 123,
"km_traveled": 123,
"tolls": 123,
"cost_km_per_km_traveled": 123,
"additional_cost": 123,
"cost_type_id": 123,
"technician_cost_status": true,
"client_cost_status": true,
"client_cost": 123,
"cost_per_km_client": 123,
"km_traveled_client": 123,
"client_currency": 123,
"technician_currency": 123,
"technician_payed": true
}
'import requests
url = "https://api.raul.ugps.io/api/v1/visit_cost/{visitDetailId}"
payload = {
"technician_cost": 123,
"cost_per_km_technician": 123,
"km_traveled": 123,
"tolls": 123,
"cost_km_per_km_traveled": 123,
"additional_cost": 123,
"cost_type_id": 123,
"technician_cost_status": True,
"client_cost_status": True,
"client_cost": 123,
"cost_per_km_client": 123,
"km_traveled_client": 123,
"client_currency": 123,
"technician_currency": 123,
"technician_payed": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
technician_cost: 123,
cost_per_km_technician: 123,
km_traveled: 123,
tolls: 123,
cost_km_per_km_traveled: 123,
additional_cost: 123,
cost_type_id: 123,
technician_cost_status: true,
client_cost_status: true,
client_cost: 123,
cost_per_km_client: 123,
km_traveled_client: 123,
client_currency: 123,
technician_currency: 123,
technician_payed: true
})
};
fetch('https://api.raul.ugps.io/api/v1/visit_cost/{visitDetailId}', 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/visit_cost/{visitDetailId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'technician_cost' => 123,
'cost_per_km_technician' => 123,
'km_traveled' => 123,
'tolls' => 123,
'cost_km_per_km_traveled' => 123,
'additional_cost' => 123,
'cost_type_id' => 123,
'technician_cost_status' => true,
'client_cost_status' => true,
'client_cost' => 123,
'cost_per_km_client' => 123,
'km_traveled_client' => 123,
'client_currency' => 123,
'technician_currency' => 123,
'technician_payed' => 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/visit_cost/{visitDetailId}"
payload := strings.NewReader("{\n \"technician_cost\": 123,\n \"cost_per_km_technician\": 123,\n \"km_traveled\": 123,\n \"tolls\": 123,\n \"cost_km_per_km_traveled\": 123,\n \"additional_cost\": 123,\n \"cost_type_id\": 123,\n \"technician_cost_status\": true,\n \"client_cost_status\": true,\n \"client_cost\": 123,\n \"cost_per_km_client\": 123,\n \"km_traveled_client\": 123,\n \"client_currency\": 123,\n \"technician_currency\": 123,\n \"technician_payed\": true\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.raul.ugps.io/api/v1/visit_cost/{visitDetailId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"technician_cost\": 123,\n \"cost_per_km_technician\": 123,\n \"km_traveled\": 123,\n \"tolls\": 123,\n \"cost_km_per_km_traveled\": 123,\n \"additional_cost\": 123,\n \"cost_type_id\": 123,\n \"technician_cost_status\": true,\n \"client_cost_status\": true,\n \"client_cost\": 123,\n \"cost_per_km_client\": 123,\n \"km_traveled_client\": 123,\n \"client_currency\": 123,\n \"technician_currency\": 123,\n \"technician_payed\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raul.ugps.io/api/v1/visit_cost/{visitDetailId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"technician_cost\": 123,\n \"cost_per_km_technician\": 123,\n \"km_traveled\": 123,\n \"tolls\": 123,\n \"cost_km_per_km_traveled\": 123,\n \"additional_cost\": 123,\n \"cost_type_id\": 123,\n \"technician_cost_status\": true,\n \"client_cost_status\": true,\n \"client_cost\": 123,\n \"cost_per_km_client\": 123,\n \"km_traveled_client\": 123,\n \"client_currency\": 123,\n \"technician_currency\": 123,\n \"technician_payed\": true\n}"
response = http.request(request)
puts response.read_body{
"visit_cost_id": 123,
"visit_detail_id": "<string>",
"technician_cost": {},
"cost_per_km_technician": {},
"km_traveled": {},
"tolls": {},
"cost_km_per_km_traveled": {},
"additional_cost": {},
"cost_type_id": {},
"technician_cost_status": {},
"client_cost_status": {},
"client_cost": {},
"cost_per_km_client": {},
"km_traveled_client": {},
"client_currency": {},
"technician_currency": {},
"technician_payed": {}
}Authorizations
Bearer token authentication
Path Parameters
Body
application/json
Technician cost
Cost per km for technician
Km traveled
Tolls
Cost per km traveled
Additional cost
Cost type ID
Technician cost status
Client cost status
Client cost
Cost per km for client
Km traveled for client
Client currency
Technician currency
Technician payed
Response
Visit cost updated
Visit cost ID
Visit detail ID
Technician cost
Cost per km for technician
Km traveled
Tolls
Cost per km traveled
Additional cost
Cost type ID
Technician cost status
Client cost status
Client cost
Cost per km for client
Km traveled for client
Client currency
Technician currency
Technician payed
⌘I