Delete a note
client.note.delete(stringid, NoteDeleteParams { body } params?, RequestOptionsoptions?): NoteDeleteResponse { id, createdAt, fields, 4 more }
DELETE/v1/notes/{id}
Moves a note to the trash. The note is soft-deleted and may be restored from the Lightfield UI.
Calling delete on an already-trashed note is a no-op and returns the existing record.
Required scope: notes:delete
Rate limit category: Write
Delete a note
import Lightfield from 'lightfield';
const client = new Lightfield({
apiKey: 'My API Key',
});
const noteDeleteResponse = await client.note.delete('id');
console.log(noteDeleteResponse.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"
}