Search all documents

post

/oitt/api/v1/documents/index/_search

The operation searches through all documents accessible to the user.

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
Supported request body fields:
  • explain
  • from
  • min_score
  • query
  • size
  • _source
The (queryable) index mapping:
{
  "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
Request Body - application/json ()
Root Schema : schema
Back to Top

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:
Body ()
Root Schema : Document
Type: object
Show Source
Nested Schema : attachments
Type: array
List of attachments related to the document.
Show Source
Nested Schema : documentType
Type: object
Details about a type of the document.
Show Source
Nested Schema : documentVersion
Type: object
Document version details.
Show Source
Nested Schema : flow
Type: object
Business flow into which the document was submitted.
Show Source
Nested Schema : receiver
Type: object
Trading partner receiver.
Show Source
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
Nested Schema : submitter
Type: object
Trading partner submitter details.
Show Source
Nested Schema : transactionValue
Type: object
Transaction value details.
Show Source
Nested Schema : viewers
Type: object
List of trading partners allowed to view the document.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : businessIdentifiers
Type: array
Show Source
Nested Schema : location
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Match One Schema
Show Source
Nested Schema : items-oneOf[0]
Type: object
Show Source
Nested Schema : items-oneOf[1]
Type: object
Show Source
Nested Schema : businessIdentifiers
Type: array
Show Source
Nested Schema : location
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top