Ask about an opportunity
POST
/api/v1/opportunities/{id}/ask
const url = 'https://app.prokure.ca/api/v1/opportunities/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/ask';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"question":"example","history":[]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.prokure.ca/api/v1/opportunities/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/ask \ --header 'Content-Type: application/json' \ --data '{ "question": "example", "history": [] }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
question
required
The customer’s question about this solicitation.
string
history
Earlier turns of this conversation, oldest first: alternating user and assistant turns, starting with a user turn. Only the most recent few are sent to the model.
Array<object>
object
role
required
string
text
required
string
Responses
Section titled “Responses”Default Response
Media typeapplication/json
object
answer
required
Plain-text answer grounded in the notice, the extraction and the company profile.
string
model
required
Model that composed the answer.
string
Examplegenerated
{ "answer": "example", "model": "example"}Default Response
Media typeapplication/json
object
error
required
string
message
required
string
requestId
required
string
issues
Array
issue_count
integer
Example
{ "error": "unauthorized"}Default Response
Media typeapplication/json
object
error
required
string
message
required
string
requestId
required
string
issues
Array
issue_count
integer
Example
{ "error": "unauthorized"}Default Response
Media typeapplication/json
object
error
required
string
message
required
string
requestId
required
string
issues
Array
issue_count
integer
Example
{ "error": "unauthorized"}Default Response
Media typeapplication/json
object
error
required
string
message
required
string
requestId
required
string
issues
Array
issue_count
integer
Example
{ "error": "unauthorized"}Default Response
Media typeapplication/json
object
error
required
string
message
required
string
requestId
required
string
issues
Array
issue_count
integer
Example
{ "error": "unauthorized"}Default Response
Media typeapplication/json
object
error
required
string
message
required
string
requestId
required
string
issues
Array
issue_count
integer
Example
{ "error": "unauthorized"}