curl --request PUT \
--url https://external.pleo.io/v0/tags/{tagId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data '
{
"archived": false,
"code": "12345",
"name": "Lunch allowance",
"otherDimensionValues": [
"value1",
"value2"
]
}
'import requests
url = "https://external.pleo.io/v0/tags/{tagId}"
payload = {
"archived": False,
"code": "12345",
"name": "Lunch allowance",
"otherDimensionValues": ["value1", "value2"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json;charset=UTF-8"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/json;charset=UTF-8'
},
body: JSON.stringify({
archived: false,
code: '12345',
name: 'Lunch allowance',
otherDimensionValues: ['value1', 'value2']
})
};
fetch('https://external.pleo.io/v0/tags/{tagId}', 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://external.pleo.io/v0/tags/{tagId}",
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([
'archived' => false,
'code' => '12345',
'name' => 'Lunch allowance',
'otherDimensionValues' => [
'value1',
'value2'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json;charset=UTF-8"
],
]);
$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://external.pleo.io/v0/tags/{tagId}"
payload := strings.NewReader("{\n \"archived\": false,\n \"code\": \"12345\",\n \"name\": \"Lunch allowance\",\n \"otherDimensionValues\": [\n \"value1\",\n \"value2\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json;charset=UTF-8")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://external.pleo.io/v0/tags/{tagId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json;charset=UTF-8")
.body("{\n \"archived\": false,\n \"code\": \"12345\",\n \"name\": \"Lunch allowance\",\n \"otherDimensionValues\": [\n \"value1\",\n \"value2\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.pleo.io/v0/tags/{tagId}")
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;charset=UTF-8'
request.body = "{\n \"archived\": false,\n \"code\": \"12345\",\n \"name\": \"Lunch allowance\",\n \"otherDimensionValues\": [\n \"value1\",\n \"value2\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"archived": false,
"code": "12345",
"createdAt": "2023-08-23T03:11:48Z",
"groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "c04c7e9e-6c15-11ee-b962-0242ac120002",
"updatedAt": "2023-08-23T03:11:48Z",
"name": "Lunch allowance"
}
}Updates tag by id
curl --request PUT \
--url https://external.pleo.io/v0/tags/{tagId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data '
{
"archived": false,
"code": "12345",
"name": "Lunch allowance",
"otherDimensionValues": [
"value1",
"value2"
]
}
'import requests
url = "https://external.pleo.io/v0/tags/{tagId}"
payload = {
"archived": False,
"code": "12345",
"name": "Lunch allowance",
"otherDimensionValues": ["value1", "value2"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json;charset=UTF-8"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/json;charset=UTF-8'
},
body: JSON.stringify({
archived: false,
code: '12345',
name: 'Lunch allowance',
otherDimensionValues: ['value1', 'value2']
})
};
fetch('https://external.pleo.io/v0/tags/{tagId}', 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://external.pleo.io/v0/tags/{tagId}",
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([
'archived' => false,
'code' => '12345',
'name' => 'Lunch allowance',
'otherDimensionValues' => [
'value1',
'value2'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json;charset=UTF-8"
],
]);
$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://external.pleo.io/v0/tags/{tagId}"
payload := strings.NewReader("{\n \"archived\": false,\n \"code\": \"12345\",\n \"name\": \"Lunch allowance\",\n \"otherDimensionValues\": [\n \"value1\",\n \"value2\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json;charset=UTF-8")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://external.pleo.io/v0/tags/{tagId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json;charset=UTF-8")
.body("{\n \"archived\": false,\n \"code\": \"12345\",\n \"name\": \"Lunch allowance\",\n \"otherDimensionValues\": [\n \"value1\",\n \"value2\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.pleo.io/v0/tags/{tagId}")
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;charset=UTF-8'
request.body = "{\n \"archived\": false,\n \"code\": \"12345\",\n \"name\": \"Lunch allowance\",\n \"otherDimensionValues\": [\n \"value1\",\n \"value2\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"archived": false,
"code": "12345",
"createdAt": "2023-08-23T03:11:48Z",
"groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "c04c7e9e-6c15-11ee-b962-0242ac120002",
"updatedAt": "2023-08-23T03:11:48Z",
"name": "Lunch allowance"
}
}Authorizations
JWT Bearer token authentication. Include the token in the Authorization header as: Bearer <token>
Path Parameters
Unique identifier of the tag to update.
Body
Boolean flag used to determine whether the tag is archived.
false
Code used in the external ERP/accounting system to identify the tag.
"12345"
User readable name of the tag.
"Lunch allowance"
Dimension values outside the two main dimensions ordered by display order. Values not provided will not be changed.Values will be ignored if there is not enough dimensions to add them to
Dimension values outside the two main dimensions ordered by display order. Values not provided will not be changed.Values will be ignored if there is not enough dimensions to add them to
["value1", "value2"]
Response
Tag updated successfully.
Show child attributes
Show child attributes
Was this page helpful?