Skip to main content
PATCH
/
tags
/
{tag_id}
Go (SDK)
package main

import(
	"context"
	"os"
	latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
	"github.com/latitudesh/latitudesh-go-sdk/models/operations"
	"log"
)

func main() {
    ctx := context.Background()

    s := latitudeshgosdk.New(
        latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
    )

    res, err := s.Tags.Update(ctx, "tag_k88kazkbPktNYRWa2l9ZsN6gVrrL", operations.UpdateTagTagsRequestBody{
        Data: &operations.UpdateTagTagsData{
            ID: latitudeshgosdk.Pointer("tag_k88kazkbPktNYRWa2l9ZsN6gVrrL"),
            Type: operations.UpdateTagTagsTypeTags.ToPointer(),
            Attributes: &operations.UpdateTagTagsAttributes{
                Name: latitudeshgosdk.Pointer("Tag Name"),
            },
        },
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.CustomTag != nil {
        // handle response
    }
}
{
  "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
        }
      }
    }
  }
}

Authorizations

Authorization
string
header
required

Path Parameters

tag_id
string
required

Body

data
object

Response

200 - application/vnd.api+json

Success

data
object
meta
object