Document AI API (0.2.0)

Download OpenAPI specification:

Endpoints for Document AI Services

Healthcheck

Check service availability

Healthcheck endpoint to confirm the service is operational Returns a JSON object {"status": "OK"} if healthy

Authorizations:
JWT

Responses

Envelopes

Submit envelope batch metadata after files are uploaded to GCS

Endpoint called after the client uploads all files for an envelope batch The JSON must have a top-level "batch" key with the following structure: { "batch": { "id": "batch_id", "create_date": "YYYY-MM-DD HH:MM:SS.sss", "initial_gb": "BusinessArea", "source": "SCAN or MAIL", "files": [ { file details... } ] } } Actions performed:

  • Validate envelope contents based on its source type
  • Extract the envelope ID (batch.id) and business area (batch.initial_gb)
  • Store the entire JSON payload in a GCS bucket using the id as prefix (e.g. "batch_id/batch_id.json")
  • Publish a Pub/Sub message with the entire JSON payload to trigger the pre-processing workflow
Authorizations:
JWT
Request Body schema: application/json
required
required
object (BatchData)

Responses

Request samples

Content type
application/json
{
  • "batch": {
    }
}

Check processing status of an envelope

Authorizations:
JWT
path Parameters
envelope_id
required
string

Responses

GCS Access

Get a GCS access token with read-only permission

Endpoint to retrieve a temporary GCS access token with read-only access Notes:

  • The token is generated with minimal scope (devstorage.read_only)
  • Consumers should only use this token to access the designated download bucket (ENV_VARS.DOWNLOAD_BUCKET_NAME)
Authorizations:
JWT

Responses

Get a GCS access token with read and write permissions

Endpoint to retrieve a temporary GCS access token with read/write access

Notes:

  • The token is generated with the devstorage.read_write scope
  • Consumers should only use this token to access the designated upload bucket (ENV_VARS.UPLOAD_BUCKET_NAME)
Authorizations:
JWT

Responses