Skip to content

Ask about an opportunity

POST
/api/v1/opportunities/{id}/ask
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": [] }'
id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
Media typeapplication/json
object
question
required

The customer’s question about this solicitation.

string
>= 1 characters <= 1000 characters
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>
default: <= 10 items
object
role
required
string
Allowed values: user assistant
text
required
string
>= 1 characters <= 4000 characters

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
Allowed values: unauthorized forbidden no_membership membership_disabled unverified_email identity_conflict insufficient_scope validation_failed not_found missing_file unsupported_type file_too_large empty_document unreadable_document context_doc_cap_reached rule_cap_reached already_reverted superseded already_exists partner_not_authorized invalid_import rate_limited internal
message
required
string
requestId
required
string
issues
Array
issue_count
integer
>= -9007199254740991 <= 9007199254740991
Example
{
"error": "unauthorized"
}

Default Response

Media typeapplication/json
object
error
required
string
Allowed values: unauthorized forbidden no_membership membership_disabled unverified_email identity_conflict insufficient_scope validation_failed not_found missing_file unsupported_type file_too_large empty_document unreadable_document context_doc_cap_reached rule_cap_reached already_reverted superseded already_exists partner_not_authorized invalid_import rate_limited internal
message
required
string
requestId
required
string
issues
Array
issue_count
integer
>= -9007199254740991 <= 9007199254740991
Example
{
"error": "unauthorized"
}

Default Response

Media typeapplication/json
object
error
required
string
Allowed values: unauthorized forbidden no_membership membership_disabled unverified_email identity_conflict insufficient_scope validation_failed not_found missing_file unsupported_type file_too_large empty_document unreadable_document context_doc_cap_reached rule_cap_reached already_reverted superseded already_exists partner_not_authorized invalid_import rate_limited internal
message
required
string
requestId
required
string
issues
Array
issue_count
integer
>= -9007199254740991 <= 9007199254740991
Example
{
"error": "unauthorized"
}

Default Response

Media typeapplication/json
object
error
required
string
Allowed values: unauthorized forbidden no_membership membership_disabled unverified_email identity_conflict insufficient_scope validation_failed not_found missing_file unsupported_type file_too_large empty_document unreadable_document context_doc_cap_reached rule_cap_reached already_reverted superseded already_exists partner_not_authorized invalid_import rate_limited internal
message
required
string
requestId
required
string
issues
Array
issue_count
integer
>= -9007199254740991 <= 9007199254740991
Example
{
"error": "unauthorized"
}

Default Response

Media typeapplication/json
object
error
required
string
Allowed values: unauthorized forbidden no_membership membership_disabled unverified_email identity_conflict insufficient_scope validation_failed not_found missing_file unsupported_type file_too_large empty_document unreadable_document context_doc_cap_reached rule_cap_reached already_reverted superseded already_exists partner_not_authorized invalid_import rate_limited internal
message
required
string
requestId
required
string
issues
Array
issue_count
integer
>= -9007199254740991 <= 9007199254740991
Example
{
"error": "unauthorized"
}

Default Response

Media typeapplication/json
object
error
required
string
Allowed values: unauthorized forbidden no_membership membership_disabled unverified_email identity_conflict insufficient_scope validation_failed not_found missing_file unsupported_type file_too_large empty_document unreadable_document context_doc_cap_reached rule_cap_reached already_reverted superseded already_exists partner_not_authorized invalid_import rate_limited internal
message
required
string
requestId
required
string
issues
Array
issue_count
integer
>= -9007199254740991 <= 9007199254740991
Example
{
"error": "unauthorized"
}