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

    Address
  • archivedboolean

    True if the entity is archived.

  • catConfigurationobject

    The default client to be applied for the client.
  • contactsarray

    The contacts
  • detailsstring

    Additional details.

  • filenameFormatsobject

    Filename format settings
  • filesarray

    The files.
  • invoiceobject

    Invoice settings
  • labelsarray

    The labels.
  • logoUrlstring

    The logo Url.
  • marketingsarray

    The marketing notes
  • nationalIdentificationNumberstring

    The national identification number, if applicable (SIRET, KVK, etc).

  • notesarray

    The notes linked to the entity.
  • pinnedboolean

    True if the entity is pinned.

  • servicesarray

    services
  • usersarray

    users
  • vatNumberstring

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

GET/v2/clients

List all Clients

This endpoint allows you to retrieve all the clients.

Request

GET
/v2/clients
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
}

POST/v2/clients

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

POST
/v2/clients
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"
}


GET/v2/clients/:id

Retrieve a client

This endpoint allows you to retrieve a client by providing their id.

Request

GET
/v2/clients/:id
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"
}


PUT/v2/clients/:id

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

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

Delete a client

This endpoint allows you to delete a client.

Request

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