Legacy Price Reject
INFO
Price Reject API V1 Coming Soon!
Lead Post Response
On the initial Lead Post, optionally, lenders may reject the default lead price yet respond back with lower lead prices. If posted back in, the lead would be automatically accepted using the below specifications.
Response Parameters
When price reject is enabled in Decision Cloud the lead post response is slightly different. There are two main differences:
- The "result" field may contain a third possible value of "P" for pending.
- If pending, an additional "price_reject" field will be added.
INFO
See Legacy Lead Post Response Parameters for full response details.
status
stringContains the status on the request.
result
stringContains the result of the lead post. With price reject there are now three possible results:
- A = Lead Accepted
- R = Lead Rejected
- P = Lead Pending
A price reject response will always have a result of "P" which means the lead is pending a price reject offer.
price_reject
objectapi_key
stringThe campaign API key of the lead.
TIP
This is the "api_key" to be used in the price reject request.
price_reject.offers
array[object]id
integerThe offer ID that correlates to the lead and the offer price for that particular lead.
TIP
This is the "price_reject_offer_id" to be used in the price reject request.
price
floatThe amount of the offer price.
expires_in
integerThe number of seconds until the offer expires. This ranges anywhere from 5 minutes (300 seconds) up to 96 hours (345600 seconds).
{
"status": "OK",
"result": "P",
"price_reject": {
"api_key": "{API_KEY}",
"offers": [
{
"id": 1,
"price": 15,
"expires_in": 900
},
{
"id": 2,
"price": 10,
"expires_in": 300
}
]
}
}Price Reject Request
Header Parameters
Request Parameters
api_key
stringrequiredThe price_reject.api_key returned in the lead post response.
price_reject_offer_id
integerrequiredThe price_reject.offers.*.id returned in the lead post response of the offer to be to accepted.
Response Parameters
The responses are identical to a regular lead post response with the exception of the various error responses.
INFO
See Legacy Lead Post Response Parameters for full response details.
status
stringContains the status on the request.
result
nullablestringContains the result of the lead post.
redirect_url
nullablestringContains the URL to redirect the customer to if the lead has been accepted.
errors
nullablearrayContains any errors on the request.
INFO
Errors from this request may be used to determine why an offer could not be accepted. See example error responses.
POST /api/legacy
curl --request POST \
"https://api.decisioncloud.me/api/legacy" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"api_key\": \"{API_KEY}\",
\"price_reject_offer_id\": 1
}"const url = new URL(
"https://api.decisioncloud.me/api/legacy"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"api_key": "{API_KEY}",
"price_reject_offer_id": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.decisioncloud.me/api/legacy',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'api_key' => '{API_KEY}',
'price_reject_offer_id' => 1,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api.decisioncloud.me/api/legacy'
payload = {
"api_key": "{API_KEY}",
"price_reject_offer_id": 1
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json(){
"status": "OK",
"result": "A",
"redirect_url": "https:\/\/api.decisioncloud.me\/redirect\/?t=fbcd830ee915aie8ddf3018b52adff76"
}{
"status": "OK",
"result": "R"
}{
"status": "ERROR",
"errors": [
"Invalid price reject offer."
]
}{
"status": "ERROR",
"errors": [
"Accepted price reject offer."
]
}{
"status": "ERROR",
"errors": [
"Revoked price reject offer."
]
}{
"status": "ERROR",
"errors": [
"Expired price reject offer."
]
}{
"status": "ERROR",
"errors": [
"Price reject not enabled for this campaign."
]
}