Print Transaction
post
/rest/v16/commerceDocuments{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.
-
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 Name
The 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 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. -
languagePreference:
string
Title:
Language Attribute Value
language preference selected by user -
saveToQuote:
boolean
Title:
Save To Quote
Indicates if the print document is saved to the quote, valid values are {true, false} -
updateQuoteWithAttachment:
boolean
Title:
Update Quote With Attachment
Indicates if quote has to be updated with print document attachment file, valid values are {true, false} -
xslView:
integer
Title:
XSL View
Printer friendly proposals or history outputs generated from predefined XSL templates
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
-
Array of:
object Attachment properties.
Title:
Attachment properties.
Captures the id of the attachment.
Nested Schema : Attachment properties.
Type:
object
Title:
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 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. -
fileAttachmentAttribute:
string
Title:
File Attachment Attribute
Used for confirmation -
fileContent:
string
Title:
File Content
The Base64 encoded binary document value -
fileContentType:
string
Title:
File Content Type
The file content type -
fileTitle:
string
Title:
File Title
This 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 -i -H "Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQg" -H "Accept: application/json" https://sitename.oracle.com/rest/v16/commerceDocumentsOraclecpqoTransaction/18498612/actions/_print_document
Request Body Sample
{ "actionVariableName": "_action_process_print", "languagePreference": "en", "xslView": 3023147879, "attachmentIdsForMerge": ["3023197953", "-2"] }