Skip to content

Validate contact.

POST
/no_auth/validate_contact
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.

Examples of this operation.

Media typeapplication/json
Request to validate contact

Validate contacts request.

object
name
name

The name of the configuration object to be fetched. Is not used for now.

string
>= 6 characters <= 1024 characters
namespace
namespace

The namespace in which the configuration object is present. Is not used for now.

string
>= 6 characters <= 1024 characters
spec
object
address1
address1

Network address or location

string
<= 1024 characters
address2
address2

Network address or location

string
<= 1024 characters
city
city

Configuration parameter for city

string
<= 1024 characters
contact_type
string
default: MAILING
Allowed values: MAILING BILLING PAYMENT
country
country

Configuration parameter for country

string
<= 1024 characters
county
county

Configuration parameter for county

string
<= 1024 characters
phone_number
phone_number

Configuration parameter for phone number

string
<= 1024 characters
state
state

Current state of the resource

string
<= 1024 characters
state_code
state code

Configuration parameter for state code

string
<= 1024 characters
zip_code
zip_code

IP address configuration

string
<= 1024 characters

A successful response.

Media typeapplication/json
Response to validate contact

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
err
string
default: EUNKNOWN
Allowed values: EUNKNOWN ETOKEN_OK ETOKEN_FAILED ETOKEN_NOTFOUND ETOKEN_USED ETOKEN_EXPIRED EUSER_OK EUSER_EXISTS EUSER_FAILED ECONTACT_VALIDATE_OK ECONTACT_EMPTY_COUNTRY ECONTACT_EMPTY_ZIP_CODE ECONTACT_UNKNOWN_COUNTRY ECONTACT_INVALID_ZIP EOK ENO_STATES ENO_CITIES
is_valid
Is a valid contact

Flag indicates if the contact is valid.

boolean format: boolean
validation_errors
validation errors

X-displayName : “Validation errors” collection of validation errors.

Array<object>
Validation error field

Contains information on a single validation error.

object
error_field
Error field

Path indicates the field that is not valid.

string
<= 1024 characters
error_message
Error message

More descriptive error message.

string
<= 1024 characters
Example
{
"err": "EUNKNOWN"
}

Returned when operation is not authorized.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when there is no permission to access resource.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when resource is not found.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when operation on resource is conflicting with current value.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when operation has been rejected as it is happening too frequently.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when server encountered an error in processing API.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when service is unavailable temporarily.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when server timed out processing request.

Media typeapplication/json
string format: string
Examplegenerated
example