RTE Template REST APIs
Overview
These REST API endpoints provide web services to support user-specific RTE templates for the JET Transaction UI RTE inline editor.
Administration
Get a List of Templates for an RTE Attribute
Get a List of Templates for an RTE Attribute | ||
---|---|---|
Description |
This REST API endpoint with the Commerce process variable name, document variable name, and RTE variable name query parameters can be used to retrieve a user-specific list of templates for the specified RTE attribute. |
|
URI Endpoint |
/rest/v17/commerceAttrRichTextTemplates?q={$and:[{'processVarName':'yourProcessVarName'},{'documentVarName':'yourMainDocumentVarName'},{'attributeVarName':'RTEattributeVarName'}} |
|
Endpoint Parameters |
q |
The following query parameters are required to retrieve a user-specific list of templates. Replace the italisized text with the applicable variable names from your site.
This endpoint supports query specifications that follow Oracle CPQ query and pagination parameters syntax. Query specifications follow a subset of MongoDB syntax and can be used to organize or narrow return data. For more information, see Manage Collections. |
HTTP Method | GET | |
Request Body Parameters |
None |
|
Response Body Parameters |
The response contains the list of templates for the queried RTE attribute. |
https://site.oracle.com/rest/v17/commerceAttrRichTextTemplates?q={$and:[{'processVarName':'oraclecpqo'},{'documentVarName':'transaction'},{'attributeVarName':'coverLetter_t'}]}&fields=name,id&orderby=name
{ "hasMore": false, "links": [{ "rel": "self", "href": "https://site.oracle.com/rest/v17/commerceAttrRichTextTemplates" } ], "items": [{ "name": "Templ", "id": 3022555768, "links": [{ "rel": "self", "href": "https://site.oracle.com/rest/v17/commerceAttrRichTextTemplates/3022555768" } ] }, { "name": "Temp2", "id": 3022555858, "links": [{ "rel": "self", "href": "https://site.oracle.com/rest/v17/commerceAttrRichTextTemplates/3022555858" } ] } ] }
https://site.oracle.com/rest/v17/commerceAttrRichTextTemplates/3022555858?fields=content
{ "content": "this is a <span style=\"font-size: 18pt;\">RTE</span> entry\n<div><strong><em>Ill </em></strong>try <span style=\"color: #00ff00;\">to</span> create a <span style=\"color: #ff0000;\">template</span></div>\n<div>and now I'm modifiing it \n<div> </div>\n</div>", "links": [{ "rel": "self", "href": "https://site.oracle.com/rest/v17/commerceRichTextTemplates/3022555858" } ] }
https://sitename.oracle.com/rest/v17/commerceAttrRichTextTemplates
{ "processVarName": "oraclecpqo", "documentVarName": "transaction", "attributeVarName": "coverLetter_t", "name": "MyNewTemplate", "content": "this is a <span style=\"font-size: 18pt;\">RTE</span> entry\n<div><strong><em>Ill </em></strong>try <span style=\"color: #00ff00;\">to</span> create a <span style=\"color: #ff0000;\">template</span></div>\n<div>and now I'm modifiing it \n<div> </div>\n</div>" }
{ "name": "MyNewTemplate", "id": 3022555768, "processVarName": "oraclecpqo", "documentVarName": "transaction", "attributeVarName": "coverLetter_t", "content": "this is a <span style=\"font-size: 18pt;\">RTE</span> entry\n<div><strong><em>Ill </em></strong>try <span style=\"color: #00ff00;\">to</span> create a <span style=\"color: #ff0000;\">template</span></div>\n<div>and now I'm modifiing it \n<div> </div>\n</div>" "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/commerceAttrRichTextTemplates/3022555768" } ] }
https://sitename.oracle.com/rest/v17/commerceAttrRichTextTemplates/3022555768
https://sitename.oracle.com/rest/v17/commerceAttrRichTextTemplates/3022555768
{ "name": "MyNewTemplateRenamed" }
{ "name": "MyNewTemplateRenamed", "id": 3022555768, "processVarName": "oraclecpqo", "documentVarName": "transaction", "attributeVarName": "coverLetter_t", "content": "this is a <span style=\"font-size: 18pt;\">RTE</span> entry\n<div><strong><em>Ill </em></strong>try <span style=\"color: #00ff00;\">to</span> create a <span style=\"color: #ff0000;\">template</span></div>\n<div>and now I'm modifiing it \n<div> </div>\n</div>" "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/commerceAttrRichTextTemplates/3022555768" } ] }
Create, Rename, or Delete Multiple RTE Templates
https://sitename.oracle.com/rest/v17/commerceAttrRichTextTemplates/actions/synchronize
{ "_client_driven_action": true, "documents": { "items": [{ "name": "sync5_1", "id": 3022596693, "_sync_action": "update" }, { "id": 3022596694, "_sync_action": "delete" }, { "processVarName": "oraclecpqo", "documentVarName": "transaction", "attributeVarName": "coverLetter_t", "name": "sync11", "content": "sync111", "_sync_action": "create" } ] } }
{ "documents": { "hasMore": false, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/commerceAttrRichTextTemplates" } ], "items": [{ "_sync_status": "updated", "attributeVarName": "coverLetter_t", "processVarName": "oraclecpqo", "documentVarName": "transaction", "name": "sync5_1", "dateModified": "2021-06-30T17:22:00.954Z", "id": 3022596693, "dateAdded": "2021-06-29T01:30:32.000Z", "content": "synce1", "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/commerceAttrRichTextTemplates/3022596693" } ] }, { "_sync_status": "created", "attributeVarName": "functionDefaultRTE", "processVarName": "transaction_bmClone_2", "documentVarName": "quote", "name": "sync11", "dateModified": "2021-06-30T17:22:11.262Z", "id": 3022597224, "dateAdded": "2021-06-30T17:22:11.262Z", "content": "sync111", "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v17/commerceAttrRichTextTemplates/3022597224" } ] } ] } }