> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thewo.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Trade Document

> Extract structured invoice and receipt data through The Wo API.

**Turn a remotely accessible invoice or receipt into structured business data.**

Trade Document accepts one document URL and returns normalized fields, line
items, missing-field indicators, review flags, extraction confidence, and usage
information through The Wo API.

The initial contract supports invoices and receipts in PDF, JPEG, PNG, or WebP
format, retrieved over HTTP or HTTPS. This is a URL-only API: direct upload,
multipart form data, and inline/base64 content are not supported.

## Start here

> [card] [Quickstart](https://docs.thewo.io/trade-document/quickstart.md)
>
> Configure your server environment and call `POST /v1/documents/extract`.

> [card] [Product access](https://docs.thewo.io/trade-document/guides/product-access.md)
>
> Review the current catalog state and how API access is granted.

> [card] [Document contract](https://docs.thewo.io/trade-document/guides/document-contract.md)
>
> Review request rules, response fields, source limits, and extraction semantics.

> [card] [API Reference](https://docs.thewo.io/trade-document/api-reference/overview.md)
>
> Explore the OpenAPI request, response, and error definitions.

## Product goal

Invoices and receipts contain useful commercial information, but applications
often need that information as structured fields. Trade Document extracts a
normalized invoice or receipt result that software can review and use in its
own workflow.

The API contract is owned by The Wo and does not expose provider-specific
configuration or output. Extraction results are not proof of authenticity,
fraud status, legal validity, or tax compliance. Review values against the
source before making consequential decisions.

## Current capabilities

The current v1 contract supports:

* one remote document URL per synchronous extraction;
* invoices and receipts only;
* PDF, JPEG, PNG, and WebP sources retrieved over HTTP or HTTPS;
* optional source-language hints `en`, `pt`, or `es`;
* optional expected-type hints `invoice` or `receipt`;
* normalized parties, dates, monetary values, and line items where available;
* missing-field indicators, review flags, and extraction confidence;
* shared API-key authentication, entitlement, rate limiting, idempotency, quota,
  and usage controls.

## Current public endpoint

```http theme={"theme":"github-dark-default"}
POST /v1/documents/extract
```

The request accepts a remote document URL and returns a completed invoice or
receipt extraction. One successful extraction records one
`document_extraction` usage unit. See [Usage and quotas](https://docs.thewo.io/trade-document/guides/usage-and-quotas.md)
for quota and retry behavior.

## Current API lifecycle

Trade Document is synchronous. The Wo authenticates the request, checks access
and request controls, retrieves and validates the remote source, extracts and
stores the result, records usage, and returns the public response.

## Shared platform boundary

Trade Document owns its document and extraction vocabulary. Shared API-key
behavior is documented once in [Authentication](https://docs.thewo.io/platform/authentication.md);
product access, quota, rate limiting, idempotency, and usage use The Wo's shared
platform capabilities.

## API version

The public route uses URL versioning:

```text theme={"theme":"github-dark-default"}
/v1
```

Backward-incompatible public contract changes are not introduced silently
within an existing API version.

## Environment availability

Trade Document is currently marked **Coming Soon** in the product catalog.
Publishing this documentation does not grant access or provide a public
self-service activation path. Check the current state in the
[Developer Console](https://thewo.io/app/products/trade-document).

The canonical production API origin is:

```text theme={"theme":"github-dark-default"}
https://api.thewo.io
```

The Staging API is reserved for internal The Wo release validation and is not
a customer integration target. The OpenAPI contract advertises the canonical
production origin.

## Continue exploring

* [Quickstart](https://docs.thewo.io/trade-document/quickstart.md)
* [Product access](https://docs.thewo.io/trade-document/guides/product-access.md)
* [Document contract](https://docs.thewo.io/trade-document/guides/document-contract.md)
* [Usage and quotas](https://docs.thewo.io/trade-document/guides/usage-and-quotas.md)
* [Errors](https://docs.thewo.io/trade-document/guides/errors.md)
* [TypeScript example](https://docs.thewo.io/trade-document/examples/typescript.md)
* [API Reference](https://docs.thewo.io/trade-document/api-reference/overview.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.