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>"
}

GET/v2/suppliers/:id/contacts

List all contacts

This endpoint allows you to retrieve all the contacts for a supplier.

Request

GET
/v2/suppliers/:id/contacts
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>"
  },
  {...},
  {...}
]

POST/v2/suppliers/:id/contacts

Create a contact

This endpoint allows you to add a new contact.

Parameters

  • emailundefined

    The email address of the contact.

  • emailsobject

    Emails options
  • fullNamestring 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

POST
/v2/suppliers/:id/contacts
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>"
}


GET/v2/suppliers/:id/contacts/:contactId

Retrieve a contact

This endpoint allows you to retrieve a contact for a supplier.

Request

GET
/v2/suppliers/:id/contacts/:contactId
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>"
}


PUT/v2/suppliers/:id/contacts/:contactId

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

    emails
  • fullNamestring

    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

PUT
/v2/suppliers/:id/contacts/:contactId
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/v2/suppliers/:id/contacts/:contactId

Delete a contact

This endpoint allows you to delete a contact.

Request

DELETE
/v2/suppliers/:id/contacts/:contactId
curl -X DELETE https://api.lsp.expert/v2/suppliers/:66f1313f9e477f90664d1ad8/contacts/66f137269e477f90664d1ada \
  -u {key}: