Update a custom object record
client.object.update(stringid, ObjectUpdateParams { entitySlug, fields, relationships } params, RequestOptionsoptions?): ObjectUpdateResponse { id, createdAt, fields, 4 more }
POST/v1/objects/{entitySlug}/values/{id}
Updates an existing record by ID for the specified custom object type. Only included fields and relationships are modified.
Update a custom object record
import Lightfield from 'lightfield';
const client = new Lightfield({
apiKey: 'My API Key',
});
const objectUpdateResponse = await client.object.update('id', { entitySlug: 'entitySlug' });
console.log(objectUpdateResponse.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"
}