Contacts
Contacts represent contacts associated with a supplier. They can be used to send purchase orders and other documents to the supplier. Note that contacts are only available for suppliers with the company
supplier type.
The Contact object
Properties
idstring
Unique identifier for the object.
emailstring
The email address of the contact.
emailsobject
Emails options.fullNamestring
Full name (eg John Smith).
mobilestring
Mobile phone number.
nicknamestring
Nickname (eg John).
notesstring
The notes linked to the entity.
phonestring
Phone number.
pictureUrlobject
Picture Url.titlestring
Title (eg CEO).
Contact object
{
"id": "654cbb4e74ef2e4d80e3d821",
"email": "john@lsp.expert",
"emails": {
"ccPurchaseOrder": false,
"purchaseOrder": true,
},
"fullName": "John Doe",
"nickname": "John",
"notes": "<p></p>"
}
List all contacts
This endpoint allows you to retrieve all the contacts for a supplier.
Request
curl -G https://api.lsp.expert/v2/suppliers/6548c72a13162e1d7ade0290/contacts \
-u {key}:
Response
[
{
"id": "654cbb4e74ef2e4d80e3d821",
"email": "john@lsp.expert",
"emails": {
"ccPurchaseOrder": false,
"purchaseOrder": true,
},
"fullName": "John Doe",
"nickname": "John",
"notes": "<p></p>"
},
{...},
{...}
]
Create a contact
This endpoint allows you to add a new contact.
Parameters
emailundefined
The email address of the contact.
emailsobject
Emails optionsfullNamestring Required
Full name (eg John Smith).
mobilestring
Mobile phone number.
nicknamestring,null
Nickname (eg John).
notesstring
The notes linked to the entity.
phonestring
Phone number.
titlestring
Title (eg CEO).
Request
curl https://api.lsp.expert/v2/suppliers/:id/contacts \
-u {key}: \
-d fullName="John Doe"
Response
{
"id": "66f137269e477f90664d1ada",
"emails": {
"ccPurchaseOrder": false,
"purchaseOrder": true,
},
"fullName": "John Doe",
"nickname": "",
"notes": "<p></p>"
}
Retrieve a contact
This endpoint allows you to retrieve a contact for a supplier.
Request
curl https://api.lsp.expert/v2/suppliers/66f1313f9e477f90664d1ad8/contacts/66f137269e477f90664d1ada \
-u {key}:
Response
{
"id": "66f137269e477f90664d1ada",
"emails": {
"ccPurchaseOrder": false,
"purchaseOrder": true,
},
"fullName": "John Doe",
"nickname": "",
"notes": "<p></p>"
}
Update a contact
This endpoint allows you to perform an update on a contact. Any parameters not provided will be left unchanged.
Parameters
emailundefined
email
emailsobject
emailsfullNamestring
The full name of the contact.
mobilestring
The mobile phone number of the contact.
nicknamestring,null
The nickname of the contact.
notesstring
The notes linked to the entity.
phonestring
The phone number of the contact.
titlestring
The title of the contact.
Request
curl -X PUT https://api.lsp.expert/v2/suppliers/:66f1313f9e477f90664d1ad8/contacts/66f137269e477f90664d1ada \
-u {key}: \
-d email="john.doe@gmail.com"
Response
{
"id": "66f137269e477f90664d1ada",
"emails": {
"ccPurchaseOrder": false,
"purchaseOrder": true,
},
"email": "john.doe@gmail.com",
"fullName": "John Doe",
"nickname": "",
"notes": "<p></p>"
}
Delete a contact
This endpoint allows you to delete a contact.
Request
curl -X DELETE https://api.lsp.expert/v2/suppliers/:66f1313f9e477f90664d1ad8/contacts/66f137269e477f90664d1ada \
-u {key}: