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

# Entity upload

> Payload format, validation, and date formats

Data is sent with `POST /uploading/:upload_uuid/:entity_name`. The body is JSON with two fields:

* `columns` — column names (**order matters**)
* `data` — array of rows; values in each row follow the same order as `columns`

## Example

```json theme={null}
{
  "columns": ["id", "store_id", "terminal_id", "opened_at", "closed_at"],
  "data": [
    ["r-1", "s-10", "t-1", "2026-06-01 10:00:00", "2026-06-01 10:05:00"],
    ["r-2", "s-10", "t-1", "2026-06-01 10:07:00", "2026-06-01 10:09:00"]
  ]
}
```

Success response:

```json theme={null}
{ "status": "success", "message": "Data validated successfully.", "rows_processed": 2 }
```

## Data requirements

* All **required columns** must appear in `columns` — otherwise `422`
* **Types** are validated (string, number, date, bool) — otherwise `422`
* Multiple **sequential requests** per entity are allowed — data accumulates in the session
* Upload is allowed only in `UPLOADING` state
* Maximum package size — **32 MB**

## Date formats

| Type     | Format                | Example               |
| -------- | --------------------- | --------------------- |
| Date     | `YYYY-MM-DD`          | `2026-06-01`          |
| Datetime | `YYYY-MM-DD HH:MM:SS` | `2026-06-01 10:05:00` |

Naive datetime (no timezone suffix).

## Validation and storage

Validation is **synchronous** within the request. Storage writes are **asynchronous** in the background. Before `start-upload`, ensure `upload_tasks_finished = true` in `GET /status`.

## Supported entities

The list of entities enabled for your client is configured by support. Full field definitions (required fields marked with a red <span style={{color: "red"}}>\*</span>):

[Entity schema](/connector-api/integration/entity-schema)

Unknown `entity_name` → `400 Unknown entity`.

## Entity dependencies

Some entities require their parent to be uploaded in the same session first (e.g. `receipt` before `receiptitem`). Receipts must be uploaded **with line items**. See [Entity dependencies](/connector-api/integration/entity-dependencies).

## Data sources

Entities loaded via API do not run on scheduled Connector jobs. Coordinate with support which steps use API vs other sources. See [Data sources](/connector-api/integration/data-sources).
