Documents Endpoint

GET /channels/{channel_id}/documents/{document_identifier}

Get the JSON representation of a document in a Bloomreach Content channel including all the documents it references.

See Document JSON Representation for a full walkthrough of the response format.

Parameters

Name

Description

channel_id *

string

(path)

Channel ID

document_identifier

string

(path)

The can be any of the following elements:

  • The uuid of a document: /delivery/site/v1/channels/brxsaas/documents/9a3f1f5c-5302-43c4-9bec-584e810ffa2f
  • A same uuid in the format used within the Delivery APIs: /delivery/site/v1/channels/brxsaas/documents/u9a3f1f5c530243c49bec584e810ffa2f
  • The absolute path of the document in the repository: /delivery/site/v1/channels/brxsaas/documents/content/documents/brxsaas/articles/highlighted
  • The relative path to the document for the current channel (only valid if the content is a descendant of the root content folder of the current channel): /delivery/site/v1/channels/brxsaas/documents/articles/highlighted

Authorization

string

(header)

ℹ️ The Authorization header is only required for previewing a channel in the Experience manager, not for regular public consumption of the API. Preview channel authentication is built into the Bloomreach SPA SDK. Channel preview works out of the box with any SPA built using the SDK. Only SPAs not using the SDK need to implement preview authentication.

When the Experience manager requests the preview channel for the first time, it appends the external frontend application's URL with a 'query' request parameter containing a JSON Web Token. In order to access the preview channel data through a Page Delivery API request, the frontend application must include this token in the Authorization header using the Bearer schema. See Delivery API Preview Authentication for more details.

Mandatory in Experience manager channel preview context only

Example:

Authorization: Bearer xxxxx.yyyyy.zzzzz

As of version 20220629, this header may also contain an anonymous UUID associated with a specific project for which External preview support has been enabled. In this case, the response will contain unpublished data associated with the specific project branch that is linked to the UUID value, rather than the currently published version.

Example:

Authorization: Bearer 56e7e6ca-1f62-4ea0-97ac-548a9025e301

preview-token

string

(request parameter)

As of version 20220629, this query string style parameter is available as an alternative to the Authorization header as described above. It provides equivalent functionality and is intended to support developer use cases where it is most convenient to access the Delivery API preview response without manipulating HTTP request headers. This can be useful for simple exploratory testing with a standard web browser, for example.

Example:

/delivery/site/v1/channels/brxsaas/documents/content/documents/brxsaas/articles/highlighted?preview-token=56e7e6ca-1f62-4ea0-97ac-548a9025e301

Response

Code: 200
Description: OK Media type: application/json
Example:

{
   "meta":{   
      "product": "brx",
      "version":"1.0",
      "branch":"master"
   },
   "document":{
      "$ref":"/page/u10811792bf4b42c4bbf1ab303fc5ebcf"
   },
   "content":{
      "u10811792bf4b42c4bbf1ab303fc5ebcf":{
         "type":"document",
         ...
         ]
      },
      ...
      ...
      ...
      "u6b031ebfe46f46cd9ecdf430fa952f34":{
         "type":"document",
         ...
      }
   }
}

Code: 404
Description: Not Found