API reference
Apply a proposal
Run an action previewed with preview_action, exactly as previewed. Applying the same proposal twice returns the first result. The key needs the scope of the action the proposal runs, too. Uses what its preview stated: 1 shortlist credit for a search or an expansion, nothing for anything else.
Needs scope searches:read.
POST
/
proposals
/
apply
Apply a proposal
curl --request POST \
--url https://api.revcenter.ai/v1/proposals/apply \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"proposal_id": "prop_eyJhIjoibGF1bmNoX3NlYXJjaCJ9.k3V9Q2xWm8"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({proposal_id: 'prop_eyJhIjoibGF1bmNoX3NlYXJjaCJ9.k3V9Q2xWm8'})
};
fetch('https://api.revcenter.ai/v1/proposals/apply', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revcenter.ai/v1/proposals/apply"
payload = { "proposal_id": "prop_eyJhIjoibGF1bmNoX3NlYXJjaCJ9.k3V9Q2xWm8" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"action": "launch_search",
"result": {
"search_id": "0b9e7d6c-5a4f-4e3d-8c2b-1a0f9e8d7c61",
"reused": false,
"compiled_by": "caller",
"criteria": {
"title_variants": [
"Plant Controller",
"Controller"
],
"metro": "Camden, NJ",
"geo_radius_mi": 40,
"years_experience": {
"min": 8,
"enforcement": "hard"
},
"must_have": [
"CPA"
]
},
"database_only": false
}
},
"meta": {
"request_id": "req_01JABCDEF"
}
}{
"error": {
"code": "search_not_found",
"message": "No search with that id in this workspace.",
"details": null,
"request_id": "req_01JABCDEF"
},
"meta": {
"request_id": "req_01JABCDEF"
}
}{
"error": {
"code": "search_not_found",
"message": "No search with that id in this workspace.",
"details": null,
"request_id": "req_01JABCDEF"
},
"meta": {
"request_id": "req_01JABCDEF"
}
}{
"error": {
"code": "search_not_found",
"message": "No search with that id in this workspace.",
"details": null,
"request_id": "req_01JABCDEF"
},
"meta": {
"request_id": "req_01JABCDEF"
}
}{
"error": {
"code": "search_not_found",
"message": "No search with that id in this workspace.",
"details": null,
"request_id": "req_01JABCDEF"
},
"meta": {
"request_id": "req_01JABCDEF"
}
}{
"error": {
"code": "search_not_found",
"message": "No search with that id in this workspace.",
"details": null,
"request_id": "req_01JABCDEF"
},
"meta": {
"request_id": "req_01JABCDEF"
}
}{
"error": {
"code": "search_not_found",
"message": "No search with that id in this workspace.",
"details": null,
"request_id": "req_01JABCDEF"
},
"meta": {
"request_id": "req_01JABCDEF"
}
}{
"error": {
"code": "search_not_found",
"message": "No search with that id in this workspace.",
"details": null,
"request_id": "req_01JABCDEF"
},
"meta": {
"request_id": "req_01JABCDEF"
}
}{
"error": {
"code": "search_not_found",
"message": "No search with that id in this workspace.",
"details": null,
"request_id": "req_01JABCDEF"
},
"meta": {
"request_id": "req_01JABCDEF"
}
}{
"error": {
"code": "search_not_found",
"message": "No search with that id in this workspace.",
"details": null,
"request_id": "req_01JABCDEF"
},
"meta": {
"request_id": "req_01JABCDEF"
}
}⌘I
Apply a proposal
curl --request POST \
--url https://api.revcenter.ai/v1/proposals/apply \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"proposal_id": "prop_eyJhIjoibGF1bmNoX3NlYXJjaCJ9.k3V9Q2xWm8"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({proposal_id: 'prop_eyJhIjoibGF1bmNoX3NlYXJjaCJ9.k3V9Q2xWm8'})
};
fetch('https://api.revcenter.ai/v1/proposals/apply', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revcenter.ai/v1/proposals/apply"
payload = { "proposal_id": "prop_eyJhIjoibGF1bmNoX3NlYXJjaCJ9.k3V9Q2xWm8" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"action": "launch_search",
"result": {
"search_id": "0b9e7d6c-5a4f-4e3d-8c2b-1a0f9e8d7c61",
"reused": false,
"compiled_by": "caller",
"criteria": {
"title_variants": [
"Plant Controller",
"Controller"
],
"metro": "Camden, NJ",
"geo_radius_mi": 40,
"years_experience": {
"min": 8,
"enforcement": "hard"
},
"must_have": [
"CPA"
]
},
"database_only": false
}
},
"meta": {
"request_id": "req_01JABCDEF"
}
}{
"error": {
"code": "search_not_found",
"message": "No search with that id in this workspace.",
"details": null,
"request_id": "req_01JABCDEF"
},
"meta": {
"request_id": "req_01JABCDEF"
}
}{
"error": {
"code": "search_not_found",
"message": "No search with that id in this workspace.",
"details": null,
"request_id": "req_01JABCDEF"
},
"meta": {
"request_id": "req_01JABCDEF"
}
}{
"error": {
"code": "search_not_found",
"message": "No search with that id in this workspace.",
"details": null,
"request_id": "req_01JABCDEF"
},
"meta": {
"request_id": "req_01JABCDEF"
}
}{
"error": {
"code": "search_not_found",
"message": "No search with that id in this workspace.",
"details": null,
"request_id": "req_01JABCDEF"
},
"meta": {
"request_id": "req_01JABCDEF"
}
}{
"error": {
"code": "search_not_found",
"message": "No search with that id in this workspace.",
"details": null,
"request_id": "req_01JABCDEF"
},
"meta": {
"request_id": "req_01JABCDEF"
}
}{
"error": {
"code": "search_not_found",
"message": "No search with that id in this workspace.",
"details": null,
"request_id": "req_01JABCDEF"
},
"meta": {
"request_id": "req_01JABCDEF"
}
}{
"error": {
"code": "search_not_found",
"message": "No search with that id in this workspace.",
"details": null,
"request_id": "req_01JABCDEF"
},
"meta": {
"request_id": "req_01JABCDEF"
}
}{
"error": {
"code": "search_not_found",
"message": "No search with that id in this workspace.",
"details": null,
"request_id": "req_01JABCDEF"
},
"meta": {
"request_id": "req_01JABCDEF"
}
}{
"error": {
"code": "search_not_found",
"message": "No search with that id in this workspace.",
"details": null,
"request_id": "req_01JABCDEF"
},
"meta": {
"request_id": "req_01JABCDEF"
}
}