Print Transaction
post
/rest/v19/commerce{Stage}{ProcessVarName}{MainDocVarName}/{id}/actions/_print_document
Use this endpoint to print the generated transaction document.
Request
Supported Media Types
- application/json
Path Parameters
-
MainDocVarName(required): string
The variable name of the main document, note the first letter must be capitalized.
-
ProcessVarName(required): string
The variable name of the commerce process, note the first letter must be capitalized.
-
Stage(required): string
The stage variable identifies where a transaction is within the Commerce process flow. (Documents, Quotes, Agreements, or Orders)
-
id(required): integer
Current unique user-side ID. This is the internal identifier for a transaction within a CPQ site.
Root Schema : Transaction-_print_documentRequest
Type:
Show Source
object-
actionVariableName:
string
Title:
Action Variable NameThe print action variable name used to look up print action configuration -
attachmentIdsForMerge:
array Attachments to be merged.
Title:
Attachments to be merged.List of attachments to be merged for an email or print action. -
cacheInstanceId:
string
Title:
Cache Instance IdThe 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. -
languagePreference:
string
Title:
Language Attribute ValueLanguage attribute value for the print document -
saveToQuote:
boolean
Title:
Save To QuoteIndicates if the print document is saved to the quote, valid values are {true, false} -
updateQuoteWithAttachment:
boolean
Title:
Update Quote With AttachmentIndicates if quote has to be updated with print document attachment file, valid values are {true, false} -
xslView:
integer
Title:
XSL ViewPrinter friendly proposals or history outputs generated from predefined XSL templates
Nested Schema : Attachments to be merged.
Type:
arrayTitle:
Attachments to be merged.List of attachments to be merged for an email or print action.
Show Source
-
Array of:
object Attachment properties.
Title:
Attachment properties.Captures the id of the attachment.
Nested Schema : Attachment properties.
Type:
objectTitle:
Attachment properties.Captures the id of the attachment.
Show Source
-
id:
integer
ID for the attachment.
Response
Supported Media Types
- application/json
Default Response
Root Schema : Transaction-_print_documentResponse
Type:
Show Source
object-
cacheInstanceId:
string
Title:
Cache Instance IdThe 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. -
fileAttachmentAttribute:
string
Title:
File Attachment AttributeUsed for confirmation -
fileContent:
string
Title:
File ContentThe Base64 encoded binary document value -
fileContentType:
string
Title:
File Content TypeThe file content type -
fileTitle:
string
Title:
File TitleThis file name used when saving to the quote file attachment attribute, or when downloading the file
Examples
The following example shows how to print the generated transaction document 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/_print_document
Request Body Sample
{
"actionVariableName": "_action_process_print",
"languagePreference": "en",
"xslView": 3023147879,
"attachmentIdsForMerge": ["3023197953", "-2"]
}