ConnectCloud Developers

Score the completeness of contact data (tenant:crm:read)

POST /api/crm/v1/quality/score

Module: CRM · operationId: calculateQualityScore · Tag: Verification · Auth: access token (Authorization: Bearer <accessToken>)

Pure calculation, nothing is stored. Each of five criteria adds 20 points: VAT ID or tax number; email or phone; complete postal address (street, zip and city); at least one contact person; website. breakdown lists the criteria met, suggestions the missing ones (English texts).

Request body

application/json (required)

  • city (string): City.
  • companyName (string): Company name.
  • contactPersons (array of string): Names of the contact persons.
  • email (string): E-mail address.
  • phone (string): Phone number.
  • street (string): Street with house number.
  • taxNumber (string): Tax number.
  • vatId (string): VAT ID.
  • website (string): Website.
  • zip (string): Postal code.

Example:

{
  "city": "Mallersdorf-Pfaffenberg",
  "companyName": "Brauerei Gaßner GmbH \u0026 Co. KG",
  "contactPersons": [
    "Eva Gaßner"
  ],
  "email": "eva.gassner@brauerei-gassner.example",
  "phone": "+49 9441 50070",
  "street": "Brauhausstraße 4",
  "vatId": "DE999000231",
  "zip": "84066"
}

Responses

  • 200 Score (application/json)
  • 400 Invalid input (invalid): field names the first invalid field, details.fields every one (JSON paths for bodies, parameter names for the query). Some refusals have their own code (invalid_sort, invalid_stages, invalid_custom_fields, convert_target_required, invalid_csv, …). (application/json)
  • 401 Missing, invalid or expired token (no body).
  • 403 The token lacks the permission (insufficient permissions) or has no active tenant. (application/json)

Fields of the 200 answer:

  • score (integer, required): Data quality score in steps of 20. (max 100)
  • breakdown (array of string): Criteria met; null when none.
  • suggestions (array of string): Missing criteria; null when all are met.

Example 200 answer:

{
  "breakdown": [
    "VAT ID or Tax Number provided (+20%)",
    "Direct email or phone provided (+20%)",
    "Complete postal address provided (+20%)",
    "Contact persons linked (+20%)"
  ],
  "score": 80,
  "suggestions": [
    "Add company website URL"
  ]
}

Example request

curl -X POST 'https://api.mbcom.cloud/api/crm/v1/quality/score' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  --data '{"city":"Mallersdorf-Pfaffenberg","companyName":"Brauerei Gaßner GmbH \u0026 Co. KG","contactPersons":["Eva Gaßner"],"email":"eva.gassner@brauerei-gassner.example","phone":"+49 9441 50070","street":"Brauhausstraße 4","vatId":"DE999000231","zip":"84066"}'

View as Markdown · Interactive reference · OpenAPI