Send Prospect (Exchange)
Description
Send an application form for a prospect to the Bold Penguin Exchange. You will need to map the prospect's responses to the Bold Penguin master question set and supply them in the request body for this endpoint.
The endpoint returns an application form ID.
Endpoint
Staging
https://partner-engine-uat.beta.boldpenguin.com/exchange_application_forms
Production
https://partner-engine.boldpenguin.com/exchange_application_forms
Authentication
This endpoint requires an access_token from the authentication endpoint in the same environment. Include it as a bearer token in an Authorization header for the request.
Authorization: Bearer <access_token>
Methods
POST
Request Syntax
The body of the request contains a completed application_form
in JSON format. This form must include mqs_phone
along with any additional question codes and answers from the Master Question Set.
{
"application_form": {
"answer_values": [
{
"code": "mqs_first_name",
"answer": "<string>"
},
{
"code": "mqs_last_name",
"answer": "<string>"
},
{
"code": "mqs_business_name",
"answer": "<string>"
},
{
"code": "mqs_phone",
"answer": "<string>"
},
...
]
}
}
Request Parameters
JSON Parameters
Your JSON payload must include an application_form
object with the following
properties:
- answer_values
- An array of one or more question code and answer tuples
- Type: JSON object
- Required: Yes
Response Syntax
{
"id": <uid string>,
...
}
Response Elements
- id
- The unique ID for this application form in the Exchange
- Type: String
Note: The response may include additional attributes that are not relevant and may be ignored.
Status Codes
- 201 Created
- 401 Unauthorized: The necessary authentication credentials are not present in the request or are incorrect.
- 422 Parameter validation failure (verify the request body against the master question set)
Note: A prospect can only be sent to Bold Penguin once. Bold Penguin uses the prospect's phone number to ensure uniqueness. If it is not unique, you will receive a 422 response.
Examples
Example Request
$ cat data.json
{
"application_form": {
"answer_values": [
{
"code": "mqs_first_name",
"answer": "John"
},
{
"code": "mqs_last_name",
"answer": "Smith"
},
{
"code": "mqs_business_name",
"answer": "XYZ Company"
},
{
"code": "mqs_phone",
"answer": "6145558888"
}
]
}
}
$ curl -v -X POST \
--header 'Authorization: Bearer <access_token>' \
--header "Content-Type: application/json" \
-d @data.json \
https://partner-engine-uat.beta.boldpenguin.com/exchange_application_forms
Example Response
{
"id": "2a1a6c3e-742f-4d26-b37c-995c72e2cedd",
"tenant_id": "76fe7443-2629-494c-b645-9c4d14d780e2",
"user_group_id": "a621af94-f454-4ffc-b56c-08971630b622",
"owner_id": "840337b8-831e-45a7-b7ff-3c7c83a9b3b2",
"parent_id": "8ef6bb6b-d946-4899-9531-fb81e1674815",
"completed_at": null,
"locked": false,
"taken_over": false,
"state": "in_progress",
"reference_id": "4LX-JXC-QJR",
"cable_token": "24435d7b-9b55-43dc-9ea0-9bcc037c99ca",
"redirect_url": null,
"quote_requests_count": 0,
"owner_is_guest": false,
"finished_quote_requests_count": 0,
"created_at": "2019-11-08T13:41:33.920-05:00",
"updated_at": "2019-11-08T13:41:34.698-05:00",
"cloned": false,
"inactive": false,
"global_origin_tenant_name": "Chuck's Agency",
"features": [],
"application_forms_question_sets": [],
"messages": [],
"quote_requests": []
}