> For the complete documentation index, see [llms.txt](https://docs.live-eo.com/tradeaware/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.live-eo.com/tradeaware/using-the-tradeaware-api/api-reference/transactions.md).

# Transactions

Transactions endpoint allow users to create, modify and delete transactions and their components.

### Transactions

See the [Transaction Management guide](https://docs.live-eo.com/tradeaware/using-the-tradeaware-api/user-guide-transaction-management) for workflows and examples.

Transactions can be of three different `activityTypes`:

1. **'IMPORT'**
2. **'EXPORT'**
3. **'DOMESTIC'**

{% hint style="info" %}
A fourth activity type, `TRADE`, existed historically but can no longer be used to create new transactions — it was removed along with the trader/representative-trader operator roles. Existing `TRADE` transactions remain visible as historical records with status `DEPRECATED`.
{% endhint %}

Transactions use `countryOfActivity` to identify where the activity takes place. For imports, use the EU country of entry. For exports, use the EU country of exit. For domestic production, use the EU country where goods are sourced, manufactured, produced, or placed on the market.

### Transaction components

A transaction can have one or more components. Each component describes a batch or shipment.

#### Required fields

Creating a transaction requires `activityType`, `countryOfActivity`, and `components`.

Each component requires `hsn`, `quantity`, `unit`, and `description`.

All other fields are optional. This includes `legalEntityId`, `customId`, supplier IDs, plot IDs, product IDs, DDS references, production dates, and name pairs.

#### Optional traceability and quantities

Use `ddsReferences` for products covered by earlier DDS submissions.

Use `supplierBusinessId` or `supplierBusinessIds` to identify suppliers. Use `plotIds` to select specific plots. Use `productIds` to link catalog products.

`supplementaryUnit`, `supplementaryUnitQualifier`, and `percentageEstimationOrDeviation` are optional. If you send `supplementaryUnit`, provide `supplementaryUnitQualifier` when the HS code has no default qualifier. Some HS codes require supplementary quantities when submitting to TRACES.

### Transaction Status

When a transaction is created, its initial status is set to `DRAFT`. While in the `DRAFT` state, the transaction and its components can be freely modified or deleted.

Once the transaction is submitted via the **`PUT /transactions/{id}/submit`** endpoint, its status changes to `TO_SUBMIT`, and further modifications are no longer allowed.

The status then progresses asynchronously and can be retrieved using **`GET /transactions/{id}`**. The transaction follows these possible status updates:

1. `DRAFT` → Initial state where modifications are allowed.
2. `TO_SUBMIT` → Transaction is pending submission to TRACES.
3. `SUBMITTED` → The transaction has been successfully submitted to TRACES but is still awaiting validation.
   * **DDS reference and verification number are not assigned immediately in this state.**
   * The validation process can take anywhere from a few minutes to several hours, depending on TRACES' response times.
4. `PROCESSING` → TRACES is currently processing the submitted transaction.
5. `AVAILABLE` → The transaction was accepted by the EU Information System. **This is the state in which the DDS reference and verification number become available.**
6. `ERROR` → The transaction failed to be submitted to the EU Information System.
7. `REJECTED` → The transaction was rejected by the EU Information System.
8. `WITHDRAWN` → The transaction was withdrawn before completion and is no longer active.
9. `DEPRECATED` → The transaction used the trade activity or a trader role, both removed from the regulation. It remains visible as a record; no further operation is possible.

⚠️ **Important Notes:**

* Only transactions in the `AVAILABLE` state return a DDS reference and verification number. Transactions in `DRAFT`, `TO_SUBMIT`, `SUBMITTED`, `PROCESSING`, `ERROR`, `REJECTED`, or `WITHDRAWN` do not.

### Legal Entity of a Transaction

A transaction can be submitted by any legal entity of the business. The legal entity can be specified by setting the optional `legalEntityId` attribute when creating or updating a transaction through **`POST /transactions`** and **`PATCH /transactions/{id}`**.

If no legal entity was specified, a transaction defaults to the oldest legal entity that your business has registered.

### Permissions

Your business must be entitled to access this endpoint. If you run into Error 403, please contact your Customer Success Manager.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.live-eo.com/tradeaware/using-the-tradeaware-api/api-reference/transactions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
