Activities
Activities represent activities associated with a supplier. They can be used to store communications and interactions with a supplier.
The Activity object
Properties
idstring
Unique identifier for the object.
descriptionstring
The description of the activity.
actionDatedate
The date and time the action was taken.
doneDatedate
The date and time the activity was completed.
dueDatedate
The date and time the activity is due.
subjectstring
The subject of the activity.
userobject
The user that created the activity.
Activity object
{
"id": "66420f6543137a180c01ef0c",
"description": "<p>After a first positive contact by phone. Contact them again in one week.</p>",
"actionDate": "2024-05-12T22:00:00.000Z",
"doneDate": "2024-06-03T12:25:10.052Z",
"dueDate": "2024-05-12T22:00:00.000Z",
"subject": "First contact - reminder",
"user": {
"id": "6548c11c5136b418fd626e2f",
"name": "John Doe"
}
}
List all activities
This endpoint allows you to retrieve all the activities for a supplier.
Request
curl -G https://api.lsp.expert/v2/suppliers/6548c72a13162e1d7ade0290/activities \
-u {key}:
Response
[
{
"id": "66420f6543137a180c01ef0c",
"description": "<p>After a first positive contact by phone. Contact them again in one week.</p>",
"actionDate": "2024-05-12T22:00:00.000Z",
"doneDate": "2024-06-03T12:25:10.052Z",
"dueDate": "2024-05-12T22:00:00.000Z",
"subject": "First contact - reminder",
"user": {
"id": "6548c11c5136b418fd626e2f",
"name": "John Doe"
}
},
{...},
{...}
]
Create a activity
This endpoint allows you to add a new activity.
Parameters
descriptionstring,null
The description of the activity.
actionDatestring Required
The date and time the action was taken.
dueDatestring
The date and time the activity is due.
subjectstring Required
The subject of the activity.
Request
curl https://api.lsp.expert/v2/suppliers/:id/marketings \
-u {key}: \
-d subject="First contact" \
-d actionDate="2024-05-12T22:00:00.000Z" \
-d description="<p>After a first positive contact by phone. Contact them again in one week.</p>"
Response
{
"id": "66420f6543137a180c01ef0c",
"description": "<p>After a first positive contact by phone. Contact them again in one week.</p>",
"actionDate": "2024-05-12T22:00:00.000Z",
"subject": "First contact - reminder",
"user": {
"id": "6548c11c5136b418fd626e2f",
"name": "John Doe"
}
}
Update a activity
This endpoint allows you to perform an update on a activity. Any parameters not provided will be left unchanged.
Parameters
descriptionstring,null
description
actionDatestring
actionDate
doneDatestring,null
doneDate
dueDatestring,null
dueDate
subjectstring
subject
Request
curl -X PUT https://api.lsp.expert/v2/suppliers/:66f1313f9e477f90664d1ad8/activities/66420f6543137a180c01ef0c \
-u {key}: \
-d doneDate="2024-06-03T12:25:10.052Z"
Response
{
"id": "66420f6543137a180c01ef0c",
"description": "<p>After a first positive contact by phone. Contact them again in one week.</p>",
"actionDate": "2024-05-12T22:00:00.000Z",
"doneDate":"2024-06-03T12:25:10.052Z",
"subject": "First contact - reminder",
"user": {
"id": "6548c11c5136b418fd626e2f",
"name": "John Doe"
}
}
Delete a activity
This endpoint allows you to delete a activity.
Request
curl -X DELETE https://api.lsp.expert/v2/suppliers/:66f1313f9e477f90664d1ad8/activities/66420f6543137a180c01ef0c \
-u {key}: