Submitting a Web Enquiry (r=WebEnquiry)
1. Endpoint and Method
|
Detail
|
Value
|
|
Endpoint
|
https://id.autovusolutions.com/api/publicquery.aspx
|
|
Method
|
POST
|
|
Content Type
|
application/x-www-form-urlencoded
|
2. Authentication
Authentication must be handled using the Basic Auth HTTP header.
-
Take your Client ID (CID).
-
When configuring your client (e.g., Postman, or programming libraries), enter your Client ID (CID) as the Username and leave the Password field empty.
-
Send the resulting Base64 credential string in the Authorization header prefixed with Basic .
3. Mandatory Fields (Validation)
For a WebEnquiry to be successfully processed, the following minimum data requirements must be met:
-
Query Identifier (r) must always be present and set to WebEnquiry.
-
Enquiry Details (EnqDetails) must always be provided.
-
At least one of the following primary contact/location fields must be present:
4. Available Data Fields
The following parameters can be submitted in the request body (or query string). Please note the maximum lengths enforced by the API.
|
Parameter
|
Max Length
|
Mandatory?
|
Description
|
|
r
|
50
|
Yes
|
Query identifier. Must be WebEnquiry.
|
|
PersonFirstname
|
50
|
No
|
The individual's first name.
|
|
PersonLastName
|
50
|
No
|
The individual's last name.
|
|
PersonName
|
100
|
No
|
Full name. If blank, is generated from Title/First/Last Name.
|
|
PersonTitle
|
50
|
No
|
Title (e.g., Mr, Ms, Dr).
|
|
CompanyName
|
50
|
No
|
The name of the company/organisation.
|
|
EnqType
|
50
|
No
|
The category or type of enquiry.
|
|
Email
|
N/A
|
Conditional*
|
Primary email address.
|
|
Mobile
|
N/A
|
No
|
Mobile phone number.
|
|
Landline
|
N/A
|
No
|
Landline phone number.
|
|
Fax
|
N/A
|
No
|
Fax number.
|
|
Web
|
N/A
|
No
|
Website URL.
|
|
Add1
|
N/A
|
Conditional*
|
Address Line 1.
|
|
Add2
|
N/A
|
No
|
Address Line 2.
|
|
BuildingName
|
N/A
|
No
|
Building name/Sub-premise.
|
|
Town
|
N/A
|
No
|
Town/City.
|
|
County
|
N/A
|
No
|
County/State.
|
|
Postcode
|
N/A
|
Conditional*
|
Postcode/Zip Code.
|
|
Country
|
N/A
|
No
|
Country. If provided, must be in ISO 3166-1 alpha-2 format (e.g., GB).
|
|
TagName
|
N/A
|
No
|
A custom tag or source marker for the enquiry.
|
|
EnqDetails
|
N/A
|
Yes
|
REQUIRED. The main content of the enquiry. (HTML tags are stripped).
|
|
AdditionalNotes
|
N/A
|
No
|
Any extra notes to be saved with the enquiry. (HTML tags are stripped).
|
5. cURL Example
This example demonstrates submitting an enquiry using Basic Auth and providing the minimum required fields (EnqDetails and Email).
# IMPORTANT: Replace <YOUR_CLIENT_ID> with your actual API key, and <BASE64_ENCODED_CID:> with the Base64 encoding of 'YOUR_CLIENT_ID:'
curl -X POST '[https://id.autovusolutions.com/api/publicquery.aspx](https://id.autovusolutions.com/api/publicquery.aspx)' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Authorization: Basic <BASE64_ENCODED_CID:>' \
--data-urlencode 'r=WebEnquiry' \
--data-urlencode 'PersonFirstname=John' \
--data-urlencode 'PersonLastName=Doe' \
--data-urlencode 'Email=john.doe@example.com' \
--data-urlencode 'EnqDetails=I am interested in service X, please call me back.'
Success Response
{
"Status": "Success",
"ErrorMessage": ""
}
Fail Response
{
"Status": "Fail",
"ErrorMessage": "WebEnquiry failed validation: Enquiry Details (EnqDetails) is mandatory.",
"LocationID": "PageLoad"
}