Email - Send Transaction Email

post

/rest/v19/commerce{Stage}{ProcessVarName}{MainDocVarName}/{id}/actions/_send_email

Use this endpoint to collect email form data, generate the attachment, pushe the email to SMTP servers, and return confirmation on email sent time. The email recipient receives an email with the comments in the email body and an attachment that contains the quote information.

Request

Supported Media Types
Path Parameters
Body ()
Root Schema : Transaction-_send_emailRequest
Type: object
Show Source
Nested Schema : Attachments to be merged.
Type: array
Title: Attachments to be merged.
List of attachments to be merged for an email action.
Show Source
Nested Schema : Attachments to be merged.
Type: array
Title: Attachments to be merged.
List of attachments to be merged for an email or print action.
Show Source
Nested Schema : Attachment properties.
Type: object
Title: Attachment properties.
Captures the id of the attachment.
Show Source
Back to Top

Response

Supported Media Types

Default Response

Body ()
Root Schema : Transaction-_send_emailResponse
Type: object
Show Source
  • Title: Cache Instance Id
    The unique identifier for the entry of transaction data stored in the cache. This typically is obtained from first createTransaction or OpenTransaction action and passed along in subsequent Modify/Interact action to avoid reload transaction data from db.
  • Title: Message
    The summary message for sending email
Back to Top

Examples

The following example shows how to collect email form data, generates the attachment, pushes the email to SMTP servers, and returns confirmation on email sent time by submitting a POST request to the REST resource using cURL. For more information about cURL, see Use cURL.

curl -X POST -H "Authorization: Bearer <token>" -H "Accept: application/json"
https://sitename.oracle.com/rest/v19/commerceDocumentsOraclecpqoTransaction/18498612/actions/_send_email

Request Body Sample

{
  "actionVariableName": "_action_process_email_print",
  "comments": "test comments",
  "ccEmail": "",
  "toName": "Test To Name",
  "subject": "Test subject",
  "fromName": "Test From Name",
  "toEmail": "test@oracle.com",
  "languageCode": "en",
  "xslView": "3023146476",
  "attachmentIdsForMerge": ["-2", "3023146599", "3023146600"]
}

Response Body Sample

{
   "message": "Your email was sent on 06/26/2024 4: 42PM",
   "cacheInstanceId":  "5J9MTQAbF1ZmcJGnul6y4WOrAydsRpSyR2vvW1o7fWkrEkO89aiFxbEQSIUCEnF4"
}
Back to Top