Search all documents
post
/oitt/api/v1/documents/index/_search
The operation searches through all documents accessible to the user.
Supported query parameters:
Permissions
This operation is only available to users who have the DOCUMENT_TRACE_LATEST_VERSION permission. If a user has this permission, they will only be able to view the latest versions of documents. If the user also has the DOCUMENT_TRACE permission, they will be able to view all versions of the documents. Users can view only documents associated with trading partners that are implicit or explicit viewers. Founder users can view all the documents.Operations
This endpoint works like the OpenSearch proxy. For more details, see the official OpenSearch API documentation.Supported query parameters:
- default_operator
- explain
- from
- lenient
- search_type
- size
- sort
- track_total_hits
- explain
- from
- min_score
- query
- size
- _source
{ "properties": { "documentKey": { "type": "keyword", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "referenceKeys": { "type": "nested", "properties": { "key": { "type": "keyword" }, "lastVersion" : { "type": "boolean" } } }, "references": { "properties": { "referenceKey": { "type": "keyword" }, "documentKey": { "type": "keyword" } } }, "documentNumber": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "documentVersion": { "properties": { "value": { "type": "integer" }, "latestValue": { "type": "integer" }, "latest": { "type": "boolean" } } }, "documentTimestamp": { "type": "date" }, "receivedTimestamp": { "type": "date" }, "transactionValue": { "properties": { "amount": { "type": "float" }, "currencyCode": { "type": "keyword" } } }, "flow": { "properties": { "name": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } } } }, "step": { "properties": { "name": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } } } }, "documentType": { "properties": { "name": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "variantName": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } } } }, "submitter": { "properties": { "name": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "location": { "properties": { "name": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } } } }, "businessIdentifiers": { "type": "nested", "properties": { "type": { "type": "keyword" }, "value": { "type": "keyword" }, "primary": { "type": "boolean" } } } } }, "receiver": { "properties": { "name": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "location": { "properties": { "name": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } } } }, "businessIdentifiers": { "type": "nested", "properties": { "type": { "type": "keyword" }, "value": { "type": "keyword" }, "primary": { "type": "boolean" } } } } }, "viewers": { "properties": { "name": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } } } }, "attachmentsCount": { "type": "integer" }, "attachments": { "type": "nested", "properties": { "mediaType": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "fileName": { "type": "keyword" }, "description": { "type": "text" }, "size": { "type": "integer" } } } } }
Request
There are no request parameters for this operation.
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.