Class ProcessorRunCreateRequest.Builder

    • Method Detail

      • metadata

        public ProcessorRunCreateRequest._FinalStage metadata​(java.util.Map<java.lang.String,​java.lang.Object> metadata)

        An optional object that can be passed in to identify the run of the document processor. It will be returned back to you in the response and webhooks.

        To categorize processor runs for billing and usage tracking, include extend:usage_tags with an array of string values (e.g., {"extend:usage_tags": ["production", "team-eng", "customer-123"]}). Tags must contain only alphanumeric characters, hyphens, and underscores; any special characters will be automatically removed.

        Specified by:
        metadata in interface ProcessorRunCreateRequest._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • metadata

        public ProcessorRunCreateRequest._FinalStage metadata​(java.util.Optional<java.util.Map<java.lang.String,​java.lang.Object>> metadata)

        An optional object that can be passed in to identify the run of the document processor. It will be returned back to you in the response and webhooks.

        To categorize processor runs for billing and usage tracking, include extend:usage_tags with an array of string values (e.g., {"extend:usage_tags": ["production", "team-eng", "customer-123"]}). Tags must contain only alphanumeric characters, hyphens, and underscores; any special characters will be automatically removed.

        Specified by:
        metadata in interface ProcessorRunCreateRequest._FinalStage
      • sync

        public ProcessorRunCreateRequest._FinalStage sync​(java.lang.Boolean sync)

        Whether to run the processor synchronously. When true, the request will wait for the processor run to complete and return the final results. When false (default), the request returns immediately with a PROCESSING status, and you can poll for completion or use webhooks. For production use cases, we recommending leaving sync off and building around an async integration for more resiliency, unless your use case is predictably fast (e.g. sub < 30 seconds) run time or otherwise have integration constraints that require a synchronous API. See Async Processing for more details.

        Timeout: Synchronous requests have a 5-minute timeout. If the processor run takes longer, it will continue processing asynchronously and you can retrieve the results via the GET endpoint.

        Specified by:
        sync in interface ProcessorRunCreateRequest._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • sync

        public ProcessorRunCreateRequest._FinalStage sync​(java.util.Optional<java.lang.Boolean> sync)

        Whether to run the processor synchronously. When true, the request will wait for the processor run to complete and return the final results. When false (default), the request returns immediately with a PROCESSING status, and you can poll for completion or use webhooks. For production use cases, we recommending leaving sync off and building around an async integration for more resiliency, unless your use case is predictably fast (e.g. sub < 30 seconds) run time or otherwise have integration constraints that require a synchronous API. See Async Processing for more details.

        Timeout: Synchronous requests have a 5-minute timeout. If the processor run takes longer, it will continue processing asynchronously and you can retrieve the results via the GET endpoint.

        Specified by:
        sync in interface ProcessorRunCreateRequest._FinalStage
      • version

        public ProcessorRunCreateRequest._FinalStage version​(java.lang.String version)

        An optional version of the processor to use. When not supplied, the most recent published version of the processor will be used. Special values include:

        • "latest" for the most recent published version. If there are no published versions, the draft version will be used.
        • "draft" for the draft version.
        • Specific version numbers corresponding to versions your team has published, e.g. "1.0", "2.2", etc.
        Specified by:
        version in interface ProcessorRunCreateRequest._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • version

        public ProcessorRunCreateRequest._FinalStage version​(java.util.Optional<java.lang.String> version)

        An optional version of the processor to use. When not supplied, the most recent published version of the processor will be used. Special values include:

        • "latest" for the most recent published version. If there are no published versions, the draft version will be used.
        • "draft" for the draft version.
        • Specific version numbers corresponding to versions your team has published, e.g. "1.0", "2.2", etc.
        Specified by:
        version in interface ProcessorRunCreateRequest._FinalStage