# Unify API

Send invoice data through one API request for a supported country. Start with a sandbox key, a source and a document type.

## Submit a document

```http title="Unify endpoint"
POST https://prod.gets.complyance.io/api/v3/unify
```

Send `new-api: true` with a JSON request, or send the request as [XML](https://docs.complyance.io/api-reference/unify/submit-and-retrieve/#xml-requests). Set `environment` to `sandbox` when you use a sandbox API key, and use your own source as `name:version`. `purpose` says whether to submit the document, only [validate it, or save it as a sample](https://docs.complyance.io/api-reference/unify/submit-and-retrieve/#purpose). Complyance reads the `payload` through your source’s mapping; with the **Default GETS Mapping**, the payload is GETS and holds the [fields](https://docs.complyance.io/api-reference/gets/fields/) required for the selected country and document type.

The response tells you whether the document passed validation. A successful response includes a `documentId`; keep it to [follow the document](https://docs.complyance.io/api-reference/unify/documents/) while delivery continues. A `422` response lists the validation findings to correct.

- [Send your first invoice](https://docs.complyance.io/get-started/quickstart/): Use a complete UAE sandbox request.
- [Submit and retrieve](https://docs.complyance.io/api-reference/unify/submit-and-retrieve/): See the request, batches, XML, limits and retries.
- [Documents and status](https://docs.complyance.io/api-reference/unify/documents/): Read a document's state and what the authority returned.
- [Examples](https://docs.complyance.io/api-reference/unify/examples/): Compare a request with success and validation responses.
- [Errors](https://docs.complyance.io/api-reference/unify/errors/): Find out what an error means and how to act on it.
- [Migration guide](https://docs.complyance.io/api-reference/unify/migration/): Move an earlier Unify request to this format.

You can build and send a sandbox request in the [API playground](https://docs.complyance.io/api/?operation=submitDocument). For the fields, rules and examples of each country, follow its guide: [United Arab Emirates](https://docs.complyance.io/countries/ae/), [Saudi Arabia](https://docs.complyance.io/countries/sa/), [Malaysia](https://docs.complyance.io/countries/my/), [Oman](https://docs.complyance.io/countries/om/), [Belgium](https://docs.complyance.io/countries/be/) and [Germany](https://docs.complyance.io/countries/de/).

Source: https://docs.complyance.io/api-reference/unify/
