Retrieves the summary for a custom prompt based on the provided input data
post
/ccstore/v1/ai/actions/completions
Retrieves the summary for a custom prompt based on the provided input data
Request
Supported Media Types
- application/json
Root Schema : completions_request
Type:
Show Source
object-
promptCode:
string
The code of the custom prompt
-
propertyValues:
array propertyValues
The pair of property key and value
Example:
{
"promptCode":"quote_summary",
"propertyValues":[
{
"propertyKey":"transactionName",
"propertyValue":"Quote"
},
{
"propertyKey":"transactionID",
"propertyValue":"TXN_5678"
},
{
"propertyKey":"contractStartDate",
"propertyValue":"23/05/2025"
},
{
"propertyKey":"currency",
"propertyValue":"USD"
},
{
"propertyKey":"contractEndDate",
"propertyValue":"23/05/2027"
},
{
"propertyKey":"totalAnnualValue",
"propertyValue":200000
},
{
"propertyKey":"totalContractListValue",
"propertyValue":400000
},
{
"propertyKey":"createdDate",
"propertyValue":"05/05/2025"
},
{
"propertyKey":"contractedPeriods",
"propertyValue":"2"
},
{
"propertyKey":"totalDiscountPercent",
"propertyValue":"10"
}
]
}Nested Schema : items
Type:
Show Source
object-
propertyKey:
string
The variable key defined in the prompt
-
propertyValue:
string
The value of the variable
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : completions_response
Type:
Show Source
object-
lastUpdateDate:
string
The last updated date
-
summaryText:
string
The AI generated summary text
Example Response (application/json)
{
"summaryText":"Summary of Quote TXN_5678:\n\nQUOTE TXN_5678 has a total contract value of USD 400,000, with an annual contract value of USD 200,000. The contract period is 2 years, starting on May 23, 2025, and ending on May 23, 2027. The total discount percentage is 10%, resulting in a discounted total of USD 360,000.This quote supports the objective, as it includes a total discount of 10%, which aligns with the goal of reducing cost or improving efficiency.",
"lastUpdateDate":null,
"links":[
{
"rel":"self",
"href":"http://phoenix311795.appsdev.fusionappsdphx1.oraclevcn.com:8080/ccstore/v1/ai/actions/completions"
}
]
}
Default Response
The error response.
The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud:
|Error Code|Description|
|------------------|------------------|
|33303|An error occurred while generating the summary. Please try again.|
|33305|The property 'promptCode' is required and cannot be null or empty.|
|33306|The property 'propertyValues' is required and cannot be null or empty.|
|33307|The property 'propertyValues' must be a non-empty JSON array.|
Root Schema : errorModel
Type:
Show Source
object-
devMessage:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
errors:
array errors
An optional list of errors if multiple errors were encountered
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code
-
type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
arrayAn optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object-
devMessage:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code