Search references for the specific document version
post
/oitt/api/v1/documents/{documentKey}/versions/{documentVersion}/references/index/_search
The operation returns documents referenced by the document specified by document key and document version.
Permissions
This operation is only available to users who have the DOCUMENT_TRACE permission. Users can access references of the document only if it is allowed to see the document itself. Users can see only references associated with trading partners that are implicit or explicit viewers. Founder users can see all the references.Operations
This endpoint works like the OpenSearch proxy. Queryable index mapping is the same as in method Search all documents.Request
Path Parameters
-
documentKey(required): string
A key that uniquely identifies the document.
-
documentVersion(required): string
Version of a document identified by some document key.
Supported Media Types
- application/json
Root Schema : schema
Response
200 Response
See the response in OpenSearch documentation.
In the case of the default search (with empty request JSON), the _source field contains an array of the following documents:
Root Schema : Document
Type:
Show Source
object
-
attachments(required): array
attachments
List of attachments related to the document.
-
attachmentsCount(required): integer
Count of attachments.
-
documentKey(required): string
A key that uniquely identifies the document.
-
documentNumber(required): string
Another identifier of the document that may not be unique.
-
documentTimestamp(required): string
(date-time)
Time when the document was issued.
-
documentType(required): object
documentType
Details about a type of the document.
-
documentVersion(required): object
documentVersion
Document version details.
-
flow(required): object
flow
Business flow into which the document was submitted.
-
receivedTimestamp(required): string
(date-time)
Time when the document was submitted.
-
receiver(required): object
receiver
Trading partner receiver.
-
referenceKeys(required): array
referenceKeys
A list of keys that can be used to reference this document.
-
references(required): array
references
List of reference or document keys referenced by the document.
-
step(required): object
step
Business flow step into which the document was submitted.
-
submitter(required): object
submitter
Trading partner submitter details.
-
transactionValue(required): object
transactionValue
Transaction value details.
-
viewers(required): object
viewers
List of trading partners allowed to view the document.
Nested Schema : documentType
Type:
object
Details about a type of the document.
Show Source
-
name(required): string
Document type name.
-
variantName(required): string
Document type name.
Nested Schema : documentVersion
Type:
object
Document version details.
Show Source
-
latest(required): boolean
True if this document is the latest version of the document with same document key.
-
latestValue(required): integer
Latest version of the document with same document key.
-
value(required): integer
The actual version of the document.
Nested Schema : flow
Type:
object
Business flow into which the document was submitted.
Show Source
-
name(required): string
Business flow name.
Nested Schema : receiver
Type:
object
Trading partner receiver.
Show Source
-
businessIdentifiers(required): array
businessIdentifiers
-
location: object
location
-
name(required): string
Receiver trading partner name.
Nested Schema : referenceKeys
Type:
array
A list of keys that can be used to reference this document.
Show Source
Nested Schema : references
Type:
array
List of reference or document keys referenced by the document.
Show Source
Nested Schema : step
Type:
object
Business flow step into which the document was submitted.
Show Source
-
name(required): string
Business flow step name.
Nested Schema : submitter
Type:
object
Trading partner submitter details.
Show Source
-
businessIdentifiers(required): array
businessIdentifiers
-
location: object
location
-
name(required): string
Trading partner submitter name.
Nested Schema : transactionValue
Type:
object
Transaction value details.
Show Source
-
amount(required): number
Transaction amount.
-
currencyCode(required): string
Transaction currency code.
Nested Schema : viewers
Type:
object
List of trading partners allowed to view the document.
Show Source
-
name(required): string
Name of a viewer.
Nested Schema : items
Type:
Show Source
object
-
description: string
Attachment description.
-
fileName(required): string
Attachment file name.
-
mediaType(required): string
Attachment media MIME type.
-
size(required): integer
Attachment size in bytes.
Nested Schema : items
Type:
Show Source
object
-
primary(required): boolean
Indicates if the business identifier belongs to the most important (primary) location.
-
type(required): string
Business identifier type.
-
value(required): string
Business identifier value.
Nested Schema : items
Type:
Show Source
object
-
key(required): string
A document identifier that other documents can reference.
-
lastVersion(required): boolean
True if this is the last version of the document that contains this reference key.
Nested Schema : items-oneOf[0]
Type:
Show Source
object
-
referenceKey(required): string
Reference key of the referenced document.
Nested Schema : items-oneOf[1]
Type:
Show Source
object
-
documentKey: string
Document key of the referenced document.
Nested Schema : location
Type:
Show Source
object
-
name(required): string
Trading partner submitter location name.
Nested Schema : items
Type:
Show Source
object
-
primary(required): boolean
Indicates if the business identifier belongs to the most important location.
-
type(required): string
Business identifier type.
-
value(required): string
Business identifier value.
403 Response
The user doesn't have permission to view the document.
404 Response
The document doesn't exist.