- Home
- API Enriched
- Tenant And Identity
- validate_contact
- Validate contact.
Validate contact.
const url = 'https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/no_auth/validate_contact';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"name":"example","namespace":"example","spec":{"address1":"example","address2":"example","city":"example","contact_type":"MAILING","country":"example","county":"example","phone_number":"example","state":"example","state_code":"example","zip_code":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/no_auth/validate_contact \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "namespace": "example", "spec": { "address1": "example", "address2": "example", "city": "example", "contact_type": "MAILING", "country": "example", "county": "example", "phone_number": "example", "state": "example", "state_code": "example", "zip_code": "example" } }'It validates that:
- the provided country and zip code are not empty
- the provided country is in the configured list of countries
- a provided zip code matches a regexp for a given country.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Validate contacts request.
object
The name of the configuration object to be fetched. Is not used for now.
The namespace in which the configuration object is present. Is not used for now.
object
Network address or location
Network address or location
Configuration parameter for city
Configuration parameter for country
Configuration parameter for county
Configuration parameter for phone number
Current state of the resource
Configuration parameter for state code
IP address configuration
Responses
Section titled “Responses”A successful response.
ValidateRegistrationResponse is the response that indicates if the contact is valid or not. If the contact is not valid, a corresponding error code is returned. A list of supported validation is provided under Validate rpc call documentation.
object
Flag indicates if the contact is valid.
X-displayName : “Validation errors” collection of validation errors.
Contains information on a single validation error.
object
Path indicates the field that is not valid.
More descriptive error message.
Example
{ "err": "EUNKNOWN"}Returned when operation is not authorized.
Examplegenerated
exampleReturned when there is no permission to access resource.
Examplegenerated
exampleReturned when resource is not found.
Examplegenerated
exampleReturned when operation on resource is conflicting with current value.
Examplegenerated
exampleReturned when operation has been rejected as it is happening too frequently.
Examplegenerated
exampleReturned when server encountered an error in processing API.
Examplegenerated
exampleReturned when service is unavailable temporarily.
Examplegenerated
exampleReturned when server timed out processing request.
Examplegenerated
example