Introduction
These endpoints ensure seamless interaction with the notes system, allowing users to effortlessly add or remove notes while maintaining data integrity and security through user authentication and validation checks. Below, you will find detailed information on how to use these endpoints effectively.
Create new note
This endpoint allows you to create a new note for a specific offer. The request must include the offer_id, is_push_notification, message, and is_deleted_app. The type of the note will be set to manual, which means that the note was created manually by a user rather than generated automatically by the system.
Parameters
The request body must include the following fields:
offer_id(string, required): The unique identifier of the offer associated with the note.is_push_notification(boolean, required): Indicates whether a push notification should be sent for this note.message(string, required): The content of the note.is_deleted_app(boolean, required): Indicates whether the note should be marked as deleted in the app.
Example request
{
"offer_id": "123",
"is_push_notification": true,
"message": "This is a manual note.",
"is_deleted_app": false
}
Example response
{
"id": "1",
"attributes": {
"offer_id": "123",
"created_by": "user@example.com",
"is_push_notification": true,
"type": "manual",
"message": "This is a manual note.",
"is_deleted_app": false,
"created_at": "2023-01-05T12:00:00Z",
"updated_at": "2023-01-05T12:00:00Z"
}
}
Notes
- The
typeof the note is set tomanual, indicating that it was created by a user manually. - Ensure that all required fields are included in the request body.
- The endpoint returns the newly created note upon successful validation and creation.
Delete note by id
This endpoint deletes a specific note based on the provided note ID. The request checks if the note is associated with a company that matches the company_id of the user performing the request.
Parameters
id(string): The unique identifier of the note being deleted.
Example response
{
"message": "Note has successfully been deleted."
}
Notes
- The
company_idof the user performing the request must match thecompany_idassociated with the note. - Ensure that the
idprovided in the request URL is valid and associated with a note belonging to your company. - A success message will be returned upon successful deletion.