Skip to content
  • Auto
  • Light
  • Dark
Talk to an expert

Set Name

Update a customer name
client.V1.Customers.SetName(ctx, params) (*DataCustomerV1CustomerSetNameResponse, error)
post/v1/customers/{customer_id}/setName

Updates the specified customer's name.

Parameters
paramsCustomerIDfieldNamefieldV1CustomerSetNameParams
Hide ParametersShow Parameters
CustomerIDfield
param.Field[string]

Path param:

formatuuid
Namefield
param.Field[string]

Body param: The new name for the customer. This will be truncated to 160 characters if the provided name is longer.

Returns
V1CustomerSetNameResponsestruct
Hide ParametersShow Parameters
DataIDstringExternalIDstringIngestAliasesarrayNamestringCustomFieldsmapCustomer
package main

import (
  "context"
  "fmt"

  "github.com/Metronome-Industries/metronome-go"
  "github.com/Metronome-Industries/metronome-go/option"
)

func main() {
  client := metronome.NewClient(
    option.WithBearerToken("My Bearer Token"),
  )
  response, err := client.V1.Customers.SetName(context.TODO(), metronome.V1CustomerSetNameParams{
    CustomerID: metronome.F("d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc"),
    Name: metronome.F("Example, Inc."),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.Data)
}
200 Example
{
  "data": {
    "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "external_id": "external_id",
    "ingest_aliases": [
      "string"
    ],
    "name": "name",
    "custom_fields": {
      "foo": "string"
    }
  }
}