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
Body ()
Root Schema : completions_request
Type: object
Show Source
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 : propertyValues
Type: array
The pair of property key and value
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

Following model is returned when operation succeeds.
Body ()
Root Schema : completions_response
Type: object
Show Source
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.|
Body ()
Root Schema : errorModel
Type: object
Show Source
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top