Create a Lightbox document

post

/crmRestApi/resources/11.13.18.05/lightboxDocuments

Request

Header Parameters
  • If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
  • The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
  • Contains one of the following values: true or false. If true, the server performs an Upsert operation instead of a Create operation. During an Upsert operation, the server attempts to find an existing resource that matches the payload. If a match is found, the server updates the existing resource instead of creating a new one. If not found or false (default), the server performs a Create operation. Note that the Upsert operation isn't supported for date-effective REST resources.
Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
Nested Schema : Lightbox Scoring Signals
Type: array
Title: Lightbox Scoring Signals
The resource is used to view the signals captured when a document is downloaded.
Show Source
Nested Schema : Lightbox Document Pages
Type: array
Title: Lightbox Document Pages
The Lightbox document page resource is used to view and update the pages within a Lightbox document.
Show Source
Nested Schema : Document-shared-with-user Signals
Type: array
Title: Document-shared-with-user Signals
The resource is used to view the signals captured when a document is shared with a user.
Show Source
Nested Schema : Document-unshared-with-user Signals
Type: array
Title: Document-unshared-with-user Signals
The resource is used to view the signals captured when a document share with a user is deleted.
Show Source
Nested Schema : Document-Viewed-Within-Lightbox Signals
Type: array
Title: Document-Viewed-Within-Lightbox Signals
The resource is used to view the signals that the document is viewed within Lightbox.
Show Source
Nested Schema : Document-viewed-outside-Lightbox Signals
Type: array
Title: Document-viewed-outside-Lightbox Signals
The resource is used to view and create the signals captured when document is viewed by a process outside Lightbox.
Show Source
Nested Schema : Shared-person Instances
Type: array
Title: Shared-person Instances
The shared person resource is used to view, create, and delete document shares. A document share lets you share the Lightbox document with another user.
Show Source
Nested Schema : lightboxDocuments-documentDownloadSignals-item-post-request
Type: object
Show Source
Nested Schema : lightboxDocuments-documentPages-item-post-request
Type: object
Show Source
Nested Schema : Page Added to Cart Signals
Type: array
Title: Page Added to Cart Signals
Show Source
Nested Schema : Page Downloaded in Cart Signals
Type: array
Title: Page Downloaded in Cart Signals
Show Source
Nested Schema : Page Viewed Externally Signals
Type: array
Title: Page Viewed Externally Signals
Show Source
Nested Schema : lightboxDocuments-documentPages-pageAddedToCartSignals-item-post-request
Type: object
Show Source
Nested Schema : lightboxDocuments-documentPages-pageDownloadedInCartSignals-item-post-request
Type: object
Show Source
Nested Schema : schema
Type: object
Show Source
Nested Schema : lightboxDocuments-documentSharedToUserSignals-item-post-request
Type: object
Show Source
Nested Schema : lightboxDocuments-documentUnsharedFromUserSignals-item-post-request
Type: object
Show Source
Nested Schema : lightboxDocuments-documentViewedInLightboxSignals-item-post-request
Type: object
Show Source
Nested Schema : schema
Type: object
Show Source
Nested Schema : schema
Type: object
Show Source
Back to Top

Response

Supported Media Types

Default Response

The following table describes the default response for this task.
Headers
  • If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
  • The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Body ()
Root Schema : lightboxDocuments-item-response
Type: object
Show Source
Nested Schema : Lightbox Scoring Signals
Type: array
Title: Lightbox Scoring Signals
The resource is used to view the signals captured when a document is downloaded.
Show Source
Nested Schema : Lightbox Document Pages
Type: array
Title: Lightbox Document Pages
The Lightbox document page resource is used to view and update the pages within a Lightbox document.
Show Source
Nested Schema : Document-shared-with-user Signals
Type: array
Title: Document-shared-with-user Signals
The resource is used to view the signals captured when a document is shared with a user.
Show Source
Nested Schema : Document-unshared-with-user Signals
Type: array
Title: Document-unshared-with-user Signals
The resource is used to view the signals captured when a document share with a user is deleted.
Show Source
Nested Schema : Document-Viewed-Within-Lightbox Signals
Type: array
Title: Document-Viewed-Within-Lightbox Signals
The resource is used to view the signals that the document is viewed within Lightbox.
Show Source
Nested Schema : Document-viewed-outside-Lightbox Signals
Type: array
Title: Document-viewed-outside-Lightbox Signals
The resource is used to view and create the signals captured when document is viewed by a process outside Lightbox.
Show Source
Nested Schema : Shared-person Instances
Type: array
Title: Shared-person Instances
The shared person resource is used to view, create, and delete document shares. A document share lets you share the Lightbox document with another user.
Show Source
Nested Schema : lightboxDocuments-documentDownloadSignals-item-response
Type: object
Show Source
Nested Schema : lightboxDocuments-documentPages-item-response
Type: object
Show Source
Nested Schema : Page-added-to-cart Signals
Type: array
Title: Page-added-to-cart Signals
The resource is used to view the signals captured when pages of a document are added to cart.
Show Source
Nested Schema : Downloaded-from-cart Signals
Type: array
Title: Downloaded-from-cart Signals
The resource is used to view the signals captured when pages within a cart are downloaded by the user.
Show Source
Nested Schema : Page-viewed-outside-Lightbox Signals
Type: array
Title: Page-viewed-outside-Lightbox Signals
The resource is used to view and create signals that a Lightbox document's pages are viewed outside Lightbox.
Show Source
Nested Schema : lightboxDocuments-documentPages-pageAddedToCartSignals-item-response
Type: object
Show Source
Nested Schema : lightboxDocuments-documentPages-pageDownloadedInCartSignals-item-response
Type: object
Show Source
Nested Schema : lightboxDocuments-documentPages-pageViewedOutsideLightboxSignals-item-response
Type: object
Show Source
Nested Schema : lightboxDocuments-documentSharedToUserSignals-item-response
Type: object
Show Source
Nested Schema : lightboxDocuments-documentUnsharedFromUserSignals-item-response
Type: object
Show Source
Nested Schema : lightboxDocuments-documentViewedInLightboxSignals-item-response
Type: object
Show Source
Nested Schema : lightboxDocuments-documentViewedOutsideLightboxSignals-item-response
Type: object
Show Source
Nested Schema : lightboxDocuments-sharedPersons-item-response
Type: object
Show Source
Back to Top

Examples

The following example shows how to create a Lightbox document by submitting a POST request on the REST resource using cURL.

Create a document placeholder

cURL Command

curl --basic --user user_name:passwd -H "Content-Type: application/vnd.oracle.adf.resourceitem+json" -X POST -d '{"FileName":"16x4 Template.pptx"}' https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.0.0/lightboxDocuments

Example of Request Body

The following shows an example of the request body in JSON format.

{
"FileName":"16x4 Template.pptx"
}

Example of Response Body

The following example shows the contents of the response body in JSON format.

{
  "LightboxDocumentId": "96f6b368-115c-4e09-8072-d169f332a1b9",
  "DocumentTypeCode": "UNKNOWN",
  "FileName": "16x4 Template.pptx",
  "OriginalOwnerPartyId": 100010037456865,
  "OriginalOwnerName": "Matt Hooper",
  "OriginalOwnerEmailAddress": "sendmail-test-discard@your_org.com",
  "DocumentOwnerFlag": true,
  "CurrentRevision": "0 (Uploading)",
  "KeyPageSequenceNumber": 1,
  "IsDocumentReadyFlag": false,
  "SharedDate": null,
  "CurrencyCode": "USD",
  "DocumentPageCount": 0,
  "DocumentThumbnailURL": "https://servername.fa.us2.oraclecloud.com/crmCommon/images/qual_placeholdergeneric_210.png",
  "FileSize": -1,
  "DocumentDownloadURL": null,
  "DocumentType": "Unknown",
  "DocumentDownloadedCount": 0,
  "DocumentSharedToEntityCount": 0,
  "DocumentSharedToUserCount": 0,
  "DocumentViewedOutsideLightboxCount": 0,
  "DocumentViewedInLightboxCount": 0,
  "DocumentUnsharedFromUserCount": 0,
  "DeleteFlag": true,
  "IsSharedWithCurrentUserFlag": true,
  "IsDocumentUploadInProgressFlag": true,
  "UpdateFlag": false,
  "UploadDate": "2016-10-24T02:22:03-07:00",
  "CreationDate": "2016-10-24T02:22:03-07:00",
  "CreatedBy": "MHoope",
  "LastUpdateDate": "2016-10-24T02:22:03-07:00",
  "LastUpdatedBy": "MHoope",
  "LastUpdateLogin": "3F98DE06736C62FDE053DF00F40A2D76",
  "DocumentTitle": "16x4 Template",
 ...
}

Upload content for document placeholder

cURL Command

curl --basic --user user_name:passwd -H "Content-Type: application/octet-stream" --data-binary @"/path/to/16x4 Template.pptx" -X PUT https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.0.0/lightboxDocuments/{lightboxDocumentID}/enclosure/DocumentContents

Create a Lightbox document with base64-encoded content in the message payload

cURL Command

curl --basic --user user_name:passwd -H "Content-Type: application/vnd.oracle.adf.resourceitem+json" -X POST --data-ascii @"/path/to/preparedfile/theSOAEssentialsPDF.json" https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.0.0/lightboxDocuments

Example of Request Body

The following shows an example of the request body in JSON format.

{
"FileName":"The-SOA-Essentials.pdf","DocumentContents":"JVBERi0xLjIgDSXi48/TDQogDTEwIDAgb2JqDTw8DS9MZW5ndGggMTEgMCBSDS9GaWx0ZXIgL0ZsYXRlRGVjb2RlIA0+Pg1zdHJlYW0NCkiJJczBCYAwEATACq6HferDmAtJzreoFVwHAUUhiH5s30TZ37C7o5I4iI/GBUAnsqi5N1C/WDD/vhaHJnTWsJMqDxq00INmpQvEEkz4pjKYUnA81GWMvnDK5W3PjOmkF/t
…"
}

Example of Response Body

The following example shows the contents of the response body in JSON format.

{
  "LightboxDocumentId": "a2084998-6a97-4d36-87b8-8dec1a7815a7",
  "DocumentTypeCode": "UNKNOWN",
  "FileName": "OMG-and-the-SOA-1.pdf",
  "OriginalOwnerPartyId": 100010034246683,
  "OriginalOwnerName": "Waternoose,Henry",
  "OriginalOwnerEmailAddress": "mayank.p.singh@oracle.com",
  "DocumentOwnerFlag": true,
  "CurrentRevision": "0 (Uploading)",
  "KeyPageSequenceNumber": 1,
  "IsDocumentReadyFlag": false,
  "SharedDate": null,
  "CurrencyCode": "USD",
  "DocumentPageCount": 0,
  "DocumentThumbnailURL": "https://servername.fa.us2.oraclecloud.com//crmCommon/images/qual_placeholdergeneric_210.png",
  "FileSize": -1,
  "DocumentDownloadURL": null,
  "DocumentType": "Unknown",
  "DocumentDownloadedCount": 0,
  "DocumentSharedToEntityCount": 0,
  "DocumentSharedToUserCount": 0,
  "DocumentViewedOutsideLightboxCount": 0,
  "DocumentViewedInLightboxCount": 0,
  "DocumentUnsharedFromUserCount": 0,
  "DeleteFlag": true,
  "IsSharedWithCurrentUserFlag": true,
  "IsDocumentUploadInProgressFlag": true,
  "UpdateFlag": false,
  "UploadDate": "2016-11-02T00:03:17-07:00",
  "CreationDate": "2016-11-02T00:03:16-07:00",
  "CreatedBy": "HWater",
  "LastUpdateDate": "2016-11-02T00:03:17-07:00",
  "LastUpdatedBy": "HWater",
  "LastUpdateLogin": "401BEDB4B0822D47E053DF00F40A1D0D",
  "DocumentTitle": "OMG-and-the-SOA-1",
 ...
}
Back to Top