Clients
Clients represent a client in the system. They contain information about the client, such as their name, address, and contact details but also their prices, services, activities and files.
The Client object
Properties
idstring
Unique identifier for the object.
namestring
The name of the client.
addressobject
Addressarchivedboolean
True if the entity is archived.
catConfigurationobject
The default client to be applied for the client.contactsarray
The contactsdetailsstring
Additional details.
filenameFormatsobject
Filename format settingsfilesarray
The files.invoiceobject
Invoice settingslabelsarray
The labels.logoUrlstring
The logo Url.marketingsarray
The marketing notesnationalIdentificationNumberstring
The national identification number, if applicable (SIRET, KVK, etc).
notesarray
The notes linked to the entity.pinnedboolean
True if the entity is pinned.
servicesarray
servicesusersarray
usersvatNumberstring
The VAT number of the company.
createdAtdate
The date and time the entity was created.
updatedAtdate
The date and time the entity was last updated.
Client object
{
"id": "6548c72a13162e1d7ade0290",
"name": "Microsoft",
"address": {
"name": "Microsoft"
},
"archived": false,
"contacts": [
{
"emails": {
"invoice": true,
"quote": true,
"ccInvoice": false,
"ccQuote": false
},
"email": "john@lsp.expert",
"fullName": "John Doe",
"nickname": "John",
"notes": "<p></p>",
"id": "654cbb4e74ef2e4d80e3d821"
}
],
"files": [
{
"size": 487477,
"shareOnJobs": false,
"createdAt": "2024-01-23T07:47:47.440Z",
"name": "Ref material.pdf",
"id": "65af6f23014c1c7a227e890f"
}
],
"invoice": {
"applyVATReverseCharge": false,
"currency": {
"code": "EUR",
"symbol": "€"
},
"document": {
"id": "6548c11c5136b418fd626e58",
"name": "English"
},
"overrideGroupMatches": false,
"paymentTermsEndOfMonth": false,
"rappenRounding": false,
"showExchangeRateOnInvoice": false,
"tax1": {
"id": "6548c1705136b418fd626e65",
"name": "VAT",
"value": 0.21
}
},
"labels": [
{
"id": "6654468b366ad245719322f4",
"name": "VIP",
"color": "#991b1b"
}
],
"marketings": [],
"notes": [],
"pinned": false,
"services": [
{
"service": {
"id": "6548c16d5136b418fd626e5f",
"name": "Translation"
},
"quantityType": {
"id": "6548c16d5136b418fd626e61",
"name": "Words"
},
"currency": {
"code": "EUR",
"symbol": "€"
},
"unitCost": 0.16,
"matchesType": "fixed",
"matches": [],
"id": "656dc10361046992e8dc95a5"
}
],
"users": [
{
"id": "6548c11c5136b418fd626e2f",
"name": "John Smith"
}
],
"createdAt": "2023-11-06T10:59:54.034Z",
"updatedAt": "2024-06-03T12:25:10.085Z"
}
List all Clients
This endpoint allows you to retrieve all the clients.
Filters
All the filters are optional and can be combined. See Pagination for the rules shared by all the list endpoints (multiple values, dates, keywords).
_idstring
Comma-separated list of client ids.
namestring
Only the clients whose name contains this text (not case sensitive).
contactstring
Only the clients that have a contact whose full name contains this text (not case sensitive).
emailstring
Only the clients that have a contact whose email contains this text (not case sensitive).
services.service.idstring
Comma-separated list of service ids. Only the clients that have a price for one of these services are returned.
services.languagePair.idstring
Comma-separated list of language pair ids. Only the clients that have a price for one of these language pairs are returned.
users.idstring
Comma-separated list of user ids. Only the clients managed by these users (project managers) are returned.
users.allboolean
Set to
trueto return only the clients managed by all the users ofusers.id.labels.idstring
Comma-separated list of label ids. The clients that have at least one of these labels are returned (see
labels.all).labels.allboolean
Set to
trueto return only the clients that have all the labels oflabels.id.archivedboolean
trueto retrieve only the archived clients,falseto exclude them. If not provided, both are returned.
Sorting
sortstring
The field to sort by. One of:
name. The default isname.directionstring
The sort direction:
ascordesc. The default isasc.
Request
curl -G https://api.lsp.expert/v2/clients \
-u {key}:
Response
{
"items": [{
"id": "6548c72a13162e1d7ade0290",
"name": "Microsoft",
"address": {
"name": "Microsoft"
},
"archived": false,
"contacts": [],
"files": [],
"invoice": {
"applyVATReverseCharge": false,
"currency": {
"code": "EUR",
"symbol": "€"
},
"document": {
"id": "6548c11c5136b418fd626e58",
"name": "English"
},
"overrideGroupMatches": false,
"paymentTermsEndOfMonth": false,
"rappenRounding": false,
"showExchangeRateOnInvoice": false,
"tax1": {
"id": "6548c1705136b418fd626e65",
"name": "VAT",
"value": 0.21
}
},
"labels": [],
"marketings": [],
"notes": [],
"pinned": false,
"services": [],
"users": [
{
"id": "6548c11c5136b418fd626e2f",
"name": "John Smith"
}
],
"createdAt": "2023-11-06T10:59:54.034Z",
"updatedAt": "2024-06-03T12:25:10.085Z"
},
{...},
{...}
],
"pageSize": 20,
"page": 1,
"totalPages": 1,
"totalItems": 2,
"hasNextPage": false,
"hasPreviousPage": false
}
Create a client
This endpoint allows you to add a new client.
Parameters
namestring Required
The name of the client.
addressCitystring,null
City, district, suburb, town, or village.
addressCountrystring,null
Two-letter country code.
addressLine1string,null
Address line 1 (e.g., street, PO Box, or company name).
addressLine2string,null
Address line 2 (e.g., apartment, suite, unit, or building).
addressNamestring,null
Business name.
addressPostalCodestring,null
ZIP or postal code.
addressStatestring,null
State, county, province, or region.
applyVATReverseChargeboolean
True if the reverse charge applies.
catConfigurationstring
The default CAT configuration ID.
creditNoteFilenameFormatstring
The filename format for the credit notes.
currencystring
The currency code (ISO, e.g., EUR).
detailsstring,null
The additional details.
documentstring
The document configuration id.
invoiceFilenameFormatstring
The filename format for the invoices.
minimumFeenumber
The minimum fee to be applied.
nationalIdentificationNumberstring,null
The national identification number, if applicable (SIRET, KVK, etc).
overrideGroupMatchesboolean
True if the group matches (defined at account level) should be overridden.
paymentTermsnumber
The payment terms in days.
paymentTermsEndOfMonthboolean
True if the payment terms are at the end of the month.
quoteFilenameFormatstring
The filename format for the quotes.
rappenRoundingboolean
True if the rounding should be done in rappen (Swiss Francs only).
showExchangeRateOnInvoiceboolean
True if the exchange rate should be shown on the invoice.
tax1string,null
The first tax id.
tax2string,null
The second tax id.
validityDaysnumber
The number of days the quote is valid.
vatNumberstring,null
The VAT number of the company.
Request
curl https://api.lsp.expert/v2/clients \
-u {key}: \
-d name="Google"
Response
{
"id": "66f1313f9e477f90664d1ad8",
"name": "Google",
"address": {
"name": "Google"
},
"archived": false,
"contacts": [],
"files": [],
"invoice": {
"applyVATReverseCharge": false,
"currency": {
"code": "EUR",
"symbol": "€"
},
"document": {
"id": "6548c11c5136b418fd626e58",
"name": "English"
},
"overrideGroupMatches": false,
"paymentTermsEndOfMonth": false,
"rappenRounding": false,
"showExchangeRateOnInvoice": false,
"tax1": {
"id": "6548c1705136b418fd626e65",
"name": "VAT",
"value": 0.21
}
},
"labels": [],
"marketings": [],
"notes": [],
"object": "client",
"pinned": false,
"services": [],
"users": [
{
"id": "6548c11c5136b418fd626e2f",
"name": "Cédric Doe"
}
],
"createdAt": "2024-09-23T09:13:35.001Z",
"updatedAt": "2024-09-23T09:13:35.012Z"
}
Retrieve a client
This endpoint allows you to retrieve a client by providing their id.
Request
curl https://api.lsp.expert/v2/clients/66f1313f9e477f90664d1ad8 \
-u {key}:
Response
{
"id": "66f1313f9e477f90664d1ad8",
"name": "Google",
"address": {
"name": "Google"
},
"archived": false,
"contacts": [],
"files": [],
"invoice": {
"applyVATReverseCharge": false,
"currency": {
"code": "EUR",
"symbol": "€"
},
"document": {
"id": "6548c11c5136b418fd626e58",
"name": "English"
},
"overrideGroupMatches": false,
"paymentTermsEndOfMonth": false,
"rappenRounding": false,
"showExchangeRateOnInvoice": false,
"tax1": {
"id": "6548c1705136b418fd626e65",
"name": "VAT",
"value": 0.21
}
},
"labels": [],
"marketings": [],
"notes": [],
"object": "client",
"pinned": false,
"services": [],
"users": [
{
"id": "6548c11c5136b418fd626e2f",
"name": "Cédric Doe"
}
],
"createdAt": "2024-09-23T09:13:35.001Z",
"updatedAt": "2024-09-23T09:13:35.012Z"
}
Update a client
This endpoint allows you to perform an update on a client. Any parameters not provided will be left unchanged.
Parameters
namestring
The name of the client.
addressCitystring,null
City, district, suburb, town, or village.
addressCountrystring,null
Two-letter country code.
addressLine1string,null
Address line 1 (e.g., street, PO Box, or company name).
addressLine2string,null
Address line 2 (e.g., apartment, suite, unit, or building).
addressNamestring,null
Business name.
addressPostalCodestring,null
ZIP or postal code.
addressStatestring,null
State, county, province, or region.
applyVATReverseChargeboolean
True if the reverse charge applies.
archivedboolean
True if the entity is archived.
catConfigurationstring,null
The default CAT configuration ID.
creditNoteFilenameFormatstring,null
The default credit note filename format.
currencystring
The currency code (ISO, e.g., EUR).
detailsstring,null
The additional details.
documentstring
The document id.
invoiceFilenameFormatstring,null
The default invoice filename format.
minimumFeenumber,null
The minimum fee to be applied.
nationalIdentificationNumberstring,null
The national identification number, if applicable (SIRET, KVK, etc).
overrideGroupMatchesboolean
True if the group matches (defined at account level) should be overridden.
paymentTermsnumber,null
The payment terms in days.
paymentTermsEndOfMonthboolean,null
True if the payment terms are at the end of the month.
pinnedboolean
True if the entity is pinned.
quoteFilenameFormatstring,null
The default quote filename format.
rappenRoundingboolean
True if the rounding should be done in rappen (Swiss Francs only).
showExchangeRateOnInvoiceboolean,null
True if the exchange rate should be shown on the invoice.
tax1string,null
The first tax id.
tax2string,null
The second tax id.
vatNumberstring,null
The VAT number of the company.
Request
curl -X PUT https://api.lsp.expert/v2/clients/66f1313f9e477f90664d1ad8 \
-u {key}: \
-d name="Google inc."
Response
{
"id": "66f1313f9e477f90664d1ad8",
"name": "Google inc.",
"address": {
"name": "Google"
},
"archived": false,
"contacts": [],
"files": [],
"invoice": {
"applyVATReverseCharge": false,
"currency": {
"code": "EUR",
"symbol": "€"
},
"document": {
"id": "6548c11c5136b418fd626e58",
"name": "English"
},
"overrideGroupMatches": false,
"paymentTermsEndOfMonth": false,
"rappenRounding": false,
"showExchangeRateOnInvoice": false,
"tax1": {
"id": "6548c1705136b418fd626e65",
"name": "VAT",
"value": 0.21
}
},
"labels": [],
"marketings": [],
"notes": [],
"object": "client",
"pinned": false,
"services": [],
"users": [
{
"id": "6548c11c5136b418fd626e2f",
"name": "Cédric Doe"
}
],
"createdAt": "2024-09-23T09:13:35.001Z",
"updatedAt": "2024-09-23T09:13:35.012Z"
}
Delete a client
This endpoint allows you to delete a client.
Request
curl -X DELETE https://api.lsp.expert/v2/clients/66f1313f9e477f90664d1ad8 \
-u {key}: