Update an account
client.Account.Update(ctx, id, body) (*AccountUpdateResponse, error)
POST/v1/accounts/{id}
Updates an existing account by ID. Only included fields and relationships are modified.
The $howTheyMakeMoney and $accountStatus fields are read-only and cannot be updated. The $opportunity, $task, and $note relationships are also read-only — manage them via the $account relationship on the opportunity or task, or the $account/$opportunity note relationships instead.
Supports idempotency via the Idempotency-Key header.
Required scope: accounts:update
Rate limit category: Write
Update an account
package main
import (
"context"
"fmt"
"github.com/Lightfld/lightfield-go"
"github.com/Lightfld/lightfield-go/option"
)
func main() {
client := githubcomlightfldlightfieldgo.NewClient(
option.WithAPIKey("My API Key"),
)
accountUpdateResponse, err := client.Account.Update(
context.TODO(),
"id",
githubcomlightfldlightfieldgo.AccountUpdateParams{
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", accountUpdateResponse.ID)
}
{
"id": "id",
"createdAt": "createdAt",
"fields": {
"foo": {
"value": "string",
"valueType": "ADDRESS"
}
},
"httpLink": "httpLink",
"relationships": {
"foo": {
"cardinality": "cardinality",
"objectType": "objectType",
"values": [
"string"
]
}
},
"updatedAt": "updatedAt",
"externalId": "externalId"
}Returns Examples
{
"id": "id",
"createdAt": "createdAt",
"fields": {
"foo": {
"value": "string",
"valueType": "ADDRESS"
}
},
"httpLink": "httpLink",
"relationships": {
"foo": {
"cardinality": "cardinality",
"objectType": "objectType",
"values": [
"string"
]
}
},
"updatedAt": "updatedAt",
"externalId": "externalId"
}