Skip to main content

UpdateClient

UpdateClient updates a single client's compliance profile.

Update access is restricted based on the client's current verification status:

When status is VERIFICATION_STATUS_NOT_STARTED or VERIFICATION_STATUS_FAILED:

  • Full update access to all mutable fields.
  • The following fields are never updatable: name, owner, owners, verification_status, verification_date, next_verification_date.

When status is VERIFICATION_STATUS_PENDING or VERIFICATION_STATUS_VERIFIED:

  • Only the verification authority may update the client.
  • The following fields remain non-updatable: name, owner, owners.

Method Options​

Authorisation specification of the UpdateClient method.

TypeMETHOD_TYPE_WRITE
Access LevelMETHOD_ACCESS_LEVEL_AUTHORISED
Roles
  • ROLE_COMPLIANCE_ADMIN
  • ROLE_COMPLIANCE_CLIENT_ADMIN

Parameters​

Request and response parameter message overview:

Input: UpdateClientRequest Message​

FieldTypeRequiredDescription
Client

meshtrade.compliance.client.v1.Client

True

The client resource with updated values. The name field must be set to identify which client to update. Only provided fields will be modified, subject to the state-based access restrictions documented on UpdateClient.

Returns: Client Message​

Code Examples​

Select supported SDK in the language of your choice for a full example of how to invoke the this method:

package main

import (
"context"
"log"

clientv1 "github.com/meshtrade/api/go/compliance/client/v1"
)

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

// Default configuration is used and credentials come from MESH_API_CREDENTIALS
// environment variable or default discovery methods. Zero config required
// unless you want custom configuration.
service, err := clientv1.NewClientService()
if err != nil {
log.Fatalf("Failed to create service: %v", err)
}
defer service.Close()

// Update the client's display name
request := &clientv1.UpdateClientRequest{
Client: &clientv1.Client{
Name: "compliance/clients/01HQZXYZ9ABCDEFGHIJKLMNPQR",
DisplayName: "Updated Client Name",
ShortName: "UCN",
},
}

// Call the UpdateClient method
client, err := service.UpdateClient(ctx, request)
if err != nil {
log.Fatalf("UpdateClient failed: %v", err)
}

log.Printf("Client updated: %s", client.DisplayName)
}

Advanced Configuration​

For advanced client configuration options (custom endpoints, TLS settings, timeouts), see the SDK Configuration Guide.

Other Methods​