Contacts

Contacts represent contacts associated with a client. They can be used to send invoices, quotes, and other documents to the client.

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).

Client object

{
  "id": "654cbb4e74ef2e4d80e3d821",
  "email": "john@lsp.expert",
  "emails": {
    "ccInvoice": false,
    "ccQuote": false,
    "invoice": true,
    "quote": true
  },
  "fullName": "John Doe",
  "nickname": "John",
  "notes": "<p></p>"
}

GET/v2/clients/:id/contacts

List all contacts

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

Request

GET
/v2/clients/:id/contacts
curl -G https://api.lsp.expert/v2/clients/6548c72a13162e1d7ade0290/contacts \
  -u {key}: 

Response

[
  {
    "id": "654cbb4e74ef2e4d80e3d821",
    "email": "john@lsp.expert",
    "emails": {
      "ccInvoice": false,
      "ccQuote": false,
      "invoice": true,
      "quote": true
    },
    "fullName": "John Doe",
    "nickname": "John",
    "notes": "<p></p>"
  },
  {...},
  {...}
]

POST/v2/clients/: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/clients/:id/contacts
curl https://api.lsp.expert/v2/clients/:id/contacts \
  -u {key}: \
  -d fullName="John Doe" 

Response

{
  "id": "66f137269e477f90664d1ada",
  "emails": {
    "ccInvoice": false,
    "ccQuote": false,
    "invoice": true,
    "quote": true
  },
  "fullName": "John Doe",
  "nickname": "",
  "notes": "<p></p>"
}


GET/v2/clients/:id/contacts/:contactId

Retrieve a contact

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

Request

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

Response

{
  "id": "66f137269e477f90664d1ada",
  "emails": {
    "ccInvoice": false,
    "ccQuote": false,
    "invoice": true,
    "quote": true
  },
  "fullName": "John Doe",
  "nickname": "",
  "notes": "<p></p>"
}


PUT/v2/clients/: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

    fullName

  • mobilestring

    mobile

  • nicknamestring,null

    nickname

  • notesstring

    The notes linked to the entity.

  • phonestring

    phone

  • titlestring

    title

Request

PUT
/v2/clients/:id/contacts/:contactId
curl -X PUT https://api.lsp.expert/v2/clients/:66f1313f9e477f90664d1ad8/contacts/66f137269e477f90664d1ada \
  -u {key}: \
  -d email="john.doe@gmail.com"

Response

{
  "id": "66f137269e477f90664d1ada",
  "email": "john.doe@gmail.com",
  "emails": {
    "ccInvoice": false,
    "ccQuote": false,
    "invoice": true,
    "quote": true
  },
  "fullName": "John Doe",
  "nickname": "",
  "notes": "<p></p>"
}

DELETE/v2/clients/:id/contacts/:contactId

Delete a contact

This endpoint allows you to delete a contact.

Request

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