Get a Document

get

/capture/api/v1.1/documents/{docId}

This operation will return the document specified by the docId parameter.

This operation supports the expand parameter, which includes child resources/collections inline. The child resource of batch is supported. If that resource is not expanded, then it just contains the summary information of id and name. The collection resource of attachments is also supported in the expand parameter, and will inline all the attachments of the document.

Note: If the OAuth token represents an account that is a Capture Administator, the response will return the given document, provided it exists. If the OAuth token does not represent an account that is a Capture Administator, meaning it is just a Capture User, the response will only return the document if it exists and the document is currently in a step in which the account as been granted explict access.

Request

Supported Media Types
Path Parameters
Query Parameters
  • The expand parameter provides the option of getting child resources/collections inline with the response. It accepts a comma-separated list of attribute names or all. When expand is specified as all (with all in lower case), all child resources/collections of the requested docment are expanded.

    When the expand parameter contains a non-defined child resource, the request operation results in an error. The available child resources/collections are:

    • batch
    • attachments

    Example : ?expand=batch
    Expands the batch child resource of this document.

    Example : ?expand=attachments
    Expands the collection of attachments of this document, if any.

Back to Top

Response

Supported Media Types

200 Response

The document specified by docId.

Body ()
Root Schema : Document
Type: object
Title: Document

A Document in Capture is a file combined with custom metadata fields. The metadata fields are defined in Capture procedures, and act as holders of information manged within Capture. A Document can also contain attachments. An Attachment is intended to augment the the Document, and there can be numerous attachments of varing types.

Show Source
Nested Schema : batch
Type: object

The Capture Batch that contains this document.

Match All
Show Source
  • Capture Batch
    Title: Capture Batch

    A collection of documents in Capture that represent a unit of work in a procedure.

Nested Schema : createdBy
Type: object

The user that created the document.

Match All
Show Source
  • User Information
    Title: User Information

    This object contains information about a given user of Capture.

    Models use this object to denote some relation between a user and some other object. For instance, a model of the API may define the attribute updatedBy that is a user object. This indicates it was last updated by that given user.

Nested Schema : fields
Type: array

This is an array of all the field values available for this document.

Show Source
  • Field Value
    Title: Field Value

    A field value is a Capture metadata field that combines the basic field definition and an actual value.

Nested Schema : profile
Type: object

The document profile that has been assigned to this document.

Match All
Show Source
  • Document Profile
    Title: Document Profile

    A Document Profile associates a collection of custom metadata fields defined in a Capture procedure with a document. Additionally, it can have associated attachment types.

    These are used in Capture to help categorize and process documents. While a document profile does relate custom metadata fields and attachment types from the procedure to a document, it does not restrict metadata to just those fields or attachments to just those types. It they are used for display/management within the Capture Client.

Nested Schema : step
Type: object

The current processing step, if any, this document is undergoing.

Match All
Show Source
Nested Schema : updatedBy
Type: object

The last user that updated the document.

Match All
Show Source
  • User Information
    Title: User Information

    This object contains information about a given user of Capture.

    Models use this object to denote some relation between a user and some other object. For instance, a model of the API may define the attribute updatedBy that is a user object. This indicates it was last updated by that given user.

Nested Schema : Capture Batch
Type: object
Title: Capture Batch

A collection of documents in Capture that represent a unit of work in a procedure.

Show Source
  • createdBy

    The user that created the batch.

  • This identifies when the batch was created. The date/time in ISO-8601 Date Time format (yyyy-MM-dd'T'HH:mm:ss.SSSZ) UTC, governed by RFC 3339.

  • The current error message of the batch, if any.

    If the batch is in the ERROR state, this will contain the error message detailing why the batch failed processing. This message will remain until the batch re-enters processing.

  • The unique identifier of the batch.

  • links
  • lock

    If the batch is locked (by a user creating/editing the batch or if Capture is currently processing the batch), this object will contain information about the lock. The state of the batch determines if this object exists.

  • The name given to the batch.

    When Capture creates a batch, the name is some defined prefix and a sequence number. For example, inv_4781

  • User supplied general notes associated with a batch.

  • Minimum Value: 0
    Maximum Value: 10
    Default Value: 0

    A user specified priority of the batch.

    This value is used prioritize the batch for a user's attention. Its used to filter and sort batches for viewing in the client.

  • procedure

    The Capture Procedure associated with this batch.

  • Default Value: READY

    The current state of the batch.

    • READY - The standard resting state of a batch. It is available to be locked by a client.
    • LOCKED - The batch is locked by a client for editing, such as adding/removing documents and setting metadata field values.
    • ERROR - An error occurred during processing. It is available to be locked by a client for edits to correct processing errors.
    • PROCESSING - Capture is presently processing the batch. The batch is in one of the jobs defined in the Capture procedure.
  • The current status assigned to the batch.

    The status values are defined in the procedure and can be assigned during batch creation, and during transitions between processing jobs.

  • updatedBy

    The last user that updated the batch. This can be the Capture system.

  • This identifies when the last time the batch was updated. The date/time in ISO-8601 Date Time format (yyyy-MM-dd'T'HH:mm:ss.SSSZ) UTC, governed by RFC 3339.

Nested Schema : createdBy
Type: object

The user that created the batch.

Match All
Show Source
  • User Information
    Title: User Information

    This object contains information about a given user of Capture.

    Models use this object to denote some relation between a user and some other object. For instance, a model of the API may define the attribute updatedBy that is a user object. This indicates it was last updated by that given user.

Nested Schema : lock
Type: object

If the batch is locked (by a user creating/editing the batch or if Capture is currently processing the batch), this object will contain information about the lock. The state of the batch determines if this object exists.

Show Source
Nested Schema : procedure
Type: object

The Capture Procedure associated with this batch.

Match All
Show Source
Nested Schema : updatedBy
Type: object

The last user that updated the batch. This can be the Capture system.

Match All
Show Source
  • User Information
    Title: User Information

    This object contains information about a given user of Capture.

    Models use this object to denote some relation between a user and some other object. For instance, a model of the API may define the attribute updatedBy that is a user object. This indicates it was last updated by that given user.

Nested Schema : User Information
Type: object
Title: User Information

This object contains information about a given user of Capture.

Models use this object to denote some relation between a user and some other object. For instance, a model of the API may define the attribute updatedBy that is a user object. This indicates it was last updated by that given user.

Show Source
Nested Schema : lockedBy
Type: object

If the batch is locked within a Capture Client instance, this attribute will contain the user that locked the batch.

Match All
Show Source
  • User Information
    Title: User Information

    This object contains information about a given user of Capture.

    Models use this object to denote some relation between a user and some other object. For instance, a model of the API may define the attribute updatedBy that is a user object. This indicates it was last updated by that given user.

Nested Schema : step
Type: object

If Capture is currently processing the batch, this object will contain current processing step the batch is undergoing.

Match All
Show Source
Nested Schema : Procedure Step
Type: object
Title: Procedure Step

A step in a procedure flow.

Show Source
  • The unique identifier of the step within the procedure.

  • The name given to the step when created. For instance, the name of the processing job or commit profile.

  • The type of step. Some example include: External Processor, TIFF Conversion Processor, Asset Lookup Processor, etc.

Nested Schema : Capture Procedure
Type: object
Title: Capture Procedure

A Capture Procedure defines metadata and procesing steps of a flow.

Show Source
Nested Schema : Field Value
Type: object
Title: Field Value

A field value is a Capture metadata field that combines the basic field definition and an actual value.

Show Source
  • Default Value: ALPHA_NUMERIC

    The data type of the field. Capture supports the following six data types:

    • NUMERIC - Integer based number value
    • ALPHA_NUMERIC - Any general text or string value
    • DATE - A date/time value in the form of ISO-8601 Date Time format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z'), as governed by RFC 3339
    • FLOAT - Floating point number values
    • ITEM_REFERENCE - A pointer to a content item in Oracle Content Management
    • ASSET_REFERENCE - A pointer to a digital asset in Oracle Content Management
    • CATEGORY_REFERENCE - A pointer to a taxonomy category in Oracle Content Management
    • LANGUAGE - A language code as defined by RFC 4647.
  • The name of the field.

  • The actual value of this metadata field as it pertains to the given Capture document.

    Fields do not initially have values. They must be set. This is either done through a default value in the metadata field definition, user supplied in Capture Client, or some Capture processing job.

    The fields in Capture do not have a concept of a null value. The fields either have a value or do not have a value. Blank means there is no value.

Nested Schema : Document Profile
Type: object
Title: Document Profile

A Document Profile associates a collection of custom metadata fields defined in a Capture procedure with a document. Additionally, it can have associated attachment types.

These are used in Capture to help categorize and process documents. While a document profile does relate custom metadata fields and attachment types from the procedure to a document, it does not restrict metadata to just those fields or attachments to just those types. It they are used for display/management within the Capture Client.

Show Source

400 Response

Bad Request

The request could not be processed because it contains missing or invalid information, such as a validation error on an input field or a missing required value. The response will be an Error Detail object.

404 Response

Not Found

The request includes a resource URI that does not exist. The response will be an Error Detail object.

500 Response

Internal Server Error

The server encountered an unexpected condition that prevented it from fulfilling the request. The response will be an Error Detail object.

Back to Top

Examples

Example 1:

The following example shows how to get a document.

curl -X GET -H 'Accept: application/json' 'https://host:port/content/capture/api/v1/documents/dcf65d45-4f53-4f82-998c-5e189de1b6a1'

This gets the document with id: dcf65d45-4f53-4f82-998c-5e189de1b6a1.

Response Body

{
    "id": "dcf65d45-4f53-4f82-998c-5e189de1b6a1",
    "title": "Invoice20210810124042797000.tiff",
              "batch": {
                    "id": "864",
                    "name": "ep_53"
                },
                "step": {
                    "id": "a82321c2-f288-4545-8795-e3c0f035f7ba",
                    "name": "Find Invoice Date",
                    "type": "External Processor"
                },
                "profile": {
                    "id": "4933f335-0861-4e6a-84ca-86ccae6b7ed8",
                    "name": "Invoice Profile"
                },
                "stateToken": "340f804ff4118f2f419bc3ca87ef1213",
                "mediaType": "image/tiff",
                "sourceName": "Invoice20210810124042797000.TIF",
                "size": 32709,
                "fields": [
                    {
                        "name": "Invoice Date",
                        "dataType": "DATE",
                        "value": ""
                    },
                    {
                        "name": "Invoice Number",
                        "dataType": "NUMERIC",
                        "value": ""
                    },
                    {
                        "name": "Company Name",
                        "dataType": "ALPHA_NUMERIC",
                        "value": ""
                    },
                    {
                        "name": "Invoice Total",
                        "dataType": "FLOAT",
                        "value": ""
                    }
                ],
                "createdBy": {
                    "name": "ssvrint.mtadmin"
                },
                "createdDate": "2021-08-18T05:01:37.181Z",
                "updatedBy": {
                    "name": "ssvrint.mtadmin"
                },
                "updatedDate": "2021-08-18T05:01:48.916Z",
                "links": [
                    {
                        "rel": "canonical",
                        "href": "http://server.example.com/capture/api/v1/documents/dcf65d45-4f53-4f82-998c-5e189de1b6a1",
                        "method": "GET",
                        "mediaType": "application/json"
                    },
                    {
                        "rel": "urn:oce:capture:document-content",
                        "href": "http://server.example.com/capture/api/v1/documents/dcf65d45-4f53-4f82-998c-5e189de1b6a1/content",
                        "method": "GET",
                        "mediaType": "image/tiff"
                    },
                    {
                        "rel": "urn:oce:capture:document-complete",
                        "href": "http://server.example.com/capture/api/v1/steps/a82321c2-f288-4545-8795-e3c0f035f7ba/tasks/documents/complete",
                        "method": "PUT",
                        "mediaType": "image/tiff"
                    }
                ]
              }

Example 2:

curl -X GET -H 'Accept: application/json' 'https://host:port/content/capture/api/v1/documents/dcf65d45-4f53-4f82-998c-5e189de1b6a1?expand=attachments'

This gets the document with id: dcf65d45-4f53-4f82-998c-5e189de1b6a1, and expands the document's attachments.

Response Body

{
        "id": "dcf65d45-4f53-4f82-998c-5e189de1b6a1",
        "title": "Invoice20210810124042797000.tiff",
              "batch": {
                    "id": "864",
                    "name": "ep_53"
                },
                "step": {
                    "id": "a82321c2-f288-4545-8795-e3c0f035f7ba",
                    "name": "Find Invoice Date",
                    "type": "External Processor"
                },
                "profile": {
                    "id": "4933f335-0861-4e6a-84ca-86ccae6b7ed8",
                    "name": "Invoice Profile"
                },
                "stateToken": "340f804ff4118f2f419bc3ca87ef1213",
                "mediaType": "image/tiff",
                "sourceName": "Invoice20210810124042797000.TIF",
                "size": 32709,
                "attachments": [
                    {
                        "id": "cef7aea9-d867-41bd-9c11-2e4fc86d0d90",
                        "documentId": "dcf65d45-4f53-4f82-998c-5e189de1b6a1",
                        "title": "InvoiceNote1.txt",
                        "batch": {
                            "id": "864",
                            "name": "ep_53"
                        },
                        "type": {
                            "id": "1d3340ca-3fcb-43f7-9304-89cfedb1ac69",
                            "name": "Invoice Notes"
                        },
                        "stateToken": "627ceceb37e4d5e5b94f0d31aaef0616",
                        "mediaType": "text/plain",
                        "sourceName": "notes.txt",
                        "size": 4875,
                        "createdBy": {
                            "name": "ssvrint.mtadmin"
                        },
                        "createdDate": "2021-01-19T20:05:14.215Z",
                        "updatedBy": {
                            "name": "ssvrint.mtadmin"
                        },
                        "updatedDate": "2021-01-19T20:05:14.215Z",
                        "links": [
                            {
                                "rel": "canonical",
                                "href": "http://server.example.com/documents/dcf65d45-4f53-4f82-998c-5e189de1b6a1/attachments/cef7aea9-d867-41bd-9c11-2e4fc86d0d90",
                                "method": "GET",
                                "mediaType": "application/json"
                            },
                            {
                                "rel": "urn:oce:capture:attachment-content",
                                "href": "http://server.example.com/documents/dcf65d45-4f53-4f82-998c-5e189de1b6a1/attachments/cef7aea9-d867-41bd-9c11-2e4fc86d0d90/content",
                                "method": "GET",
                                "mediaType": "text/plain"
                            }
                        ]
                    }
                ],
                "fields": [
                    {
                        "name": "Invoice Date",
                        "dataType": "DATE",
                        "value": ""
                    },
                    {
                        "name": "Invoice Number",
                        "dataType": "NUMERIC",
                        "value": ""
                    },
                    {
                        "name": "Company Name",
                        "dataType": "ALPHA_NUMERIC",
                        "value": ""
                    },
                    {
                        "name": "Invoice Total",
                        "dataType": "FLOAT",
                        "value": ""
                    }
                ],
                "createdBy": {
                    "name": "ssvrint.mtadmin"
                },
                "createdDate": "2021-08-18T05:01:37.181Z",
                "updatedBy": {
                    "name": "ssvrint.mtadmin"
                },
                "updatedDate": "2021-08-18T05:01:48.916Z",
                "links": [
                    {
                        "rel": "canonical",
                        "href": "http://server.example.com/capture/api/v1/documents/dcf65d45-4f53-4f82-998c-5e189de1b6a1",
                        "method": "GET",
                        "mediaType": "application/json"
                    },
                    {
                        "rel": "urn:oce:capture:document-content",
                        "href": "http://server.example.com/capture/api/v1/documents/dcf65d45-4f53-4f82-998c-5e189de1b6a1/content",
                        "method": "GET",
                        "mediaType": "image/tiff"
                    },
                    {
                        "rel": "urn:oce:capture:document-complete",
                        "href": "http://server.example.com/capture/api/v1/steps/a82321c2-f288-4545-8795-e3c0f035f7ba/tasks/documents/complete",
                        "method": "PUT",
                        "mediaType": "image/tiff"
                    }
                 }

Example 3:

curl -X GET -H 'Accept: application/json' 'https://host:port/content/capture/api/v1/documents/dcf65d45-4f53-4f82-998c-5e189de1b6a1?expand=batch'

This illustrates the error response when attempting expand child attributes that are not supported. Only the attachments child attribute is supported. This tries to expand the batch child attribute.

Response Body

{
     "type": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
     "title": "Bad Request",
     "status": 400,
     "detail": "The attribute 'batch' is not a valid expansion attribute."
  }

Example 4:

curl -X GET -H 'Accept: application/json' 'https://host:port/content/capture/api/v1/documents/5f2be40c-588d-49ac-8d82-c98338d47834'

This illustrates the error response when attempting to get a document that does not exist.

Response Body

{
    "type": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5",
    "title": "Not Found",
    "status": 404,
    "detail": "The document with ID '5f2be40c-588d-49ac-8d82-c98338d47834' does not exist."
  }        
Back to Top