Update an account
client.account.update(stringid, AccountUpdateParams { fields, relationships } body, RequestOptionsoptions?): AccountUpdateResponse { id, createdAt, fields, 4 more }
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
Parameters
id: string
Unique identifier of the account to update.
Returns
Update an account
import Lightfield from 'lightfield';
const client = new Lightfield({
apiKey: 'My API Key',
});
const accountUpdateResponse = await client.account.update('id');
console.log(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"
}