Validate a record by its ID

Use the /v1/record/validate endpoint to validate configured address, phone, and email fields by record ID, apply optional auto-processing scenarios, and inspect saved results.

The /v1/record/validate endpoint validates a Salesforce record by its ID and saves the results on the record. Plauti Verify reads the record itself, validates every address, phone and email field configured for the object in the Verify setup, and saves the statuses the same way the "Plauti Verify - Validate All" flow action does.

Key Points

  • Send only the record ID. You don't need to query the record or send any field values.
  • Every configured field that has a value is validated in one request. An address is validated when its street and country have a value.
  • The validation statuses are saved on the record, and the record's Plauti Verify status is updated. Field values are not changed unless you name an auto-processing scenario.
  • Optionally, name an auto-processing scenario per service (address, phone, email). The scenario is applied to all fields of that service, for example to accept address suggestions.
  • The response contains the record's new status and the result for each field, keyed by field API name. Each result is the same output object the address, phone and email validation endpoints return.
  • Invalid requests are rejected before the validation starts, so they don't use credits.

Authentication

The validateRecord endpoint requires authentication via Salesforce OAuth 2.0. Requests must include a valid OAuth access token in the Authorization header.

For detailed authentication steps, refer to: Salesforce Authentication Guide.

Method Signature

HTTP
POST /services/apexrest/recordval/v1/record/validate

Parameters

Type Variable Description
RecordValidationInput_v1 input The structured input object containing the ID of the record to validate and, optionally, the auto-processing scenarios to apply.

Input

RecordValidationInput_v1

Field Type Required Description
recordId String Yes The Salesforce ID of the record to validate. The record's object must be configured in the Verify setup.
addressScenarioName String No The name of an address auto-processing scenario. It is applied to all validated address fields of the record.
phoneScenarioName String No The name of a phone auto-processing scenario. It is applied to all validated phone fields of the record.
emailScenarioName String No The name of an email auto-processing scenario. It is applied to all validated email fields of the record.

For a service without a scenario name, only the validation statuses of its fields are saved.

Which fields are validated

Plauti Verify uses the object's configuration in the Verify setup:

  • Address: validated when the street field and the country field have a value. When State and Country/Territory Picklists are enabled, the country code field must have a value as well.
  • Phone: validated when the phone field has a value. The phone country and format configured for the field are used.
  • Email: validated when the email field has a value.

Fields without a value are skipped.

What is saved on the record

The results are saved with one update of the record:

  • For each validated field: its validation result and, when they are configured in the Verify setup, its status code, status message, and status date and time fields, plus the phone type field for phone fields.
  • The record's Plauti Verify status.
  • With a scenario name: the field values the scenario changes, for example an accepted address suggestion or a formatted phone number.

Fields that were not validated in this request keep their earlier status, and that status is included when the record's status is determined.

The update is a regular record update, so your validation rules, triggers and flows on the object run as usual. Plauti Verify itself does not validate the record again on this update. The user must have edit access to the record.

Example Request

JSON
{
  "recordId": "00QAa00000JinjeMAB",
  "addressScenarioName": "Default Address"
}

Output

Return Type: RecordValidationOutput_v1

Field Type Description
recordId String The ID of the validated record.
recordStatus String The Plauti Verify status saved on the record, for example GREEN, AMBER or RED. It is CHANGED or MANUAL when another field on the record was changed or entered manually after its last validation.
status Status_v1 The status of the validation as a whole. Code 850 means the validation was processed. Each field result carries its own status and advice.
addresses Map of String to AddressValidationOutput_v1 The address results, keyed by the API name of the address's street field, for example MailingStreet.
phones Map of String to PhoneValidationOutput_v1 The phone results, keyed by the API name of the phone field, for example MobilePhone.
emails Map of String to EmailValidationOutput_v1 The email results, keyed by the API name of the email field, for example Email.

Each field result is the same object the single validation endpoints return:

The results show what the validation service returned. When a scenario changes field values, query the record to see the values that were saved.

Example Response

JSON
{
  "recordId": "00QAa00000JinjeMAB",
  "recordStatus": "GREEN",
  "status": {
    "message": "BulkItem Validation Succeeded.",
    "credit": false,
    "code": "850"
  },
  "addresses": {
    "Street": {
      "status": {
        "message": "Current address is verified up to Street. Suggestion contains an improved, verified address up to Street.",
        "credit": true,
        "code": "533"
      },
      "advice": "GREEN",
      "addresses": [
        {
          "street": "Stationsplein 1",
          "housenumber": null,
          "housenumberAddition": null,
          "postalCode": "3511 ED",
          "city": "Utrecht",
          "state": "Utrecht",
          "stateCode": "Utrecht",
          "country": "Nederland",
          "countryCode": "NL",
          "fullAddress": "Stationsplein 1, 3511 ED  Utrecht",
          "latitude": null,
          "longitude": null,
          "geoStatus": null,
          "status": {
            "message": "Current address is verified up to Street. Suggestion contains an improved, verified address up to Street.",
            "credit": true,
            "code": "533"
          },
          "advice": "GREEN"
        }
      ]
    }
  },
  "phones": {
    "Phone": {
      "status": {
        "message": "Current phone number is correct. Suggestion contains an improved, standardised phone number.",
        "credit": true,
        "code": "102"
      },
      "phoneNumber": "+31612345678",
      "phoneType": "MOBILE",
      "countryCode": "NL",
      "advice": "GREEN"
    }
  },
  "emails": {
    "Email": {
      "status": {
        "message": "Email is correct, but can’t be associated with a particular person.",
        "credit": true,
        "code": "313"
      },
      "complete": "info@plauti.com",
      "addressee": "info",
      "domain": "plauti.com",
      "free": false,
      "disposable": false,
      "advice": "GREEN"
    }
  }
}