Skip to main content

Quickstart

Send one remotely accessible invoice or receipt URL and receive its structured extraction.

Before you start

Trade Document is currently Coming Soon. There is no public plan or self-service activation path, and publishing these docs does not grant access. To prepare for access, you need:
  • a The Wo account and Workspace;
  • Trade Document entitlement when it becomes available;
  • a Developer API key created in the Developer Console API Keys page;
  • a trusted server environment where the key can remain secret.
See Product access for the current catalog state and Authentication for API-key handling. Never commit the key, put it in a URL, log it, or embed it in browser or mobile code.

Configure your environment

Use the canonical production API origin for customer integrations. The Staging API is reserved for internal The Wo release validation and is not a normal customer integration target.

Send an extraction request

The example URL below is fictional. Replace it with an absolute HTTP or HTTPS URL that The Wo can retrieve and that points to an invoice or receipt your application is authorized to share.
documentUrl is required. expectedType and language are optional hints; expectedType does not force the detected result. Accepted values are invoice or receipt, and en, pt, or es. The request body is strict, so unknown fields are rejected. The URL must resolve to PDF, JPEG, PNG, or WebP content. The maximum content size is configured per deployment; the public contract defines no page-count limit. Direct upload, multipart form data, and inline/base64 content are not supported. See the document contract for all request and source rules.

Read the result

A successful request returns 201 Created. This illustrative invoice response shows the public response shape:
documentType is the type detected by extraction. Monetary values use integer minorUnits and an ISO currency code; currency precision varies. Confidence is extraction confidence only. Review results against the source before relying on them for consequential decisions. One successful extraction records one document_extraction usage unit. For quota and retry behavior, see Usage and quotas.

Handle errors

Errors use The Wo’s shared JSON envelope. For example:
Use error.code to handle an error and keep requestId when reporting a problem. See Errors for the public error catalog and retry guidance.

Next steps