RocketKOR

Retrieve a Document Content URL

Retrieve the download or upload content URL for a document.

  • contentUrlType = DOWNLOAD  Retrieve a content URL to download the latest version of the document.
  • contentUrlType = UPLOAD   Retrieve a content URL to upload a new version of the document.

Endpoint

GET /v1/documents/{documentId}/content-url

Authorization Header

Authorization: Bearer <access_token>

Path Parameters

documentId  REQUIRED

string

Semantic ID of the document. Example: kor-privacy-policy

Query Parameters

contentUrlType  REQUIRED

string enum, values: DOWNLOAD, UPLOAD

Type of content URL. The following values are supported:

  • DOWNLOAD  URL used to download the latest version of the document.
  • UPLOAD  URL used to upload a new version of the document.

contentLength

integer (int64), max size: 5,242,880 bytes (5 MB)

File content size in bytes. Optional if contentUrlType is UPLOAD. Ignored if contentUrlType is DOWNLOAD.

fileExtension

string enum, values: JPG, JPEG, PNG, PDF

Document file extension. Allowed values are JPG, JPEG, PNG, and PDF. Optional if contentUrlType is UPLOAD. Ignored if contentUrlType is DOWNLOAD.

Request Body

None

Returns

Returns the document content URL. The following fields are returned.

value

string (URI)

Content URL for the document. Can be used to download the document (if allowed is GET) or upload a new version of the document (if allowed is PUT). Note that the URL will not be set if the document status is NEW.

allowed

string enum, values: GET, PUT

Allowed HTTP method for the URL.

expiresIn

integer (int64)

URL expiry period (in seconds).

SAMPLE RESPONSE

				
					{
  "value": "https://documents.rocketkor.net/7260554c5",
  "allowed": "GET",
  "expiresIn": 600
}