Skip to main content
PUT
/
api
/
v1
/
visit_cost
/
{visitDetailId}
/
technician-payed
Update technician payed status
curl --request PUT \
  --url https://api.raul.ugps.io/api/v1/visit_cost/{visitDetailId}/technician-payed \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "technician_payed": true
}
'
import requests

url = "https://api.raul.ugps.io/api/v1/visit_cost/{visitDetailId}/technician-payed"

payload = { "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_payed: true})
};

fetch('https://api.raul.ugps.io/api/v1/visit_cost/{visitDetailId}/technician-payed', 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}/technician-payed",
  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_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}/technician-payed"

	payload := strings.NewReader("{\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}/technician-payed")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"technician_payed\": true\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.raul.ugps.io/api/v1/visit_cost/{visitDetailId}/technician-payed")

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_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

Authorization
string
header
required

Bearer token authentication

Path Parameters

visitDetailId
string
required

Body

application/json
technician_payed
boolean
required

Technician payed status

Response

Technician payed status updated

visit_cost_id
number
required

Visit cost ID

visit_detail_id
string
required

Visit detail ID

technician_cost
object

Technician cost

cost_per_km_technician
object

Cost per km for technician

km_traveled
object

Km traveled

tolls
object

Tolls

cost_km_per_km_traveled
object

Cost per km traveled

additional_cost
object

Additional cost

cost_type_id
object

Cost type ID

technician_cost_status
object

Technician cost status

client_cost_status
object

Client cost status

client_cost
object

Client cost

cost_per_km_client
object

Cost per km for client

km_traveled_client
object

Km traveled for client

client_currency
object

Client currency

technician_currency
object

Technician currency

technician_payed
object

Technician payed