Validation API
The Validations API is a versatile tool designed to ensure data accuracy and integrity across various fields, including addresses, phone numbers, and messages. You can easily verify the validity of input fields, enhancing overall data quality and reliability. Whether it's confirming the correctness of addresses for shipping purposes, validating phone numbers for communication channels, or ensuring message content meets specified criteria, the Validation API offers a comprehensive solution for call centers.
Base URL
The Validation API is currently on version 1.
https://api.ttgtoolbox.com/v1/validate
Authentication
Authentication is required for all API endpoints using an API Key sent in the request header. See the Authentication page to learn how to set up your keys and authenticate to the API.
Response codes & errors
We use conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx
range indicate success. Codes in the 4xx
range indicate an error that failed given the information provided (e.g., a required parameter was omitted, etc.). Codes in the 5xx
range indicate an error with our servers.
Code | Type | Details |
---|---|---|
200 | OK | The request succeeded. |
400 | Bad request | Bad request. Additional errors will be provided in the message. |
401 | Unauthorized | The request was failed, usually due missing or invalid API key. |
422 | Quota reached | The request was denied due to insufficient API credits. Free plans only. |
429 | Too many requests | The request was denied due to the number of allowed requests per minute being exceeded. |
500 | Internal server error | The request could not be completed due to an error on the server side. |
503 | Service unavailable | The server was unavailable. |
Tutorials & examples
Tutorials and guides, including downloadable example scripts, are available on the TTG Toolbox website.
A note on credits
All of our APIs use credits for billing and tracking purposes. The Validation API consumes credits as follows:
API | Endpoint | Credits per use |
---|---|---|
Validate Phone Number | /v1/validate/phonenumber | 0 free |
Validate Phone Number + Name | /v1/validate/phonenumber | 1 |
Validate Address | /v1/validate/address | 0.2 |
Validate Message | /v1/validate/message | 0.1 per 100 total characters |