Skip to main content
PUT
/
v2
/
time-clock
/
settings
Update time settings
curl --request PUT \
  --url https://app.tarefy.com/nodeapi/v2/time-clock/settings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "geofence_enabled": true,
  "geofence_block_outside_radius": true,
  "geofence_latitude": 123,
  "geofence_longitude": 123,
  "geofence_radius_meters": 123,
  "geofence_address": "<string>",
  "presential_weekdays": [
    1,
    2,
    3,
    4,
    5
  ]
}
'
import requests

url = "https://app.tarefy.com/nodeapi/v2/time-clock/settings"

payload = {
    "geofence_enabled": True,
    "geofence_block_outside_radius": True,
    "geofence_latitude": 123,
    "geofence_longitude": 123,
    "geofence_radius_meters": 123,
    "geofence_address": "<string>",
    "presential_weekdays": [1, 2, 3, 4, 5]
}
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({
    geofence_enabled: true,
    geofence_block_outside_radius: true,
    geofence_latitude: 123,
    geofence_longitude: 123,
    geofence_radius_meters: 123,
    geofence_address: '<string>',
    presential_weekdays: [1, 2, 3, 4, 5]
  })
};

fetch('https://app.tarefy.com/nodeapi/v2/time-clock/settings', 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://app.tarefy.com/nodeapi/v2/time-clock/settings",
  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([
    'geofence_enabled' => true,
    'geofence_block_outside_radius' => true,
    'geofence_latitude' => 123,
    'geofence_longitude' => 123,
    'geofence_radius_meters' => 123,
    'geofence_address' => '<string>',
    'presential_weekdays' => [
        1,
        2,
        3,
        4,
        5
    ]
  ]),
  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://app.tarefy.com/nodeapi/v2/time-clock/settings"

	payload := strings.NewReader("{\n  \"geofence_enabled\": true,\n  \"geofence_block_outside_radius\": true,\n  \"geofence_latitude\": 123,\n  \"geofence_longitude\": 123,\n  \"geofence_radius_meters\": 123,\n  \"geofence_address\": \"<string>\",\n  \"presential_weekdays\": [\n    1,\n    2,\n    3,\n    4,\n    5\n  ]\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://app.tarefy.com/nodeapi/v2/time-clock/settings")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"geofence_enabled\": true,\n  \"geofence_block_outside_radius\": true,\n  \"geofence_latitude\": 123,\n  \"geofence_longitude\": 123,\n  \"geofence_radius_meters\": 123,\n  \"geofence_address\": \"<string>\",\n  \"presential_weekdays\": [\n    1,\n    2,\n    3,\n    4,\n    5\n  ]\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://app.tarefy.com/nodeapi/v2/time-clock/settings")

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  \"geofence_enabled\": true,\n  \"geofence_block_outside_radius\": true,\n  \"geofence_latitude\": 123,\n  \"geofence_longitude\": 123,\n  \"geofence_radius_meters\": 123,\n  \"geofence_address\": \"<string>\",\n  \"presential_weekdays\": [\n    1,\n    2,\n    3,\n    4,\n    5\n  ]\n}"

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

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
geofence_enabled
boolean

Exige GPS ativo e permissão de localização para bater ponto.

geofence_block_outside_radius
boolean

Em dia presencial, batidas fora do raio entram no fluxo de confirmação antes de criar o registro.

geofence_latitude
number | null
geofence_longitude
number | null
geofence_radius_meters
integer | null
geofence_address
string | null
presential_weekdays
integer[]

Dias presenciais padrão da empresa em formato ISO, onde 1=segunda e 7=domingo.

Required range: 1 <= x <= 7
Example:
[1, 2, 3, 4, 5]

Response

200 - application/json

Configurações atualizadas com sucesso

The response is of type object.