Note objects
You can use the Spaaza API to manage any notes attached to a given user. This can be used to provide useful details about a user’s purchase habits, or any other generic notes that neeed to be saved for a user.
Fields in the Note object
The following fields are returned in the note object.
Identifying a note
Details for a note
Field | Description |
---|---|
id | the unique identifier (id) for a given note object. |
text | the text that makes up a note record. |
created_date | the timestamp for when the record was created. |
user_id | the unique user id for the user that the note is attached to. |
creating_user_id | the unique id for the user that created the note. |
Viewing user notes
User notes do not currently have their own API endpoint for fetching data. They can be fetched as part of the user get-card api call
Adding a note to a user
Example response
{
"id": 123456,
"text": "Customer very happy with her latest dress purchase.",
"created_date": "2017-07-03T11:56:04Z",
"user_id": 123123,
"creating_user_id": 321321
}
Overview
- Call name: add-user-note
- Endpoint URL: https://api0.spaaza.com/internal/add-user-note
- Request methods: POST
- Request Content-Type: multipart/form-data or application/x-www-form-urlencoded
- Response Content-Type: application/json
- Auth required: yes
X-Spaaza-MyPrice-App-Hostname
header requirement: mandatory when using privileged authentication
Introduction
This API call adds a new note record to an existing user.
HTTP parameters
The following HTTP parameters can be passed to the API:
Parameter | Description |
---|---|
user_id | (integer, mandatory) The id of the user to which the note is being added. |
text | (string, mandatory) The text for the new note record - max. 1000 characters in length. |
Deleting a user note
Example response
{
"id": 123456,
"deleted": true
}
Overview
- Call name: delete-user-note
- Endpoint URL: https://api0.spaaza.com/internal/delete-user-note
- Request methods: DELETE
- Request Content-Type: multipart/form-data or application/x-www-form-urlencoded
- Response Content-Type: application/json
- Auth required: yes
X-Spaaza-MyPrice-App-Hostname
header requirement: mandatory when using privileged authentication
Introduction
This API call deletes a user’s note record.
HTTP parameters
The following HTTP parameters can be passed to the API:
Parameter | Description |
---|---|
user_note_id | (integer, mandatory) The id of the user note that is to be deleted. |