import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.tags.update({
tagId: "tag_k88kazkbPktNYRWa2l9ZsN6gVrrL",
requestBody: {
data: {
id: "tag_k88kazkbPktNYRWa2l9ZsN6gVrrL",
type: "tags",
attributes: {
name: "Tag Name",
},
},
},
});
console.log(result);
}
run();{
"data": {
"id": "tag_k88kazkbPktNYRWa2l9ZsN6gVrrL",
"type": "tags",
"attributes": {
"name": "Tag Name",
"slug": "tag-name",
"description": "Debitis dolorum qui alias.",
"color": "#2ca5a5",
"team": {
"id": "team_v8ZZbARV28T0n8P05PbYFBRmMLP",
"name": "575 Team",
"slug": "575-team",
"description": "575 Team",
"address": "Suite 733 888 Wonda Mountains, Kuvalisburgh, SC 38682-0878",
"status": "verified",
"currency": {
"id": "cur_AW6Q2D9lqKLpr",
"code": "BRL",
"name": "Brazilian Real",
"currency_id": null
}
}
}
}
}Update a Tag in the team.
import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.tags.update({
tagId: "tag_k88kazkbPktNYRWa2l9ZsN6gVrrL",
requestBody: {
data: {
id: "tag_k88kazkbPktNYRWa2l9ZsN6gVrrL",
type: "tags",
attributes: {
name: "Tag Name",
},
},
},
});
console.log(result);
}
run();{
"data": {
"id": "tag_k88kazkbPktNYRWa2l9ZsN6gVrrL",
"type": "tags",
"attributes": {
"name": "Tag Name",
"slug": "tag-name",
"description": "Debitis dolorum qui alias.",
"color": "#2ca5a5",
"team": {
"id": "team_v8ZZbARV28T0n8P05PbYFBRmMLP",
"name": "575 Team",
"slug": "575-team",
"description": "575 Team",
"address": "Suite 733 888 Wonda Mountains, Kuvalisburgh, SC 38682-0878",
"status": "verified",
"currency": {
"id": "cur_AW6Q2D9lqKLpr",
"code": "BRL",
"name": "Brazilian Real",
"currency_id": null
}
}
}
}
}Show child attributes
Was this page helpful?