Live environment: send POST or GET request to:
http://premiercarebathing.xyz/api/live/
Testing environment: send POST or GET request to:
http://premiercarebathing.xyz/api/test/Note: The URL's above will redirect (302) - be sure your posting method will follow redirects Note: Send firstname=pixeltest to fire your pixel(s) but not store any information on our end
| Required Parameters | ||
|---|---|---|
| firstName string | First Name, min 3 characters | |
| lastName string | Last Name, min 3 characters | |
| phone string | Phone Number: 10 numeric digits required, all other text is stripped. Examples: (555) 555-5555 5555555555 555-555-5555 |
|
| adId integer | Advertiser ID - this will be provided to you | |
| Address Parameters (Optional) | ||
|---|---|---|
| street string | Street Address | |
| city string | City | |
| state string | State / Province; 2 character code, example: PA NY |
|
| zip string | Zip / Postal Code 55555 XYZ 123 |
|
| Other Parameters (Optional) | ||
|---|---|---|
| email string | Customer Email Address | |
| adName string | Advertiser Name - this will be provided to you if you need it | |
| customVar1 string | Custom Variable 1 | |
| ip string | User's IP Address 123.12.123.12 |
|
| subId string | Secondary ID - you can pass a secondary identifier string with this variable. [Previously named 'cpaPartnerId', you may pass either 'cpaPartnerId' or 'subId', but not both] |
|
| cid string, 20 | Custom Variable - Use for whatever you'd like to pass through | |
| dcid string, 20 | Custom Variable - Use for whatever you'd like to pass through | |
| promo string | Promotional Code / ID | |
| comments string | Customer freeform comments | |
| request string | Customer request type (Deprecated) RequestBrochure BookAssessment DownloadBrochure ExistingCustomer ReferAFriend Other |
|
|
||
|---|---|---|
| Success | {
"Success": true,
"Message": "Success",
"NewLeadID": "This will hold a unique return ID"
} |
|
| Error: Missing Required Fields | {
"Success": false,
"ErrorCode": 5,
"Message": "Missing Required Fields",
"Specifics": {
"fields": [
"first_name",
"last_name",
"number1",
"email",
"AdvId",
"AdvName"
]
}
} |
|
| Error: Invalid Phone Number | {
"Success": false,
"ErrorCode": 6,
"Message": "Invalid Phone Number",
"Specifics": {
"number1": "5555555"
}
} |
|
| Error: Invalid Email Address | {
"Success": false,
"ErrorCode": 7,
"Message": "Invalid Email Address",
"Specifics": {
"email": "bademail@@baddomain"
}
} |
|
| Error: Lead Already Exists | {
"Success": false,
"ErrorCode": 72,
"Message": "Lead Already Exists [web30]"
} |
|
| Error: State is Required | {
"Success": false,
"ErrorCode": 49,
"Message": "State is required"
} |
|
| Error: State is Required | {
"Success": false,
"ErrorCode": 48,
"Message": "State is not allowed",
"Specifics": {
"stateProvided": "state code provided",
"allowedStates": "list of accepted states"
}
} |
|
| Error: Valid Email Address Required | {
"Success": false,
"ErrorCode": 93,
"Message": "Valid Email Address Required",
"Specifics": {
"email": "email provided"
}
} |
|
| Error: Full Street Address Required | {
"Success": false,
"ErrorCode": 94,
"Message": "Full Street Address Required",
"Specifics": {
"street": "street address provided",
"city": "city provided",
"zip": "zip code provided"
}
} |
|
Document History
2016-06-03 | Changed 'cid' to 'string' type, 20 max length
2016-04-29 | Added 'subId' optional parameter
2016-04-29 | Retired cpaPartnerId
2016-04-26 | Changed usage for 'cid' and 'dcid' optional parameters
2016-04-26 | Added 'dcid' optional parameter
2016-04-22 | Added 'pixeltest' partner testing environment
2016-04-12 | Added `checkForDupes90` optional parameter
2016-04-12 | Added `checkForDupes60` optional parameter
2016-04-12 | Added `checkForDupes30` optional parameter
2016-01-26 | Added `checkForDupes` optional parameter
2015-04-28 | Added `cid` optional parameter
2015-04-14 | Added `customVar1` optional parameter
2015-04-22 | Change API URL to SSL