Tätä sivua ei ole käännetty kielellesi. Näytetään englanti (Iso-Britannia)-versio.
Notes
List, add, change and delete the notes on a lead through the Fondaro API.
Notes are the written record on a lead. Reading needs crm:read; adding, changing and deleting need crm:write and an active plan.
A member reaches the notes of their own leads; an admin reaches every note. A lead or note you cannot reach answers 404 with "Lead not found." or "Note not found.", the same as one that does not exist. Anyone with access to the lead may edit its notes; a member may delete only notes they wrote, and an admin may delete any.
A note can be written on one of the lead's deals (dealId). It is still a note on the lead: it shows on the lead's timeline, with the deal's title as a link, and on the deal's page. Every note carries dealId and dealTitle, both null for a plain lead note. Deleting the deal leaves its notes on the lead, with dealId back to null.
List the notes on a lead
GET /v1/leads/{leadId}/notes
Every note on the lead, newest first, in one response with hasMore: false. Send dealId for only the notes written on that deal.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
leadId | Path | integer | Yes | The id of the lead |
dealId | Query | UUID | No | Only the notes written on this deal, one of the lead's own |
Add a note to a lead
POST /v1/leads/{leadId}/notes
Adds a note written by the key's person. Accepts an Idempotency-Key header.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
leadId | Path | integer | Yes | The id of the lead |
content | Body | string | Yes | The text of the note |
isPinned | Body | boolean | No | true pins the note to the top of the lead's page. Left out, the note is not pinned |
dealId | Body | UUID | No | Writes the note on one of the lead's deals. A deal that isn't on this lead answers 400 with "That deal isn't on this lead." |
The 201 response is the note, as in the list above.
Change a note
PATCH /v1/notes/{noteId}
Replaces the note's text, pins it, unpins it, or both. Send at least one of content and isPinned; a call with neither answers 400.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
noteId | Path | UUID | Yes | The id of the note |
content | Body | string | No | The new text. Left out, the text stays as it is |
isPinned | Body | boolean | No | true pins the note, false unpins it. Left out, the pin stays as it is |
The response is the note with the new content and a later updatedAt. To pin a note without touching its text, send { "isPinned": true }.
Delete a note
DELETE /v1/notes/{noteId}
Permanently deletes the note.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
noteId | Path | UUID | Yes | The id of the note |
The response is 204 with no body. Errors: 404 "Note not found."