---
title: "Stores · Tallio API reference"
description: "Online stores: connecting one to Tallio, the orders it sends and the documents they become."
canonical: "https://tallio.dev/docs/api/stores"
lang: "en"
---

# Stores

Online stores: connecting one to Tallio, the orders it sends and the documents they become.

## Retrieve a merchant's store settings

`GET /api/v1/merchants/{id}/store_settings`

Returns the settings store orders of this merchant are issued with: the payment method for gateways Tallio does not map, per-gateway methods, the status that sends an offline-gateway order and invoice confirmation. Defaults until changed. A store key reads its own merchant's only.

> **France:** Also what the invoices cover and their prefixes.

*Bearer API key*

*Path parameters*

- `id` · `string` · required
  The merchant's id (mer\_…).

*Request*

*curl*

```bash
curl -X GET 'https://tallio.dev/api/v1/merchants/mer_02y9O8rh7F50tGi0QcWRrx/store_settings' \
  -H "Authorization: Bearer $TALLIO_API_KEY"
```

*TypeScript SDK*

```ts
import { createTallioClient, unwrap } from "@tallio-dev/sdk";

const tallio = createTallioClient({
  apiKey: process.env.TALLIO_API_KEY!,
  baseUrl: "https://tallio.dev",
});

const result = await unwrap(tallio.http.GET("/api/v1/merchants/{id}/store_settings", {
  params: {
    path: {
      id: "mer_02y9O8rh7F50tGi0QcWRrx",
    },
  },
}));
```

*Responses*

| Status | Description |
| --- | --- |
| `200` | The merchant's store settings. |
| 4XX, 5XX | An error: see Errors below. |

*Response body · 200*

- `data` · `object` · required
  A merchant's store settings: its explicit choices on top of Tallio's defaults.
  - `object` · `string` · required
    Always "store\_settings".
    Always `store_settings`
  - `merchant` · `string` · required
    Id of the merchant (mer\_…).
    Pattern: `^mer_[0-9A-Za-z]{22}$`
  - `regime` · `string` · required
    The merchant's regime, which decides what applies; set on the merchant, not here.
    One of: `GR`, `FR`
  - `unrecognised_payment_method` · `string | null` · required
    > **Greece:** The method used when an order's gateways name none (each such document carries the warning payment\_method\_default); null holds such an order as payment\_method\_unknown.
    
    > **France:** Kept but unused, since an invoice names no payment means it cannot tell.
    
    One of: `domestic_account`, `foreign_account`, `cash`, `cheque`, `on_credit`, `web_banking`, `pos`, `iris`
  - `gateway_methods` · `object` · required
    The merchant's payment method per gateway id, ahead of Tallio's own gateway table: a gateway Tallio does not know, or one the merchant says settles otherwise. Gateways left out follow the table.
    - `{key}` · `string`
      How the document is paid: domestic\_account (myDATA 1), foreign\_account (myDATA 2), cash (myDATA 3), cheque (myDATA 4), on\_credit (myDATA 5), web\_banking (myDATA 6), pos (myDATA 7), iris (myDATA 8).
      One of: `domestic_account`, `foreign_account`, `cash`, `cheque`, `on_credit`, `web_banking`, `pos`, `iris`
      Pattern: `^[a-z0-9][a-z0-9_.-]{0,63}$`
  - `issue_on` · `object` · required
    The gateways sent at an order status rather than on payment, defaults included (cod completed, bacs and cheque processing); a gateway not named here is sent on its payment event.
    - `{key}` · `string`
      payment: the order is sent on the gateway's payment event; processing: once it is processing or completed; completed: only once completed.
      One of: `payment`, `processing`, `completed`
      Pattern: `^[a-z0-9][a-z0-9_.-]{0,63}$`
  - `invoice_confirmation` · `string` · required
    > **Greece:** When a 1.1 invoice waits for the merchant to confirm the buyer: on\_mismatch (only when the VAT registry's name differs or is withheld) or always.
    
    > **France:** Kept but unused.
    
    One of: `on_mismatch`, `always`
  - `fr` · `object | null` · required
    France only: null for a merchant in another regime.
    - `operation` · `string | null` · required
      What the invoices cover: goods, services or mixed. A mandatory mention with no default: while null, an order that maps to an invoice waits as fr\_settings\_missing.
      One of: `goods`, `services`, `mixed`
    - `vat_on_debits` · `boolean` · required
      The merchant pays VAT on debits (option pour les débits): printed on its invoices of services.
    - `invoice_prefix` · `string` · required
      The prefix of invoice numbers (F by default).
      Pattern: `^[A-Za-z0-9]{1,10}$`
    - `credit_prefix` · `string` · required
      The prefix of credit note numbers (AV by default).
      Pattern: `^[A-Za-z0-9]{1,10}$`
  - `updated` · `string | null` · required
    When the settings last changed; null while every value is a default.
    Format: `date-time`

*Example response · 200*

```json
{
  "data": {
    "object": "store_settings",
    "merchant": "mer_02y9O8rh7F50tGi0QcWRrx",
    "regime": "GR",
    "unrecognised_payment_method": "domestic_account",
    "gateway_methods": {
      "my_pos_gateway": "pos"
    },
    "issue_on": {
      "cod": "completed"
    },
    "invoice_confirmation": "on_mismatch",
    "fr": {
      "operation": "goods",
      "vat_on_debits": false,
      "invoice_prefix": "F",
      "credit_prefix": "F"
    },
    "updated": "2026-10-11T09:30:00.000Z"
  }
}
```

*Response headers*

- `x-request-id` · `string`
  The request's correlation id; quote it when reporting a problem. One of: req\_ plus a uuid (Tallio made it), client: plus the x-request-id you sent (8-128 of A-Z a-z 0-9 . \_ : -), or the hosting platform's id.
  With every response
  Pattern: `^(?:req_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|client:[A-Za-z0-9._:-]{8,128}|[A-Za-z0-9._-]{1,16}::[A-Za-z0-9._:-]{6,110})$`
- `ratelimit-limit` · `integer`
  Requests allowed in the current window for the bucket this request counted against.
  With 200, 404, 409, 429 · At least 1
- `ratelimit-remaining` · `integer`
  Requests left in the current window; 0 means the next one is refused until the window resets.
  With 200, 404, 409, 429 · At least 0
- `ratelimit-reset` · `integer`
  Seconds until the current window resets.
  With 200, 404, 409, 429 · At least 0
- `www-authenticate` · `string`
  The bearer challenge: send a vendor secret key as `Authorization: Bearer <key>`.
  With 401 · Always `Bearer realm="tallio"`
- `retry-after` · `integer`
  Seconds to wait before retrying a request refused with 429 `rate_limited`.
  With 429 · At least 1

*Errors*

| Code | Status | Retryable | Meaning |
| --- | --- | --- | --- |
| `unauthorized` | 401 | No | Authentication is required. |
| `vendor_suspended` | 403 | No | This vendor's access to Tallio is suspended. Its owner can contact Tallio to restore it. |
| `not_found` | 404 | No | The requested resource was not found. |
| `store_url_mismatch` | 409 | No | This store key was granted to another store URL than the one this request names (Tallio-Store-Url). Connect this store again, or confirm that the store moved. |
| `rate_limited` | 429 | Yes | A rate limit was reached. Retry later. |
| `internal_error` | 500 | No | An unexpected server error occurred. |

## Update a merchant's store settings

`PATCH /api/v1/merchants/{id}/store_settings`

Changes the settings store orders are mapped with from now on; fields left out keep their value. An order already mapped keeps its outcome, one held for a setting (payment\_method\_unknown, fr\_settings\_missing) included. The settings serve both modes, so once the merchant has a live connection or the team a live key, a test key changing them is 403 forbidden.

> **France:** The French settings are for French merchants only; sent for any other, they are 422 regime\_mismatch.

*Bearer API key*

*Path parameters*

- `id` · `string` · required
  The merchant's id (mer\_…).

*Request body*

- `unrecognised_payment_method` · `string | null`
  > **Greece:** The method for gateways that name none, or null to hold such orders.
  
  One of: `domestic_account`, `foreign_account`, `cash`, `cheque`, `on_credit`, `web_banking`, `pos`, `iris`
- `gateway_methods` · `object`
  Replaces the whole map; {} clears it. The method per gateway id, ahead of Tallio's gateway table.
  - `{key}` · `string`
    How the document is paid: domestic\_account (myDATA 1), foreign\_account (myDATA 2), cash (myDATA 3), cheque (myDATA 4), on\_credit (myDATA 5), web\_banking (myDATA 6), pos (myDATA 7), iris (myDATA 8).
    One of: `domestic_account`, `foreign_account`, `cash`, `cheque`, `on_credit`, `web_banking`, `pos`, `iris`
    Pattern: `^[a-z0-9][a-z0-9_.-]{0,63}$`
- `issue_on` · `object`
  Replaces the merchant's map whole; a gateway left out (or given its default) follows the default.
  - `{key}` · `string`
    payment: the order is sent on the gateway's payment event; processing: once it is processing or completed; completed: only once completed.
    One of: `payment`, `processing`, `completed`
    Pattern: `^[a-z0-9][a-z0-9_.-]{0,63}$`
- `invoice_confirmation` · `string`
  > **Greece:** When a 1.1 invoice waits for the merchant to confirm the buyer: on\_mismatch (only when the VAT registry's name differs or is withheld) or always.
  
  > **France:** Kept but unused.
  
  One of: `on_mismatch`, `always`
- `fr` · `object`
  France only (422 regime\_mismatch for another regime); fields left out keep their value.
  - `operation` · `string`
    What the invoices cover: goods, services or mixed. Once chosen it can be changed, never unset.
    One of: `goods`, `services`, `mixed`
  - `vat_on_debits` · `boolean`
    The merchant pays VAT on debits (option pour les débits): printed on its invoices of services.
  - `invoice_prefix` · `string`
    The prefix of invoice numbers.
    Pattern: `^[A-Za-z0-9]{1,10}$`
  - `credit_prefix` · `string`
    The prefix of credit note numbers.
    Pattern: `^[A-Za-z0-9]{1,10}$`

*Request*

*JSON*

```json
{}
```

*curl*

```bash
curl -X PATCH 'https://tallio.dev/api/v1/merchants/mer_02y9O8rh7F50tGi0QcWRrx/store_settings' \
  -H "Authorization: Bearer $TALLIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

*TypeScript SDK*

```ts
import { createTallioClient, unwrap } from "@tallio-dev/sdk";

const tallio = createTallioClient({
  apiKey: process.env.TALLIO_API_KEY!,
  baseUrl: "https://tallio.dev",
});

const result = await unwrap(tallio.http.PATCH("/api/v1/merchants/{id}/store_settings", {
  params: {
    path: {
      id: "mer_02y9O8rh7F50tGi0QcWRrx",
    },
  },
  body: {},
}));
```

*Responses*

| Status | Description |
| --- | --- |
| `200` | The merchant's store settings, changed. |
| 4XX, 5XX | An error: see Errors below. |

*Response body · 200*

- `data` · `object` · required
  A merchant's store settings: its explicit choices on top of Tallio's defaults.
  - `object` · `string` · required
    Always "store\_settings".
    Always `store_settings`
  - `merchant` · `string` · required
    Id of the merchant (mer\_…).
    Pattern: `^mer_[0-9A-Za-z]{22}$`
  - `regime` · `string` · required
    The merchant's regime, which decides what applies; set on the merchant, not here.
    One of: `GR`, `FR`
  - `unrecognised_payment_method` · `string | null` · required
    > **Greece:** The method used when an order's gateways name none (each such document carries the warning payment\_method\_default); null holds such an order as payment\_method\_unknown.
    
    > **France:** Kept but unused, since an invoice names no payment means it cannot tell.
    
    One of: `domestic_account`, `foreign_account`, `cash`, `cheque`, `on_credit`, `web_banking`, `pos`, `iris`
  - `gateway_methods` · `object` · required
    The merchant's payment method per gateway id, ahead of Tallio's own gateway table: a gateway Tallio does not know, or one the merchant says settles otherwise. Gateways left out follow the table.
    - `{key}` · `string`
      How the document is paid: domestic\_account (myDATA 1), foreign\_account (myDATA 2), cash (myDATA 3), cheque (myDATA 4), on\_credit (myDATA 5), web\_banking (myDATA 6), pos (myDATA 7), iris (myDATA 8).
      One of: `domestic_account`, `foreign_account`, `cash`, `cheque`, `on_credit`, `web_banking`, `pos`, `iris`
      Pattern: `^[a-z0-9][a-z0-9_.-]{0,63}$`
  - `issue_on` · `object` · required
    The gateways sent at an order status rather than on payment, defaults included (cod completed, bacs and cheque processing); a gateway not named here is sent on its payment event.
    - `{key}` · `string`
      payment: the order is sent on the gateway's payment event; processing: once it is processing or completed; completed: only once completed.
      One of: `payment`, `processing`, `completed`
      Pattern: `^[a-z0-9][a-z0-9_.-]{0,63}$`
  - `invoice_confirmation` · `string` · required
    > **Greece:** When a 1.1 invoice waits for the merchant to confirm the buyer: on\_mismatch (only when the VAT registry's name differs or is withheld) or always.
    
    > **France:** Kept but unused.
    
    One of: `on_mismatch`, `always`
  - `fr` · `object | null` · required
    France only: null for a merchant in another regime.
    - `operation` · `string | null` · required
      What the invoices cover: goods, services or mixed. A mandatory mention with no default: while null, an order that maps to an invoice waits as fr\_settings\_missing.
      One of: `goods`, `services`, `mixed`
    - `vat_on_debits` · `boolean` · required
      The merchant pays VAT on debits (option pour les débits): printed on its invoices of services.
    - `invoice_prefix` · `string` · required
      The prefix of invoice numbers (F by default).
      Pattern: `^[A-Za-z0-9]{1,10}$`
    - `credit_prefix` · `string` · required
      The prefix of credit note numbers (AV by default).
      Pattern: `^[A-Za-z0-9]{1,10}$`
  - `updated` · `string | null` · required
    When the settings last changed; null while every value is a default.
    Format: `date-time`

*Example response · 200*

```json
{
  "data": {
    "object": "store_settings",
    "merchant": "mer_02y9O8rh7F50tGi0QcWRrx",
    "regime": "GR",
    "unrecognised_payment_method": "domestic_account",
    "gateway_methods": {
      "my_pos_gateway": "pos"
    },
    "issue_on": {
      "cod": "completed"
    },
    "invoice_confirmation": "on_mismatch",
    "fr": {
      "operation": "goods",
      "vat_on_debits": false,
      "invoice_prefix": "F",
      "credit_prefix": "F"
    },
    "updated": "2026-10-11T09:30:00.000Z"
  }
}
```

*Response headers*

- `x-request-id` · `string`
  The request's correlation id; quote it when reporting a problem. One of: req\_ plus a uuid (Tallio made it), client: plus the x-request-id you sent (8-128 of A-Z a-z 0-9 . \_ : -), or the hosting platform's id.
  With every response
  Pattern: `^(?:req_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|client:[A-Za-z0-9._:-]{8,128}|[A-Za-z0-9._-]{1,16}::[A-Za-z0-9._:-]{6,110})$`
- `ratelimit-limit` · `integer`
  Requests allowed in the current window for the bucket this request counted against.
  With 200, 400, 404, 409, 413, 415, 422, 429 · At least 1
- `ratelimit-remaining` · `integer`
  Requests left in the current window; 0 means the next one is refused until the window resets.
  With 200, 400, 404, 409, 413, 415, 422, 429 · At least 0
- `ratelimit-reset` · `integer`
  Seconds until the current window resets.
  With 200, 400, 404, 409, 413, 415, 422, 429 · At least 0
- `www-authenticate` · `string`
  The bearer challenge: send a vendor secret key as `Authorization: Bearer <key>`.
  With 401 · Always `Bearer realm="tallio"`
- `retry-after` · `integer`
  Seconds to wait before retrying a request refused with 429 `rate_limited`.
  With 429 · At least 1

*Errors*

| Code | Status | Retryable | Meaning |
| --- | --- | --- | --- |
| `validation_failed` | 400 | No | Request validation failed. |
| `unauthorized` | 401 | No | Authentication is required. |
| `vendor_suspended` | 403 | No | This vendor's access to Tallio is suspended. Its owner can contact Tallio to restore it. |
| `forbidden` | 403 | No | This request is not allowed. |
| `not_found` | 404 | No | The requested resource was not found. |
| `store_url_mismatch` | 409 | No | This store key was granted to another store URL than the one this request names (Tallio-Store-Url). Connect this store again, or confirm that the store moved. |
| `payload_too_large` | 413 | No | The request body is too large. |
| `unsupported_media_type` | 415 | No | The request body must be JSON (Content-Type: application/json). |
| `regime_mismatch` | 422 | No | The request's regime differs from its merchant's: a document, a setting or a provider of another country. |
| `rate_limited` | 429 | Yes | A rate limit was reached. Retry later. |
| `internal_error` | 500 | No | An unexpected server error occurred. |

## Confirm that the store moved to a new URL

`PUT /api/v1/store_binding`

A store key granted by Connect to Tallio is bound to its store's URL: a request naming another one in Tallio-Store-Url answers 409 store\_url\_mismatch. When the store really moved (a new domain), its admin confirms it and the store sends its new URL here; both of its keys are bound to it from then on. A live key cannot move to a development host (localhost, .test, a public tunnel) or a non-production store\_environment. While the store has a live key, only the live key may move it (a test key answers 409 invalid\_state); otherwise the owner reconnects the store. Moves have a small budget per merchant (429 rate\_limited with Retry-After past it), and the owners get at most one email per window. Any other key, or a store key the CLI minted, answers 409 invalid\_state.

*Bearer API key*

*Request body*

- `store_url` · `string` · required
  The store's home URL now (WordPress home\_url), where it moved to: https, or http on a development host for a test key only.
  Up to 2048 characters
- `store_environment` · `string`
  The store's environment as it reports it (WordPress wp\_get\_environment\_type()). When sent, anything but production gets a test key only, and a live key cannot move there; a public tunnel or staging copy is told apart only this way.
  One of: `production`, `staging`, `development`, `local`

*Request*

*JSON*

```json
{
  "store_url": "string"
}
```

*curl*

```bash
curl -X PUT 'https://tallio.dev/api/v1/store_binding' \
  -H "Authorization: Bearer $TALLIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "store_url": "string"
}'
```

*TypeScript SDK*

```ts
import { createTallioClient, unwrap } from "@tallio-dev/sdk";

const tallio = createTallioClient({
  apiKey: process.env.TALLIO_API_KEY!,
  baseUrl: "https://tallio.dev",
});

const result = await unwrap(tallio.http.PUT("/api/v1/store_binding", {
  body: {
    store_url: "string",
  },
}));
```

*Responses*

| Status | Description |
| --- | --- |
| `200` | The store's binding, now at the new URL. |
| 4XX, 5XX | An error: see Errors below. |

*Response body · 200*

- `data` · `object` · required
  The store URL a store key is bound to.
  - `object` · `string` · required
    Always "store\_binding".
    Always `store_binding`
  - `platform` · `string` · required
    The store's platform.
    One of: `woocommerce`
  - `store_url` · `string` · required
    The normalised store URL the key's requests must name in Tallio-Store-Url.
    Up to 200 characters
  - `merchant` · `string` · required
    The merchant the store issues for.
    Pattern: `^mer_[0-9A-Za-z]{22}$`

*Example response · 200*

```json
{
  "data": {
    "object": "store_binding",
    "platform": "woocommerce",
    "store_url": "string",
    "merchant": "mer_02y9O8rh7F50tGi0QcWRrx"
  }
}
```

*Response headers*

- `x-request-id` · `string`
  The request's correlation id; quote it when reporting a problem. One of: req\_ plus a uuid (Tallio made it), client: plus the x-request-id you sent (8-128 of A-Z a-z 0-9 . \_ : -), or the hosting platform's id.
  With every response
  Pattern: `^(?:req_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|client:[A-Za-z0-9._:-]{8,128}|[A-Za-z0-9._-]{1,16}::[A-Za-z0-9._:-]{6,110})$`
- `ratelimit-limit` · `integer`
  Requests allowed in the current window for the bucket this request counted against.
  With 200, 400, 409, 413, 415, 429 · At least 1
- `ratelimit-remaining` · `integer`
  Requests left in the current window; 0 means the next one is refused until the window resets.
  With 200, 400, 409, 413, 415, 429 · At least 0
- `ratelimit-reset` · `integer`
  Seconds until the current window resets.
  With 200, 400, 409, 413, 415, 429 · At least 0
- `www-authenticate` · `string`
  The bearer challenge: send a vendor secret key as `Authorization: Bearer <key>`.
  With 401 · Always `Bearer realm="tallio"`
- `retry-after` · `integer`
  Seconds to wait before retrying a request refused with 429 `rate_limited`.
  With 429 · At least 1

*Errors*

| Code | Status | Retryable | Meaning |
| --- | --- | --- | --- |
| `validation_failed` | 400 | No | Request validation failed. |
| `unauthorized` | 401 | No | Authentication is required. |
| `vendor_suspended` | 403 | No | This vendor's access to Tallio is suspended. Its owner can contact Tallio to restore it. |
| `invalid_state` | 409 | No | The object's current state does not allow this request. |
| `payload_too_large` | 413 | No | The request body is too large. |
| `unsupported_media_type` | 415 | No | The request body must be JSON (Content-Type: application/json). |
| `rate_limited` | 429 | Yes | A rate limit was reached. Retry later. |
| `internal_error` | 500 | No | An unexpected server error occurred. |

## Exchange a store's authorization code for its keys

`POST /api/v1/store_grants/token`

The last step of Connect to Tallio (OAuth 2.0 authorization code with PKCE S256): the store's server sends the one-time code Tallio sent to its redirect\_uri, the code\_verifier its code\_challenge was made from, and that redirect\_uri, and names its store in the Tallio-Store-Url header (its home URL, as every later call of its keys will). Takes no API key. Answers once with the store's restricted keys (rk\_live\_…, rk\_test\_…), its merchant and its team. Every refusal is the same 400 invalid\_grant: an unknown, expired or spent code, another redirect\_uri, a wrong verifier, another store named, a team that took an API plan, or a code whose authorization was withdrawn. Exchanging a spent code again with its redirect\_uri and verifier also revokes the keys its first exchange made (a replay means the exchange leaked); never retry a successful exchange, and after a lost answer, start the connection again. Budget: per client address and named store.

*Public, no key*

*Request body*

- `grant_type` · `string` · required
  Always "authorization\_code".
  Always `authorization_code`
- `code` · `string` · required
  The one-time code Tallio sent to redirect\_uri. It lives 10 minutes and is spent by the first exchange.
  Pattern: `^[A-Za-z0-9_-]{43}$`
- `code_verifier` · `string` · required
  The PKCE verifier the code\_challenge was made from; it never leaves the store's server but here.
  Pattern: `^[A-Za-z0-9._~-]{43,128}$`
- `redirect_uri` · `string` · required
  The redirect\_uri of the authorization request, exactly as sent.
  Up to 500 characters
- `store_environment` · `string`
  The store's environment as it reports it (WordPress wp\_get\_environment\_type()). When sent, anything but production gets a test key only, and a live key cannot move there; a public tunnel or staging copy is told apart only this way.
  One of: `production`, `staging`, `development`, `local`

*Request*

*JSON*

```json
{
  "grant_type": "authorization_code",
  "code": "SplxlOBeZQQYbYS6WxSbIA0123456789abcdefghijk",
  "code_verifier": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk",
  "redirect_uri": "string"
}
```

*curl*

```bash
curl -X POST 'https://tallio.dev/api/v1/store_grants/token' \
  -H "Content-Type: application/json" \
  -d '{
  "grant_type": "authorization_code",
  "code": "SplxlOBeZQQYbYS6WxSbIA0123456789abcdefghijk",
  "code_verifier": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk",
  "redirect_uri": "string"
}'
```

*TypeScript SDK*

```ts
import { createTallioClient, unwrap } from "@tallio-dev/sdk";

const tallio = createTallioClient({
  apiKey: process.env.TALLIO_API_KEY!,
  baseUrl: "https://tallio.dev",
});

const result = await unwrap(tallio.http.POST("/api/v1/store_grants/token", {
  body: {
    grant_type: "authorization_code",
    code: "SplxlOBeZQQYbYS6WxSbIA0123456789abcdefghijk",
    code_verifier: "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk",
    redirect_uri: "string",
  },
}));
```

*Responses*

| Status | Description |
| --- | --- |
| `200` | The store's keys, shown this once. |
| 4XX, 5XX | An error: see Errors below. |

*Response body · 200*

- `data` · `object` · required
  What a store receives once, when it exchanges its authorization code.
  - `object` · `string` · required
    Always "store\_grant".
    Always `store_grant`
  - `platform` · `string` · required
    The store's platform.
    One of: `woocommerce`
  - `store_url` · `string` · required
    The store's normalised home URL, which its keys are bound to (the merchant's external\_id).
    Up to 200 characters
  - `team` · `object` · required
    The Tallio team the store belongs to: its owners sign in to the dashboard to see its documents.
    - `id` · `string` · required
      Id of the team (team\_…): the Tallio account that holds the keys.
      Pattern: `^team_[0-9A-Za-z]{22}$`
    - `name` · `string` · required
      The team's name, as its owners named it.
  - `merchant` · `object` · required
    A business that issues documents under your account.
    - `id` · `string` · required
      Id of the merchant (mer\_…).
      Pattern: `^mer_[0-9A-Za-z]{22}$`
    - `object` · `string` · required
      Always "merchant".
      Always `merchant`
    - `external_id` · `string` · required
      Your own id for the merchant, e.g. a shop domain: 1 to 200 characters, trimmed, unique in your account ignoring case (Shop-A and shop-a are the same merchant). Find a merchant by it.
      Up to 200 characters
      Pattern: `\S`
    - `name` · `string` · required
      The merchant's name, as you show it: 1 to 200 characters, trimmed.
      Up to 200 characters
      Pattern: `\S`
    - `regime` · `string` · required
      The tax regime the merchant issues under: GR or FR.
      One of: `GR`, `FR` · Default: `GR`
    - `tax_id` · `object | null` · required
      The merchant's tax registration (GR afm, FR vat), or null when it has none.
      - `country` · `string` · required
        ISO 3166-1 alpha-2 country of the registration.
      - `scheme` · `string` · required
        Identifier scheme: afm, vat, tin, siren or siret.
        One of: `afm`, `vat`, `tin`, `siren`, `siret`
      - `code` · `string` · required
        The identifier itself, as given.
    - `legal_id` · `object | null` · required
      The merchant's company registration (FR siren), or null when it has none.
      - `country` · `string` · required
        ISO 3166-1 alpha-2 country of the registration.
      - `scheme` · `string` · required
        Identifier scheme: afm, vat, tin, siren or siret.
        One of: `afm`, `vat`, `tin`, `siren`, `siret`
      - `code` · `string` · required
        The identifier itself, as given.
    - `establishment` · `object | null` · required
      The establishment the merchant issues from (GR branch, FR siret), or null for the head office.
      - `scheme` · `string` · required
        Establishment scheme: branch (AADE) or siret.
        One of: `branch`, `siret`
      - `code` · `string` · required
        The branch number or the SIRET.
    - `metadata` · `object` · required
      Up to 50 key-value pairs of your own (keys up to 40 characters, values up to 500). Do not put personal data in it.
      - `{key}` · `string`
        A value, up to 500 characters.
        1 to 40 characters
    - `archived` · `boolean` · required
      True once the merchant is archived; it then issues nothing new.
    - `created` · `string` · required
      When the merchant was created.
      Format: `date-time`
  - `keys` · `object` · required
    The store's keys, one per mode. Keep them sealed on the store's server; never in a URL or a page.
    - `live` · `string | null` · required
      The live store key (rk\_live\_…), shown this once; null for a development store (localhost, .test, a public tunnel) or one that named a non-production store\_environment, which gets a test key only.
    - `test` · `string` · required
      The test restricted store key (rk\_test\_…), shown this once: it acts only on this merchant, through the operations marked for store keys.
  - `webhook_secrets` · `object` · required
    The signing secrets of the store's webhook endpoints, one per mode. Events are hints: the store reads the store order again before acting on one.
    - `live` · `string | null` · required
      The signing secret (whsec\_…) of the store's live webhook endpoint, shown this once. The endpoint posts store\_order.updated for this merchant only, to the store's own address. Null when Tallio made none: no key in that mode, an address Tallio does not post to (a development host, or http for live), or the team already at its endpoint limit; the store then reads its orders back instead.
    - `test` · `string | null` · required
      The signing secret (whsec\_…) of the store's test webhook endpoint, shown this once. The endpoint posts store\_order.updated for this merchant only, to the store's own address. Null when Tallio made none: no key in that mode, an address Tallio does not post to (a development host, or http for live), or the team already at its endpoint limit; the store then reads its orders back instead.

*Example response · 200*

```json
{
  "data": {
    "object": "store_grant",
    "platform": "woocommerce",
    "store_url": "string",
    "team": {
      "id": "team_02y9O8rh7F50tGi0QcWRrx",
      "name": "string"
    },
    "merchant": {
      "id": "mer_02y9O8rh7F50tGi0QcWRrx",
      "object": "merchant",
      "external_id": "olive-oil.myshopify.com",
      "name": "Olive Oil Co",
      "regime": "GR",
      "tax_id": {
        "country": "string",
        "scheme": "afm",
        "code": "string"
      },
      "legal_id": {
        "country": "string",
        "scheme": "afm",
        "code": "string"
      },
      "establishment": {
        "scheme": "branch",
        "code": "string"
      },
      "metadata": {
        "shop_domain": "olive-oil.myshopify.com"
      },
      "archived": false,
      "created": "2026-10-11T09:30:00.000Z"
    },
    "keys": {
      "live": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk",
      "test": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk"
    },
    "webhook_secrets": {
      "live": "string",
      "test": "string"
    }
  }
}
```

*Response headers*

- `x-request-id` · `string`
  The request's correlation id; quote it when reporting a problem. One of: req\_ plus a uuid (Tallio made it), client: plus the x-request-id you sent (8-128 of A-Z a-z 0-9 . \_ : -), or the hosting platform's id.
  With every response
  Pattern: `^(?:req_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|client:[A-Za-z0-9._:-]{8,128}|[A-Za-z0-9._-]{1,16}::[A-Za-z0-9._:-]{6,110})$`
- `retry-after` · `integer`
  Seconds to wait before retrying a request refused with 429 `rate_limited`.
  With 429 · At least 1
- `ratelimit-limit` · `integer`
  Requests allowed in the current window for the bucket this request counted against.
  With 429 · At least 1
- `ratelimit-remaining` · `integer`
  Requests left in the current window; 0 means the next one is refused until the window resets.
  With 429 · At least 0
- `ratelimit-reset` · `integer`
  Seconds until the current window resets.
  With 429 · At least 0

*Errors*

| Code | Status | Retryable | Meaning |
| --- | --- | --- | --- |
| `validation_failed` | 400 | No | Request validation failed. |
| `invalid_grant` | 400 | No | The authorization code is unknown, expired or already used, or the redirect\_uri or code\_verifier does not match it. Start the connection again. |
| `payload_too_large` | 413 | No | The request body is too large. |
| `unsupported_media_type` | 415 | No | The request body must be JSON (Content-Type: application/json). |
| `rate_limited` | 429 | Yes | A rate limit was reached. Retry later. |
| `internal_error` | 500 | No | An unexpected server error occurred. |

## List store orders

`GET /api/v1/store_orders`

Returns the store orders of your key's mode, newest first, each with its document. status=action\_needed lists the skipped and failed ones that wait for the merchant (not marked handled); with\_warnings=true the ones whose document came with warnings. A store key lists its own merchant's only.

*Bearer API key*

*Query parameters*

- `limit` · `integer`
  How many items to return, 1 to 100; 10 by default.
  From 1 to 100 · Default: `10`
- `starting_after` · `string`
  An id (ord\_…) from this list: return the items after it, older ones (pass the last id of the current page). Not with ending\_before.
  Up to 64 characters
- `ending_before` · `string`
  An id (ord\_…) from this list: return the items before it, newer ones (pass the first id of the current page). Not with starting\_after.
  Up to 64 characters
- `merchant` · `string`
  Only this merchant's store orders (mer\_…); a store key lists its own merchant's whatever this says.
  Pattern: `^mer_[0-9A-Za-z]{22}$`
- `status` · `string`
  Only store orders in this status; action\_needed lists the skipped and failed ones the merchant has not marked handled, except skips that need nothing from them (a test order, nothing to invoice, a sale to e-report).
  One of: `pending`, `skipped`, `sent`, `issued`, `failed`, `action_needed`
- `external_id` · `string`
  Only the store order of this platform order id.
  1 to 64 characters
- `with_warnings` · `string`
  true: only store orders whose document came with warnings; false: only those without.
  One of: `true`, `false`

*Request*

*curl*

```bash
curl -X GET 'https://tallio.dev/api/v1/store_orders' \
  -H "Authorization: Bearer $TALLIO_API_KEY"
```

*TypeScript SDK*

```ts
import { createTallioClient, unwrap } from "@tallio-dev/sdk";

const tallio = createTallioClient({
  apiKey: process.env.TALLIO_API_KEY!,
  baseUrl: "https://tallio.dev",
});

const result = await unwrap(tallio.http.GET("/api/v1/store_orders"));
```

*Responses*

| Status | Description |
| --- | --- |
| `200` | A page of store orders. |
| 4XX, 5XX | An error: see Errors below. |

*Response body · 200*

- `object` · `string` · required
  Always "list".
  Always `list`
- `data` · `object[]` · required
  This page's items, newest first.
  Each item: A shop order sent to Tallio, and the document it became.
  - `id` · `string` · required
    Id of the store order (ord\_…).
    Pattern: `^ord_[0-9A-Za-z]{22}$`
  - `object` · `string` · required
    Always "store\_order".
    Always `store_order`
  - `merchant` · `string` · required
    Id of the merchant (mer\_…).
    Pattern: `^mer_[0-9A-Za-z]{22}$`
  - `mode` · `string` · required
    live for an order sent with a live key, test for a test key.
    One of: `live`, `test`
  - `platform` · `string` · required
    The platform the order comes from.
    One of: `shopify`, `woocommerce`
  - `external_id` · `string` · required
    The platform's id of the order.
    1 to 64 characters
  - `number` · `string` · required
    The order number the merchant and the buyer see.
  - `status` · `string` · required
    pending (received, not yet mapped), skipped (it maps to no document: see reason), sent (its document was created and is on its way to the provider), issued (the document was issued), failed (the document was rejected, failed or cancelled, or Tallio could not create it: see reason).
    One of: `pending`, `skipped`, `sent`, `issued`, `failed`
  - `reason` · `string | null` · required
    Why the order is skipped or failed, as a machine code; null otherwise.
  - `detail` · `string | null` · required
    The reason in a sentence for the merchant; null when there is no reason.
  - `document` · `object | null` · required
    The document issued for the order, once one was created; null before.
    - `id` · `string` · required
      Id of the document (doc\_…).
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `object` · `string` · required
      Always "document".
      Always `document`
    - `merchant` · `string` · required
      Id of the merchant (mer\_…).
      Pattern: `^mer_[0-9A-Za-z]{22}$`
    - `mode` · `string` · required
      live for a document created with a live key, test for a test key.
      One of: `live`, `test`
    - `provider` · `string` · required
      The licensed e-invoicing provider (a Greek provider, direct myDATA, a French plateforme agréée, Chorus Pro for a French public-sector buyer, or Tallio's sandbox) that issues the document.
      One of: `sandbox`, `mydata`, `wrapp`, `impact`, `epsilon`, `softone`, `prosvasis`, `superpdp`, `choruspro`, `b2brouter`, `oxygen`, `iopole`, `qonto`, `elorus`, `timologisi`
    - `regime` · `string` · required
      Tax regime the document is issued under, by country: GR (Greece, myDATA) or FR (France, e-invoicing through a plateforme agréée).
      One of: `GR`, `FR` · Default: `GR`
    - `type` · `string` · required
      Document type, by regime.
      > **Greece:** An AADE myDATA type (e.g. 1.1).
      
      > **France:** A UNTDID 1001 code (e.g. 380).
      
      One of: `380`, `381`, `384`, `386`, `1.1`, `2.1`, `5.1`, `5.2`, `11.1`, `11.2`, `11.4`, `2.2`, `2.3`
    - `number` · `string | null` · required
      The document's number.
      > **Greece:** The provider's number in its series (e.g. ΕΑΛΠ-1), null until it assigns one: a display label, not unique, so identify a document by its id.
      
      > **France:** The number you assigned (set once issued).
      
      Default: `null`
    - `status` · `string` · required
      Where the document stands: pending (Tallio accepted it; not yet issued, see stage), issued (the tax system accepted it; in Greece it has a MARK), rejected (the provider or the tax system refused it), failed (Tallio could not deliver it to the provider), cancelled (withdrawn before it was sent, or cancelled in myDATA after issue: see mydata.cancellation\_mark).
      One of: `pending`, `issued`, `rejected`, `failed`, `cancelled`
    - `stage` · `string | null` · required
      Where a pending document is (queued, submitting, awaiting\_confirmation, reconciling); null unless status is pending.
      One of: `queued`, `submitting`, `awaiting_confirmation`, `reconciling`
    - `issue_date` · `string` · required
      Issue date, YYYY-MM-DD.
      Format: `date`
    - `currency` · `string` · required
      ISO 4217 currency of the amounts.
      > **Greece:** EUR.
      
      > **France:** Any with cents.
      
      Pattern: `^[A-Z]{3}$`
    - `net` · `integer` · required
      Sum of the lines' net amounts, in minor units, at most 1000000000000000.
      From 0 to 1000000000000000
    - `vat` · `integer` · required
      Sum of the lines' VAT, each line rounded half up to the minor unit, in minor units, at most 1000000000000000.
      From 0 to 1000000000000000
    - `gross` · `integer` · required
      net + vat, in minor units, at most 1250000000000000.
      From 0 to 1250000000000000
    - `provider_reference` · `string | null` · required
      The provider's own reference for the document, once it has taken it; null before.
    - `mydata` · `object | null` · required
      myDATA's identity of the document: an object in GR, null in any other regime.
      - `mark` · `string | null` · required
        MARK (AADE registration number) once issued, as a digit string; null before. A cancelled document keeps the MARK it was issued with (null when it was withdrawn before it was sent).
        Pattern: `^[1-9]\d{0,18}$`
      - `uid` · `string | null` · required
        myDATA uid: the SHA-1 (40 upper-case hex digits) AADE derives from the document's identifiers; null until known.
        Pattern: `^[0-9A-F]{40}$`
      - `qr_url` · `string | null` · required
        URL the document's QR code points to; null until the provider returns one.
        Format: `uri`
      - `cancellation_mark` · `string | null` · required
        The MARK of the cancellation in myDATA, once an issued document is cancelled; null otherwise.
        Pattern: `^[1-9]\d{0,18}$`
    - `ctc` · `object | null` · required
      The French e-invoicing platform's identity of the document: an object in FR, null in any other regime.
      - `platform_id` · `string | null` · required
        The plateforme agréée carrying the document (sandbox in test mode); null until it has taken it.
      - `flow_id` · `string | null` · required
        The platform's id of the flow that carried the document; null until it reports one.
    - `lifecycle` · `object | null` · required
      The tax regime's status for the document once sent.
      > **Greece:** Always null.
      
      > **France:** Null until the platform reports one.
      
      Default: `null`
      - `key` · `string` · required
        Where the document is after issue, in GOBL's bill.Status keys.
        One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
      - `code` · `string` · required
        The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
        1 to 20 characters
      - `at` · `string` · required
        When the regime's platform reported this status.
        Format: `date-time`
    - `lifecycle_history` · `object[]` · required
      Every lifecycle status reported for the document, oldest first, at most the newest 30; the last is lifecycle. Empty in GR. A status after issue (a buyer's 210 Refusée, the platform's 213 Rejetée) never changes status: an issued document stays issued.
      Up to 30 items · Default: `[]`
      Each item: One lifecycle status the tax regime's platform reported for the document.
      - `key` · `string` · required
        Where the document is after issue, in GOBL's bill.Status keys.
        One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
      - `code` · `string` · required
        The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
        1 to 20 characters
      - `at` · `string` · required
        When the regime's platform reported this status.
        Format: `date-time`
      - `provider_status` · `string | null` · required
        The provider's own status the code was read from (e.g. refused, REJETEE, fr:210); null if it gave none.
        1 to 64 characters
        Pattern: `^[A-Za-z0-9_.:-]+$`
      - `reason` · `string | null` · required
        The platform's reason code for a refusal, dispute or rejection, when it reports one; null otherwise. Free-text reasons are not kept.
        1 to 64 characters
        Pattern: `^[A-Za-z0-9_.:-]+$`
    - `error` · `object | null` · required
      Why the document was rejected or failed; null otherwise.
      - `code` · `string` · required
        Stable machine-readable error code. Branch on this, never on `message`.
        One of: `validation_failed`, `unauthorized`, `not_found`, `idempotency_conflict`, `idempotency_in_progress`, `already_exists`, `invalid_grant`, `store_url_mismatch`, `invalid_state`, `already_issued`, `connection_not_disconnected`, `merchant_archived`, `cursor_not_listed`, `payload_too_large`, `unsupported_media_type`, `rate_limited`, `too_many_pending_erasures`, `forbidden`, `restricted_key`, `vendor_suspended`, `subscription_required`, `store_plan_live_only`, `store_unproven`, `not_supported`, `regime_mismatch`, `supplier_mismatch`, `connection_unavailable`, `connection_unconfirmed`, `provider_credentials_invalid`, `provider_rejected`, `balance_exceeded`, `credit_required`, `provider_unavailable`, `pdf_not_ready`, `service_unavailable`, `internal_error`
      - `message` · `string` · required
        Tallio's own explanation, safe to show to a developer; the provider's words are in provider\_message.
      - `provider_code` · `string | null` · required
        The provider's own error code, or null when the error did not come from a provider.
      - `provider_message` · `string | null` · required
        The provider's own error message, verbatim, or null when the error did not come from a provider. On a document or connection it is removed (null), like provider\_raw, once the retention window ends or by a data-subject erasure.
      - `retryable` · `boolean` · required
        True when the same request may succeed if sent again later.
      - `provider_raw` · `any`
        The provider's error response body as received, or a TruncatedProviderRaw marker when it exceeds 4096 bytes of JSON. Never holds request headers, credentials or the request payload.
    - `classification` · `object` · required
      How the document was classified for myDATA.
      - `source` · `string` · required
        default when any line took Tallio's default, else override when any line took the merchant's override, else line.
        One of: `line`, `override`, `default`
      - `warnings` · `string[]` · required
        What to check before issuing, e.g. that defaults were applied.
    - `external_reference` · `string | null` · required
      Your own reference for the document, or null.
      Default: `null`
    - `metadata` · `object` · required
      Up to 50 key-value pairs of your own (keys up to 40 characters, values up to 500). Do not put personal data in it.
      Default: `{}`
      - `{key}` · `string`
        A value, up to 500 characters.
        1 to 40 characters
    - `original_document` · `string | null` · required
      For a credit note made from a Tallio document: that document (doc\_…). Null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `replaces` · `string | null` · required
      The rejected or failed document this one was issued to replace, or null.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `corrects` · `string | null` · required
      The issued document this one corrects, or null.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `replaced_by` · `string | null` · required
      The document created to replace this rejected or failed one, the live one if there were several; null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `corrected_by` · `string | null` · required
      The document made to correct this one (POST /documents/{id}/correct), the latest if there were several; null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `credit_notes` · `string[]` · required
      Credit notes made from this document, oldest first, at most 100.
      Up to 100 items · Default: `[]`
      Each item: Id of the document (doc\_…).
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `amount_credited` · `object` · required
      What credit notes made from this document take, pending ones included. Zero when there are none.
      Default: `{"net":0,"gross":0}`
      - `net` · `integer` · required
        Net amount credited, in cents.
        From 0 to 9007199254740991
      - `gross` · `integer` · required
        Gross amount credited, in cents.
        From 0 to 9007199254740991
    - `timeline` · `object[]` · required
      The document's events, oldest first, at most 100.
      Up to 100 items
      Each item: One event in a document's history. GET /events/{id} returns the full Event.
      - `id` · `string` · required
        Id of the event (evt\_…).
        Pattern: `^evt_[0-9A-Za-z]{22}$`
      - `type` · `string` · required
        What happened: document.created (Tallio accepted a document), document.issued (the tax system accepted it; in Greece it has a MARK), document.rejected (the provider or the tax system refused it), document.failed (Tallio could not deliver it), merchant.created (a merchant was created), connection.created (a merchant was connected to a provider), connection.verified (the provider accepted its credentials), connection.invalid (the provider refused them), connection.disconnected (it was disconnected), connect\_session.completed (a merchant connected through a hosted connect link), webhook\_endpoint.disabled (Tallio disabled an endpoint failing for days), document.retried (a failed document was queued to be sent again), document.credited (a credit note made from the document was issued), document.cancelled (the document was withdrawn or cancelled), document.corrected (a corrected document was made to replace it), document.replaced (a new document was created to replace a rejected or failed one), connection.deleted (a disconnected connection was deleted from the merchant's list), merchant.archived (a merchant was archived: it issues nothing new), merchant.unarchived (an archived merchant was restored), store\_order.updated (a store order's status, reason, handled mark or document changed), document.lifecycle\_updated (the French platform reported a new lifecycle status for an issued document) and connection.updated (a connection's settings changed).
        One of: `document.created`, `document.issued`, `document.rejected`, `document.failed`, `merchant.created`, `connection.created`, `connection.verified`, `connection.invalid`, `connection.disconnected`, `connect_session.completed`, `webhook_endpoint.disabled`, `document.retried`, `document.credited`, `document.cancelled`, `document.corrected`, `document.replaced`, `connection.deleted`, `merchant.archived`, `merchant.unarchived`, `store_order.updated`, `document.lifecycle_updated`, `connection.updated`
      - `created` · `string` · required
        When the event happened.
        Format: `date-time`
    - `issued_at` · `string | null` · required
      When the document was issued (the tax system accepted it); kept if it is cancelled afterwards, null for a document never issued.
      Format: `date-time`
    - `created` · `string` · required
      When Tallio accepted the document.
      Format: `date-time`
    - `updated` · `string` · required
      When the document last changed.
      Format: `date-time`
  - `warnings` · `object[]` · required
    What the merchant should know about the order's document (a rounding cent, a free line left off, the store's default payment method); empty when there is nothing, or before the order is mapped.
    Each item: Something the merchant should know about the document made for the order; the document was still made.
    - `code` · `string` · required
      What is worth knowing about the document, as a machine code: the store's method used for an unrecognised payment method, a free line left out, a rounding difference, an invoice request not met, or a registered detail not applied.
      One of: `payment_method_default`, `free_line_omitted`, `rounding_difference`, `invoice_requested_invalid_vat`, `invoice_requested_incomplete`, `invoice_customer_is_supplier`, `invoice_request_ambiguous`, `invoice_billing_not_greek`, `invoice_name_from_person`, `invoice_field_truncated`, `invoice_registry_address_not_applied`, `invoice_request_too_late`, `delivery_address_omitted`
    - `detail` · `string` · required
      The warning in a sentence for the merchant.
    - `difference` · `integer | null` · required
      rounding\_difference only: what the customer paid minus the document's gross, in cents (hundredths of the currency), negative when the document is higher; null for every other warning.
      From -9007199254740991 to 9007199254740991
  - `refunds` · `object[]` · required
    The order's refunds sent with POST /store\_orders/{id}/refunds, oldest first, each with its credit note once one was created; empty when there are none.
    Each item: A store order's refund sent to Tallio, and the credit note it became.
    - `id` · `string` · required
      Id of the store refund (ref\_…).
      Pattern: `^ref_[0-9A-Za-z]{22}$`
    - `object` · `string` · required
      Always "store\_refund".
      Always `store_refund`
    - `merchant` · `string` · required
      Id of the merchant (mer\_…).
      Pattern: `^mer_[0-9A-Za-z]{22}$`
    - `store_order` · `string` · required
      The store order it refunds (ord\_…).
      Pattern: `^ord_[0-9A-Za-z]{22}$`
    - `external_id` · `string` · required
      The platform's id of the refund.
    - `status` · `string` · required
      pending (received, or waiting for the order's document to be issued), skipped (it maps to no credit note: see reason), sent (its credit note was created and is on its way to the provider), issued (the credit note was issued), failed (the credit note was rejected, failed or cancelled, or Tallio could not create it: see reason).
      One of: `pending`, `skipped`, `sent`, `issued`, `failed`
    - `reason` · `string | null` · required
      Why the refund is skipped or failed, as a machine code; null otherwise.
    - `detail` · `string | null` · required
      The reason in a sentence for the merchant; null when there is no reason.
    - `document` · `object | null` · required
      The credit note issued for the refund, linked to the order's document, once one was created; null before.
      - `id` · `string` · required
        Id of the document (doc\_…).
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `object` · `string` · required
        Always "document".
        Always `document`
      - `merchant` · `string` · required
        Id of the merchant (mer\_…).
        Pattern: `^mer_[0-9A-Za-z]{22}$`
      - `mode` · `string` · required
        live for a document created with a live key, test for a test key.
        One of: `live`, `test`
      - `provider` · `string` · required
        The licensed e-invoicing provider (a Greek provider, direct myDATA, a French plateforme agréée, Chorus Pro for a French public-sector buyer, or Tallio's sandbox) that issues the document.
        One of: `sandbox`, `mydata`, `wrapp`, `impact`, `epsilon`, `softone`, `prosvasis`, `superpdp`, `choruspro`, `b2brouter`, `oxygen`, `iopole`, `qonto`, `elorus`, `timologisi`
      - `regime` · `string` · required
        Tax regime the document is issued under, by country: GR (Greece, myDATA) or FR (France, e-invoicing through a plateforme agréée).
        One of: `GR`, `FR` · Default: `GR`
      - `type` · `string` · required
        Document type, by regime.
        > **Greece:** An AADE myDATA type (e.g. 1.1).
        
        > **France:** A UNTDID 1001 code (e.g. 380).
        
        One of: `380`, `381`, `384`, `386`, `1.1`, `2.1`, `5.1`, `5.2`, `11.1`, `11.2`, `11.4`, `2.2`, `2.3`
      - `number` · `string | null` · required
        The document's number.
        > **Greece:** The provider's number in its series (e.g. ΕΑΛΠ-1), null until it assigns one: a display label, not unique, so identify a document by its id.
        
        > **France:** The number you assigned (set once issued).
        
        Default: `null`
      - `status` · `string` · required
        Where the document stands: pending (Tallio accepted it; not yet issued, see stage), issued (the tax system accepted it; in Greece it has a MARK), rejected (the provider or the tax system refused it), failed (Tallio could not deliver it to the provider), cancelled (withdrawn before it was sent, or cancelled in myDATA after issue: see mydata.cancellation\_mark).
        One of: `pending`, `issued`, `rejected`, `failed`, `cancelled`
      - `stage` · `string | null` · required
        Where a pending document is (queued, submitting, awaiting\_confirmation, reconciling); null unless status is pending.
        One of: `queued`, `submitting`, `awaiting_confirmation`, `reconciling`
      - `issue_date` · `string` · required
        Issue date, YYYY-MM-DD.
        Format: `date`
      - `currency` · `string` · required
        ISO 4217 currency of the amounts.
        > **Greece:** EUR.
        
        > **France:** Any with cents.
        
        Pattern: `^[A-Z]{3}$`
      - `net` · `integer` · required
        Sum of the lines' net amounts, in minor units, at most 1000000000000000.
        From 0 to 1000000000000000
      - `vat` · `integer` · required
        Sum of the lines' VAT, each line rounded half up to the minor unit, in minor units, at most 1000000000000000.
        From 0 to 1000000000000000
      - `gross` · `integer` · required
        net + vat, in minor units, at most 1250000000000000.
        From 0 to 1250000000000000
      - `provider_reference` · `string | null` · required
        The provider's own reference for the document, once it has taken it; null before.
      - `mydata` · `object | null` · required
        myDATA's identity of the document: an object in GR, null in any other regime.
        - `mark` · `string | null` · required
          MARK (AADE registration number) once issued, as a digit string; null before. A cancelled document keeps the MARK it was issued with (null when it was withdrawn before it was sent).
          Pattern: `^[1-9]\d{0,18}$`
        - `uid` · `string | null` · required
          myDATA uid: the SHA-1 (40 upper-case hex digits) AADE derives from the document's identifiers; null until known.
          Pattern: `^[0-9A-F]{40}$`
        - `qr_url` · `string | null` · required
          URL the document's QR code points to; null until the provider returns one.
          Format: `uri`
        - `cancellation_mark` · `string | null` · required
          The MARK of the cancellation in myDATA, once an issued document is cancelled; null otherwise.
          Pattern: `^[1-9]\d{0,18}$`
      - `ctc` · `object | null` · required
        The French e-invoicing platform's identity of the document: an object in FR, null in any other regime.
        - `platform_id` · `string | null` · required
          The plateforme agréée carrying the document (sandbox in test mode); null until it has taken it.
        - `flow_id` · `string | null` · required
          The platform's id of the flow that carried the document; null until it reports one.
      - `lifecycle` · `object | null` · required
        The tax regime's status for the document once sent.
        > **Greece:** Always null.
        
        > **France:** Null until the platform reports one.
        
        Default: `null`
        - `key` · `string` · required
          Where the document is after issue, in GOBL's bill.Status keys.
          One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
        - `code` · `string` · required
          The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
          1 to 20 characters
        - `at` · `string` · required
          When the regime's platform reported this status.
          Format: `date-time`
      - `lifecycle_history` · `object[]` · required
        Every lifecycle status reported for the document, oldest first, at most the newest 30; the last is lifecycle. Empty in GR. A status after issue (a buyer's 210 Refusée, the platform's 213 Rejetée) never changes status: an issued document stays issued.
        Up to 30 items · Default: `[]`
        Each item: One lifecycle status the tax regime's platform reported for the document.
        - `key` · `string` · required
          Where the document is after issue, in GOBL's bill.Status keys.
          One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
        - `code` · `string` · required
          The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
          1 to 20 characters
        - `at` · `string` · required
          When the regime's platform reported this status.
          Format: `date-time`
        - `provider_status` · `string | null` · required
          The provider's own status the code was read from (e.g. refused, REJETEE, fr:210); null if it gave none.
          1 to 64 characters
          Pattern: `^[A-Za-z0-9_.:-]+$`
        - `reason` · `string | null` · required
          The platform's reason code for a refusal, dispute or rejection, when it reports one; null otherwise. Free-text reasons are not kept.
          1 to 64 characters
          Pattern: `^[A-Za-z0-9_.:-]+$`
      - `error` · `object | null` · required
        Why the document was rejected or failed; null otherwise.
        - `code` · `string` · required
          Stable machine-readable error code. Branch on this, never on `message`.
          One of: `validation_failed`, `unauthorized`, `not_found`, `idempotency_conflict`, `idempotency_in_progress`, `already_exists`, `invalid_grant`, `store_url_mismatch`, `invalid_state`, `already_issued`, `connection_not_disconnected`, `merchant_archived`, `cursor_not_listed`, `payload_too_large`, `unsupported_media_type`, `rate_limited`, `too_many_pending_erasures`, `forbidden`, `restricted_key`, `vendor_suspended`, `subscription_required`, `store_plan_live_only`, `store_unproven`, `not_supported`, `regime_mismatch`, `supplier_mismatch`, `connection_unavailable`, `connection_unconfirmed`, `provider_credentials_invalid`, `provider_rejected`, `balance_exceeded`, `credit_required`, `provider_unavailable`, `pdf_not_ready`, `service_unavailable`, `internal_error`
        - `message` · `string` · required
          Tallio's own explanation, safe to show to a developer; the provider's words are in provider\_message.
        - `provider_code` · `string | null` · required
          The provider's own error code, or null when the error did not come from a provider.
        - `provider_message` · `string | null` · required
          The provider's own error message, verbatim, or null when the error did not come from a provider. On a document or connection it is removed (null), like provider\_raw, once the retention window ends or by a data-subject erasure.
        - `retryable` · `boolean` · required
          True when the same request may succeed if sent again later.
        - `provider_raw` · `any`
          The provider's error response body as received, or a TruncatedProviderRaw marker when it exceeds 4096 bytes of JSON. Never holds request headers, credentials or the request payload.
      - `classification` · `object` · required
        How the document was classified for myDATA.
        - `source` · `string` · required
          default when any line took Tallio's default, else override when any line took the merchant's override, else line.
          One of: `line`, `override`, `default`
        - `warnings` · `string[]` · required
          What to check before issuing, e.g. that defaults were applied.
      - `external_reference` · `string | null` · required
        Your own reference for the document, or null.
        Default: `null`
      - `metadata` · `object` · required
        Up to 50 key-value pairs of your own (keys up to 40 characters, values up to 500). Do not put personal data in it.
        Default: `{}`
        - `{key}` · `string`
          A value, up to 500 characters.
          1 to 40 characters
      - `original_document` · `string | null` · required
        For a credit note made from a Tallio document: that document (doc\_…). Null otherwise.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `replaces` · `string | null` · required
        The rejected or failed document this one was issued to replace, or null.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `corrects` · `string | null` · required
        The issued document this one corrects, or null.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `replaced_by` · `string | null` · required
        The document created to replace this rejected or failed one, the live one if there were several; null otherwise.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `corrected_by` · `string | null` · required
        The document made to correct this one (POST /documents/{id}/correct), the latest if there were several; null otherwise.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `credit_notes` · `string[]` · required
        Credit notes made from this document, oldest first, at most 100.
        Up to 100 items · Default: `[]`
        Each item: Id of the document (doc\_…).
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `amount_credited` · `object` · required
        What credit notes made from this document take, pending ones included. Zero when there are none.
        Default: `{"net":0,"gross":0}`
        - `net` · `integer` · required
          Net amount credited, in cents.
          From 0 to 9007199254740991
        - `gross` · `integer` · required
          Gross amount credited, in cents.
          From 0 to 9007199254740991
      - `timeline` · `object[]` · required
        The document's events, oldest first, at most 100.
        Up to 100 items
        Each item: One event in a document's history. GET /events/{id} returns the full Event.
        - `id` · `string` · required
          Id of the event (evt\_…).
          Pattern: `^evt_[0-9A-Za-z]{22}$`
        - `type` · `string` · required
          What happened: document.created (Tallio accepted a document), document.issued (the tax system accepted it; in Greece it has a MARK), document.rejected (the provider or the tax system refused it), document.failed (Tallio could not deliver it), merchant.created (a merchant was created), connection.created (a merchant was connected to a provider), connection.verified (the provider accepted its credentials), connection.invalid (the provider refused them), connection.disconnected (it was disconnected), connect\_session.completed (a merchant connected through a hosted connect link), webhook\_endpoint.disabled (Tallio disabled an endpoint failing for days), document.retried (a failed document was queued to be sent again), document.credited (a credit note made from the document was issued), document.cancelled (the document was withdrawn or cancelled), document.corrected (a corrected document was made to replace it), document.replaced (a new document was created to replace a rejected or failed one), connection.deleted (a disconnected connection was deleted from the merchant's list), merchant.archived (a merchant was archived: it issues nothing new), merchant.unarchived (an archived merchant was restored), store\_order.updated (a store order's status, reason, handled mark or document changed), document.lifecycle\_updated (the French platform reported a new lifecycle status for an issued document) and connection.updated (a connection's settings changed).
          One of: `document.created`, `document.issued`, `document.rejected`, `document.failed`, `merchant.created`, `connection.created`, `connection.verified`, `connection.invalid`, `connection.disconnected`, `connect_session.completed`, `webhook_endpoint.disabled`, `document.retried`, `document.credited`, `document.cancelled`, `document.corrected`, `document.replaced`, `connection.deleted`, `merchant.archived`, `merchant.unarchived`, `store_order.updated`, `document.lifecycle_updated`, `connection.updated`
        - `created` · `string` · required
          When the event happened.
          Format: `date-time`
      - `issued_at` · `string | null` · required
        When the document was issued (the tax system accepted it); kept if it is cancelled afterwards, null for a document never issued.
        Format: `date-time`
      - `created` · `string` · required
        When Tallio accepted the document.
        Format: `date-time`
      - `updated` · `string` · required
        When the document last changed.
        Format: `date-time`
    - `warnings` · `object[]` · required
      What the merchant should know about the credit note (a rounding cent); empty when there is nothing.
      Each item: Something the merchant should know about the document made for the order; the document was still made.
      - `code` · `string` · required
        What is worth knowing about the document, as a machine code: the store's method used for an unrecognised payment method, a free line left out, a rounding difference, an invoice request not met, or a registered detail not applied.
        One of: `payment_method_default`, `free_line_omitted`, `rounding_difference`, `invoice_requested_invalid_vat`, `invoice_requested_incomplete`, `invoice_customer_is_supplier`, `invoice_request_ambiguous`, `invoice_billing_not_greek`, `invoice_name_from_person`, `invoice_field_truncated`, `invoice_registry_address_not_applied`, `invoice_request_too_late`, `delivery_address_omitted`
      - `detail` · `string` · required
        The warning in a sentence for the merchant.
      - `difference` · `integer | null` · required
        rounding\_difference only: what the customer paid minus the document's gross, in cents (hundredths of the currency), negative when the document is higher; null for every other warning.
        From -9007199254740991 to 9007199254740991
    - `handled` · `string | null` · required
      When the merchant marked the skipped or failed refund handled (POST /store\_orders/{id}/refunds/{refundId}/mark\_handled); null otherwise.
      Format: `date-time`
    - `voided_numbers` · `object[]` · required
      > **Greece:** Always empty.
      
      > **France:** The numbers Tallio numbered the refund's credit note with that no document carries, oldest first, with why; empty otherwise. Each stays a gap in its series, never reused: keep this record of why, since the series must be continuous or each gap justified (CGI ann. II art. 242 nonies A).
      
      Each item: A French number Tallio gave this record that no document carries: kept as a gap in the series.
      - `number` · `string` · required
        The French number left unused.
      - `reason` · `string` · required
        Why the number went unused: handled\_by\_hand (the merchant marked the record handled before an issued document took it: none was made, or the provider rejected the one that carried it), taken (Tallio already held that number for the merchant), not\_issued (the record closed for good, with no document, after it was numbered), replaced (the order was corrected again in place of a correction that was rejected or failed, so never issued under it).
        One of: `handled_by_hand`, `taken`, `not_issued`, `replaced`
    - `action_needed` · `boolean` · required
      Whether the refund waits for the merchant: skipped or failed, not marked handled, and not a skip that needs nothing. A refund waiting for its order's document (original\_not\_issued) is not while the order itself asks; once the order is marked handled it is, and it is credited if the order's document is made.
    - `created` · `string` · required
      When Tallio received the refund.
      Format: `date-time`
  - `handled` · `string | null` · required
    When the merchant marked the skipped or failed order handled (POST /store\_orders/{id}/mark\_handled); null otherwise, and again after a retry.
    Format: `date-time`
  - `voided_numbers` · `object[]` · required
    > **Greece:** Always empty.
    
    > **France:** The numbers Tallio numbered the order's invoice with that no document carries, oldest first, with why; empty otherwise. Each stays a gap in its series, never reused: keep this record of why, since the series must be continuous or each gap justified (CGI ann. II art. 242 nonies A).
    
    Each item: A French number Tallio gave this record that no document carries: kept as a gap in the series.
    - `number` · `string` · required
      The French number left unused.
    - `reason` · `string` · required
      Why the number went unused: handled\_by\_hand (the merchant marked the record handled before an issued document took it: none was made, or the provider rejected the one that carried it), taken (Tallio already held that number for the merchant), not\_issued (the record closed for good, with no document, after it was numbered), replaced (the order was corrected again in place of a correction that was rejected or failed, so never issued under it).
      One of: `handled_by_hand`, `taken`, `not_issued`, `replaced`
  - `action_needed` · `boolean` · required
    Whether the order itself waits for the merchant: skipped or failed, not marked handled, and not a skip that needs nothing (test\_order, no\_lines, sale\_to\_report…). GET /store\_orders?status=action\_needed lists these, and also orders with a refund that waits for the merchant (its own action\_needed).
  - `retryable` · `boolean` · required
    Whether POST /store\_orders/{id}/retry acts on it now: a skip fixed outside the order (provider\_not\_connected, order\_not\_paid, tallio\_refused, number\_taken…), a failed job, or a failed document Tallio can send again, none marked handled. A rejected document is corrected instead.
    > **France:** An invoice held as fr\_numbering\_pending (kept before Tallio numbered store invoices) is retryable even if marked handled: send it again to issue it.
    
  - `correctable` · `boolean` · required
    Whether POST /store\_orders/{id}/correct may act on it now: its document is issued, or was cancelled or credited in full, with no correction yet; or its document is a correction that was rejected or failed (correct again). Not for one partly credited.
    > **France:** Not for an invoice the buyer refused (210) or the platform rejected after issue (213).
    
  - `cancellable` · `boolean` · required
    Whether POST /store\_orders/{id}/cancel may act on it now.
    > **Greece:** Its document is issued, with no correction and no credit note.
    
    > **France:** Never; invoices are never cancelled, only corrected.
    
  - `created` · `string` · required
    When Tallio received the order; a retry of a skip moves it to the retry, since the document is dated by it. A French invoice is dated by the Paris day its number was given instead, which a retry keeps, so the series stays in date order.
    Format: `date-time`
- `has_more` · `boolean` · required
  Whether more items exist past this page in the direction you paged (starting\_after or ending\_before).

*Example response · 200*

```json
{
  "object": "list",
  "data": [],
  "has_more": false
}
```

*Response headers*

- `x-request-id` · `string`
  The request's correlation id; quote it when reporting a problem. One of: req\_ plus a uuid (Tallio made it), client: plus the x-request-id you sent (8-128 of A-Z a-z 0-9 . \_ : -), or the hosting platform's id.
  With every response
  Pattern: `^(?:req_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|client:[A-Za-z0-9._:-]{8,128}|[A-Za-z0-9._-]{1,16}::[A-Za-z0-9._:-]{6,110})$`
- `ratelimit-limit` · `integer`
  Requests allowed in the current window for the bucket this request counted against.
  With 200, 400, 409, 429 · At least 1
- `ratelimit-remaining` · `integer`
  Requests left in the current window; 0 means the next one is refused until the window resets.
  With 200, 400, 409, 429 · At least 0
- `ratelimit-reset` · `integer`
  Seconds until the current window resets.
  With 200, 400, 409, 429 · At least 0
- `www-authenticate` · `string`
  The bearer challenge: send a vendor secret key as `Authorization: Bearer <key>`.
  With 401 · Always `Bearer realm="tallio"`
- `retry-after` · `integer`
  Seconds to wait before retrying a request refused with 429 `rate_limited`.
  With 429 · At least 1

*Errors*

| Code | Status | Retryable | Meaning |
| --- | --- | --- | --- |
| `validation_failed` | 400 | No | Request validation failed. |
| `unauthorized` | 401 | No | Authentication is required. |
| `vendor_suspended` | 403 | No | This vendor's access to Tallio is suspended. Its owner can contact Tallio to restore it. |
| `store_url_mismatch` | 409 | No | This store key was granted to another store URL than the one this request names (Tallio-Store-Url). Connect this store again, or confirm that the store moved. |
| `rate_limited` | 429 | Yes | A rate limit was reached. Retry later. |
| `internal_error` | 500 | No | An unexpected server error occurred. |

## Send a shop order

`POST /api/v1/store_orders`

Sends a shop order (a WooCommerce order, say), paid or not. Tallio maps a paid one to a document, issues it through the merchant's connection in the key's mode (the sandbox for a test key without one) and keeps its state; an unpaid one is kept and skipped as order\_not\_paid (a later resend answers that row). On the Free store plan, a new live order is refused with 403 store\_unproven until Tallio has proven the store (its address at connect, or its business's tax id through a provider). A live order past the store plan's document limit is skipped as plan\_cap\_reached, retried with POST /store\_orders/{id}/retry once the plan allows; credit notes and corrections never count. Read it back with GET /store\_orders/{id}. One store order per merchant, mode, platform and order: sending an order Tallio already holds answers that store order (200) and maps nothing again, whatever the key, even a key first sent with an earlier snapshot of the same order (a resend after a lost answer); an order whose created\_at differs from the held one's is another order under a reused id (a restored or copied site), refused with 409 already\_exists. Use a key per order, such as woo:{site}:order:{id}. A store key acts on its own merchant only.

> **France:** An invoice and its credit notes are numbered and dated by Tallio, from the merchant's store settings prefixes, one series per mode and year.

*Bearer API key · Idempotency-Key required*

*Header parameters*

- `idempotency-key` · `string` · required
  A key you choose (1-255 printable ASCII characters, e.g. a UUID) that makes a create request safe to retry: the same key with the same body returns the first result instead of creating a second document. Keys starting with `store_order:`, `store_refund:`, `correction:`, `correction_credit:`, `credit_note:` are reserved for Tallio's own documents and refused.
  1 to 255 characters
  Pattern: `^[\x21-\x7E]*$`

*Request body*

- `merchant` · `string` · required
  The merchant whose store the order is from (mer\_…).
  Pattern: `^mer_[0-9A-Za-z]{22}$`
- `order` · `object` · required
  The order as the platform holds it (StoreOrderSnapshot); Tallio maps it, never the store.
  - `platform` · `string` · required
    The platform the order comes from. Not shopify: the Shopify app issues through its own path until it moves onto store orders, so one order is never issued twice.
    One of: `woocommerce`
  - `test` · `boolean` · required
    A test order (a test gateway or test mode): never a fiscal document.
  - `currency` · `string` · required
    ISO 4217 currency of every amount.
    Pattern: `^[A-Z]{3}$`
  - `prices_include_tax` · `boolean` · required
    The store's prices are entered with tax included.
  - `tax_rounding` · `string` · required
    How the platform rounded tax: "line" per line, or "subtotal" once per rate over the order. The total is checked the platform's way: each line's net and tax rounded, or the unrounded lines summed, then rounded.
    One of: `line`, `subtotal`
  - `total` · `string` · required
    The order's total, tax included, at the same moment as its lines: after edits, and (sent to the store orders API) as paid, before any refund. It equals what the lines, shipping and fees add up to with their tax; an order where they differ is refused, never corrected.
    Pattern: `^(0|[1-9]\d{0,12})(\.\d{1,2})?$`
  - `lines` · `object[]` · required
    The products, in the order's order, at the moment total describes.
    Up to 1000 items
    Each item: A product line.
    - `external_id` · `string | null` · required
      The platform's id of the line, which refunds name; null when the platform gave none.
      1 to 64 characters
    - `name` · `string` · required
      The product's name as sold, variation included (Shopify: title - variant).
      Up to 1000 characters
    - `sku` · `string`
      The SKU; describes the line when it has no name.
      Up to 200 characters
    - `product_id` · `string`
      The platform's product id; describes the line when nothing else does.
      Up to 64 characters
    - `quantity` · `string` · required
      Units on the order at the moment the snapshot describes, after edits; 0 for a line edited away. Sent to the store orders API, that moment is the payment: refunds are sent on their own (POST /store\_orders/{id}/refunds).
      Pattern: `^\d{1,9}(\.\d{1,6})?$`
    - `total` · `string` · required
      The line's net amount after discounts, tax excluded.
      Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
    - `taxes` · `object[]` · required
      The line's tax, one share per rate; empty when it is untaxed.
      Up to 10 items
      Each item: One rate's share of a line's tax.
      - `rate_id` · `string` · required
        The platform's id of the tax rate (WooCommerce: the key of the line's taxes; Shopify: the rate).
        1 to 64 characters
      - `rate_percent` · `string` · required
        The rate in percent as text, up to 10 decimals: "24", "5.5". A compound rate is never sent.
        Pattern: `^\d{1,3}(\.\d{1,10})?$`
      - `amount` · `string` · required
        The tax at this rate, unrounded when the platform stores it so; negative only on a negative (discount) line, whose tax WooCommerce stores negative too.
        Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
    - `gift_card` · `boolean` · required
      The line sells a gift card, which is not a sale of goods.
  - `shipping_lines` · `object[]` · required
    The shipping charged after discounts, at the moment total describes.
    Up to 1000 items
    Each item: A shipping line, one unit.
    - `external_id` · `string | null` · required
      The platform's id of the line, which refunds name; null when the platform gave none.
      1 to 64 characters
    - `name` · `string` · required
      The shipping's name as the order shows it.
      Up to 1000 characters
    - `total` · `string` · required
      The shipping's net amount after discounts, tax excluded.
      Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
    - `taxes` · `object[]` · required
      The shipping's tax, one share per rate; empty when it is untaxed.
      Up to 10 items
      Each item: One rate's share of a line's tax.
      - `rate_id` · `string` · required
        The platform's id of the tax rate (WooCommerce: the key of the line's taxes; Shopify: the rate).
        1 to 64 characters
      - `rate_percent` · `string` · required
        The rate in percent as text, up to 10 decimals: "24", "5.5". A compound rate is never sent.
        Pattern: `^\d{1,3}(\.\d{1,10})?$`
      - `amount` · `string` · required
        The tax at this rate, unrounded when the platform stores it so; negative only on a negative (discount) line, whose tax WooCommerce stores negative too.
        Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
  - `fee_lines` · `object[]` · required
    Other charges, such as a cash-on-delivery fee, at the moment total describes.
    Up to 1000 items
    Each item: A fee line, one unit.
    - `external_id` · `string | null` · required
      The platform's id of the line, which refunds name; null when the platform gave none.
      1 to 64 characters
    - `name` · `string` · required
      The fee's name as the order shows it.
      Up to 1000 characters
    - `total` · `string` · required
      The fee's net amount after discounts, tax excluded.
      Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
    - `taxes` · `object[]` · required
      The fee's tax, one share per rate; empty when it is untaxed.
      Up to 10 items
      Each item: One rate's share of a line's tax.
      - `rate_id` · `string` · required
        The platform's id of the tax rate (WooCommerce: the key of the line's taxes; Shopify: the rate).
        1 to 64 characters
      - `rate_percent` · `string` · required
        The rate in percent as text, up to 10 decimals: "24", "5.5". A compound rate is never sent.
        Pattern: `^\d{1,3}(\.\d{1,10})?$`
      - `amount` · `string` · required
        The tax at this rate, unrounded when the platform stores it so; negative only on a negative (discount) line, whose tax WooCommerce stores negative too.
        Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
  - `coupons` · `object[]` · required
    The coupons used, for display only: their discounts are already in the lines' totals.
    Up to 1000 items
    Each item: A coupon.
    - `code` · `string` · required
      The coupon code.
      Up to 200 characters
  - `billing` · `object`
    The billing address: it names and locates an invoice's buyer.
    - `country` · `string`
      ISO 3166-1 alpha-2 country code.
      Pattern: `^[A-Z]{2}$`
    - `address_1` · `string`
      Street and number.
      Up to 500 characters
    - `city` · `string`
      City.
      Up to 200 characters
    - `postcode` · `string`
      Postal code.
      Up to 50 characters
    - `company` · `string`
      Company name.
      Up to 500 characters
    - `name` · `string`
      The billing person's full name, when the platform keeps one.
      Up to 500 characters
    - `first_name` · `string`
      First name.
      Up to 200 characters
    - `last_name` · `string`
      Last name.
      Up to 200 characters
  - `shipping` · `object`
    The shipping address; the sale is taxed in its country, else the billing country.
    - `country` · `string`
      ISO 3166-1 alpha-2 country code.
      Pattern: `^[A-Z]{2}$`
    - `address_1` · `string`
      Street and number.
      Up to 500 characters
    - `city` · `string`
      City.
      Up to 200 characters
    - `postcode` · `string`
      Postal code.
      Up to 50 characters
  - `payment_gateways` · `object[]` · required
    The gateways that took the payment; one for most orders.
    Up to 10 items
    Each item: A payment gateway the order was paid through.
    - `id` · `string` · required
      The gateway's id (WooCommerce: cod, bacs, stripe; Shopify: its gateway name).
      1 to 200 characters
    - `title` · `string` · required
      The gateway's name as the buyer saw it.
      Up to 200 characters
  - `invoice_request` · `object`
    What the checkout captured of a buyer's request for an invoice. A platform that captures each field once sends one value each; Shopify's cart attributes may repeat.
    - `requested` · `string[]` · required
      Every value the checkout captured for "I need an invoice" ("true", "yes", "false"); distinct values disagree, and no invoice is guessed.
      Up to 10 items
      Each item: Up to 200 characters
    - `vat_numbers` · `string[]` · required
      Every value the checkout captured for the buyer's VAT number (ΑΦΜ, SIREN, SIRET or EU VAT number); distinct values disagree, and no invoice is guessed.
      Up to 10 items
      Each item: Up to 200 characters
    - `company_names` · `string[]` · required
      Every value the checkout captured for the buyer's company name; distinct values disagree, and no invoice is guessed.
      Up to 10 items
      Each item: Up to 200 characters
  - `platform_version` · `string` · required
    The platform's version ("11.2.1"), logged, never branched on.
    1 to 50 characters
  - `external_id` · `string` · required
    The platform's order id.
    1 to 64 characters
  - `number` · `string` · required
    The order number the merchant knows it by ("1042", "#1042").
    1 to 64 characters
  - `created_at` · `string` · required
    When the order was placed.
    Format: `date-time`
  - `paid_at` · `string | null` · required
    When it was paid; null while unpaid.
    Format: `date-time`
  - `cancelled` · `boolean` · required
    The order was cancelled: it is kept and skipped as order\_cancelled.
  - `refunded_total` · `string` · required
    What was already refunded on the order when the snapshot was taken ("0" for nothing). An order refunded in part before its document is issued as paid, and each refund is credited after it; one refunded in full is skipped as refunded\_before\_issue (nothing was sold).
    Pattern: `^(0|[1-9]\d{0,12})(\.\d{1,2})?$`

*Request*

*JSON*

```json
{
  "merchant": "mer_02y9O8rh7F50tGi0QcWRrx",
  "order": {
    "platform": "woocommerce",
    "test": false,
    "currency": "EUR",
    "prices_include_tax": false,
    "tax_rounding": "line",
    "total": "81.41",
    "lines": [],
    "shipping_lines": [],
    "fee_lines": [],
    "coupons": [],
    "payment_gateways": [],
    "platform_version": "string",
    "external_id": "string",
    "number": "string",
    "created_at": "2026-10-11T09:30:00.000Z",
    "paid_at": "2026-10-11T09:31:00.000Z",
    "cancelled": false,
    "refunded_total": "81.41"
  }
}
```

*curl*

```bash
curl -X POST 'https://tallio.dev/api/v1/store_orders' \
  -H "Authorization: Bearer $TALLIO_API_KEY" \
  -H 'Idempotency-Key: order-1042' \
  -H "Content-Type: application/json" \
  -d '{
  "merchant": "mer_02y9O8rh7F50tGi0QcWRrx",
  "order": {
    "platform": "woocommerce",
    "test": false,
    "currency": "EUR",
    "prices_include_tax": false,
    "tax_rounding": "line",
    "total": "81.41",
    "lines": [],
    "shipping_lines": [],
    "fee_lines": [],
    "coupons": [],
    "payment_gateways": [],
    "platform_version": "string",
    "external_id": "string",
    "number": "string",
    "created_at": "2026-10-11T09:30:00.000Z",
    "paid_at": "2026-10-11T09:31:00.000Z",
    "cancelled": false,
    "refunded_total": "81.41"
  }
}'
```

*TypeScript SDK*

```ts
import { createTallioClient, unwrap } from "@tallio-dev/sdk";

const tallio = createTallioClient({
  apiKey: process.env.TALLIO_API_KEY!,
  baseUrl: "https://tallio.dev",
});

const result = await unwrap(tallio.http.POST("/api/v1/store_orders", {
  body: {
    merchant: "mer_02y9O8rh7F50tGi0QcWRrx",
    order: {
      platform: "woocommerce",
      test: false,
      currency: "EUR",
      prices_include_tax: false,
      tax_rounding: "line",
      total: "81.41",
      lines: [],
      shipping_lines: [],
      fee_lines: [],
      coupons: [],
      payment_gateways: [],
      platform_version: "string",
      external_id: "string",
      number: "string",
      created_at: "2026-10-11T09:30:00.000Z",
      paid_at: "2026-10-11T09:31:00.000Z",
      cancelled: false,
      refunded_total: "81.41",
    },
  },
}));
```

*Responses*

| Status | Description |
| --- | --- |
| `200` | The store order Tallio already held for this order. |
| `201` | The store order, pending. A replay returns the first answer. |
| 4XX, 5XX | An error: see Errors below. |

*Response body · 200*

- `data` · `object` · required
  A shop order sent to Tallio, and the document it became.
  - `id` · `string` · required
    Id of the store order (ord\_…).
    Pattern: `^ord_[0-9A-Za-z]{22}$`
  - `object` · `string` · required
    Always "store\_order".
    Always `store_order`
  - `merchant` · `string` · required
    Id of the merchant (mer\_…).
    Pattern: `^mer_[0-9A-Za-z]{22}$`
  - `mode` · `string` · required
    live for an order sent with a live key, test for a test key.
    One of: `live`, `test`
  - `platform` · `string` · required
    The platform the order comes from.
    One of: `shopify`, `woocommerce`
  - `external_id` · `string` · required
    The platform's id of the order.
    1 to 64 characters
  - `number` · `string` · required
    The order number the merchant and the buyer see.
  - `status` · `string` · required
    pending (received, not yet mapped), skipped (it maps to no document: see reason), sent (its document was created and is on its way to the provider), issued (the document was issued), failed (the document was rejected, failed or cancelled, or Tallio could not create it: see reason).
    One of: `pending`, `skipped`, `sent`, `issued`, `failed`
  - `reason` · `string | null` · required
    Why the order is skipped or failed, as a machine code; null otherwise.
  - `detail` · `string | null` · required
    The reason in a sentence for the merchant; null when there is no reason.
  - `document` · `object | null` · required
    The document issued for the order, once one was created; null before.
    - `id` · `string` · required
      Id of the document (doc\_…).
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `object` · `string` · required
      Always "document".
      Always `document`
    - `merchant` · `string` · required
      Id of the merchant (mer\_…).
      Pattern: `^mer_[0-9A-Za-z]{22}$`
    - `mode` · `string` · required
      live for a document created with a live key, test for a test key.
      One of: `live`, `test`
    - `provider` · `string` · required
      The licensed e-invoicing provider (a Greek provider, direct myDATA, a French plateforme agréée, Chorus Pro for a French public-sector buyer, or Tallio's sandbox) that issues the document.
      One of: `sandbox`, `mydata`, `wrapp`, `impact`, `epsilon`, `softone`, `prosvasis`, `superpdp`, `choruspro`, `b2brouter`, `oxygen`, `iopole`, `qonto`, `elorus`, `timologisi`
    - `regime` · `string` · required
      Tax regime the document is issued under, by country: GR (Greece, myDATA) or FR (France, e-invoicing through a plateforme agréée).
      One of: `GR`, `FR` · Default: `GR`
    - `type` · `string` · required
      Document type, by regime.
      > **Greece:** An AADE myDATA type (e.g. 1.1).
      
      > **France:** A UNTDID 1001 code (e.g. 380).
      
      One of: `380`, `381`, `384`, `386`, `1.1`, `2.1`, `5.1`, `5.2`, `11.1`, `11.2`, `11.4`, `2.2`, `2.3`
    - `number` · `string | null` · required
      The document's number.
      > **Greece:** The provider's number in its series (e.g. ΕΑΛΠ-1), null until it assigns one: a display label, not unique, so identify a document by its id.
      
      > **France:** The number you assigned (set once issued).
      
      Default: `null`
    - `status` · `string` · required
      Where the document stands: pending (Tallio accepted it; not yet issued, see stage), issued (the tax system accepted it; in Greece it has a MARK), rejected (the provider or the tax system refused it), failed (Tallio could not deliver it to the provider), cancelled (withdrawn before it was sent, or cancelled in myDATA after issue: see mydata.cancellation\_mark).
      One of: `pending`, `issued`, `rejected`, `failed`, `cancelled`
    - `stage` · `string | null` · required
      Where a pending document is (queued, submitting, awaiting\_confirmation, reconciling); null unless status is pending.
      One of: `queued`, `submitting`, `awaiting_confirmation`, `reconciling`
    - `issue_date` · `string` · required
      Issue date, YYYY-MM-DD.
      Format: `date`
    - `currency` · `string` · required
      ISO 4217 currency of the amounts.
      > **Greece:** EUR.
      
      > **France:** Any with cents.
      
      Pattern: `^[A-Z]{3}$`
    - `net` · `integer` · required
      Sum of the lines' net amounts, in minor units, at most 1000000000000000.
      From 0 to 1000000000000000
    - `vat` · `integer` · required
      Sum of the lines' VAT, each line rounded half up to the minor unit, in minor units, at most 1000000000000000.
      From 0 to 1000000000000000
    - `gross` · `integer` · required
      net + vat, in minor units, at most 1250000000000000.
      From 0 to 1250000000000000
    - `provider_reference` · `string | null` · required
      The provider's own reference for the document, once it has taken it; null before.
    - `mydata` · `object | null` · required
      myDATA's identity of the document: an object in GR, null in any other regime.
      - `mark` · `string | null` · required
        MARK (AADE registration number) once issued, as a digit string; null before. A cancelled document keeps the MARK it was issued with (null when it was withdrawn before it was sent).
        Pattern: `^[1-9]\d{0,18}$`
      - `uid` · `string | null` · required
        myDATA uid: the SHA-1 (40 upper-case hex digits) AADE derives from the document's identifiers; null until known.
        Pattern: `^[0-9A-F]{40}$`
      - `qr_url` · `string | null` · required
        URL the document's QR code points to; null until the provider returns one.
        Format: `uri`
      - `cancellation_mark` · `string | null` · required
        The MARK of the cancellation in myDATA, once an issued document is cancelled; null otherwise.
        Pattern: `^[1-9]\d{0,18}$`
    - `ctc` · `object | null` · required
      The French e-invoicing platform's identity of the document: an object in FR, null in any other regime.
      - `platform_id` · `string | null` · required
        The plateforme agréée carrying the document (sandbox in test mode); null until it has taken it.
      - `flow_id` · `string | null` · required
        The platform's id of the flow that carried the document; null until it reports one.
    - `lifecycle` · `object | null` · required
      The tax regime's status for the document once sent.
      > **Greece:** Always null.
      
      > **France:** Null until the platform reports one.
      
      Default: `null`
      - `key` · `string` · required
        Where the document is after issue, in GOBL's bill.Status keys.
        One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
      - `code` · `string` · required
        The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
        1 to 20 characters
      - `at` · `string` · required
        When the regime's platform reported this status.
        Format: `date-time`
    - `lifecycle_history` · `object[]` · required
      Every lifecycle status reported for the document, oldest first, at most the newest 30; the last is lifecycle. Empty in GR. A status after issue (a buyer's 210 Refusée, the platform's 213 Rejetée) never changes status: an issued document stays issued.
      Up to 30 items · Default: `[]`
      Each item: One lifecycle status the tax regime's platform reported for the document.
      - `key` · `string` · required
        Where the document is after issue, in GOBL's bill.Status keys.
        One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
      - `code` · `string` · required
        The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
        1 to 20 characters
      - `at` · `string` · required
        When the regime's platform reported this status.
        Format: `date-time`
      - `provider_status` · `string | null` · required
        The provider's own status the code was read from (e.g. refused, REJETEE, fr:210); null if it gave none.
        1 to 64 characters
        Pattern: `^[A-Za-z0-9_.:-]+$`
      - `reason` · `string | null` · required
        The platform's reason code for a refusal, dispute or rejection, when it reports one; null otherwise. Free-text reasons are not kept.
        1 to 64 characters
        Pattern: `^[A-Za-z0-9_.:-]+$`
    - `error` · `object | null` · required
      Why the document was rejected or failed; null otherwise.
      - `code` · `string` · required
        Stable machine-readable error code. Branch on this, never on `message`.
        One of: `validation_failed`, `unauthorized`, `not_found`, `idempotency_conflict`, `idempotency_in_progress`, `already_exists`, `invalid_grant`, `store_url_mismatch`, `invalid_state`, `already_issued`, `connection_not_disconnected`, `merchant_archived`, `cursor_not_listed`, `payload_too_large`, `unsupported_media_type`, `rate_limited`, `too_many_pending_erasures`, `forbidden`, `restricted_key`, `vendor_suspended`, `subscription_required`, `store_plan_live_only`, `store_unproven`, `not_supported`, `regime_mismatch`, `supplier_mismatch`, `connection_unavailable`, `connection_unconfirmed`, `provider_credentials_invalid`, `provider_rejected`, `balance_exceeded`, `credit_required`, `provider_unavailable`, `pdf_not_ready`, `service_unavailable`, `internal_error`
      - `message` · `string` · required
        Tallio's own explanation, safe to show to a developer; the provider's words are in provider\_message.
      - `provider_code` · `string | null` · required
        The provider's own error code, or null when the error did not come from a provider.
      - `provider_message` · `string | null` · required
        The provider's own error message, verbatim, or null when the error did not come from a provider. On a document or connection it is removed (null), like provider\_raw, once the retention window ends or by a data-subject erasure.
      - `retryable` · `boolean` · required
        True when the same request may succeed if sent again later.
      - `provider_raw` · `any`
        The provider's error response body as received, or a TruncatedProviderRaw marker when it exceeds 4096 bytes of JSON. Never holds request headers, credentials or the request payload.
    - `classification` · `object` · required
      How the document was classified for myDATA.
      - `source` · `string` · required
        default when any line took Tallio's default, else override when any line took the merchant's override, else line.
        One of: `line`, `override`, `default`
      - `warnings` · `string[]` · required
        What to check before issuing, e.g. that defaults were applied.
    - `external_reference` · `string | null` · required
      Your own reference for the document, or null.
      Default: `null`
    - `metadata` · `object` · required
      Up to 50 key-value pairs of your own (keys up to 40 characters, values up to 500). Do not put personal data in it.
      Default: `{}`
      - `{key}` · `string`
        A value, up to 500 characters.
        1 to 40 characters
    - `original_document` · `string | null` · required
      For a credit note made from a Tallio document: that document (doc\_…). Null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `replaces` · `string | null` · required
      The rejected or failed document this one was issued to replace, or null.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `corrects` · `string | null` · required
      The issued document this one corrects, or null.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `replaced_by` · `string | null` · required
      The document created to replace this rejected or failed one, the live one if there were several; null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `corrected_by` · `string | null` · required
      The document made to correct this one (POST /documents/{id}/correct), the latest if there were several; null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `credit_notes` · `string[]` · required
      Credit notes made from this document, oldest first, at most 100.
      Up to 100 items · Default: `[]`
      Each item: Id of the document (doc\_…).
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `amount_credited` · `object` · required
      What credit notes made from this document take, pending ones included. Zero when there are none.
      Default: `{"net":0,"gross":0}`
      - `net` · `integer` · required
        Net amount credited, in cents.
        From 0 to 9007199254740991
      - `gross` · `integer` · required
        Gross amount credited, in cents.
        From 0 to 9007199254740991
    - `timeline` · `object[]` · required
      The document's events, oldest first, at most 100.
      Up to 100 items
      Each item: One event in a document's history. GET /events/{id} returns the full Event.
      - `id` · `string` · required
        Id of the event (evt\_…).
        Pattern: `^evt_[0-9A-Za-z]{22}$`
      - `type` · `string` · required
        What happened: document.created (Tallio accepted a document), document.issued (the tax system accepted it; in Greece it has a MARK), document.rejected (the provider or the tax system refused it), document.failed (Tallio could not deliver it), merchant.created (a merchant was created), connection.created (a merchant was connected to a provider), connection.verified (the provider accepted its credentials), connection.invalid (the provider refused them), connection.disconnected (it was disconnected), connect\_session.completed (a merchant connected through a hosted connect link), webhook\_endpoint.disabled (Tallio disabled an endpoint failing for days), document.retried (a failed document was queued to be sent again), document.credited (a credit note made from the document was issued), document.cancelled (the document was withdrawn or cancelled), document.corrected (a corrected document was made to replace it), document.replaced (a new document was created to replace a rejected or failed one), connection.deleted (a disconnected connection was deleted from the merchant's list), merchant.archived (a merchant was archived: it issues nothing new), merchant.unarchived (an archived merchant was restored), store\_order.updated (a store order's status, reason, handled mark or document changed), document.lifecycle\_updated (the French platform reported a new lifecycle status for an issued document) and connection.updated (a connection's settings changed).
        One of: `document.created`, `document.issued`, `document.rejected`, `document.failed`, `merchant.created`, `connection.created`, `connection.verified`, `connection.invalid`, `connection.disconnected`, `connect_session.completed`, `webhook_endpoint.disabled`, `document.retried`, `document.credited`, `document.cancelled`, `document.corrected`, `document.replaced`, `connection.deleted`, `merchant.archived`, `merchant.unarchived`, `store_order.updated`, `document.lifecycle_updated`, `connection.updated`
      - `created` · `string` · required
        When the event happened.
        Format: `date-time`
    - `issued_at` · `string | null` · required
      When the document was issued (the tax system accepted it); kept if it is cancelled afterwards, null for a document never issued.
      Format: `date-time`
    - `created` · `string` · required
      When Tallio accepted the document.
      Format: `date-time`
    - `updated` · `string` · required
      When the document last changed.
      Format: `date-time`
  - `warnings` · `object[]` · required
    What the merchant should know about the order's document (a rounding cent, a free line left off, the store's default payment method); empty when there is nothing, or before the order is mapped.
    Each item: Something the merchant should know about the document made for the order; the document was still made.
    - `code` · `string` · required
      What is worth knowing about the document, as a machine code: the store's method used for an unrecognised payment method, a free line left out, a rounding difference, an invoice request not met, or a registered detail not applied.
      One of: `payment_method_default`, `free_line_omitted`, `rounding_difference`, `invoice_requested_invalid_vat`, `invoice_requested_incomplete`, `invoice_customer_is_supplier`, `invoice_request_ambiguous`, `invoice_billing_not_greek`, `invoice_name_from_person`, `invoice_field_truncated`, `invoice_registry_address_not_applied`, `invoice_request_too_late`, `delivery_address_omitted`
    - `detail` · `string` · required
      The warning in a sentence for the merchant.
    - `difference` · `integer | null` · required
      rounding\_difference only: what the customer paid minus the document's gross, in cents (hundredths of the currency), negative when the document is higher; null for every other warning.
      From -9007199254740991 to 9007199254740991
  - `refunds` · `object[]` · required
    The order's refunds sent with POST /store\_orders/{id}/refunds, oldest first, each with its credit note once one was created; empty when there are none.
    Each item: A store order's refund sent to Tallio, and the credit note it became.
    - `id` · `string` · required
      Id of the store refund (ref\_…).
      Pattern: `^ref_[0-9A-Za-z]{22}$`
    - `object` · `string` · required
      Always "store\_refund".
      Always `store_refund`
    - `merchant` · `string` · required
      Id of the merchant (mer\_…).
      Pattern: `^mer_[0-9A-Za-z]{22}$`
    - `store_order` · `string` · required
      The store order it refunds (ord\_…).
      Pattern: `^ord_[0-9A-Za-z]{22}$`
    - `external_id` · `string` · required
      The platform's id of the refund.
    - `status` · `string` · required
      pending (received, or waiting for the order's document to be issued), skipped (it maps to no credit note: see reason), sent (its credit note was created and is on its way to the provider), issued (the credit note was issued), failed (the credit note was rejected, failed or cancelled, or Tallio could not create it: see reason).
      One of: `pending`, `skipped`, `sent`, `issued`, `failed`
    - `reason` · `string | null` · required
      Why the refund is skipped or failed, as a machine code; null otherwise.
    - `detail` · `string | null` · required
      The reason in a sentence for the merchant; null when there is no reason.
    - `document` · `object | null` · required
      The credit note issued for the refund, linked to the order's document, once one was created; null before.
      - `id` · `string` · required
        Id of the document (doc\_…).
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `object` · `string` · required
        Always "document".
        Always `document`
      - `merchant` · `string` · required
        Id of the merchant (mer\_…).
        Pattern: `^mer_[0-9A-Za-z]{22}$`
      - `mode` · `string` · required
        live for a document created with a live key, test for a test key.
        One of: `live`, `test`
      - `provider` · `string` · required
        The licensed e-invoicing provider (a Greek provider, direct myDATA, a French plateforme agréée, Chorus Pro for a French public-sector buyer, or Tallio's sandbox) that issues the document.
        One of: `sandbox`, `mydata`, `wrapp`, `impact`, `epsilon`, `softone`, `prosvasis`, `superpdp`, `choruspro`, `b2brouter`, `oxygen`, `iopole`, `qonto`, `elorus`, `timologisi`
      - `regime` · `string` · required
        Tax regime the document is issued under, by country: GR (Greece, myDATA) or FR (France, e-invoicing through a plateforme agréée).
        One of: `GR`, `FR` · Default: `GR`
      - `type` · `string` · required
        Document type, by regime.
        > **Greece:** An AADE myDATA type (e.g. 1.1).
        
        > **France:** A UNTDID 1001 code (e.g. 380).
        
        One of: `380`, `381`, `384`, `386`, `1.1`, `2.1`, `5.1`, `5.2`, `11.1`, `11.2`, `11.4`, `2.2`, `2.3`
      - `number` · `string | null` · required
        The document's number.
        > **Greece:** The provider's number in its series (e.g. ΕΑΛΠ-1), null until it assigns one: a display label, not unique, so identify a document by its id.
        
        > **France:** The number you assigned (set once issued).
        
        Default: `null`
      - `status` · `string` · required
        Where the document stands: pending (Tallio accepted it; not yet issued, see stage), issued (the tax system accepted it; in Greece it has a MARK), rejected (the provider or the tax system refused it), failed (Tallio could not deliver it to the provider), cancelled (withdrawn before it was sent, or cancelled in myDATA after issue: see mydata.cancellation\_mark).
        One of: `pending`, `issued`, `rejected`, `failed`, `cancelled`
      - `stage` · `string | null` · required
        Where a pending document is (queued, submitting, awaiting\_confirmation, reconciling); null unless status is pending.
        One of: `queued`, `submitting`, `awaiting_confirmation`, `reconciling`
      - `issue_date` · `string` · required
        Issue date, YYYY-MM-DD.
        Format: `date`
      - `currency` · `string` · required
        ISO 4217 currency of the amounts.
        > **Greece:** EUR.
        
        > **France:** Any with cents.
        
        Pattern: `^[A-Z]{3}$`
      - `net` · `integer` · required
        Sum of the lines' net amounts, in minor units, at most 1000000000000000.
        From 0 to 1000000000000000
      - `vat` · `integer` · required
        Sum of the lines' VAT, each line rounded half up to the minor unit, in minor units, at most 1000000000000000.
        From 0 to 1000000000000000
      - `gross` · `integer` · required
        net + vat, in minor units, at most 1250000000000000.
        From 0 to 1250000000000000
      - `provider_reference` · `string | null` · required
        The provider's own reference for the document, once it has taken it; null before.
      - `mydata` · `object | null` · required
        myDATA's identity of the document: an object in GR, null in any other regime.
        - `mark` · `string | null` · required
          MARK (AADE registration number) once issued, as a digit string; null before. A cancelled document keeps the MARK it was issued with (null when it was withdrawn before it was sent).
          Pattern: `^[1-9]\d{0,18}$`
        - `uid` · `string | null` · required
          myDATA uid: the SHA-1 (40 upper-case hex digits) AADE derives from the document's identifiers; null until known.
          Pattern: `^[0-9A-F]{40}$`
        - `qr_url` · `string | null` · required
          URL the document's QR code points to; null until the provider returns one.
          Format: `uri`
        - `cancellation_mark` · `string | null` · required
          The MARK of the cancellation in myDATA, once an issued document is cancelled; null otherwise.
          Pattern: `^[1-9]\d{0,18}$`
      - `ctc` · `object | null` · required
        The French e-invoicing platform's identity of the document: an object in FR, null in any other regime.
        - `platform_id` · `string | null` · required
          The plateforme agréée carrying the document (sandbox in test mode); null until it has taken it.
        - `flow_id` · `string | null` · required
          The platform's id of the flow that carried the document; null until it reports one.
      - `lifecycle` · `object | null` · required
        The tax regime's status for the document once sent.
        > **Greece:** Always null.
        
        > **France:** Null until the platform reports one.
        
        Default: `null`
        - `key` · `string` · required
          Where the document is after issue, in GOBL's bill.Status keys.
          One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
        - `code` · `string` · required
          The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
          1 to 20 characters
        - `at` · `string` · required
          When the regime's platform reported this status.
          Format: `date-time`
      - `lifecycle_history` · `object[]` · required
        Every lifecycle status reported for the document, oldest first, at most the newest 30; the last is lifecycle. Empty in GR. A status after issue (a buyer's 210 Refusée, the platform's 213 Rejetée) never changes status: an issued document stays issued.
        Up to 30 items · Default: `[]`
        Each item: One lifecycle status the tax regime's platform reported for the document.
        - `key` · `string` · required
          Where the document is after issue, in GOBL's bill.Status keys.
          One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
        - `code` · `string` · required
          The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
          1 to 20 characters
        - `at` · `string` · required
          When the regime's platform reported this status.
          Format: `date-time`
        - `provider_status` · `string | null` · required
          The provider's own status the code was read from (e.g. refused, REJETEE, fr:210); null if it gave none.
          1 to 64 characters
          Pattern: `^[A-Za-z0-9_.:-]+$`
        - `reason` · `string | null` · required
          The platform's reason code for a refusal, dispute or rejection, when it reports one; null otherwise. Free-text reasons are not kept.
          1 to 64 characters
          Pattern: `^[A-Za-z0-9_.:-]+$`
      - `error` · `object | null` · required
        Why the document was rejected or failed; null otherwise.
        - `code` · `string` · required
          Stable machine-readable error code. Branch on this, never on `message`.
          One of: `validation_failed`, `unauthorized`, `not_found`, `idempotency_conflict`, `idempotency_in_progress`, `already_exists`, `invalid_grant`, `store_url_mismatch`, `invalid_state`, `already_issued`, `connection_not_disconnected`, `merchant_archived`, `cursor_not_listed`, `payload_too_large`, `unsupported_media_type`, `rate_limited`, `too_many_pending_erasures`, `forbidden`, `restricted_key`, `vendor_suspended`, `subscription_required`, `store_plan_live_only`, `store_unproven`, `not_supported`, `regime_mismatch`, `supplier_mismatch`, `connection_unavailable`, `connection_unconfirmed`, `provider_credentials_invalid`, `provider_rejected`, `balance_exceeded`, `credit_required`, `provider_unavailable`, `pdf_not_ready`, `service_unavailable`, `internal_error`
        - `message` · `string` · required
          Tallio's own explanation, safe to show to a developer; the provider's words are in provider\_message.
        - `provider_code` · `string | null` · required
          The provider's own error code, or null when the error did not come from a provider.
        - `provider_message` · `string | null` · required
          The provider's own error message, verbatim, or null when the error did not come from a provider. On a document or connection it is removed (null), like provider\_raw, once the retention window ends or by a data-subject erasure.
        - `retryable` · `boolean` · required
          True when the same request may succeed if sent again later.
        - `provider_raw` · `any`
          The provider's error response body as received, or a TruncatedProviderRaw marker when it exceeds 4096 bytes of JSON. Never holds request headers, credentials or the request payload.
      - `classification` · `object` · required
        How the document was classified for myDATA.
        - `source` · `string` · required
          default when any line took Tallio's default, else override when any line took the merchant's override, else line.
          One of: `line`, `override`, `default`
        - `warnings` · `string[]` · required
          What to check before issuing, e.g. that defaults were applied.
      - `external_reference` · `string | null` · required
        Your own reference for the document, or null.
        Default: `null`
      - `metadata` · `object` · required
        Up to 50 key-value pairs of your own (keys up to 40 characters, values up to 500). Do not put personal data in it.
        Default: `{}`
        - `{key}` · `string`
          A value, up to 500 characters.
          1 to 40 characters
      - `original_document` · `string | null` · required
        For a credit note made from a Tallio document: that document (doc\_…). Null otherwise.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `replaces` · `string | null` · required
        The rejected or failed document this one was issued to replace, or null.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `corrects` · `string | null` · required
        The issued document this one corrects, or null.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `replaced_by` · `string | null` · required
        The document created to replace this rejected or failed one, the live one if there were several; null otherwise.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `corrected_by` · `string | null` · required
        The document made to correct this one (POST /documents/{id}/correct), the latest if there were several; null otherwise.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `credit_notes` · `string[]` · required
        Credit notes made from this document, oldest first, at most 100.
        Up to 100 items · Default: `[]`
        Each item: Id of the document (doc\_…).
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `amount_credited` · `object` · required
        What credit notes made from this document take, pending ones included. Zero when there are none.
        Default: `{"net":0,"gross":0}`
        - `net` · `integer` · required
          Net amount credited, in cents.
          From 0 to 9007199254740991
        - `gross` · `integer` · required
          Gross amount credited, in cents.
          From 0 to 9007199254740991
      - `timeline` · `object[]` · required
        The document's events, oldest first, at most 100.
        Up to 100 items
        Each item: One event in a document's history. GET /events/{id} returns the full Event.
        - `id` · `string` · required
          Id of the event (evt\_…).
          Pattern: `^evt_[0-9A-Za-z]{22}$`
        - `type` · `string` · required
          What happened: document.created (Tallio accepted a document), document.issued (the tax system accepted it; in Greece it has a MARK), document.rejected (the provider or the tax system refused it), document.failed (Tallio could not deliver it), merchant.created (a merchant was created), connection.created (a merchant was connected to a provider), connection.verified (the provider accepted its credentials), connection.invalid (the provider refused them), connection.disconnected (it was disconnected), connect\_session.completed (a merchant connected through a hosted connect link), webhook\_endpoint.disabled (Tallio disabled an endpoint failing for days), document.retried (a failed document was queued to be sent again), document.credited (a credit note made from the document was issued), document.cancelled (the document was withdrawn or cancelled), document.corrected (a corrected document was made to replace it), document.replaced (a new document was created to replace a rejected or failed one), connection.deleted (a disconnected connection was deleted from the merchant's list), merchant.archived (a merchant was archived: it issues nothing new), merchant.unarchived (an archived merchant was restored), store\_order.updated (a store order's status, reason, handled mark or document changed), document.lifecycle\_updated (the French platform reported a new lifecycle status for an issued document) and connection.updated (a connection's settings changed).
          One of: `document.created`, `document.issued`, `document.rejected`, `document.failed`, `merchant.created`, `connection.created`, `connection.verified`, `connection.invalid`, `connection.disconnected`, `connect_session.completed`, `webhook_endpoint.disabled`, `document.retried`, `document.credited`, `document.cancelled`, `document.corrected`, `document.replaced`, `connection.deleted`, `merchant.archived`, `merchant.unarchived`, `store_order.updated`, `document.lifecycle_updated`, `connection.updated`
        - `created` · `string` · required
          When the event happened.
          Format: `date-time`
      - `issued_at` · `string | null` · required
        When the document was issued (the tax system accepted it); kept if it is cancelled afterwards, null for a document never issued.
        Format: `date-time`
      - `created` · `string` · required
        When Tallio accepted the document.
        Format: `date-time`
      - `updated` · `string` · required
        When the document last changed.
        Format: `date-time`
    - `warnings` · `object[]` · required
      What the merchant should know about the credit note (a rounding cent); empty when there is nothing.
      Each item: Something the merchant should know about the document made for the order; the document was still made.
      - `code` · `string` · required
        What is worth knowing about the document, as a machine code: the store's method used for an unrecognised payment method, a free line left out, a rounding difference, an invoice request not met, or a registered detail not applied.
        One of: `payment_method_default`, `free_line_omitted`, `rounding_difference`, `invoice_requested_invalid_vat`, `invoice_requested_incomplete`, `invoice_customer_is_supplier`, `invoice_request_ambiguous`, `invoice_billing_not_greek`, `invoice_name_from_person`, `invoice_field_truncated`, `invoice_registry_address_not_applied`, `invoice_request_too_late`, `delivery_address_omitted`
      - `detail` · `string` · required
        The warning in a sentence for the merchant.
      - `difference` · `integer | null` · required
        rounding\_difference only: what the customer paid minus the document's gross, in cents (hundredths of the currency), negative when the document is higher; null for every other warning.
        From -9007199254740991 to 9007199254740991
    - `handled` · `string | null` · required
      When the merchant marked the skipped or failed refund handled (POST /store\_orders/{id}/refunds/{refundId}/mark\_handled); null otherwise.
      Format: `date-time`
    - `voided_numbers` · `object[]` · required
      > **Greece:** Always empty.
      
      > **France:** The numbers Tallio numbered the refund's credit note with that no document carries, oldest first, with why; empty otherwise. Each stays a gap in its series, never reused: keep this record of why, since the series must be continuous or each gap justified (CGI ann. II art. 242 nonies A).
      
      Each item: A French number Tallio gave this record that no document carries: kept as a gap in the series.
      - `number` · `string` · required
        The French number left unused.
      - `reason` · `string` · required
        Why the number went unused: handled\_by\_hand (the merchant marked the record handled before an issued document took it: none was made, or the provider rejected the one that carried it), taken (Tallio already held that number for the merchant), not\_issued (the record closed for good, with no document, after it was numbered), replaced (the order was corrected again in place of a correction that was rejected or failed, so never issued under it).
        One of: `handled_by_hand`, `taken`, `not_issued`, `replaced`
    - `action_needed` · `boolean` · required
      Whether the refund waits for the merchant: skipped or failed, not marked handled, and not a skip that needs nothing. A refund waiting for its order's document (original\_not\_issued) is not while the order itself asks; once the order is marked handled it is, and it is credited if the order's document is made.
    - `created` · `string` · required
      When Tallio received the refund.
      Format: `date-time`
  - `handled` · `string | null` · required
    When the merchant marked the skipped or failed order handled (POST /store\_orders/{id}/mark\_handled); null otherwise, and again after a retry.
    Format: `date-time`
  - `voided_numbers` · `object[]` · required
    > **Greece:** Always empty.
    
    > **France:** The numbers Tallio numbered the order's invoice with that no document carries, oldest first, with why; empty otherwise. Each stays a gap in its series, never reused: keep this record of why, since the series must be continuous or each gap justified (CGI ann. II art. 242 nonies A).
    
    Each item: A French number Tallio gave this record that no document carries: kept as a gap in the series.
    - `number` · `string` · required
      The French number left unused.
    - `reason` · `string` · required
      Why the number went unused: handled\_by\_hand (the merchant marked the record handled before an issued document took it: none was made, or the provider rejected the one that carried it), taken (Tallio already held that number for the merchant), not\_issued (the record closed for good, with no document, after it was numbered), replaced (the order was corrected again in place of a correction that was rejected or failed, so never issued under it).
      One of: `handled_by_hand`, `taken`, `not_issued`, `replaced`
  - `action_needed` · `boolean` · required
    Whether the order itself waits for the merchant: skipped or failed, not marked handled, and not a skip that needs nothing (test\_order, no\_lines, sale\_to\_report…). GET /store\_orders?status=action\_needed lists these, and also orders with a refund that waits for the merchant (its own action\_needed).
  - `retryable` · `boolean` · required
    Whether POST /store\_orders/{id}/retry acts on it now: a skip fixed outside the order (provider\_not\_connected, order\_not\_paid, tallio\_refused, number\_taken…), a failed job, or a failed document Tallio can send again, none marked handled. A rejected document is corrected instead.
    > **France:** An invoice held as fr\_numbering\_pending (kept before Tallio numbered store invoices) is retryable even if marked handled: send it again to issue it.
    
  - `correctable` · `boolean` · required
    Whether POST /store\_orders/{id}/correct may act on it now: its document is issued, or was cancelled or credited in full, with no correction yet; or its document is a correction that was rejected or failed (correct again). Not for one partly credited.
    > **France:** Not for an invoice the buyer refused (210) or the platform rejected after issue (213).
    
  - `cancellable` · `boolean` · required
    Whether POST /store\_orders/{id}/cancel may act on it now.
    > **Greece:** Its document is issued, with no correction and no credit note.
    
    > **France:** Never; invoices are never cancelled, only corrected.
    
  - `created` · `string` · required
    When Tallio received the order; a retry of a skip moves it to the retry, since the document is dated by it. A French invoice is dated by the Paris day its number was given instead, which a retry keeps, so the series stays in date order.
    Format: `date-time`

*Example response · 200*

```json
{
  "data": {
    "id": "ord_02y9O8rh7F50tGi0QcWRrx",
    "object": "store_order",
    "merchant": "mer_02y9O8rh7F50tGi0QcWRrx",
    "mode": "live",
    "platform": "shopify",
    "external_id": "1042",
    "number": "1042",
    "status": "pending",
    "reason": null,
    "detail": null,
    "document": {
      "id": "doc_02y9O8rhJKVUXRvojdffcz",
      "object": "document",
      "merchant": "mer_02y9O8rh7F50tGi0QcWRrx",
      "mode": "test",
      "provider": "sandbox",
      "regime": "GR",
      "type": "1.1",
      "number": null,
      "status": "issued",
      "stage": null,
      "issue_date": "2026-10-10",
      "currency": "EUR",
      "net": 2500,
      "vat": 435,
      "gross": 2935,
      "provider_reference": "doc_02y9O8rhJKVUXRvojdffcz",
      "mydata": {
        "mark": "900000000000001",
        "uid": "4E1F0A6C2B9D8E7F6A5B4C3D2E1F0A9B8C7D6E5F",
        "qr_url": "https://sandbox.tallio.invalid/qr/900000000000001",
        "cancellation_mark": null
      },
      "ctc": null,
      "lifecycle": null,
      "lifecycle_history": [],
      "error": null,
      "classification": {
        "source": "default",
        "warnings": [
          "No income classification on line 2; applied the 1.1 default category1_1/E3_561_001. Set it on the line, or as a merchant override, if that is wrong."
        ]
      },
      "external_reference": "#1042",
      "metadata": {
        "order_id": "5520731963508"
      },
      "original_document": null,
      "replaces": null,
      "corrects": null,
      "replaced_by": null,
      "corrected_by": null,
      "credit_notes": [],
      "amount_credited": {
        "net": 0,
        "gross": 0
      },
      "timeline": [
        {
          "id": "evt_02y9O8rhJ2Z2v1fOH2XiSH",
          "type": "document.created",
          "created": "2026-10-11T09:30:00.000Z"
        },
        {
          "id": "evt_02y9O8s1a8ymJqpmAy0nLe",
          "type": "document.issued",
          "created": "2026-10-11T09:30:02.000Z"
        }
      ],
      "issued_at": "2026-10-11T09:30:02.000Z",
      "created": "2026-10-11T09:30:00.000Z",
      "updated": "2026-10-11T09:30:02.000Z"
    },
    "warnings": [],
    "refunds": [],
    "handled": "2026-10-11T09:30:00.000Z",
    "voided_numbers": [],
    "action_needed": false,
    "retryable": false,
    "correctable": false,
    "cancellable": false,
    "created": "2026-10-11T09:30:00.000Z"
  }
}
```

*Response body · 201*

- `data` · `object` · required
  A shop order sent to Tallio, and the document it became.
  - `id` · `string` · required
    Id of the store order (ord\_…).
    Pattern: `^ord_[0-9A-Za-z]{22}$`
  - `object` · `string` · required
    Always "store\_order".
    Always `store_order`
  - `merchant` · `string` · required
    Id of the merchant (mer\_…).
    Pattern: `^mer_[0-9A-Za-z]{22}$`
  - `mode` · `string` · required
    live for an order sent with a live key, test for a test key.
    One of: `live`, `test`
  - `platform` · `string` · required
    The platform the order comes from.
    One of: `shopify`, `woocommerce`
  - `external_id` · `string` · required
    The platform's id of the order.
    1 to 64 characters
  - `number` · `string` · required
    The order number the merchant and the buyer see.
  - `status` · `string` · required
    pending (received, not yet mapped), skipped (it maps to no document: see reason), sent (its document was created and is on its way to the provider), issued (the document was issued), failed (the document was rejected, failed or cancelled, or Tallio could not create it: see reason).
    One of: `pending`, `skipped`, `sent`, `issued`, `failed`
  - `reason` · `string | null` · required
    Why the order is skipped or failed, as a machine code; null otherwise.
  - `detail` · `string | null` · required
    The reason in a sentence for the merchant; null when there is no reason.
  - `document` · `object | null` · required
    The document issued for the order, once one was created; null before.
    - `id` · `string` · required
      Id of the document (doc\_…).
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `object` · `string` · required
      Always "document".
      Always `document`
    - `merchant` · `string` · required
      Id of the merchant (mer\_…).
      Pattern: `^mer_[0-9A-Za-z]{22}$`
    - `mode` · `string` · required
      live for a document created with a live key, test for a test key.
      One of: `live`, `test`
    - `provider` · `string` · required
      The licensed e-invoicing provider (a Greek provider, direct myDATA, a French plateforme agréée, Chorus Pro for a French public-sector buyer, or Tallio's sandbox) that issues the document.
      One of: `sandbox`, `mydata`, `wrapp`, `impact`, `epsilon`, `softone`, `prosvasis`, `superpdp`, `choruspro`, `b2brouter`, `oxygen`, `iopole`, `qonto`, `elorus`, `timologisi`
    - `regime` · `string` · required
      Tax regime the document is issued under, by country: GR (Greece, myDATA) or FR (France, e-invoicing through a plateforme agréée).
      One of: `GR`, `FR` · Default: `GR`
    - `type` · `string` · required
      Document type, by regime.
      > **Greece:** An AADE myDATA type (e.g. 1.1).
      
      > **France:** A UNTDID 1001 code (e.g. 380).
      
      One of: `380`, `381`, `384`, `386`, `1.1`, `2.1`, `5.1`, `5.2`, `11.1`, `11.2`, `11.4`, `2.2`, `2.3`
    - `number` · `string | null` · required
      The document's number.
      > **Greece:** The provider's number in its series (e.g. ΕΑΛΠ-1), null until it assigns one: a display label, not unique, so identify a document by its id.
      
      > **France:** The number you assigned (set once issued).
      
      Default: `null`
    - `status` · `string` · required
      Where the document stands: pending (Tallio accepted it; not yet issued, see stage), issued (the tax system accepted it; in Greece it has a MARK), rejected (the provider or the tax system refused it), failed (Tallio could not deliver it to the provider), cancelled (withdrawn before it was sent, or cancelled in myDATA after issue: see mydata.cancellation\_mark).
      One of: `pending`, `issued`, `rejected`, `failed`, `cancelled`
    - `stage` · `string | null` · required
      Where a pending document is (queued, submitting, awaiting\_confirmation, reconciling); null unless status is pending.
      One of: `queued`, `submitting`, `awaiting_confirmation`, `reconciling`
    - `issue_date` · `string` · required
      Issue date, YYYY-MM-DD.
      Format: `date`
    - `currency` · `string` · required
      ISO 4217 currency of the amounts.
      > **Greece:** EUR.
      
      > **France:** Any with cents.
      
      Pattern: `^[A-Z]{3}$`
    - `net` · `integer` · required
      Sum of the lines' net amounts, in minor units, at most 1000000000000000.
      From 0 to 1000000000000000
    - `vat` · `integer` · required
      Sum of the lines' VAT, each line rounded half up to the minor unit, in minor units, at most 1000000000000000.
      From 0 to 1000000000000000
    - `gross` · `integer` · required
      net + vat, in minor units, at most 1250000000000000.
      From 0 to 1250000000000000
    - `provider_reference` · `string | null` · required
      The provider's own reference for the document, once it has taken it; null before.
    - `mydata` · `object | null` · required
      myDATA's identity of the document: an object in GR, null in any other regime.
      - `mark` · `string | null` · required
        MARK (AADE registration number) once issued, as a digit string; null before. A cancelled document keeps the MARK it was issued with (null when it was withdrawn before it was sent).
        Pattern: `^[1-9]\d{0,18}$`
      - `uid` · `string | null` · required
        myDATA uid: the SHA-1 (40 upper-case hex digits) AADE derives from the document's identifiers; null until known.
        Pattern: `^[0-9A-F]{40}$`
      - `qr_url` · `string | null` · required
        URL the document's QR code points to; null until the provider returns one.
        Format: `uri`
      - `cancellation_mark` · `string | null` · required
        The MARK of the cancellation in myDATA, once an issued document is cancelled; null otherwise.
        Pattern: `^[1-9]\d{0,18}$`
    - `ctc` · `object | null` · required
      The French e-invoicing platform's identity of the document: an object in FR, null in any other regime.
      - `platform_id` · `string | null` · required
        The plateforme agréée carrying the document (sandbox in test mode); null until it has taken it.
      - `flow_id` · `string | null` · required
        The platform's id of the flow that carried the document; null until it reports one.
    - `lifecycle` · `object | null` · required
      The tax regime's status for the document once sent.
      > **Greece:** Always null.
      
      > **France:** Null until the platform reports one.
      
      Default: `null`
      - `key` · `string` · required
        Where the document is after issue, in GOBL's bill.Status keys.
        One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
      - `code` · `string` · required
        The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
        1 to 20 characters
      - `at` · `string` · required
        When the regime's platform reported this status.
        Format: `date-time`
    - `lifecycle_history` · `object[]` · required
      Every lifecycle status reported for the document, oldest first, at most the newest 30; the last is lifecycle. Empty in GR. A status after issue (a buyer's 210 Refusée, the platform's 213 Rejetée) never changes status: an issued document stays issued.
      Up to 30 items · Default: `[]`
      Each item: One lifecycle status the tax regime's platform reported for the document.
      - `key` · `string` · required
        Where the document is after issue, in GOBL's bill.Status keys.
        One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
      - `code` · `string` · required
        The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
        1 to 20 characters
      - `at` · `string` · required
        When the regime's platform reported this status.
        Format: `date-time`
      - `provider_status` · `string | null` · required
        The provider's own status the code was read from (e.g. refused, REJETEE, fr:210); null if it gave none.
        1 to 64 characters
        Pattern: `^[A-Za-z0-9_.:-]+$`
      - `reason` · `string | null` · required
        The platform's reason code for a refusal, dispute or rejection, when it reports one; null otherwise. Free-text reasons are not kept.
        1 to 64 characters
        Pattern: `^[A-Za-z0-9_.:-]+$`
    - `error` · `object | null` · required
      Why the document was rejected or failed; null otherwise.
      - `code` · `string` · required
        Stable machine-readable error code. Branch on this, never on `message`.
        One of: `validation_failed`, `unauthorized`, `not_found`, `idempotency_conflict`, `idempotency_in_progress`, `already_exists`, `invalid_grant`, `store_url_mismatch`, `invalid_state`, `already_issued`, `connection_not_disconnected`, `merchant_archived`, `cursor_not_listed`, `payload_too_large`, `unsupported_media_type`, `rate_limited`, `too_many_pending_erasures`, `forbidden`, `restricted_key`, `vendor_suspended`, `subscription_required`, `store_plan_live_only`, `store_unproven`, `not_supported`, `regime_mismatch`, `supplier_mismatch`, `connection_unavailable`, `connection_unconfirmed`, `provider_credentials_invalid`, `provider_rejected`, `balance_exceeded`, `credit_required`, `provider_unavailable`, `pdf_not_ready`, `service_unavailable`, `internal_error`
      - `message` · `string` · required
        Tallio's own explanation, safe to show to a developer; the provider's words are in provider\_message.
      - `provider_code` · `string | null` · required
        The provider's own error code, or null when the error did not come from a provider.
      - `provider_message` · `string | null` · required
        The provider's own error message, verbatim, or null when the error did not come from a provider. On a document or connection it is removed (null), like provider\_raw, once the retention window ends or by a data-subject erasure.
      - `retryable` · `boolean` · required
        True when the same request may succeed if sent again later.
      - `provider_raw` · `any`
        The provider's error response body as received, or a TruncatedProviderRaw marker when it exceeds 4096 bytes of JSON. Never holds request headers, credentials or the request payload.
    - `classification` · `object` · required
      How the document was classified for myDATA.
      - `source` · `string` · required
        default when any line took Tallio's default, else override when any line took the merchant's override, else line.
        One of: `line`, `override`, `default`
      - `warnings` · `string[]` · required
        What to check before issuing, e.g. that defaults were applied.
    - `external_reference` · `string | null` · required
      Your own reference for the document, or null.
      Default: `null`
    - `metadata` · `object` · required
      Up to 50 key-value pairs of your own (keys up to 40 characters, values up to 500). Do not put personal data in it.
      Default: `{}`
      - `{key}` · `string`
        A value, up to 500 characters.
        1 to 40 characters
    - `original_document` · `string | null` · required
      For a credit note made from a Tallio document: that document (doc\_…). Null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `replaces` · `string | null` · required
      The rejected or failed document this one was issued to replace, or null.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `corrects` · `string | null` · required
      The issued document this one corrects, or null.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `replaced_by` · `string | null` · required
      The document created to replace this rejected or failed one, the live one if there were several; null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `corrected_by` · `string | null` · required
      The document made to correct this one (POST /documents/{id}/correct), the latest if there were several; null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `credit_notes` · `string[]` · required
      Credit notes made from this document, oldest first, at most 100.
      Up to 100 items · Default: `[]`
      Each item: Id of the document (doc\_…).
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `amount_credited` · `object` · required
      What credit notes made from this document take, pending ones included. Zero when there are none.
      Default: `{"net":0,"gross":0}`
      - `net` · `integer` · required
        Net amount credited, in cents.
        From 0 to 9007199254740991
      - `gross` · `integer` · required
        Gross amount credited, in cents.
        From 0 to 9007199254740991
    - `timeline` · `object[]` · required
      The document's events, oldest first, at most 100.
      Up to 100 items
      Each item: One event in a document's history. GET /events/{id} returns the full Event.
      - `id` · `string` · required
        Id of the event (evt\_…).
        Pattern: `^evt_[0-9A-Za-z]{22}$`
      - `type` · `string` · required
        What happened: document.created (Tallio accepted a document), document.issued (the tax system accepted it; in Greece it has a MARK), document.rejected (the provider or the tax system refused it), document.failed (Tallio could not deliver it), merchant.created (a merchant was created), connection.created (a merchant was connected to a provider), connection.verified (the provider accepted its credentials), connection.invalid (the provider refused them), connection.disconnected (it was disconnected), connect\_session.completed (a merchant connected through a hosted connect link), webhook\_endpoint.disabled (Tallio disabled an endpoint failing for days), document.retried (a failed document was queued to be sent again), document.credited (a credit note made from the document was issued), document.cancelled (the document was withdrawn or cancelled), document.corrected (a corrected document was made to replace it), document.replaced (a new document was created to replace a rejected or failed one), connection.deleted (a disconnected connection was deleted from the merchant's list), merchant.archived (a merchant was archived: it issues nothing new), merchant.unarchived (an archived merchant was restored), store\_order.updated (a store order's status, reason, handled mark or document changed), document.lifecycle\_updated (the French platform reported a new lifecycle status for an issued document) and connection.updated (a connection's settings changed).
        One of: `document.created`, `document.issued`, `document.rejected`, `document.failed`, `merchant.created`, `connection.created`, `connection.verified`, `connection.invalid`, `connection.disconnected`, `connect_session.completed`, `webhook_endpoint.disabled`, `document.retried`, `document.credited`, `document.cancelled`, `document.corrected`, `document.replaced`, `connection.deleted`, `merchant.archived`, `merchant.unarchived`, `store_order.updated`, `document.lifecycle_updated`, `connection.updated`
      - `created` · `string` · required
        When the event happened.
        Format: `date-time`
    - `issued_at` · `string | null` · required
      When the document was issued (the tax system accepted it); kept if it is cancelled afterwards, null for a document never issued.
      Format: `date-time`
    - `created` · `string` · required
      When Tallio accepted the document.
      Format: `date-time`
    - `updated` · `string` · required
      When the document last changed.
      Format: `date-time`
  - `warnings` · `object[]` · required
    What the merchant should know about the order's document (a rounding cent, a free line left off, the store's default payment method); empty when there is nothing, or before the order is mapped.
    Each item: Something the merchant should know about the document made for the order; the document was still made.
    - `code` · `string` · required
      What is worth knowing about the document, as a machine code: the store's method used for an unrecognised payment method, a free line left out, a rounding difference, an invoice request not met, or a registered detail not applied.
      One of: `payment_method_default`, `free_line_omitted`, `rounding_difference`, `invoice_requested_invalid_vat`, `invoice_requested_incomplete`, `invoice_customer_is_supplier`, `invoice_request_ambiguous`, `invoice_billing_not_greek`, `invoice_name_from_person`, `invoice_field_truncated`, `invoice_registry_address_not_applied`, `invoice_request_too_late`, `delivery_address_omitted`
    - `detail` · `string` · required
      The warning in a sentence for the merchant.
    - `difference` · `integer | null` · required
      rounding\_difference only: what the customer paid minus the document's gross, in cents (hundredths of the currency), negative when the document is higher; null for every other warning.
      From -9007199254740991 to 9007199254740991
  - `refunds` · `object[]` · required
    The order's refunds sent with POST /store\_orders/{id}/refunds, oldest first, each with its credit note once one was created; empty when there are none.
    Each item: A store order's refund sent to Tallio, and the credit note it became.
    - `id` · `string` · required
      Id of the store refund (ref\_…).
      Pattern: `^ref_[0-9A-Za-z]{22}$`
    - `object` · `string` · required
      Always "store\_refund".
      Always `store_refund`
    - `merchant` · `string` · required
      Id of the merchant (mer\_…).
      Pattern: `^mer_[0-9A-Za-z]{22}$`
    - `store_order` · `string` · required
      The store order it refunds (ord\_…).
      Pattern: `^ord_[0-9A-Za-z]{22}$`
    - `external_id` · `string` · required
      The platform's id of the refund.
    - `status` · `string` · required
      pending (received, or waiting for the order's document to be issued), skipped (it maps to no credit note: see reason), sent (its credit note was created and is on its way to the provider), issued (the credit note was issued), failed (the credit note was rejected, failed or cancelled, or Tallio could not create it: see reason).
      One of: `pending`, `skipped`, `sent`, `issued`, `failed`
    - `reason` · `string | null` · required
      Why the refund is skipped or failed, as a machine code; null otherwise.
    - `detail` · `string | null` · required
      The reason in a sentence for the merchant; null when there is no reason.
    - `document` · `object | null` · required
      The credit note issued for the refund, linked to the order's document, once one was created; null before.
      - `id` · `string` · required
        Id of the document (doc\_…).
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `object` · `string` · required
        Always "document".
        Always `document`
      - `merchant` · `string` · required
        Id of the merchant (mer\_…).
        Pattern: `^mer_[0-9A-Za-z]{22}$`
      - `mode` · `string` · required
        live for a document created with a live key, test for a test key.
        One of: `live`, `test`
      - `provider` · `string` · required
        The licensed e-invoicing provider (a Greek provider, direct myDATA, a French plateforme agréée, Chorus Pro for a French public-sector buyer, or Tallio's sandbox) that issues the document.
        One of: `sandbox`, `mydata`, `wrapp`, `impact`, `epsilon`, `softone`, `prosvasis`, `superpdp`, `choruspro`, `b2brouter`, `oxygen`, `iopole`, `qonto`, `elorus`, `timologisi`
      - `regime` · `string` · required
        Tax regime the document is issued under, by country: GR (Greece, myDATA) or FR (France, e-invoicing through a plateforme agréée).
        One of: `GR`, `FR` · Default: `GR`
      - `type` · `string` · required
        Document type, by regime.
        > **Greece:** An AADE myDATA type (e.g. 1.1).
        
        > **France:** A UNTDID 1001 code (e.g. 380).
        
        One of: `380`, `381`, `384`, `386`, `1.1`, `2.1`, `5.1`, `5.2`, `11.1`, `11.2`, `11.4`, `2.2`, `2.3`
      - `number` · `string | null` · required
        The document's number.
        > **Greece:** The provider's number in its series (e.g. ΕΑΛΠ-1), null until it assigns one: a display label, not unique, so identify a document by its id.
        
        > **France:** The number you assigned (set once issued).
        
        Default: `null`
      - `status` · `string` · required
        Where the document stands: pending (Tallio accepted it; not yet issued, see stage), issued (the tax system accepted it; in Greece it has a MARK), rejected (the provider or the tax system refused it), failed (Tallio could not deliver it to the provider), cancelled (withdrawn before it was sent, or cancelled in myDATA after issue: see mydata.cancellation\_mark).
        One of: `pending`, `issued`, `rejected`, `failed`, `cancelled`
      - `stage` · `string | null` · required
        Where a pending document is (queued, submitting, awaiting\_confirmation, reconciling); null unless status is pending.
        One of: `queued`, `submitting`, `awaiting_confirmation`, `reconciling`
      - `issue_date` · `string` · required
        Issue date, YYYY-MM-DD.
        Format: `date`
      - `currency` · `string` · required
        ISO 4217 currency of the amounts.
        > **Greece:** EUR.
        
        > **France:** Any with cents.
        
        Pattern: `^[A-Z]{3}$`
      - `net` · `integer` · required
        Sum of the lines' net amounts, in minor units, at most 1000000000000000.
        From 0 to 1000000000000000
      - `vat` · `integer` · required
        Sum of the lines' VAT, each line rounded half up to the minor unit, in minor units, at most 1000000000000000.
        From 0 to 1000000000000000
      - `gross` · `integer` · required
        net + vat, in minor units, at most 1250000000000000.
        From 0 to 1250000000000000
      - `provider_reference` · `string | null` · required
        The provider's own reference for the document, once it has taken it; null before.
      - `mydata` · `object | null` · required
        myDATA's identity of the document: an object in GR, null in any other regime.
        - `mark` · `string | null` · required
          MARK (AADE registration number) once issued, as a digit string; null before. A cancelled document keeps the MARK it was issued with (null when it was withdrawn before it was sent).
          Pattern: `^[1-9]\d{0,18}$`
        - `uid` · `string | null` · required
          myDATA uid: the SHA-1 (40 upper-case hex digits) AADE derives from the document's identifiers; null until known.
          Pattern: `^[0-9A-F]{40}$`
        - `qr_url` · `string | null` · required
          URL the document's QR code points to; null until the provider returns one.
          Format: `uri`
        - `cancellation_mark` · `string | null` · required
          The MARK of the cancellation in myDATA, once an issued document is cancelled; null otherwise.
          Pattern: `^[1-9]\d{0,18}$`
      - `ctc` · `object | null` · required
        The French e-invoicing platform's identity of the document: an object in FR, null in any other regime.
        - `platform_id` · `string | null` · required
          The plateforme agréée carrying the document (sandbox in test mode); null until it has taken it.
        - `flow_id` · `string | null` · required
          The platform's id of the flow that carried the document; null until it reports one.
      - `lifecycle` · `object | null` · required
        The tax regime's status for the document once sent.
        > **Greece:** Always null.
        
        > **France:** Null until the platform reports one.
        
        Default: `null`
        - `key` · `string` · required
          Where the document is after issue, in GOBL's bill.Status keys.
          One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
        - `code` · `string` · required
          The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
          1 to 20 characters
        - `at` · `string` · required
          When the regime's platform reported this status.
          Format: `date-time`
      - `lifecycle_history` · `object[]` · required
        Every lifecycle status reported for the document, oldest first, at most the newest 30; the last is lifecycle. Empty in GR. A status after issue (a buyer's 210 Refusée, the platform's 213 Rejetée) never changes status: an issued document stays issued.
        Up to 30 items · Default: `[]`
        Each item: One lifecycle status the tax regime's platform reported for the document.
        - `key` · `string` · required
          Where the document is after issue, in GOBL's bill.Status keys.
          One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
        - `code` · `string` · required
          The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
          1 to 20 characters
        - `at` · `string` · required
          When the regime's platform reported this status.
          Format: `date-time`
        - `provider_status` · `string | null` · required
          The provider's own status the code was read from (e.g. refused, REJETEE, fr:210); null if it gave none.
          1 to 64 characters
          Pattern: `^[A-Za-z0-9_.:-]+$`
        - `reason` · `string | null` · required
          The platform's reason code for a refusal, dispute or rejection, when it reports one; null otherwise. Free-text reasons are not kept.
          1 to 64 characters
          Pattern: `^[A-Za-z0-9_.:-]+$`
      - `error` · `object | null` · required
        Why the document was rejected or failed; null otherwise.
        - `code` · `string` · required
          Stable machine-readable error code. Branch on this, never on `message`.
          One of: `validation_failed`, `unauthorized`, `not_found`, `idempotency_conflict`, `idempotency_in_progress`, `already_exists`, `invalid_grant`, `store_url_mismatch`, `invalid_state`, `already_issued`, `connection_not_disconnected`, `merchant_archived`, `cursor_not_listed`, `payload_too_large`, `unsupported_media_type`, `rate_limited`, `too_many_pending_erasures`, `forbidden`, `restricted_key`, `vendor_suspended`, `subscription_required`, `store_plan_live_only`, `store_unproven`, `not_supported`, `regime_mismatch`, `supplier_mismatch`, `connection_unavailable`, `connection_unconfirmed`, `provider_credentials_invalid`, `provider_rejected`, `balance_exceeded`, `credit_required`, `provider_unavailable`, `pdf_not_ready`, `service_unavailable`, `internal_error`
        - `message` · `string` · required
          Tallio's own explanation, safe to show to a developer; the provider's words are in provider\_message.
        - `provider_code` · `string | null` · required
          The provider's own error code, or null when the error did not come from a provider.
        - `provider_message` · `string | null` · required
          The provider's own error message, verbatim, or null when the error did not come from a provider. On a document or connection it is removed (null), like provider\_raw, once the retention window ends or by a data-subject erasure.
        - `retryable` · `boolean` · required
          True when the same request may succeed if sent again later.
        - `provider_raw` · `any`
          The provider's error response body as received, or a TruncatedProviderRaw marker when it exceeds 4096 bytes of JSON. Never holds request headers, credentials or the request payload.
      - `classification` · `object` · required
        How the document was classified for myDATA.
        - `source` · `string` · required
          default when any line took Tallio's default, else override when any line took the merchant's override, else line.
          One of: `line`, `override`, `default`
        - `warnings` · `string[]` · required
          What to check before issuing, e.g. that defaults were applied.
      - `external_reference` · `string | null` · required
        Your own reference for the document, or null.
        Default: `null`
      - `metadata` · `object` · required
        Up to 50 key-value pairs of your own (keys up to 40 characters, values up to 500). Do not put personal data in it.
        Default: `{}`
        - `{key}` · `string`
          A value, up to 500 characters.
          1 to 40 characters
      - `original_document` · `string | null` · required
        For a credit note made from a Tallio document: that document (doc\_…). Null otherwise.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `replaces` · `string | null` · required
        The rejected or failed document this one was issued to replace, or null.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `corrects` · `string | null` · required
        The issued document this one corrects, or null.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `replaced_by` · `string | null` · required
        The document created to replace this rejected or failed one, the live one if there were several; null otherwise.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `corrected_by` · `string | null` · required
        The document made to correct this one (POST /documents/{id}/correct), the latest if there were several; null otherwise.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `credit_notes` · `string[]` · required
        Credit notes made from this document, oldest first, at most 100.
        Up to 100 items · Default: `[]`
        Each item: Id of the document (doc\_…).
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `amount_credited` · `object` · required
        What credit notes made from this document take, pending ones included. Zero when there are none.
        Default: `{"net":0,"gross":0}`
        - `net` · `integer` · required
          Net amount credited, in cents.
          From 0 to 9007199254740991
        - `gross` · `integer` · required
          Gross amount credited, in cents.
          From 0 to 9007199254740991
      - `timeline` · `object[]` · required
        The document's events, oldest first, at most 100.
        Up to 100 items
        Each item: One event in a document's history. GET /events/{id} returns the full Event.
        - `id` · `string` · required
          Id of the event (evt\_…).
          Pattern: `^evt_[0-9A-Za-z]{22}$`
        - `type` · `string` · required
          What happened: document.created (Tallio accepted a document), document.issued (the tax system accepted it; in Greece it has a MARK), document.rejected (the provider or the tax system refused it), document.failed (Tallio could not deliver it), merchant.created (a merchant was created), connection.created (a merchant was connected to a provider), connection.verified (the provider accepted its credentials), connection.invalid (the provider refused them), connection.disconnected (it was disconnected), connect\_session.completed (a merchant connected through a hosted connect link), webhook\_endpoint.disabled (Tallio disabled an endpoint failing for days), document.retried (a failed document was queued to be sent again), document.credited (a credit note made from the document was issued), document.cancelled (the document was withdrawn or cancelled), document.corrected (a corrected document was made to replace it), document.replaced (a new document was created to replace a rejected or failed one), connection.deleted (a disconnected connection was deleted from the merchant's list), merchant.archived (a merchant was archived: it issues nothing new), merchant.unarchived (an archived merchant was restored), store\_order.updated (a store order's status, reason, handled mark or document changed), document.lifecycle\_updated (the French platform reported a new lifecycle status for an issued document) and connection.updated (a connection's settings changed).
          One of: `document.created`, `document.issued`, `document.rejected`, `document.failed`, `merchant.created`, `connection.created`, `connection.verified`, `connection.invalid`, `connection.disconnected`, `connect_session.completed`, `webhook_endpoint.disabled`, `document.retried`, `document.credited`, `document.cancelled`, `document.corrected`, `document.replaced`, `connection.deleted`, `merchant.archived`, `merchant.unarchived`, `store_order.updated`, `document.lifecycle_updated`, `connection.updated`
        - `created` · `string` · required
          When the event happened.
          Format: `date-time`
      - `issued_at` · `string | null` · required
        When the document was issued (the tax system accepted it); kept if it is cancelled afterwards, null for a document never issued.
        Format: `date-time`
      - `created` · `string` · required
        When Tallio accepted the document.
        Format: `date-time`
      - `updated` · `string` · required
        When the document last changed.
        Format: `date-time`
    - `warnings` · `object[]` · required
      What the merchant should know about the credit note (a rounding cent); empty when there is nothing.
      Each item: Something the merchant should know about the document made for the order; the document was still made.
      - `code` · `string` · required
        What is worth knowing about the document, as a machine code: the store's method used for an unrecognised payment method, a free line left out, a rounding difference, an invoice request not met, or a registered detail not applied.
        One of: `payment_method_default`, `free_line_omitted`, `rounding_difference`, `invoice_requested_invalid_vat`, `invoice_requested_incomplete`, `invoice_customer_is_supplier`, `invoice_request_ambiguous`, `invoice_billing_not_greek`, `invoice_name_from_person`, `invoice_field_truncated`, `invoice_registry_address_not_applied`, `invoice_request_too_late`, `delivery_address_omitted`
      - `detail` · `string` · required
        The warning in a sentence for the merchant.
      - `difference` · `integer | null` · required
        rounding\_difference only: what the customer paid minus the document's gross, in cents (hundredths of the currency), negative when the document is higher; null for every other warning.
        From -9007199254740991 to 9007199254740991
    - `handled` · `string | null` · required
      When the merchant marked the skipped or failed refund handled (POST /store\_orders/{id}/refunds/{refundId}/mark\_handled); null otherwise.
      Format: `date-time`
    - `voided_numbers` · `object[]` · required
      > **Greece:** Always empty.
      
      > **France:** The numbers Tallio numbered the refund's credit note with that no document carries, oldest first, with why; empty otherwise. Each stays a gap in its series, never reused: keep this record of why, since the series must be continuous or each gap justified (CGI ann. II art. 242 nonies A).
      
      Each item: A French number Tallio gave this record that no document carries: kept as a gap in the series.
      - `number` · `string` · required
        The French number left unused.
      - `reason` · `string` · required
        Why the number went unused: handled\_by\_hand (the merchant marked the record handled before an issued document took it: none was made, or the provider rejected the one that carried it), taken (Tallio already held that number for the merchant), not\_issued (the record closed for good, with no document, after it was numbered), replaced (the order was corrected again in place of a correction that was rejected or failed, so never issued under it).
        One of: `handled_by_hand`, `taken`, `not_issued`, `replaced`
    - `action_needed` · `boolean` · required
      Whether the refund waits for the merchant: skipped or failed, not marked handled, and not a skip that needs nothing. A refund waiting for its order's document (original\_not\_issued) is not while the order itself asks; once the order is marked handled it is, and it is credited if the order's document is made.
    - `created` · `string` · required
      When Tallio received the refund.
      Format: `date-time`
  - `handled` · `string | null` · required
    When the merchant marked the skipped or failed order handled (POST /store\_orders/{id}/mark\_handled); null otherwise, and again after a retry.
    Format: `date-time`
  - `voided_numbers` · `object[]` · required
    > **Greece:** Always empty.
    
    > **France:** The numbers Tallio numbered the order's invoice with that no document carries, oldest first, with why; empty otherwise. Each stays a gap in its series, never reused: keep this record of why, since the series must be continuous or each gap justified (CGI ann. II art. 242 nonies A).
    
    Each item: A French number Tallio gave this record that no document carries: kept as a gap in the series.
    - `number` · `string` · required
      The French number left unused.
    - `reason` · `string` · required
      Why the number went unused: handled\_by\_hand (the merchant marked the record handled before an issued document took it: none was made, or the provider rejected the one that carried it), taken (Tallio already held that number for the merchant), not\_issued (the record closed for good, with no document, after it was numbered), replaced (the order was corrected again in place of a correction that was rejected or failed, so never issued under it).
      One of: `handled_by_hand`, `taken`, `not_issued`, `replaced`
  - `action_needed` · `boolean` · required
    Whether the order itself waits for the merchant: skipped or failed, not marked handled, and not a skip that needs nothing (test\_order, no\_lines, sale\_to\_report…). GET /store\_orders?status=action\_needed lists these, and also orders with a refund that waits for the merchant (its own action\_needed).
  - `retryable` · `boolean` · required
    Whether POST /store\_orders/{id}/retry acts on it now: a skip fixed outside the order (provider\_not\_connected, order\_not\_paid, tallio\_refused, number\_taken…), a failed job, or a failed document Tallio can send again, none marked handled. A rejected document is corrected instead.
    > **France:** An invoice held as fr\_numbering\_pending (kept before Tallio numbered store invoices) is retryable even if marked handled: send it again to issue it.
    
  - `correctable` · `boolean` · required
    Whether POST /store\_orders/{id}/correct may act on it now: its document is issued, or was cancelled or credited in full, with no correction yet; or its document is a correction that was rejected or failed (correct again). Not for one partly credited.
    > **France:** Not for an invoice the buyer refused (210) or the platform rejected after issue (213).
    
  - `cancellable` · `boolean` · required
    Whether POST /store\_orders/{id}/cancel may act on it now.
    > **Greece:** Its document is issued, with no correction and no credit note.
    
    > **France:** Never; invoices are never cancelled, only corrected.
    
  - `created` · `string` · required
    When Tallio received the order; a retry of a skip moves it to the retry, since the document is dated by it. A French invoice is dated by the Paris day its number was given instead, which a retry keeps, so the series stays in date order.
    Format: `date-time`

*Example response · 201*

```json
{
  "data": {
    "id": "ord_02y9O8rh7F50tGi0QcWRrx",
    "object": "store_order",
    "merchant": "mer_02y9O8rh7F50tGi0QcWRrx",
    "mode": "live",
    "platform": "shopify",
    "external_id": "1042",
    "number": "1042",
    "status": "pending",
    "reason": null,
    "detail": null,
    "document": {
      "id": "doc_02y9O8rhJKVUXRvojdffcz",
      "object": "document",
      "merchant": "mer_02y9O8rh7F50tGi0QcWRrx",
      "mode": "test",
      "provider": "sandbox",
      "regime": "GR",
      "type": "1.1",
      "number": null,
      "status": "issued",
      "stage": null,
      "issue_date": "2026-10-10",
      "currency": "EUR",
      "net": 2500,
      "vat": 435,
      "gross": 2935,
      "provider_reference": "doc_02y9O8rhJKVUXRvojdffcz",
      "mydata": {
        "mark": "900000000000001",
        "uid": "4E1F0A6C2B9D8E7F6A5B4C3D2E1F0A9B8C7D6E5F",
        "qr_url": "https://sandbox.tallio.invalid/qr/900000000000001",
        "cancellation_mark": null
      },
      "ctc": null,
      "lifecycle": null,
      "lifecycle_history": [],
      "error": null,
      "classification": {
        "source": "default",
        "warnings": [
          "No income classification on line 2; applied the 1.1 default category1_1/E3_561_001. Set it on the line, or as a merchant override, if that is wrong."
        ]
      },
      "external_reference": "#1042",
      "metadata": {
        "order_id": "5520731963508"
      },
      "original_document": null,
      "replaces": null,
      "corrects": null,
      "replaced_by": null,
      "corrected_by": null,
      "credit_notes": [],
      "amount_credited": {
        "net": 0,
        "gross": 0
      },
      "timeline": [
        {
          "id": "evt_02y9O8rhJ2Z2v1fOH2XiSH",
          "type": "document.created",
          "created": "2026-10-11T09:30:00.000Z"
        },
        {
          "id": "evt_02y9O8s1a8ymJqpmAy0nLe",
          "type": "document.issued",
          "created": "2026-10-11T09:30:02.000Z"
        }
      ],
      "issued_at": "2026-10-11T09:30:02.000Z",
      "created": "2026-10-11T09:30:00.000Z",
      "updated": "2026-10-11T09:30:02.000Z"
    },
    "warnings": [],
    "refunds": [],
    "handled": "2026-10-11T09:30:00.000Z",
    "voided_numbers": [],
    "action_needed": false,
    "retryable": false,
    "correctable": false,
    "cancellable": false,
    "created": "2026-10-11T09:30:00.000Z"
  }
}
```

*Response headers*

- `x-request-id` · `string`
  The request's correlation id; quote it when reporting a problem. One of: req\_ plus a uuid (Tallio made it), client: plus the x-request-id you sent (8-128 of A-Z a-z 0-9 . \_ : -), or the hosting platform's id.
  With every response
  Pattern: `^(?:req_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|client:[A-Za-z0-9._:-]{8,128}|[A-Za-z0-9._-]{1,16}::[A-Za-z0-9._:-]{6,110})$`
- `ratelimit-limit` · `integer`
  Requests allowed in the current window for the bucket this request counted against.
  With 200, 201, 400, 404, 409, 413, 415, 429 · At least 1
- `ratelimit-remaining` · `integer`
  Requests left in the current window; 0 means the next one is refused until the window resets.
  With 200, 201, 400, 404, 409, 413, 415, 429 · At least 0
- `ratelimit-reset` · `integer`
  Seconds until the current window resets.
  With 200, 201, 400, 404, 409, 413, 415, 429 · At least 0
- `idempotent-replayed` · `string`
  true when this answer replays an earlier request with the same Idempotency-Key (nothing new was created); absent on the request that created it.
  With 200, 201 · Always `true`
- `www-authenticate` · `string`
  The bearer challenge: send a vendor secret key as `Authorization: Bearer <key>`.
  With 401 · Always `Bearer realm="tallio"`
- `retry-after` · `integer`
  Seconds to wait before retrying a request refused with 429 `rate_limited`.
  With 429 · At least 1

*Errors*

| Code | Status | Retryable | Meaning |
| --- | --- | --- | --- |
| `validation_failed` | 400 | No | Request validation failed. |
| `unauthorized` | 401 | No | Authentication is required. |
| `vendor_suspended` | 403 | No | This vendor's access to Tallio is suspended. Its owner can contact Tallio to restore it. |
| `store_unproven` | 403 | No | On the Free store plan, Tallio issues live documents only for a proven store. Update Tallio for WooCommerce and connect the store again so Tallio can confirm its address, or choose a paid store plan. Test mode works with any store. |
| `not_found` | 404 | No | The requested resource was not found. |
| `store_url_mismatch` | 409 | No | This store key was granted to another store URL than the one this request names (Tallio-Store-Url). Connect this store again, or confirm that the store moved. |
| `idempotency_conflict` | 409 | No | This idempotency key was already used with a different request. |
| `idempotency_in_progress` | 409 | Yes | A request with this idempotency key is still in progress; retry it after Retry-After to get its answer. |
| `merchant_archived` | 409 | No | This merchant is archived: it issues and connects nothing new. Unarchive it first (POST /merchants/{id}/unarchive). |
| `already_exists` | 409 | No | An object with this identifier already exists; look it up instead of creating it again. |
| `payload_too_large` | 413 | No | The request body is too large. |
| `unsupported_media_type` | 415 | No | The request body must be JSON (Content-Type: application/json). |
| `rate_limited` | 429 | Yes | A rate limit was reached. Retry later. |
| `internal_error` | 500 | No | An unexpected server error occurred. |

## Retrieve a store order

`GET /api/v1/store_orders/{id}`

Returns a store order with its status, the reason when it was skipped or failed, and its document once one was created (number and MARK once issued).

*Bearer API key*

*Path parameters*

- `id` · `string` · required
  The store order's id (ord\_…).

*Request*

*curl*

```bash
curl -X GET 'https://tallio.dev/api/v1/store_orders/ord_02y9O8rh7F50tGi0QcWRrx' \
  -H "Authorization: Bearer $TALLIO_API_KEY"
```

*TypeScript SDK*

```ts
import { createTallioClient, unwrap } from "@tallio-dev/sdk";

const tallio = createTallioClient({
  apiKey: process.env.TALLIO_API_KEY!,
  baseUrl: "https://tallio.dev",
});

const result = await unwrap(tallio.http.GET("/api/v1/store_orders/{id}", {
  params: {
    path: {
      id: "ord_02y9O8rh7F50tGi0QcWRrx",
    },
  },
}));
```

*Responses*

| Status | Description |
| --- | --- |
| `200` | The store order. |
| 4XX, 5XX | An error: see Errors below. |

*Response body · 200*

- `data` · `object` · required
  A shop order sent to Tallio, and the document it became.
  - `id` · `string` · required
    Id of the store order (ord\_…).
    Pattern: `^ord_[0-9A-Za-z]{22}$`
  - `object` · `string` · required
    Always "store\_order".
    Always `store_order`
  - `merchant` · `string` · required
    Id of the merchant (mer\_…).
    Pattern: `^mer_[0-9A-Za-z]{22}$`
  - `mode` · `string` · required
    live for an order sent with a live key, test for a test key.
    One of: `live`, `test`
  - `platform` · `string` · required
    The platform the order comes from.
    One of: `shopify`, `woocommerce`
  - `external_id` · `string` · required
    The platform's id of the order.
    1 to 64 characters
  - `number` · `string` · required
    The order number the merchant and the buyer see.
  - `status` · `string` · required
    pending (received, not yet mapped), skipped (it maps to no document: see reason), sent (its document was created and is on its way to the provider), issued (the document was issued), failed (the document was rejected, failed or cancelled, or Tallio could not create it: see reason).
    One of: `pending`, `skipped`, `sent`, `issued`, `failed`
  - `reason` · `string | null` · required
    Why the order is skipped or failed, as a machine code; null otherwise.
  - `detail` · `string | null` · required
    The reason in a sentence for the merchant; null when there is no reason.
  - `document` · `object | null` · required
    The document issued for the order, once one was created; null before.
    - `id` · `string` · required
      Id of the document (doc\_…).
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `object` · `string` · required
      Always "document".
      Always `document`
    - `merchant` · `string` · required
      Id of the merchant (mer\_…).
      Pattern: `^mer_[0-9A-Za-z]{22}$`
    - `mode` · `string` · required
      live for a document created with a live key, test for a test key.
      One of: `live`, `test`
    - `provider` · `string` · required
      The licensed e-invoicing provider (a Greek provider, direct myDATA, a French plateforme agréée, Chorus Pro for a French public-sector buyer, or Tallio's sandbox) that issues the document.
      One of: `sandbox`, `mydata`, `wrapp`, `impact`, `epsilon`, `softone`, `prosvasis`, `superpdp`, `choruspro`, `b2brouter`, `oxygen`, `iopole`, `qonto`, `elorus`, `timologisi`
    - `regime` · `string` · required
      Tax regime the document is issued under, by country: GR (Greece, myDATA) or FR (France, e-invoicing through a plateforme agréée).
      One of: `GR`, `FR` · Default: `GR`
    - `type` · `string` · required
      Document type, by regime.
      > **Greece:** An AADE myDATA type (e.g. 1.1).
      
      > **France:** A UNTDID 1001 code (e.g. 380).
      
      One of: `380`, `381`, `384`, `386`, `1.1`, `2.1`, `5.1`, `5.2`, `11.1`, `11.2`, `11.4`, `2.2`, `2.3`
    - `number` · `string | null` · required
      The document's number.
      > **Greece:** The provider's number in its series (e.g. ΕΑΛΠ-1), null until it assigns one: a display label, not unique, so identify a document by its id.
      
      > **France:** The number you assigned (set once issued).
      
      Default: `null`
    - `status` · `string` · required
      Where the document stands: pending (Tallio accepted it; not yet issued, see stage), issued (the tax system accepted it; in Greece it has a MARK), rejected (the provider or the tax system refused it), failed (Tallio could not deliver it to the provider), cancelled (withdrawn before it was sent, or cancelled in myDATA after issue: see mydata.cancellation\_mark).
      One of: `pending`, `issued`, `rejected`, `failed`, `cancelled`
    - `stage` · `string | null` · required
      Where a pending document is (queued, submitting, awaiting\_confirmation, reconciling); null unless status is pending.
      One of: `queued`, `submitting`, `awaiting_confirmation`, `reconciling`
    - `issue_date` · `string` · required
      Issue date, YYYY-MM-DD.
      Format: `date`
    - `currency` · `string` · required
      ISO 4217 currency of the amounts.
      > **Greece:** EUR.
      
      > **France:** Any with cents.
      
      Pattern: `^[A-Z]{3}$`
    - `net` · `integer` · required
      Sum of the lines' net amounts, in minor units, at most 1000000000000000.
      From 0 to 1000000000000000
    - `vat` · `integer` · required
      Sum of the lines' VAT, each line rounded half up to the minor unit, in minor units, at most 1000000000000000.
      From 0 to 1000000000000000
    - `gross` · `integer` · required
      net + vat, in minor units, at most 1250000000000000.
      From 0 to 1250000000000000
    - `provider_reference` · `string | null` · required
      The provider's own reference for the document, once it has taken it; null before.
    - `mydata` · `object | null` · required
      myDATA's identity of the document: an object in GR, null in any other regime.
      - `mark` · `string | null` · required
        MARK (AADE registration number) once issued, as a digit string; null before. A cancelled document keeps the MARK it was issued with (null when it was withdrawn before it was sent).
        Pattern: `^[1-9]\d{0,18}$`
      - `uid` · `string | null` · required
        myDATA uid: the SHA-1 (40 upper-case hex digits) AADE derives from the document's identifiers; null until known.
        Pattern: `^[0-9A-F]{40}$`
      - `qr_url` · `string | null` · required
        URL the document's QR code points to; null until the provider returns one.
        Format: `uri`
      - `cancellation_mark` · `string | null` · required
        The MARK of the cancellation in myDATA, once an issued document is cancelled; null otherwise.
        Pattern: `^[1-9]\d{0,18}$`
    - `ctc` · `object | null` · required
      The French e-invoicing platform's identity of the document: an object in FR, null in any other regime.
      - `platform_id` · `string | null` · required
        The plateforme agréée carrying the document (sandbox in test mode); null until it has taken it.
      - `flow_id` · `string | null` · required
        The platform's id of the flow that carried the document; null until it reports one.
    - `lifecycle` · `object | null` · required
      The tax regime's status for the document once sent.
      > **Greece:** Always null.
      
      > **France:** Null until the platform reports one.
      
      Default: `null`
      - `key` · `string` · required
        Where the document is after issue, in GOBL's bill.Status keys.
        One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
      - `code` · `string` · required
        The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
        1 to 20 characters
      - `at` · `string` · required
        When the regime's platform reported this status.
        Format: `date-time`
    - `lifecycle_history` · `object[]` · required
      Every lifecycle status reported for the document, oldest first, at most the newest 30; the last is lifecycle. Empty in GR. A status after issue (a buyer's 210 Refusée, the platform's 213 Rejetée) never changes status: an issued document stays issued.
      Up to 30 items · Default: `[]`
      Each item: One lifecycle status the tax regime's platform reported for the document.
      - `key` · `string` · required
        Where the document is after issue, in GOBL's bill.Status keys.
        One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
      - `code` · `string` · required
        The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
        1 to 20 characters
      - `at` · `string` · required
        When the regime's platform reported this status.
        Format: `date-time`
      - `provider_status` · `string | null` · required
        The provider's own status the code was read from (e.g. refused, REJETEE, fr:210); null if it gave none.
        1 to 64 characters
        Pattern: `^[A-Za-z0-9_.:-]+$`
      - `reason` · `string | null` · required
        The platform's reason code for a refusal, dispute or rejection, when it reports one; null otherwise. Free-text reasons are not kept.
        1 to 64 characters
        Pattern: `^[A-Za-z0-9_.:-]+$`
    - `error` · `object | null` · required
      Why the document was rejected or failed; null otherwise.
      - `code` · `string` · required
        Stable machine-readable error code. Branch on this, never on `message`.
        One of: `validation_failed`, `unauthorized`, `not_found`, `idempotency_conflict`, `idempotency_in_progress`, `already_exists`, `invalid_grant`, `store_url_mismatch`, `invalid_state`, `already_issued`, `connection_not_disconnected`, `merchant_archived`, `cursor_not_listed`, `payload_too_large`, `unsupported_media_type`, `rate_limited`, `too_many_pending_erasures`, `forbidden`, `restricted_key`, `vendor_suspended`, `subscription_required`, `store_plan_live_only`, `store_unproven`, `not_supported`, `regime_mismatch`, `supplier_mismatch`, `connection_unavailable`, `connection_unconfirmed`, `provider_credentials_invalid`, `provider_rejected`, `balance_exceeded`, `credit_required`, `provider_unavailable`, `pdf_not_ready`, `service_unavailable`, `internal_error`
      - `message` · `string` · required
        Tallio's own explanation, safe to show to a developer; the provider's words are in provider\_message.
      - `provider_code` · `string | null` · required
        The provider's own error code, or null when the error did not come from a provider.
      - `provider_message` · `string | null` · required
        The provider's own error message, verbatim, or null when the error did not come from a provider. On a document or connection it is removed (null), like provider\_raw, once the retention window ends or by a data-subject erasure.
      - `retryable` · `boolean` · required
        True when the same request may succeed if sent again later.
      - `provider_raw` · `any`
        The provider's error response body as received, or a TruncatedProviderRaw marker when it exceeds 4096 bytes of JSON. Never holds request headers, credentials or the request payload.
    - `classification` · `object` · required
      How the document was classified for myDATA.
      - `source` · `string` · required
        default when any line took Tallio's default, else override when any line took the merchant's override, else line.
        One of: `line`, `override`, `default`
      - `warnings` · `string[]` · required
        What to check before issuing, e.g. that defaults were applied.
    - `external_reference` · `string | null` · required
      Your own reference for the document, or null.
      Default: `null`
    - `metadata` · `object` · required
      Up to 50 key-value pairs of your own (keys up to 40 characters, values up to 500). Do not put personal data in it.
      Default: `{}`
      - `{key}` · `string`
        A value, up to 500 characters.
        1 to 40 characters
    - `original_document` · `string | null` · required
      For a credit note made from a Tallio document: that document (doc\_…). Null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `replaces` · `string | null` · required
      The rejected or failed document this one was issued to replace, or null.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `corrects` · `string | null` · required
      The issued document this one corrects, or null.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `replaced_by` · `string | null` · required
      The document created to replace this rejected or failed one, the live one if there were several; null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `corrected_by` · `string | null` · required
      The document made to correct this one (POST /documents/{id}/correct), the latest if there were several; null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `credit_notes` · `string[]` · required
      Credit notes made from this document, oldest first, at most 100.
      Up to 100 items · Default: `[]`
      Each item: Id of the document (doc\_…).
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `amount_credited` · `object` · required
      What credit notes made from this document take, pending ones included. Zero when there are none.
      Default: `{"net":0,"gross":0}`
      - `net` · `integer` · required
        Net amount credited, in cents.
        From 0 to 9007199254740991
      - `gross` · `integer` · required
        Gross amount credited, in cents.
        From 0 to 9007199254740991
    - `timeline` · `object[]` · required
      The document's events, oldest first, at most 100.
      Up to 100 items
      Each item: One event in a document's history. GET /events/{id} returns the full Event.
      - `id` · `string` · required
        Id of the event (evt\_…).
        Pattern: `^evt_[0-9A-Za-z]{22}$`
      - `type` · `string` · required
        What happened: document.created (Tallio accepted a document), document.issued (the tax system accepted it; in Greece it has a MARK), document.rejected (the provider or the tax system refused it), document.failed (Tallio could not deliver it), merchant.created (a merchant was created), connection.created (a merchant was connected to a provider), connection.verified (the provider accepted its credentials), connection.invalid (the provider refused them), connection.disconnected (it was disconnected), connect\_session.completed (a merchant connected through a hosted connect link), webhook\_endpoint.disabled (Tallio disabled an endpoint failing for days), document.retried (a failed document was queued to be sent again), document.credited (a credit note made from the document was issued), document.cancelled (the document was withdrawn or cancelled), document.corrected (a corrected document was made to replace it), document.replaced (a new document was created to replace a rejected or failed one), connection.deleted (a disconnected connection was deleted from the merchant's list), merchant.archived (a merchant was archived: it issues nothing new), merchant.unarchived (an archived merchant was restored), store\_order.updated (a store order's status, reason, handled mark or document changed), document.lifecycle\_updated (the French platform reported a new lifecycle status for an issued document) and connection.updated (a connection's settings changed).
        One of: `document.created`, `document.issued`, `document.rejected`, `document.failed`, `merchant.created`, `connection.created`, `connection.verified`, `connection.invalid`, `connection.disconnected`, `connect_session.completed`, `webhook_endpoint.disabled`, `document.retried`, `document.credited`, `document.cancelled`, `document.corrected`, `document.replaced`, `connection.deleted`, `merchant.archived`, `merchant.unarchived`, `store_order.updated`, `document.lifecycle_updated`, `connection.updated`
      - `created` · `string` · required
        When the event happened.
        Format: `date-time`
    - `issued_at` · `string | null` · required
      When the document was issued (the tax system accepted it); kept if it is cancelled afterwards, null for a document never issued.
      Format: `date-time`
    - `created` · `string` · required
      When Tallio accepted the document.
      Format: `date-time`
    - `updated` · `string` · required
      When the document last changed.
      Format: `date-time`
  - `warnings` · `object[]` · required
    What the merchant should know about the order's document (a rounding cent, a free line left off, the store's default payment method); empty when there is nothing, or before the order is mapped.
    Each item: Something the merchant should know about the document made for the order; the document was still made.
    - `code` · `string` · required
      What is worth knowing about the document, as a machine code: the store's method used for an unrecognised payment method, a free line left out, a rounding difference, an invoice request not met, or a registered detail not applied.
      One of: `payment_method_default`, `free_line_omitted`, `rounding_difference`, `invoice_requested_invalid_vat`, `invoice_requested_incomplete`, `invoice_customer_is_supplier`, `invoice_request_ambiguous`, `invoice_billing_not_greek`, `invoice_name_from_person`, `invoice_field_truncated`, `invoice_registry_address_not_applied`, `invoice_request_too_late`, `delivery_address_omitted`
    - `detail` · `string` · required
      The warning in a sentence for the merchant.
    - `difference` · `integer | null` · required
      rounding\_difference only: what the customer paid minus the document's gross, in cents (hundredths of the currency), negative when the document is higher; null for every other warning.
      From -9007199254740991 to 9007199254740991
  - `refunds` · `object[]` · required
    The order's refunds sent with POST /store\_orders/{id}/refunds, oldest first, each with its credit note once one was created; empty when there are none.
    Each item: A store order's refund sent to Tallio, and the credit note it became.
    - `id` · `string` · required
      Id of the store refund (ref\_…).
      Pattern: `^ref_[0-9A-Za-z]{22}$`
    - `object` · `string` · required
      Always "store\_refund".
      Always `store_refund`
    - `merchant` · `string` · required
      Id of the merchant (mer\_…).
      Pattern: `^mer_[0-9A-Za-z]{22}$`
    - `store_order` · `string` · required
      The store order it refunds (ord\_…).
      Pattern: `^ord_[0-9A-Za-z]{22}$`
    - `external_id` · `string` · required
      The platform's id of the refund.
    - `status` · `string` · required
      pending (received, or waiting for the order's document to be issued), skipped (it maps to no credit note: see reason), sent (its credit note was created and is on its way to the provider), issued (the credit note was issued), failed (the credit note was rejected, failed or cancelled, or Tallio could not create it: see reason).
      One of: `pending`, `skipped`, `sent`, `issued`, `failed`
    - `reason` · `string | null` · required
      Why the refund is skipped or failed, as a machine code; null otherwise.
    - `detail` · `string | null` · required
      The reason in a sentence for the merchant; null when there is no reason.
    - `document` · `object | null` · required
      The credit note issued for the refund, linked to the order's document, once one was created; null before.
      - `id` · `string` · required
        Id of the document (doc\_…).
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `object` · `string` · required
        Always "document".
        Always `document`
      - `merchant` · `string` · required
        Id of the merchant (mer\_…).
        Pattern: `^mer_[0-9A-Za-z]{22}$`
      - `mode` · `string` · required
        live for a document created with a live key, test for a test key.
        One of: `live`, `test`
      - `provider` · `string` · required
        The licensed e-invoicing provider (a Greek provider, direct myDATA, a French plateforme agréée, Chorus Pro for a French public-sector buyer, or Tallio's sandbox) that issues the document.
        One of: `sandbox`, `mydata`, `wrapp`, `impact`, `epsilon`, `softone`, `prosvasis`, `superpdp`, `choruspro`, `b2brouter`, `oxygen`, `iopole`, `qonto`, `elorus`, `timologisi`
      - `regime` · `string` · required
        Tax regime the document is issued under, by country: GR (Greece, myDATA) or FR (France, e-invoicing through a plateforme agréée).
        One of: `GR`, `FR` · Default: `GR`
      - `type` · `string` · required
        Document type, by regime.
        > **Greece:** An AADE myDATA type (e.g. 1.1).
        
        > **France:** A UNTDID 1001 code (e.g. 380).
        
        One of: `380`, `381`, `384`, `386`, `1.1`, `2.1`, `5.1`, `5.2`, `11.1`, `11.2`, `11.4`, `2.2`, `2.3`
      - `number` · `string | null` · required
        The document's number.
        > **Greece:** The provider's number in its series (e.g. ΕΑΛΠ-1), null until it assigns one: a display label, not unique, so identify a document by its id.
        
        > **France:** The number you assigned (set once issued).
        
        Default: `null`
      - `status` · `string` · required
        Where the document stands: pending (Tallio accepted it; not yet issued, see stage), issued (the tax system accepted it; in Greece it has a MARK), rejected (the provider or the tax system refused it), failed (Tallio could not deliver it to the provider), cancelled (withdrawn before it was sent, or cancelled in myDATA after issue: see mydata.cancellation\_mark).
        One of: `pending`, `issued`, `rejected`, `failed`, `cancelled`
      - `stage` · `string | null` · required
        Where a pending document is (queued, submitting, awaiting\_confirmation, reconciling); null unless status is pending.
        One of: `queued`, `submitting`, `awaiting_confirmation`, `reconciling`
      - `issue_date` · `string` · required
        Issue date, YYYY-MM-DD.
        Format: `date`
      - `currency` · `string` · required
        ISO 4217 currency of the amounts.
        > **Greece:** EUR.
        
        > **France:** Any with cents.
        
        Pattern: `^[A-Z]{3}$`
      - `net` · `integer` · required
        Sum of the lines' net amounts, in minor units, at most 1000000000000000.
        From 0 to 1000000000000000
      - `vat` · `integer` · required
        Sum of the lines' VAT, each line rounded half up to the minor unit, in minor units, at most 1000000000000000.
        From 0 to 1000000000000000
      - `gross` · `integer` · required
        net + vat, in minor units, at most 1250000000000000.
        From 0 to 1250000000000000
      - `provider_reference` · `string | null` · required
        The provider's own reference for the document, once it has taken it; null before.
      - `mydata` · `object | null` · required
        myDATA's identity of the document: an object in GR, null in any other regime.
        - `mark` · `string | null` · required
          MARK (AADE registration number) once issued, as a digit string; null before. A cancelled document keeps the MARK it was issued with (null when it was withdrawn before it was sent).
          Pattern: `^[1-9]\d{0,18}$`
        - `uid` · `string | null` · required
          myDATA uid: the SHA-1 (40 upper-case hex digits) AADE derives from the document's identifiers; null until known.
          Pattern: `^[0-9A-F]{40}$`
        - `qr_url` · `string | null` · required
          URL the document's QR code points to; null until the provider returns one.
          Format: `uri`
        - `cancellation_mark` · `string | null` · required
          The MARK of the cancellation in myDATA, once an issued document is cancelled; null otherwise.
          Pattern: `^[1-9]\d{0,18}$`
      - `ctc` · `object | null` · required
        The French e-invoicing platform's identity of the document: an object in FR, null in any other regime.
        - `platform_id` · `string | null` · required
          The plateforme agréée carrying the document (sandbox in test mode); null until it has taken it.
        - `flow_id` · `string | null` · required
          The platform's id of the flow that carried the document; null until it reports one.
      - `lifecycle` · `object | null` · required
        The tax regime's status for the document once sent.
        > **Greece:** Always null.
        
        > **France:** Null until the platform reports one.
        
        Default: `null`
        - `key` · `string` · required
          Where the document is after issue, in GOBL's bill.Status keys.
          One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
        - `code` · `string` · required
          The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
          1 to 20 characters
        - `at` · `string` · required
          When the regime's platform reported this status.
          Format: `date-time`
      - `lifecycle_history` · `object[]` · required
        Every lifecycle status reported for the document, oldest first, at most the newest 30; the last is lifecycle. Empty in GR. A status after issue (a buyer's 210 Refusée, the platform's 213 Rejetée) never changes status: an issued document stays issued.
        Up to 30 items · Default: `[]`
        Each item: One lifecycle status the tax regime's platform reported for the document.
        - `key` · `string` · required
          Where the document is after issue, in GOBL's bill.Status keys.
          One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
        - `code` · `string` · required
          The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
          1 to 20 characters
        - `at` · `string` · required
          When the regime's platform reported this status.
          Format: `date-time`
        - `provider_status` · `string | null` · required
          The provider's own status the code was read from (e.g. refused, REJETEE, fr:210); null if it gave none.
          1 to 64 characters
          Pattern: `^[A-Za-z0-9_.:-]+$`
        - `reason` · `string | null` · required
          The platform's reason code for a refusal, dispute or rejection, when it reports one; null otherwise. Free-text reasons are not kept.
          1 to 64 characters
          Pattern: `^[A-Za-z0-9_.:-]+$`
      - `error` · `object | null` · required
        Why the document was rejected or failed; null otherwise.
        - `code` · `string` · required
          Stable machine-readable error code. Branch on this, never on `message`.
          One of: `validation_failed`, `unauthorized`, `not_found`, `idempotency_conflict`, `idempotency_in_progress`, `already_exists`, `invalid_grant`, `store_url_mismatch`, `invalid_state`, `already_issued`, `connection_not_disconnected`, `merchant_archived`, `cursor_not_listed`, `payload_too_large`, `unsupported_media_type`, `rate_limited`, `too_many_pending_erasures`, `forbidden`, `restricted_key`, `vendor_suspended`, `subscription_required`, `store_plan_live_only`, `store_unproven`, `not_supported`, `regime_mismatch`, `supplier_mismatch`, `connection_unavailable`, `connection_unconfirmed`, `provider_credentials_invalid`, `provider_rejected`, `balance_exceeded`, `credit_required`, `provider_unavailable`, `pdf_not_ready`, `service_unavailable`, `internal_error`
        - `message` · `string` · required
          Tallio's own explanation, safe to show to a developer; the provider's words are in provider\_message.
        - `provider_code` · `string | null` · required
          The provider's own error code, or null when the error did not come from a provider.
        - `provider_message` · `string | null` · required
          The provider's own error message, verbatim, or null when the error did not come from a provider. On a document or connection it is removed (null), like provider\_raw, once the retention window ends or by a data-subject erasure.
        - `retryable` · `boolean` · required
          True when the same request may succeed if sent again later.
        - `provider_raw` · `any`
          The provider's error response body as received, or a TruncatedProviderRaw marker when it exceeds 4096 bytes of JSON. Never holds request headers, credentials or the request payload.
      - `classification` · `object` · required
        How the document was classified for myDATA.
        - `source` · `string` · required
          default when any line took Tallio's default, else override when any line took the merchant's override, else line.
          One of: `line`, `override`, `default`
        - `warnings` · `string[]` · required
          What to check before issuing, e.g. that defaults were applied.
      - `external_reference` · `string | null` · required
        Your own reference for the document, or null.
        Default: `null`
      - `metadata` · `object` · required
        Up to 50 key-value pairs of your own (keys up to 40 characters, values up to 500). Do not put personal data in it.
        Default: `{}`
        - `{key}` · `string`
          A value, up to 500 characters.
          1 to 40 characters
      - `original_document` · `string | null` · required
        For a credit note made from a Tallio document: that document (doc\_…). Null otherwise.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `replaces` · `string | null` · required
        The rejected or failed document this one was issued to replace, or null.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `corrects` · `string | null` · required
        The issued document this one corrects, or null.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `replaced_by` · `string | null` · required
        The document created to replace this rejected or failed one, the live one if there were several; null otherwise.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `corrected_by` · `string | null` · required
        The document made to correct this one (POST /documents/{id}/correct), the latest if there were several; null otherwise.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `credit_notes` · `string[]` · required
        Credit notes made from this document, oldest first, at most 100.
        Up to 100 items · Default: `[]`
        Each item: Id of the document (doc\_…).
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `amount_credited` · `object` · required
        What credit notes made from this document take, pending ones included. Zero when there are none.
        Default: `{"net":0,"gross":0}`
        - `net` · `integer` · required
          Net amount credited, in cents.
          From 0 to 9007199254740991
        - `gross` · `integer` · required
          Gross amount credited, in cents.
          From 0 to 9007199254740991
      - `timeline` · `object[]` · required
        The document's events, oldest first, at most 100.
        Up to 100 items
        Each item: One event in a document's history. GET /events/{id} returns the full Event.
        - `id` · `string` · required
          Id of the event (evt\_…).
          Pattern: `^evt_[0-9A-Za-z]{22}$`
        - `type` · `string` · required
          What happened: document.created (Tallio accepted a document), document.issued (the tax system accepted it; in Greece it has a MARK), document.rejected (the provider or the tax system refused it), document.failed (Tallio could not deliver it), merchant.created (a merchant was created), connection.created (a merchant was connected to a provider), connection.verified (the provider accepted its credentials), connection.invalid (the provider refused them), connection.disconnected (it was disconnected), connect\_session.completed (a merchant connected through a hosted connect link), webhook\_endpoint.disabled (Tallio disabled an endpoint failing for days), document.retried (a failed document was queued to be sent again), document.credited (a credit note made from the document was issued), document.cancelled (the document was withdrawn or cancelled), document.corrected (a corrected document was made to replace it), document.replaced (a new document was created to replace a rejected or failed one), connection.deleted (a disconnected connection was deleted from the merchant's list), merchant.archived (a merchant was archived: it issues nothing new), merchant.unarchived (an archived merchant was restored), store\_order.updated (a store order's status, reason, handled mark or document changed), document.lifecycle\_updated (the French platform reported a new lifecycle status for an issued document) and connection.updated (a connection's settings changed).
          One of: `document.created`, `document.issued`, `document.rejected`, `document.failed`, `merchant.created`, `connection.created`, `connection.verified`, `connection.invalid`, `connection.disconnected`, `connect_session.completed`, `webhook_endpoint.disabled`, `document.retried`, `document.credited`, `document.cancelled`, `document.corrected`, `document.replaced`, `connection.deleted`, `merchant.archived`, `merchant.unarchived`, `store_order.updated`, `document.lifecycle_updated`, `connection.updated`
        - `created` · `string` · required
          When the event happened.
          Format: `date-time`
      - `issued_at` · `string | null` · required
        When the document was issued (the tax system accepted it); kept if it is cancelled afterwards, null for a document never issued.
        Format: `date-time`
      - `created` · `string` · required
        When Tallio accepted the document.
        Format: `date-time`
      - `updated` · `string` · required
        When the document last changed.
        Format: `date-time`
    - `warnings` · `object[]` · required
      What the merchant should know about the credit note (a rounding cent); empty when there is nothing.
      Each item: Something the merchant should know about the document made for the order; the document was still made.
      - `code` · `string` · required
        What is worth knowing about the document, as a machine code: the store's method used for an unrecognised payment method, a free line left out, a rounding difference, an invoice request not met, or a registered detail not applied.
        One of: `payment_method_default`, `free_line_omitted`, `rounding_difference`, `invoice_requested_invalid_vat`, `invoice_requested_incomplete`, `invoice_customer_is_supplier`, `invoice_request_ambiguous`, `invoice_billing_not_greek`, `invoice_name_from_person`, `invoice_field_truncated`, `invoice_registry_address_not_applied`, `invoice_request_too_late`, `delivery_address_omitted`
      - `detail` · `string` · required
        The warning in a sentence for the merchant.
      - `difference` · `integer | null` · required
        rounding\_difference only: what the customer paid minus the document's gross, in cents (hundredths of the currency), negative when the document is higher; null for every other warning.
        From -9007199254740991 to 9007199254740991
    - `handled` · `string | null` · required
      When the merchant marked the skipped or failed refund handled (POST /store\_orders/{id}/refunds/{refundId}/mark\_handled); null otherwise.
      Format: `date-time`
    - `voided_numbers` · `object[]` · required
      > **Greece:** Always empty.
      
      > **France:** The numbers Tallio numbered the refund's credit note with that no document carries, oldest first, with why; empty otherwise. Each stays a gap in its series, never reused: keep this record of why, since the series must be continuous or each gap justified (CGI ann. II art. 242 nonies A).
      
      Each item: A French number Tallio gave this record that no document carries: kept as a gap in the series.
      - `number` · `string` · required
        The French number left unused.
      - `reason` · `string` · required
        Why the number went unused: handled\_by\_hand (the merchant marked the record handled before an issued document took it: none was made, or the provider rejected the one that carried it), taken (Tallio already held that number for the merchant), not\_issued (the record closed for good, with no document, after it was numbered), replaced (the order was corrected again in place of a correction that was rejected or failed, so never issued under it).
        One of: `handled_by_hand`, `taken`, `not_issued`, `replaced`
    - `action_needed` · `boolean` · required
      Whether the refund waits for the merchant: skipped or failed, not marked handled, and not a skip that needs nothing. A refund waiting for its order's document (original\_not\_issued) is not while the order itself asks; once the order is marked handled it is, and it is credited if the order's document is made.
    - `created` · `string` · required
      When Tallio received the refund.
      Format: `date-time`
  - `handled` · `string | null` · required
    When the merchant marked the skipped or failed order handled (POST /store\_orders/{id}/mark\_handled); null otherwise, and again after a retry.
    Format: `date-time`
  - `voided_numbers` · `object[]` · required
    > **Greece:** Always empty.
    
    > **France:** The numbers Tallio numbered the order's invoice with that no document carries, oldest first, with why; empty otherwise. Each stays a gap in its series, never reused: keep this record of why, since the series must be continuous or each gap justified (CGI ann. II art. 242 nonies A).
    
    Each item: A French number Tallio gave this record that no document carries: kept as a gap in the series.
    - `number` · `string` · required
      The French number left unused.
    - `reason` · `string` · required
      Why the number went unused: handled\_by\_hand (the merchant marked the record handled before an issued document took it: none was made, or the provider rejected the one that carried it), taken (Tallio already held that number for the merchant), not\_issued (the record closed for good, with no document, after it was numbered), replaced (the order was corrected again in place of a correction that was rejected or failed, so never issued under it).
      One of: `handled_by_hand`, `taken`, `not_issued`, `replaced`
  - `action_needed` · `boolean` · required
    Whether the order itself waits for the merchant: skipped or failed, not marked handled, and not a skip that needs nothing (test\_order, no\_lines, sale\_to\_report…). GET /store\_orders?status=action\_needed lists these, and also orders with a refund that waits for the merchant (its own action\_needed).
  - `retryable` · `boolean` · required
    Whether POST /store\_orders/{id}/retry acts on it now: a skip fixed outside the order (provider\_not\_connected, order\_not\_paid, tallio\_refused, number\_taken…), a failed job, or a failed document Tallio can send again, none marked handled. A rejected document is corrected instead.
    > **France:** An invoice held as fr\_numbering\_pending (kept before Tallio numbered store invoices) is retryable even if marked handled: send it again to issue it.
    
  - `correctable` · `boolean` · required
    Whether POST /store\_orders/{id}/correct may act on it now: its document is issued, or was cancelled or credited in full, with no correction yet; or its document is a correction that was rejected or failed (correct again). Not for one partly credited.
    > **France:** Not for an invoice the buyer refused (210) or the platform rejected after issue (213).
    
  - `cancellable` · `boolean` · required
    Whether POST /store\_orders/{id}/cancel may act on it now.
    > **Greece:** Its document is issued, with no correction and no credit note.
    
    > **France:** Never; invoices are never cancelled, only corrected.
    
  - `created` · `string` · required
    When Tallio received the order; a retry of a skip moves it to the retry, since the document is dated by it. A French invoice is dated by the Paris day its number was given instead, which a retry keeps, so the series stays in date order.
    Format: `date-time`

*Example response · 200*

```json
{
  "data": {
    "id": "ord_02y9O8rh7F50tGi0QcWRrx",
    "object": "store_order",
    "merchant": "mer_02y9O8rh7F50tGi0QcWRrx",
    "mode": "live",
    "platform": "shopify",
    "external_id": "1042",
    "number": "1042",
    "status": "pending",
    "reason": null,
    "detail": null,
    "document": {
      "id": "doc_02y9O8rhJKVUXRvojdffcz",
      "object": "document",
      "merchant": "mer_02y9O8rh7F50tGi0QcWRrx",
      "mode": "test",
      "provider": "sandbox",
      "regime": "GR",
      "type": "1.1",
      "number": null,
      "status": "issued",
      "stage": null,
      "issue_date": "2026-10-10",
      "currency": "EUR",
      "net": 2500,
      "vat": 435,
      "gross": 2935,
      "provider_reference": "doc_02y9O8rhJKVUXRvojdffcz",
      "mydata": {
        "mark": "900000000000001",
        "uid": "4E1F0A6C2B9D8E7F6A5B4C3D2E1F0A9B8C7D6E5F",
        "qr_url": "https://sandbox.tallio.invalid/qr/900000000000001",
        "cancellation_mark": null
      },
      "ctc": null,
      "lifecycle": null,
      "lifecycle_history": [],
      "error": null,
      "classification": {
        "source": "default",
        "warnings": [
          "No income classification on line 2; applied the 1.1 default category1_1/E3_561_001. Set it on the line, or as a merchant override, if that is wrong."
        ]
      },
      "external_reference": "#1042",
      "metadata": {
        "order_id": "5520731963508"
      },
      "original_document": null,
      "replaces": null,
      "corrects": null,
      "replaced_by": null,
      "corrected_by": null,
      "credit_notes": [],
      "amount_credited": {
        "net": 0,
        "gross": 0
      },
      "timeline": [
        {
          "id": "evt_02y9O8rhJ2Z2v1fOH2XiSH",
          "type": "document.created",
          "created": "2026-10-11T09:30:00.000Z"
        },
        {
          "id": "evt_02y9O8s1a8ymJqpmAy0nLe",
          "type": "document.issued",
          "created": "2026-10-11T09:30:02.000Z"
        }
      ],
      "issued_at": "2026-10-11T09:30:02.000Z",
      "created": "2026-10-11T09:30:00.000Z",
      "updated": "2026-10-11T09:30:02.000Z"
    },
    "warnings": [],
    "refunds": [],
    "handled": "2026-10-11T09:30:00.000Z",
    "voided_numbers": [],
    "action_needed": false,
    "retryable": false,
    "correctable": false,
    "cancellable": false,
    "created": "2026-10-11T09:30:00.000Z"
  }
}
```

*Response headers*

- `x-request-id` · `string`
  The request's correlation id; quote it when reporting a problem. One of: req\_ plus a uuid (Tallio made it), client: plus the x-request-id you sent (8-128 of A-Z a-z 0-9 . \_ : -), or the hosting platform's id.
  With every response
  Pattern: `^(?:req_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|client:[A-Za-z0-9._:-]{8,128}|[A-Za-z0-9._-]{1,16}::[A-Za-z0-9._:-]{6,110})$`
- `ratelimit-limit` · `integer`
  Requests allowed in the current window for the bucket this request counted against.
  With 200, 404, 409, 429 · At least 1
- `ratelimit-remaining` · `integer`
  Requests left in the current window; 0 means the next one is refused until the window resets.
  With 200, 404, 409, 429 · At least 0
- `ratelimit-reset` · `integer`
  Seconds until the current window resets.
  With 200, 404, 409, 429 · At least 0
- `www-authenticate` · `string`
  The bearer challenge: send a vendor secret key as `Authorization: Bearer <key>`.
  With 401 · Always `Bearer realm="tallio"`
- `retry-after` · `integer`
  Seconds to wait before retrying a request refused with 429 `rate_limited`.
  With 429 · At least 1

*Errors*

| Code | Status | Retryable | Meaning |
| --- | --- | --- | --- |
| `unauthorized` | 401 | No | Authentication is required. |
| `vendor_suspended` | 403 | No | This vendor's access to Tallio is suspended. Its owner can contact Tallio to restore it. |
| `not_found` | 404 | No | The requested resource was not found. |
| `store_url_mismatch` | 409 | No | This store key was granted to another store URL than the one this request names (Tallio-Store-Url). Connect this store again, or confirm that the store moved. |
| `rate_limited` | 429 | Yes | A rate limit was reached. Retry later. |
| `internal_error` | 500 | No | An unexpected server error occurred. |

## Cancel a store order's document

`POST /api/v1/store_orders/{id}/cancel`

Cancels a store order's issued document (POST /documents/{id}/cancel), for a sale that did not happen; the store order then reads failed with reason document\_cancelled, marked handled, since the merchant did it. A document with a credit note, a correction, or a provider that cannot cancel its type is 409 invalid\_state, as is a store order whose cancellable is false. Cancelling the cancelled document again answers the store order as it is. Recorded in the team's audit log. One correct or cancel runs on an order at a time: another meanwhile is 409 invalid\_state.

> **Greece:** The document is cancelled in myDATA.

> **France:** A document is never cancelled: 422 credit\_required (correct it instead).

*Bearer API key*

*Path parameters*

- `id` · `string` · required
  The store order's id (ord\_…).

*Request body*

- `document` · `string` · required
  The document the merchant saw on the order (doc\_…), the order's document now. When the order has moved on to another document since (a correction made meanwhile), 409 invalid\_state, so a stale page never acts on a newer document.
  Pattern: `^doc_[0-9A-Za-z]{22}$`

*Request*

*JSON*

```json
{
  "document": "doc_02y9O8rh7F50tGi0QcWRrx"
}
```

*curl*

```bash
curl -X POST 'https://tallio.dev/api/v1/store_orders/ord_02y9O8rh7F50tGi0QcWRrx/cancel' \
  -H "Authorization: Bearer $TALLIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "document": "doc_02y9O8rh7F50tGi0QcWRrx"
}'
```

*TypeScript SDK*

```ts
import { createTallioClient, unwrap } from "@tallio-dev/sdk";

const tallio = createTallioClient({
  apiKey: process.env.TALLIO_API_KEY!,
  baseUrl: "https://tallio.dev",
});

const result = await unwrap(tallio.http.POST("/api/v1/store_orders/{id}/cancel", {
  params: {
    path: {
      id: "ord_02y9O8rh7F50tGi0QcWRrx",
    },
  },
  body: {
    document: "doc_02y9O8rh7F50tGi0QcWRrx",
  },
}));
```

*Responses*

| Status | Description |
| --- | --- |
| `200` | The store order, its document cancelled. |
| 4XX, 5XX | An error: see Errors below. |

*Response body · 200*

- `data` · `object` · required
  A shop order sent to Tallio, and the document it became.
  - `id` · `string` · required
    Id of the store order (ord\_…).
    Pattern: `^ord_[0-9A-Za-z]{22}$`
  - `object` · `string` · required
    Always "store\_order".
    Always `store_order`
  - `merchant` · `string` · required
    Id of the merchant (mer\_…).
    Pattern: `^mer_[0-9A-Za-z]{22}$`
  - `mode` · `string` · required
    live for an order sent with a live key, test for a test key.
    One of: `live`, `test`
  - `platform` · `string` · required
    The platform the order comes from.
    One of: `shopify`, `woocommerce`
  - `external_id` · `string` · required
    The platform's id of the order.
    1 to 64 characters
  - `number` · `string` · required
    The order number the merchant and the buyer see.
  - `status` · `string` · required
    pending (received, not yet mapped), skipped (it maps to no document: see reason), sent (its document was created and is on its way to the provider), issued (the document was issued), failed (the document was rejected, failed or cancelled, or Tallio could not create it: see reason).
    One of: `pending`, `skipped`, `sent`, `issued`, `failed`
  - `reason` · `string | null` · required
    Why the order is skipped or failed, as a machine code; null otherwise.
  - `detail` · `string | null` · required
    The reason in a sentence for the merchant; null when there is no reason.
  - `document` · `object | null` · required
    The document issued for the order, once one was created; null before.
    - `id` · `string` · required
      Id of the document (doc\_…).
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `object` · `string` · required
      Always "document".
      Always `document`
    - `merchant` · `string` · required
      Id of the merchant (mer\_…).
      Pattern: `^mer_[0-9A-Za-z]{22}$`
    - `mode` · `string` · required
      live for a document created with a live key, test for a test key.
      One of: `live`, `test`
    - `provider` · `string` · required
      The licensed e-invoicing provider (a Greek provider, direct myDATA, a French plateforme agréée, Chorus Pro for a French public-sector buyer, or Tallio's sandbox) that issues the document.
      One of: `sandbox`, `mydata`, `wrapp`, `impact`, `epsilon`, `softone`, `prosvasis`, `superpdp`, `choruspro`, `b2brouter`, `oxygen`, `iopole`, `qonto`, `elorus`, `timologisi`
    - `regime` · `string` · required
      Tax regime the document is issued under, by country: GR (Greece, myDATA) or FR (France, e-invoicing through a plateforme agréée).
      One of: `GR`, `FR` · Default: `GR`
    - `type` · `string` · required
      Document type, by regime.
      > **Greece:** An AADE myDATA type (e.g. 1.1).
      
      > **France:** A UNTDID 1001 code (e.g. 380).
      
      One of: `380`, `381`, `384`, `386`, `1.1`, `2.1`, `5.1`, `5.2`, `11.1`, `11.2`, `11.4`, `2.2`, `2.3`
    - `number` · `string | null` · required
      The document's number.
      > **Greece:** The provider's number in its series (e.g. ΕΑΛΠ-1), null until it assigns one: a display label, not unique, so identify a document by its id.
      
      > **France:** The number you assigned (set once issued).
      
      Default: `null`
    - `status` · `string` · required
      Where the document stands: pending (Tallio accepted it; not yet issued, see stage), issued (the tax system accepted it; in Greece it has a MARK), rejected (the provider or the tax system refused it), failed (Tallio could not deliver it to the provider), cancelled (withdrawn before it was sent, or cancelled in myDATA after issue: see mydata.cancellation\_mark).
      One of: `pending`, `issued`, `rejected`, `failed`, `cancelled`
    - `stage` · `string | null` · required
      Where a pending document is (queued, submitting, awaiting\_confirmation, reconciling); null unless status is pending.
      One of: `queued`, `submitting`, `awaiting_confirmation`, `reconciling`
    - `issue_date` · `string` · required
      Issue date, YYYY-MM-DD.
      Format: `date`
    - `currency` · `string` · required
      ISO 4217 currency of the amounts.
      > **Greece:** EUR.
      
      > **France:** Any with cents.
      
      Pattern: `^[A-Z]{3}$`
    - `net` · `integer` · required
      Sum of the lines' net amounts, in minor units, at most 1000000000000000.
      From 0 to 1000000000000000
    - `vat` · `integer` · required
      Sum of the lines' VAT, each line rounded half up to the minor unit, in minor units, at most 1000000000000000.
      From 0 to 1000000000000000
    - `gross` · `integer` · required
      net + vat, in minor units, at most 1250000000000000.
      From 0 to 1250000000000000
    - `provider_reference` · `string | null` · required
      The provider's own reference for the document, once it has taken it; null before.
    - `mydata` · `object | null` · required
      myDATA's identity of the document: an object in GR, null in any other regime.
      - `mark` · `string | null` · required
        MARK (AADE registration number) once issued, as a digit string; null before. A cancelled document keeps the MARK it was issued with (null when it was withdrawn before it was sent).
        Pattern: `^[1-9]\d{0,18}$`
      - `uid` · `string | null` · required
        myDATA uid: the SHA-1 (40 upper-case hex digits) AADE derives from the document's identifiers; null until known.
        Pattern: `^[0-9A-F]{40}$`
      - `qr_url` · `string | null` · required
        URL the document's QR code points to; null until the provider returns one.
        Format: `uri`
      - `cancellation_mark` · `string | null` · required
        The MARK of the cancellation in myDATA, once an issued document is cancelled; null otherwise.
        Pattern: `^[1-9]\d{0,18}$`
    - `ctc` · `object | null` · required
      The French e-invoicing platform's identity of the document: an object in FR, null in any other regime.
      - `platform_id` · `string | null` · required
        The plateforme agréée carrying the document (sandbox in test mode); null until it has taken it.
      - `flow_id` · `string | null` · required
        The platform's id of the flow that carried the document; null until it reports one.
    - `lifecycle` · `object | null` · required
      The tax regime's status for the document once sent.
      > **Greece:** Always null.
      
      > **France:** Null until the platform reports one.
      
      Default: `null`
      - `key` · `string` · required
        Where the document is after issue, in GOBL's bill.Status keys.
        One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
      - `code` · `string` · required
        The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
        1 to 20 characters
      - `at` · `string` · required
        When the regime's platform reported this status.
        Format: `date-time`
    - `lifecycle_history` · `object[]` · required
      Every lifecycle status reported for the document, oldest first, at most the newest 30; the last is lifecycle. Empty in GR. A status after issue (a buyer's 210 Refusée, the platform's 213 Rejetée) never changes status: an issued document stays issued.
      Up to 30 items · Default: `[]`
      Each item: One lifecycle status the tax regime's platform reported for the document.
      - `key` · `string` · required
        Where the document is after issue, in GOBL's bill.Status keys.
        One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
      - `code` · `string` · required
        The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
        1 to 20 characters
      - `at` · `string` · required
        When the regime's platform reported this status.
        Format: `date-time`
      - `provider_status` · `string | null` · required
        The provider's own status the code was read from (e.g. refused, REJETEE, fr:210); null if it gave none.
        1 to 64 characters
        Pattern: `^[A-Za-z0-9_.:-]+$`
      - `reason` · `string | null` · required
        The platform's reason code for a refusal, dispute or rejection, when it reports one; null otherwise. Free-text reasons are not kept.
        1 to 64 characters
        Pattern: `^[A-Za-z0-9_.:-]+$`
    - `error` · `object | null` · required
      Why the document was rejected or failed; null otherwise.
      - `code` · `string` · required
        Stable machine-readable error code. Branch on this, never on `message`.
        One of: `validation_failed`, `unauthorized`, `not_found`, `idempotency_conflict`, `idempotency_in_progress`, `already_exists`, `invalid_grant`, `store_url_mismatch`, `invalid_state`, `already_issued`, `connection_not_disconnected`, `merchant_archived`, `cursor_not_listed`, `payload_too_large`, `unsupported_media_type`, `rate_limited`, `too_many_pending_erasures`, `forbidden`, `restricted_key`, `vendor_suspended`, `subscription_required`, `store_plan_live_only`, `store_unproven`, `not_supported`, `regime_mismatch`, `supplier_mismatch`, `connection_unavailable`, `connection_unconfirmed`, `provider_credentials_invalid`, `provider_rejected`, `balance_exceeded`, `credit_required`, `provider_unavailable`, `pdf_not_ready`, `service_unavailable`, `internal_error`
      - `message` · `string` · required
        Tallio's own explanation, safe to show to a developer; the provider's words are in provider\_message.
      - `provider_code` · `string | null` · required
        The provider's own error code, or null when the error did not come from a provider.
      - `provider_message` · `string | null` · required
        The provider's own error message, verbatim, or null when the error did not come from a provider. On a document or connection it is removed (null), like provider\_raw, once the retention window ends or by a data-subject erasure.
      - `retryable` · `boolean` · required
        True when the same request may succeed if sent again later.
      - `provider_raw` · `any`
        The provider's error response body as received, or a TruncatedProviderRaw marker when it exceeds 4096 bytes of JSON. Never holds request headers, credentials or the request payload.
    - `classification` · `object` · required
      How the document was classified for myDATA.
      - `source` · `string` · required
        default when any line took Tallio's default, else override when any line took the merchant's override, else line.
        One of: `line`, `override`, `default`
      - `warnings` · `string[]` · required
        What to check before issuing, e.g. that defaults were applied.
    - `external_reference` · `string | null` · required
      Your own reference for the document, or null.
      Default: `null`
    - `metadata` · `object` · required
      Up to 50 key-value pairs of your own (keys up to 40 characters, values up to 500). Do not put personal data in it.
      Default: `{}`
      - `{key}` · `string`
        A value, up to 500 characters.
        1 to 40 characters
    - `original_document` · `string | null` · required
      For a credit note made from a Tallio document: that document (doc\_…). Null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `replaces` · `string | null` · required
      The rejected or failed document this one was issued to replace, or null.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `corrects` · `string | null` · required
      The issued document this one corrects, or null.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `replaced_by` · `string | null` · required
      The document created to replace this rejected or failed one, the live one if there were several; null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `corrected_by` · `string | null` · required
      The document made to correct this one (POST /documents/{id}/correct), the latest if there were several; null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `credit_notes` · `string[]` · required
      Credit notes made from this document, oldest first, at most 100.
      Up to 100 items · Default: `[]`
      Each item: Id of the document (doc\_…).
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `amount_credited` · `object` · required
      What credit notes made from this document take, pending ones included. Zero when there are none.
      Default: `{"net":0,"gross":0}`
      - `net` · `integer` · required
        Net amount credited, in cents.
        From 0 to 9007199254740991
      - `gross` · `integer` · required
        Gross amount credited, in cents.
        From 0 to 9007199254740991
    - `timeline` · `object[]` · required
      The document's events, oldest first, at most 100.
      Up to 100 items
      Each item: One event in a document's history. GET /events/{id} returns the full Event.
      - `id` · `string` · required
        Id of the event (evt\_…).
        Pattern: `^evt_[0-9A-Za-z]{22}$`
      - `type` · `string` · required
        What happened: document.created (Tallio accepted a document), document.issued (the tax system accepted it; in Greece it has a MARK), document.rejected (the provider or the tax system refused it), document.failed (Tallio could not deliver it), merchant.created (a merchant was created), connection.created (a merchant was connected to a provider), connection.verified (the provider accepted its credentials), connection.invalid (the provider refused them), connection.disconnected (it was disconnected), connect\_session.completed (a merchant connected through a hosted connect link), webhook\_endpoint.disabled (Tallio disabled an endpoint failing for days), document.retried (a failed document was queued to be sent again), document.credited (a credit note made from the document was issued), document.cancelled (the document was withdrawn or cancelled), document.corrected (a corrected document was made to replace it), document.replaced (a new document was created to replace a rejected or failed one), connection.deleted (a disconnected connection was deleted from the merchant's list), merchant.archived (a merchant was archived: it issues nothing new), merchant.unarchived (an archived merchant was restored), store\_order.updated (a store order's status, reason, handled mark or document changed), document.lifecycle\_updated (the French platform reported a new lifecycle status for an issued document) and connection.updated (a connection's settings changed).
        One of: `document.created`, `document.issued`, `document.rejected`, `document.failed`, `merchant.created`, `connection.created`, `connection.verified`, `connection.invalid`, `connection.disconnected`, `connect_session.completed`, `webhook_endpoint.disabled`, `document.retried`, `document.credited`, `document.cancelled`, `document.corrected`, `document.replaced`, `connection.deleted`, `merchant.archived`, `merchant.unarchived`, `store_order.updated`, `document.lifecycle_updated`, `connection.updated`
      - `created` · `string` · required
        When the event happened.
        Format: `date-time`
    - `issued_at` · `string | null` · required
      When the document was issued (the tax system accepted it); kept if it is cancelled afterwards, null for a document never issued.
      Format: `date-time`
    - `created` · `string` · required
      When Tallio accepted the document.
      Format: `date-time`
    - `updated` · `string` · required
      When the document last changed.
      Format: `date-time`
  - `warnings` · `object[]` · required
    What the merchant should know about the order's document (a rounding cent, a free line left off, the store's default payment method); empty when there is nothing, or before the order is mapped.
    Each item: Something the merchant should know about the document made for the order; the document was still made.
    - `code` · `string` · required
      What is worth knowing about the document, as a machine code: the store's method used for an unrecognised payment method, a free line left out, a rounding difference, an invoice request not met, or a registered detail not applied.
      One of: `payment_method_default`, `free_line_omitted`, `rounding_difference`, `invoice_requested_invalid_vat`, `invoice_requested_incomplete`, `invoice_customer_is_supplier`, `invoice_request_ambiguous`, `invoice_billing_not_greek`, `invoice_name_from_person`, `invoice_field_truncated`, `invoice_registry_address_not_applied`, `invoice_request_too_late`, `delivery_address_omitted`
    - `detail` · `string` · required
      The warning in a sentence for the merchant.
    - `difference` · `integer | null` · required
      rounding\_difference only: what the customer paid minus the document's gross, in cents (hundredths of the currency), negative when the document is higher; null for every other warning.
      From -9007199254740991 to 9007199254740991
  - `refunds` · `object[]` · required
    The order's refunds sent with POST /store\_orders/{id}/refunds, oldest first, each with its credit note once one was created; empty when there are none.
    Each item: A store order's refund sent to Tallio, and the credit note it became.
    - `id` · `string` · required
      Id of the store refund (ref\_…).
      Pattern: `^ref_[0-9A-Za-z]{22}$`
    - `object` · `string` · required
      Always "store\_refund".
      Always `store_refund`
    - `merchant` · `string` · required
      Id of the merchant (mer\_…).
      Pattern: `^mer_[0-9A-Za-z]{22}$`
    - `store_order` · `string` · required
      The store order it refunds (ord\_…).
      Pattern: `^ord_[0-9A-Za-z]{22}$`
    - `external_id` · `string` · required
      The platform's id of the refund.
    - `status` · `string` · required
      pending (received, or waiting for the order's document to be issued), skipped (it maps to no credit note: see reason), sent (its credit note was created and is on its way to the provider), issued (the credit note was issued), failed (the credit note was rejected, failed or cancelled, or Tallio could not create it: see reason).
      One of: `pending`, `skipped`, `sent`, `issued`, `failed`
    - `reason` · `string | null` · required
      Why the refund is skipped or failed, as a machine code; null otherwise.
    - `detail` · `string | null` · required
      The reason in a sentence for the merchant; null when there is no reason.
    - `document` · `object | null` · required
      The credit note issued for the refund, linked to the order's document, once one was created; null before.
      - `id` · `string` · required
        Id of the document (doc\_…).
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `object` · `string` · required
        Always "document".
        Always `document`
      - `merchant` · `string` · required
        Id of the merchant (mer\_…).
        Pattern: `^mer_[0-9A-Za-z]{22}$`
      - `mode` · `string` · required
        live for a document created with a live key, test for a test key.
        One of: `live`, `test`
      - `provider` · `string` · required
        The licensed e-invoicing provider (a Greek provider, direct myDATA, a French plateforme agréée, Chorus Pro for a French public-sector buyer, or Tallio's sandbox) that issues the document.
        One of: `sandbox`, `mydata`, `wrapp`, `impact`, `epsilon`, `softone`, `prosvasis`, `superpdp`, `choruspro`, `b2brouter`, `oxygen`, `iopole`, `qonto`, `elorus`, `timologisi`
      - `regime` · `string` · required
        Tax regime the document is issued under, by country: GR (Greece, myDATA) or FR (France, e-invoicing through a plateforme agréée).
        One of: `GR`, `FR` · Default: `GR`
      - `type` · `string` · required
        Document type, by regime.
        > **Greece:** An AADE myDATA type (e.g. 1.1).
        
        > **France:** A UNTDID 1001 code (e.g. 380).
        
        One of: `380`, `381`, `384`, `386`, `1.1`, `2.1`, `5.1`, `5.2`, `11.1`, `11.2`, `11.4`, `2.2`, `2.3`
      - `number` · `string | null` · required
        The document's number.
        > **Greece:** The provider's number in its series (e.g. ΕΑΛΠ-1), null until it assigns one: a display label, not unique, so identify a document by its id.
        
        > **France:** The number you assigned (set once issued).
        
        Default: `null`
      - `status` · `string` · required
        Where the document stands: pending (Tallio accepted it; not yet issued, see stage), issued (the tax system accepted it; in Greece it has a MARK), rejected (the provider or the tax system refused it), failed (Tallio could not deliver it to the provider), cancelled (withdrawn before it was sent, or cancelled in myDATA after issue: see mydata.cancellation\_mark).
        One of: `pending`, `issued`, `rejected`, `failed`, `cancelled`
      - `stage` · `string | null` · required
        Where a pending document is (queued, submitting, awaiting\_confirmation, reconciling); null unless status is pending.
        One of: `queued`, `submitting`, `awaiting_confirmation`, `reconciling`
      - `issue_date` · `string` · required
        Issue date, YYYY-MM-DD.
        Format: `date`
      - `currency` · `string` · required
        ISO 4217 currency of the amounts.
        > **Greece:** EUR.
        
        > **France:** Any with cents.
        
        Pattern: `^[A-Z]{3}$`
      - `net` · `integer` · required
        Sum of the lines' net amounts, in minor units, at most 1000000000000000.
        From 0 to 1000000000000000
      - `vat` · `integer` · required
        Sum of the lines' VAT, each line rounded half up to the minor unit, in minor units, at most 1000000000000000.
        From 0 to 1000000000000000
      - `gross` · `integer` · required
        net + vat, in minor units, at most 1250000000000000.
        From 0 to 1250000000000000
      - `provider_reference` · `string | null` · required
        The provider's own reference for the document, once it has taken it; null before.
      - `mydata` · `object | null` · required
        myDATA's identity of the document: an object in GR, null in any other regime.
        - `mark` · `string | null` · required
          MARK (AADE registration number) once issued, as a digit string; null before. A cancelled document keeps the MARK it was issued with (null when it was withdrawn before it was sent).
          Pattern: `^[1-9]\d{0,18}$`
        - `uid` · `string | null` · required
          myDATA uid: the SHA-1 (40 upper-case hex digits) AADE derives from the document's identifiers; null until known.
          Pattern: `^[0-9A-F]{40}$`
        - `qr_url` · `string | null` · required
          URL the document's QR code points to; null until the provider returns one.
          Format: `uri`
        - `cancellation_mark` · `string | null` · required
          The MARK of the cancellation in myDATA, once an issued document is cancelled; null otherwise.
          Pattern: `^[1-9]\d{0,18}$`
      - `ctc` · `object | null` · required
        The French e-invoicing platform's identity of the document: an object in FR, null in any other regime.
        - `platform_id` · `string | null` · required
          The plateforme agréée carrying the document (sandbox in test mode); null until it has taken it.
        - `flow_id` · `string | null` · required
          The platform's id of the flow that carried the document; null until it reports one.
      - `lifecycle` · `object | null` · required
        The tax regime's status for the document once sent.
        > **Greece:** Always null.
        
        > **France:** Null until the platform reports one.
        
        Default: `null`
        - `key` · `string` · required
          Where the document is after issue, in GOBL's bill.Status keys.
          One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
        - `code` · `string` · required
          The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
          1 to 20 characters
        - `at` · `string` · required
          When the regime's platform reported this status.
          Format: `date-time`
      - `lifecycle_history` · `object[]` · required
        Every lifecycle status reported for the document, oldest first, at most the newest 30; the last is lifecycle. Empty in GR. A status after issue (a buyer's 210 Refusée, the platform's 213 Rejetée) never changes status: an issued document stays issued.
        Up to 30 items · Default: `[]`
        Each item: One lifecycle status the tax regime's platform reported for the document.
        - `key` · `string` · required
          Where the document is after issue, in GOBL's bill.Status keys.
          One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
        - `code` · `string` · required
          The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
          1 to 20 characters
        - `at` · `string` · required
          When the regime's platform reported this status.
          Format: `date-time`
        - `provider_status` · `string | null` · required
          The provider's own status the code was read from (e.g. refused, REJETEE, fr:210); null if it gave none.
          1 to 64 characters
          Pattern: `^[A-Za-z0-9_.:-]+$`
        - `reason` · `string | null` · required
          The platform's reason code for a refusal, dispute or rejection, when it reports one; null otherwise. Free-text reasons are not kept.
          1 to 64 characters
          Pattern: `^[A-Za-z0-9_.:-]+$`
      - `error` · `object | null` · required
        Why the document was rejected or failed; null otherwise.
        - `code` · `string` · required
          Stable machine-readable error code. Branch on this, never on `message`.
          One of: `validation_failed`, `unauthorized`, `not_found`, `idempotency_conflict`, `idempotency_in_progress`, `already_exists`, `invalid_grant`, `store_url_mismatch`, `invalid_state`, `already_issued`, `connection_not_disconnected`, `merchant_archived`, `cursor_not_listed`, `payload_too_large`, `unsupported_media_type`, `rate_limited`, `too_many_pending_erasures`, `forbidden`, `restricted_key`, `vendor_suspended`, `subscription_required`, `store_plan_live_only`, `store_unproven`, `not_supported`, `regime_mismatch`, `supplier_mismatch`, `connection_unavailable`, `connection_unconfirmed`, `provider_credentials_invalid`, `provider_rejected`, `balance_exceeded`, `credit_required`, `provider_unavailable`, `pdf_not_ready`, `service_unavailable`, `internal_error`
        - `message` · `string` · required
          Tallio's own explanation, safe to show to a developer; the provider's words are in provider\_message.
        - `provider_code` · `string | null` · required
          The provider's own error code, or null when the error did not come from a provider.
        - `provider_message` · `string | null` · required
          The provider's own error message, verbatim, or null when the error did not come from a provider. On a document or connection it is removed (null), like provider\_raw, once the retention window ends or by a data-subject erasure.
        - `retryable` · `boolean` · required
          True when the same request may succeed if sent again later.
        - `provider_raw` · `any`
          The provider's error response body as received, or a TruncatedProviderRaw marker when it exceeds 4096 bytes of JSON. Never holds request headers, credentials or the request payload.
      - `classification` · `object` · required
        How the document was classified for myDATA.
        - `source` · `string` · required
          default when any line took Tallio's default, else override when any line took the merchant's override, else line.
          One of: `line`, `override`, `default`
        - `warnings` · `string[]` · required
          What to check before issuing, e.g. that defaults were applied.
      - `external_reference` · `string | null` · required
        Your own reference for the document, or null.
        Default: `null`
      - `metadata` · `object` · required
        Up to 50 key-value pairs of your own (keys up to 40 characters, values up to 500). Do not put personal data in it.
        Default: `{}`
        - `{key}` · `string`
          A value, up to 500 characters.
          1 to 40 characters
      - `original_document` · `string | null` · required
        For a credit note made from a Tallio document: that document (doc\_…). Null otherwise.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `replaces` · `string | null` · required
        The rejected or failed document this one was issued to replace, or null.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `corrects` · `string | null` · required
        The issued document this one corrects, or null.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `replaced_by` · `string | null` · required
        The document created to replace this rejected or failed one, the live one if there were several; null otherwise.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `corrected_by` · `string | null` · required
        The document made to correct this one (POST /documents/{id}/correct), the latest if there were several; null otherwise.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `credit_notes` · `string[]` · required
        Credit notes made from this document, oldest first, at most 100.
        Up to 100 items · Default: `[]`
        Each item: Id of the document (doc\_…).
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `amount_credited` · `object` · required
        What credit notes made from this document take, pending ones included. Zero when there are none.
        Default: `{"net":0,"gross":0}`
        - `net` · `integer` · required
          Net amount credited, in cents.
          From 0 to 9007199254740991
        - `gross` · `integer` · required
          Gross amount credited, in cents.
          From 0 to 9007199254740991
      - `timeline` · `object[]` · required
        The document's events, oldest first, at most 100.
        Up to 100 items
        Each item: One event in a document's history. GET /events/{id} returns the full Event.
        - `id` · `string` · required
          Id of the event (evt\_…).
          Pattern: `^evt_[0-9A-Za-z]{22}$`
        - `type` · `string` · required
          What happened: document.created (Tallio accepted a document), document.issued (the tax system accepted it; in Greece it has a MARK), document.rejected (the provider or the tax system refused it), document.failed (Tallio could not deliver it), merchant.created (a merchant was created), connection.created (a merchant was connected to a provider), connection.verified (the provider accepted its credentials), connection.invalid (the provider refused them), connection.disconnected (it was disconnected), connect\_session.completed (a merchant connected through a hosted connect link), webhook\_endpoint.disabled (Tallio disabled an endpoint failing for days), document.retried (a failed document was queued to be sent again), document.credited (a credit note made from the document was issued), document.cancelled (the document was withdrawn or cancelled), document.corrected (a corrected document was made to replace it), document.replaced (a new document was created to replace a rejected or failed one), connection.deleted (a disconnected connection was deleted from the merchant's list), merchant.archived (a merchant was archived: it issues nothing new), merchant.unarchived (an archived merchant was restored), store\_order.updated (a store order's status, reason, handled mark or document changed), document.lifecycle\_updated (the French platform reported a new lifecycle status for an issued document) and connection.updated (a connection's settings changed).
          One of: `document.created`, `document.issued`, `document.rejected`, `document.failed`, `merchant.created`, `connection.created`, `connection.verified`, `connection.invalid`, `connection.disconnected`, `connect_session.completed`, `webhook_endpoint.disabled`, `document.retried`, `document.credited`, `document.cancelled`, `document.corrected`, `document.replaced`, `connection.deleted`, `merchant.archived`, `merchant.unarchived`, `store_order.updated`, `document.lifecycle_updated`, `connection.updated`
        - `created` · `string` · required
          When the event happened.
          Format: `date-time`
      - `issued_at` · `string | null` · required
        When the document was issued (the tax system accepted it); kept if it is cancelled afterwards, null for a document never issued.
        Format: `date-time`
      - `created` · `string` · required
        When Tallio accepted the document.
        Format: `date-time`
      - `updated` · `string` · required
        When the document last changed.
        Format: `date-time`
    - `warnings` · `object[]` · required
      What the merchant should know about the credit note (a rounding cent); empty when there is nothing.
      Each item: Something the merchant should know about the document made for the order; the document was still made.
      - `code` · `string` · required
        What is worth knowing about the document, as a machine code: the store's method used for an unrecognised payment method, a free line left out, a rounding difference, an invoice request not met, or a registered detail not applied.
        One of: `payment_method_default`, `free_line_omitted`, `rounding_difference`, `invoice_requested_invalid_vat`, `invoice_requested_incomplete`, `invoice_customer_is_supplier`, `invoice_request_ambiguous`, `invoice_billing_not_greek`, `invoice_name_from_person`, `invoice_field_truncated`, `invoice_registry_address_not_applied`, `invoice_request_too_late`, `delivery_address_omitted`
      - `detail` · `string` · required
        The warning in a sentence for the merchant.
      - `difference` · `integer | null` · required
        rounding\_difference only: what the customer paid minus the document's gross, in cents (hundredths of the currency), negative when the document is higher; null for every other warning.
        From -9007199254740991 to 9007199254740991
    - `handled` · `string | null` · required
      When the merchant marked the skipped or failed refund handled (POST /store\_orders/{id}/refunds/{refundId}/mark\_handled); null otherwise.
      Format: `date-time`
    - `voided_numbers` · `object[]` · required
      > **Greece:** Always empty.
      
      > **France:** The numbers Tallio numbered the refund's credit note with that no document carries, oldest first, with why; empty otherwise. Each stays a gap in its series, never reused: keep this record of why, since the series must be continuous or each gap justified (CGI ann. II art. 242 nonies A).
      
      Each item: A French number Tallio gave this record that no document carries: kept as a gap in the series.
      - `number` · `string` · required
        The French number left unused.
      - `reason` · `string` · required
        Why the number went unused: handled\_by\_hand (the merchant marked the record handled before an issued document took it: none was made, or the provider rejected the one that carried it), taken (Tallio already held that number for the merchant), not\_issued (the record closed for good, with no document, after it was numbered), replaced (the order was corrected again in place of a correction that was rejected or failed, so never issued under it).
        One of: `handled_by_hand`, `taken`, `not_issued`, `replaced`
    - `action_needed` · `boolean` · required
      Whether the refund waits for the merchant: skipped or failed, not marked handled, and not a skip that needs nothing. A refund waiting for its order's document (original\_not\_issued) is not while the order itself asks; once the order is marked handled it is, and it is credited if the order's document is made.
    - `created` · `string` · required
      When Tallio received the refund.
      Format: `date-time`
  - `handled` · `string | null` · required
    When the merchant marked the skipped or failed order handled (POST /store\_orders/{id}/mark\_handled); null otherwise, and again after a retry.
    Format: `date-time`
  - `voided_numbers` · `object[]` · required
    > **Greece:** Always empty.
    
    > **France:** The numbers Tallio numbered the order's invoice with that no document carries, oldest first, with why; empty otherwise. Each stays a gap in its series, never reused: keep this record of why, since the series must be continuous or each gap justified (CGI ann. II art. 242 nonies A).
    
    Each item: A French number Tallio gave this record that no document carries: kept as a gap in the series.
    - `number` · `string` · required
      The French number left unused.
    - `reason` · `string` · required
      Why the number went unused: handled\_by\_hand (the merchant marked the record handled before an issued document took it: none was made, or the provider rejected the one that carried it), taken (Tallio already held that number for the merchant), not\_issued (the record closed for good, with no document, after it was numbered), replaced (the order was corrected again in place of a correction that was rejected or failed, so never issued under it).
      One of: `handled_by_hand`, `taken`, `not_issued`, `replaced`
  - `action_needed` · `boolean` · required
    Whether the order itself waits for the merchant: skipped or failed, not marked handled, and not a skip that needs nothing (test\_order, no\_lines, sale\_to\_report…). GET /store\_orders?status=action\_needed lists these, and also orders with a refund that waits for the merchant (its own action\_needed).
  - `retryable` · `boolean` · required
    Whether POST /store\_orders/{id}/retry acts on it now: a skip fixed outside the order (provider\_not\_connected, order\_not\_paid, tallio\_refused, number\_taken…), a failed job, or a failed document Tallio can send again, none marked handled. A rejected document is corrected instead.
    > **France:** An invoice held as fr\_numbering\_pending (kept before Tallio numbered store invoices) is retryable even if marked handled: send it again to issue it.
    
  - `correctable` · `boolean` · required
    Whether POST /store\_orders/{id}/correct may act on it now: its document is issued, or was cancelled or credited in full, with no correction yet; or its document is a correction that was rejected or failed (correct again). Not for one partly credited.
    > **France:** Not for an invoice the buyer refused (210) or the platform rejected after issue (213).
    
  - `cancellable` · `boolean` · required
    Whether POST /store\_orders/{id}/cancel may act on it now.
    > **Greece:** Its document is issued, with no correction and no credit note.
    
    > **France:** Never; invoices are never cancelled, only corrected.
    
  - `created` · `string` · required
    When Tallio received the order; a retry of a skip moves it to the retry, since the document is dated by it. A French invoice is dated by the Paris day its number was given instead, which a retry keeps, so the series stays in date order.
    Format: `date-time`

*Example response · 200*

```json
{
  "data": {
    "id": "ord_02y9O8rh7F50tGi0QcWRrx",
    "object": "store_order",
    "merchant": "mer_02y9O8rh7F50tGi0QcWRrx",
    "mode": "live",
    "platform": "shopify",
    "external_id": "1042",
    "number": "1042",
    "status": "pending",
    "reason": null,
    "detail": null,
    "document": {
      "id": "doc_02y9O8rhJKVUXRvojdffcz",
      "object": "document",
      "merchant": "mer_02y9O8rh7F50tGi0QcWRrx",
      "mode": "test",
      "provider": "sandbox",
      "regime": "GR",
      "type": "1.1",
      "number": null,
      "status": "issued",
      "stage": null,
      "issue_date": "2026-10-10",
      "currency": "EUR",
      "net": 2500,
      "vat": 435,
      "gross": 2935,
      "provider_reference": "doc_02y9O8rhJKVUXRvojdffcz",
      "mydata": {
        "mark": "900000000000001",
        "uid": "4E1F0A6C2B9D8E7F6A5B4C3D2E1F0A9B8C7D6E5F",
        "qr_url": "https://sandbox.tallio.invalid/qr/900000000000001",
        "cancellation_mark": null
      },
      "ctc": null,
      "lifecycle": null,
      "lifecycle_history": [],
      "error": null,
      "classification": {
        "source": "default",
        "warnings": [
          "No income classification on line 2; applied the 1.1 default category1_1/E3_561_001. Set it on the line, or as a merchant override, if that is wrong."
        ]
      },
      "external_reference": "#1042",
      "metadata": {
        "order_id": "5520731963508"
      },
      "original_document": null,
      "replaces": null,
      "corrects": null,
      "replaced_by": null,
      "corrected_by": null,
      "credit_notes": [],
      "amount_credited": {
        "net": 0,
        "gross": 0
      },
      "timeline": [
        {
          "id": "evt_02y9O8rhJ2Z2v1fOH2XiSH",
          "type": "document.created",
          "created": "2026-10-11T09:30:00.000Z"
        },
        {
          "id": "evt_02y9O8s1a8ymJqpmAy0nLe",
          "type": "document.issued",
          "created": "2026-10-11T09:30:02.000Z"
        }
      ],
      "issued_at": "2026-10-11T09:30:02.000Z",
      "created": "2026-10-11T09:30:00.000Z",
      "updated": "2026-10-11T09:30:02.000Z"
    },
    "warnings": [],
    "refunds": [],
    "handled": "2026-10-11T09:30:00.000Z",
    "voided_numbers": [],
    "action_needed": false,
    "retryable": false,
    "correctable": false,
    "cancellable": false,
    "created": "2026-10-11T09:30:00.000Z"
  }
}
```

*Response headers*

- `x-request-id` · `string`
  The request's correlation id; quote it when reporting a problem. One of: req\_ plus a uuid (Tallio made it), client: plus the x-request-id you sent (8-128 of A-Z a-z 0-9 . \_ : -), or the hosting platform's id.
  With every response
  Pattern: `^(?:req_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|client:[A-Za-z0-9._:-]{8,128}|[A-Za-z0-9._-]{1,16}::[A-Za-z0-9._:-]{6,110})$`
- `ratelimit-limit` · `integer`
  Requests allowed in the current window for the bucket this request counted against.
  With 200, 400, 404, 409, 413, 415, 422, 429, 503 · At least 1
- `ratelimit-remaining` · `integer`
  Requests left in the current window; 0 means the next one is refused until the window resets.
  With 200, 400, 404, 409, 413, 415, 422, 429, 503 · At least 0
- `ratelimit-reset` · `integer`
  Seconds until the current window resets.
  With 200, 400, 404, 409, 413, 415, 422, 429, 503 · At least 0
- `www-authenticate` · `string`
  The bearer challenge: send a vendor secret key as `Authorization: Bearer <key>`.
  With 401 · Always `Bearer realm="tallio"`
- `retry-after` · `integer`
  Seconds to wait before retrying a request refused with 429 `rate_limited`.
  With 429 · At least 1

*Errors*

| Code | Status | Retryable | Meaning |
| --- | --- | --- | --- |
| `validation_failed` | 400 | No | Request validation failed. |
| `unauthorized` | 401 | No | Authentication is required. |
| `vendor_suspended` | 403 | No | This vendor's access to Tallio is suspended. Its owner can contact Tallio to restore it. |
| `not_found` | 404 | No | The requested resource was not found. |
| `store_url_mismatch` | 409 | No | This store key was granted to another store URL than the one this request names (Tallio-Store-Url). Connect this store again, or confirm that the store moved. |
| `invalid_state` | 409 | No | The object's current state does not allow this request. |
| `payload_too_large` | 413 | No | The request body is too large. |
| `unsupported_media_type` | 415 | No | The request body must be JSON (Content-Type: application/json). |
| `credit_required` | 422 | No | An issued document of this regime is never cancelled; credit it with a credit note (POST /documents/{id}/credit\_notes) or correct it (POST /documents/{id}/correct). |
| `provider_rejected` | 422 | No | The provider rejected the document. |
| `connection_unavailable` | 422 | No | The merchant has no usable connection to route this document to. |
| `rate_limited` | 429 | Yes | A rate limit was reached. Retry later. |
| `internal_error` | 500 | No | An unexpected server error occurred. |
| `provider_unavailable` | 503 | Yes | The provider is temporarily unavailable. |

## Confirm a waiting invoice

`POST /api/v1/store_orders/{id}/confirm_invoice`

Issues a store order skipped as invoice\_awaiting\_confirmation with the registered name and address the merchant reviewed: the order is mapped again from the order you send and goes back to pending. Before it is sent Tallio looks the number up again; if the registry's name or address no longer hash to registry\_hash, the order waits again (invoice\_awaiting\_confirmation) for a new review, and a number no longer registered is skipped as buyer\_vat\_not\_registered. Any other store order is 409 invalid\_state. Takes no Idempotency-Key: after a lost answer, GET the store order.

*Bearer API key*

*Path parameters*

- `id` · `string` · required
  The store order's id (ord\_…).

*Request body*

- `order` · `object` · required
  The order as the platform holds it now, for the same platform and order id: Tallio keeps no snapshot once an order is mapped, and the invoice is mapped again from this one.
  - `platform` · `string` · required
    The platform the order comes from. Not shopify: the Shopify app issues through its own path until it moves onto store orders, so one order is never issued twice.
    One of: `woocommerce`
  - `test` · `boolean` · required
    A test order (a test gateway or test mode): never a fiscal document.
  - `currency` · `string` · required
    ISO 4217 currency of every amount.
    Pattern: `^[A-Z]{3}$`
  - `prices_include_tax` · `boolean` · required
    The store's prices are entered with tax included.
  - `tax_rounding` · `string` · required
    How the platform rounded tax: "line" per line, or "subtotal" once per rate over the order. The total is checked the platform's way: each line's net and tax rounded, or the unrounded lines summed, then rounded.
    One of: `line`, `subtotal`
  - `total` · `string` · required
    The order's total, tax included, at the same moment as its lines: after edits, and (sent to the store orders API) as paid, before any refund. It equals what the lines, shipping and fees add up to with their tax; an order where they differ is refused, never corrected.
    Pattern: `^(0|[1-9]\d{0,12})(\.\d{1,2})?$`
  - `lines` · `object[]` · required
    The products, in the order's order, at the moment total describes.
    Up to 1000 items
    Each item: A product line.
    - `external_id` · `string | null` · required
      The platform's id of the line, which refunds name; null when the platform gave none.
      1 to 64 characters
    - `name` · `string` · required
      The product's name as sold, variation included (Shopify: title - variant).
      Up to 1000 characters
    - `sku` · `string`
      The SKU; describes the line when it has no name.
      Up to 200 characters
    - `product_id` · `string`
      The platform's product id; describes the line when nothing else does.
      Up to 64 characters
    - `quantity` · `string` · required
      Units on the order at the moment the snapshot describes, after edits; 0 for a line edited away. Sent to the store orders API, that moment is the payment: refunds are sent on their own (POST /store\_orders/{id}/refunds).
      Pattern: `^\d{1,9}(\.\d{1,6})?$`
    - `total` · `string` · required
      The line's net amount after discounts, tax excluded.
      Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
    - `taxes` · `object[]` · required
      The line's tax, one share per rate; empty when it is untaxed.
      Up to 10 items
      Each item: One rate's share of a line's tax.
      - `rate_id` · `string` · required
        The platform's id of the tax rate (WooCommerce: the key of the line's taxes; Shopify: the rate).
        1 to 64 characters
      - `rate_percent` · `string` · required
        The rate in percent as text, up to 10 decimals: "24", "5.5". A compound rate is never sent.
        Pattern: `^\d{1,3}(\.\d{1,10})?$`
      - `amount` · `string` · required
        The tax at this rate, unrounded when the platform stores it so; negative only on a negative (discount) line, whose tax WooCommerce stores negative too.
        Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
    - `gift_card` · `boolean` · required
      The line sells a gift card, which is not a sale of goods.
  - `shipping_lines` · `object[]` · required
    The shipping charged after discounts, at the moment total describes.
    Up to 1000 items
    Each item: A shipping line, one unit.
    - `external_id` · `string | null` · required
      The platform's id of the line, which refunds name; null when the platform gave none.
      1 to 64 characters
    - `name` · `string` · required
      The shipping's name as the order shows it.
      Up to 1000 characters
    - `total` · `string` · required
      The shipping's net amount after discounts, tax excluded.
      Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
    - `taxes` · `object[]` · required
      The shipping's tax, one share per rate; empty when it is untaxed.
      Up to 10 items
      Each item: One rate's share of a line's tax.
      - `rate_id` · `string` · required
        The platform's id of the tax rate (WooCommerce: the key of the line's taxes; Shopify: the rate).
        1 to 64 characters
      - `rate_percent` · `string` · required
        The rate in percent as text, up to 10 decimals: "24", "5.5". A compound rate is never sent.
        Pattern: `^\d{1,3}(\.\d{1,10})?$`
      - `amount` · `string` · required
        The tax at this rate, unrounded when the platform stores it so; negative only on a negative (discount) line, whose tax WooCommerce stores negative too.
        Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
  - `fee_lines` · `object[]` · required
    Other charges, such as a cash-on-delivery fee, at the moment total describes.
    Up to 1000 items
    Each item: A fee line, one unit.
    - `external_id` · `string | null` · required
      The platform's id of the line, which refunds name; null when the platform gave none.
      1 to 64 characters
    - `name` · `string` · required
      The fee's name as the order shows it.
      Up to 1000 characters
    - `total` · `string` · required
      The fee's net amount after discounts, tax excluded.
      Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
    - `taxes` · `object[]` · required
      The fee's tax, one share per rate; empty when it is untaxed.
      Up to 10 items
      Each item: One rate's share of a line's tax.
      - `rate_id` · `string` · required
        The platform's id of the tax rate (WooCommerce: the key of the line's taxes; Shopify: the rate).
        1 to 64 characters
      - `rate_percent` · `string` · required
        The rate in percent as text, up to 10 decimals: "24", "5.5". A compound rate is never sent.
        Pattern: `^\d{1,3}(\.\d{1,10})?$`
      - `amount` · `string` · required
        The tax at this rate, unrounded when the platform stores it so; negative only on a negative (discount) line, whose tax WooCommerce stores negative too.
        Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
  - `coupons` · `object[]` · required
    The coupons used, for display only: their discounts are already in the lines' totals.
    Up to 1000 items
    Each item: A coupon.
    - `code` · `string` · required
      The coupon code.
      Up to 200 characters
  - `billing` · `object`
    The billing address: it names and locates an invoice's buyer.
    - `country` · `string`
      ISO 3166-1 alpha-2 country code.
      Pattern: `^[A-Z]{2}$`
    - `address_1` · `string`
      Street and number.
      Up to 500 characters
    - `city` · `string`
      City.
      Up to 200 characters
    - `postcode` · `string`
      Postal code.
      Up to 50 characters
    - `company` · `string`
      Company name.
      Up to 500 characters
    - `name` · `string`
      The billing person's full name, when the platform keeps one.
      Up to 500 characters
    - `first_name` · `string`
      First name.
      Up to 200 characters
    - `last_name` · `string`
      Last name.
      Up to 200 characters
  - `shipping` · `object`
    The shipping address; the sale is taxed in its country, else the billing country.
    - `country` · `string`
      ISO 3166-1 alpha-2 country code.
      Pattern: `^[A-Z]{2}$`
    - `address_1` · `string`
      Street and number.
      Up to 500 characters
    - `city` · `string`
      City.
      Up to 200 characters
    - `postcode` · `string`
      Postal code.
      Up to 50 characters
  - `payment_gateways` · `object[]` · required
    The gateways that took the payment; one for most orders.
    Up to 10 items
    Each item: A payment gateway the order was paid through.
    - `id` · `string` · required
      The gateway's id (WooCommerce: cod, bacs, stripe; Shopify: its gateway name).
      1 to 200 characters
    - `title` · `string` · required
      The gateway's name as the buyer saw it.
      Up to 200 characters
  - `invoice_request` · `object`
    What the checkout captured of a buyer's request for an invoice. A platform that captures each field once sends one value each; Shopify's cart attributes may repeat.
    - `requested` · `string[]` · required
      Every value the checkout captured for "I need an invoice" ("true", "yes", "false"); distinct values disagree, and no invoice is guessed.
      Up to 10 items
      Each item: Up to 200 characters
    - `vat_numbers` · `string[]` · required
      Every value the checkout captured for the buyer's VAT number (ΑΦΜ, SIREN, SIRET or EU VAT number); distinct values disagree, and no invoice is guessed.
      Up to 10 items
      Each item: Up to 200 characters
    - `company_names` · `string[]` · required
      Every value the checkout captured for the buyer's company name; distinct values disagree, and no invoice is guessed.
      Up to 10 items
      Each item: Up to 200 characters
  - `platform_version` · `string` · required
    The platform's version ("11.2.1"), logged, never branched on.
    1 to 50 characters
  - `external_id` · `string` · required
    The platform's order id.
    1 to 64 characters
  - `number` · `string` · required
    The order number the merchant knows it by ("1042", "#1042").
    1 to 64 characters
  - `created_at` · `string` · required
    When the order was placed.
    Format: `date-time`
  - `paid_at` · `string | null` · required
    When it was paid; null while unpaid.
    Format: `date-time`
  - `cancelled` · `boolean` · required
    The order was cancelled: it is kept and skipped as order\_cancelled.
  - `refunded_total` · `string` · required
    What was already refunded on the order when the snapshot was taken ("0" for nothing). An order refunded in part before its document is issued as paid, and each refund is credited after it; one refunded in full is skipped as refunded\_before\_issue (nothing was sold).
    Pattern: `^(0|[1-9]\d{0,12})(\.\d{1,2})?$`
- `registry_hash` · `string` · required
  The hash of the registered name and address the merchant was shown (registry.hash from POST /store\_orders/{id}/invoice\_review). The invoice is issued only while the registry still answers with them.
  Pattern: `^[0-9a-f]{64}$`

*Request*

*JSON*

```json
{
  "order": {
    "platform": "woocommerce",
    "test": false,
    "currency": "EUR",
    "prices_include_tax": false,
    "tax_rounding": "line",
    "total": "81.41",
    "lines": [],
    "shipping_lines": [],
    "fee_lines": [],
    "coupons": [],
    "payment_gateways": [],
    "platform_version": "string",
    "external_id": "string",
    "number": "string",
    "created_at": "2026-10-11T09:30:00.000Z",
    "paid_at": "2026-10-11T09:31:00.000Z",
    "cancelled": false,
    "refunded_total": "81.41"
  },
  "registry_hash": "9f2b7c1e4a5d6f708192a3b4c5d6e7f8091a2b3c4d5e6f708192a3b4c5d6e7f8"
}
```

*curl*

```bash
curl -X POST 'https://tallio.dev/api/v1/store_orders/ord_02y9O8rh7F50tGi0QcWRrx/confirm_invoice' \
  -H "Authorization: Bearer $TALLIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "order": {
    "platform": "woocommerce",
    "test": false,
    "currency": "EUR",
    "prices_include_tax": false,
    "tax_rounding": "line",
    "total": "81.41",
    "lines": [],
    "shipping_lines": [],
    "fee_lines": [],
    "coupons": [],
    "payment_gateways": [],
    "platform_version": "string",
    "external_id": "string",
    "number": "string",
    "created_at": "2026-10-11T09:30:00.000Z",
    "paid_at": "2026-10-11T09:31:00.000Z",
    "cancelled": false,
    "refunded_total": "81.41"
  },
  "registry_hash": "9f2b7c1e4a5d6f708192a3b4c5d6e7f8091a2b3c4d5e6f708192a3b4c5d6e7f8"
}'
```

*TypeScript SDK*

```ts
import { createTallioClient, unwrap } from "@tallio-dev/sdk";

const tallio = createTallioClient({
  apiKey: process.env.TALLIO_API_KEY!,
  baseUrl: "https://tallio.dev",
});

const result = await unwrap(tallio.http.POST("/api/v1/store_orders/{id}/confirm_invoice", {
  params: {
    path: {
      id: "ord_02y9O8rh7F50tGi0QcWRrx",
    },
  },
  body: {
    order: {
      platform: "woocommerce",
      test: false,
      currency: "EUR",
      prices_include_tax: false,
      tax_rounding: "line",
      total: "81.41",
      lines: [],
      shipping_lines: [],
      fee_lines: [],
      coupons: [],
      payment_gateways: [],
      platform_version: "string",
      external_id: "string",
      number: "string",
      created_at: "2026-10-11T09:30:00.000Z",
      paid_at: "2026-10-11T09:31:00.000Z",
      cancelled: false,
      refunded_total: "81.41",
    },
    registry_hash: "9f2b7c1e4a5d6f708192a3b4c5d6e7f8091a2b3c4d5e6f708192a3b4c5d6e7f8",
  },
}));
```

*Responses*

| Status | Description |
| --- | --- |
| `200` | The store order, pending again. |
| 4XX, 5XX | An error: see Errors below. |

*Response body · 200*

- `data` · `object` · required
  A shop order sent to Tallio, and the document it became.
  - `id` · `string` · required
    Id of the store order (ord\_…).
    Pattern: `^ord_[0-9A-Za-z]{22}$`
  - `object` · `string` · required
    Always "store\_order".
    Always `store_order`
  - `merchant` · `string` · required
    Id of the merchant (mer\_…).
    Pattern: `^mer_[0-9A-Za-z]{22}$`
  - `mode` · `string` · required
    live for an order sent with a live key, test for a test key.
    One of: `live`, `test`
  - `platform` · `string` · required
    The platform the order comes from.
    One of: `shopify`, `woocommerce`
  - `external_id` · `string` · required
    The platform's id of the order.
    1 to 64 characters
  - `number` · `string` · required
    The order number the merchant and the buyer see.
  - `status` · `string` · required
    pending (received, not yet mapped), skipped (it maps to no document: see reason), sent (its document was created and is on its way to the provider), issued (the document was issued), failed (the document was rejected, failed or cancelled, or Tallio could not create it: see reason).
    One of: `pending`, `skipped`, `sent`, `issued`, `failed`
  - `reason` · `string | null` · required
    Why the order is skipped or failed, as a machine code; null otherwise.
  - `detail` · `string | null` · required
    The reason in a sentence for the merchant; null when there is no reason.
  - `document` · `object | null` · required
    The document issued for the order, once one was created; null before.
    - `id` · `string` · required
      Id of the document (doc\_…).
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `object` · `string` · required
      Always "document".
      Always `document`
    - `merchant` · `string` · required
      Id of the merchant (mer\_…).
      Pattern: `^mer_[0-9A-Za-z]{22}$`
    - `mode` · `string` · required
      live for a document created with a live key, test for a test key.
      One of: `live`, `test`
    - `provider` · `string` · required
      The licensed e-invoicing provider (a Greek provider, direct myDATA, a French plateforme agréée, Chorus Pro for a French public-sector buyer, or Tallio's sandbox) that issues the document.
      One of: `sandbox`, `mydata`, `wrapp`, `impact`, `epsilon`, `softone`, `prosvasis`, `superpdp`, `choruspro`, `b2brouter`, `oxygen`, `iopole`, `qonto`, `elorus`, `timologisi`
    - `regime` · `string` · required
      Tax regime the document is issued under, by country: GR (Greece, myDATA) or FR (France, e-invoicing through a plateforme agréée).
      One of: `GR`, `FR` · Default: `GR`
    - `type` · `string` · required
      Document type, by regime.
      > **Greece:** An AADE myDATA type (e.g. 1.1).
      
      > **France:** A UNTDID 1001 code (e.g. 380).
      
      One of: `380`, `381`, `384`, `386`, `1.1`, `2.1`, `5.1`, `5.2`, `11.1`, `11.2`, `11.4`, `2.2`, `2.3`
    - `number` · `string | null` · required
      The document's number.
      > **Greece:** The provider's number in its series (e.g. ΕΑΛΠ-1), null until it assigns one: a display label, not unique, so identify a document by its id.
      
      > **France:** The number you assigned (set once issued).
      
      Default: `null`
    - `status` · `string` · required
      Where the document stands: pending (Tallio accepted it; not yet issued, see stage), issued (the tax system accepted it; in Greece it has a MARK), rejected (the provider or the tax system refused it), failed (Tallio could not deliver it to the provider), cancelled (withdrawn before it was sent, or cancelled in myDATA after issue: see mydata.cancellation\_mark).
      One of: `pending`, `issued`, `rejected`, `failed`, `cancelled`
    - `stage` · `string | null` · required
      Where a pending document is (queued, submitting, awaiting\_confirmation, reconciling); null unless status is pending.
      One of: `queued`, `submitting`, `awaiting_confirmation`, `reconciling`
    - `issue_date` · `string` · required
      Issue date, YYYY-MM-DD.
      Format: `date`
    - `currency` · `string` · required
      ISO 4217 currency of the amounts.
      > **Greece:** EUR.
      
      > **France:** Any with cents.
      
      Pattern: `^[A-Z]{3}$`
    - `net` · `integer` · required
      Sum of the lines' net amounts, in minor units, at most 1000000000000000.
      From 0 to 1000000000000000
    - `vat` · `integer` · required
      Sum of the lines' VAT, each line rounded half up to the minor unit, in minor units, at most 1000000000000000.
      From 0 to 1000000000000000
    - `gross` · `integer` · required
      net + vat, in minor units, at most 1250000000000000.
      From 0 to 1250000000000000
    - `provider_reference` · `string | null` · required
      The provider's own reference for the document, once it has taken it; null before.
    - `mydata` · `object | null` · required
      myDATA's identity of the document: an object in GR, null in any other regime.
      - `mark` · `string | null` · required
        MARK (AADE registration number) once issued, as a digit string; null before. A cancelled document keeps the MARK it was issued with (null when it was withdrawn before it was sent).
        Pattern: `^[1-9]\d{0,18}$`
      - `uid` · `string | null` · required
        myDATA uid: the SHA-1 (40 upper-case hex digits) AADE derives from the document's identifiers; null until known.
        Pattern: `^[0-9A-F]{40}$`
      - `qr_url` · `string | null` · required
        URL the document's QR code points to; null until the provider returns one.
        Format: `uri`
      - `cancellation_mark` · `string | null` · required
        The MARK of the cancellation in myDATA, once an issued document is cancelled; null otherwise.
        Pattern: `^[1-9]\d{0,18}$`
    - `ctc` · `object | null` · required
      The French e-invoicing platform's identity of the document: an object in FR, null in any other regime.
      - `platform_id` · `string | null` · required
        The plateforme agréée carrying the document (sandbox in test mode); null until it has taken it.
      - `flow_id` · `string | null` · required
        The platform's id of the flow that carried the document; null until it reports one.
    - `lifecycle` · `object | null` · required
      The tax regime's status for the document once sent.
      > **Greece:** Always null.
      
      > **France:** Null until the platform reports one.
      
      Default: `null`
      - `key` · `string` · required
        Where the document is after issue, in GOBL's bill.Status keys.
        One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
      - `code` · `string` · required
        The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
        1 to 20 characters
      - `at` · `string` · required
        When the regime's platform reported this status.
        Format: `date-time`
    - `lifecycle_history` · `object[]` · required
      Every lifecycle status reported for the document, oldest first, at most the newest 30; the last is lifecycle. Empty in GR. A status after issue (a buyer's 210 Refusée, the platform's 213 Rejetée) never changes status: an issued document stays issued.
      Up to 30 items · Default: `[]`
      Each item: One lifecycle status the tax regime's platform reported for the document.
      - `key` · `string` · required
        Where the document is after issue, in GOBL's bill.Status keys.
        One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
      - `code` · `string` · required
        The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
        1 to 20 characters
      - `at` · `string` · required
        When the regime's platform reported this status.
        Format: `date-time`
      - `provider_status` · `string | null` · required
        The provider's own status the code was read from (e.g. refused, REJETEE, fr:210); null if it gave none.
        1 to 64 characters
        Pattern: `^[A-Za-z0-9_.:-]+$`
      - `reason` · `string | null` · required
        The platform's reason code for a refusal, dispute or rejection, when it reports one; null otherwise. Free-text reasons are not kept.
        1 to 64 characters
        Pattern: `^[A-Za-z0-9_.:-]+$`
    - `error` · `object | null` · required
      Why the document was rejected or failed; null otherwise.
      - `code` · `string` · required
        Stable machine-readable error code. Branch on this, never on `message`.
        One of: `validation_failed`, `unauthorized`, `not_found`, `idempotency_conflict`, `idempotency_in_progress`, `already_exists`, `invalid_grant`, `store_url_mismatch`, `invalid_state`, `already_issued`, `connection_not_disconnected`, `merchant_archived`, `cursor_not_listed`, `payload_too_large`, `unsupported_media_type`, `rate_limited`, `too_many_pending_erasures`, `forbidden`, `restricted_key`, `vendor_suspended`, `subscription_required`, `store_plan_live_only`, `store_unproven`, `not_supported`, `regime_mismatch`, `supplier_mismatch`, `connection_unavailable`, `connection_unconfirmed`, `provider_credentials_invalid`, `provider_rejected`, `balance_exceeded`, `credit_required`, `provider_unavailable`, `pdf_not_ready`, `service_unavailable`, `internal_error`
      - `message` · `string` · required
        Tallio's own explanation, safe to show to a developer; the provider's words are in provider\_message.
      - `provider_code` · `string | null` · required
        The provider's own error code, or null when the error did not come from a provider.
      - `provider_message` · `string | null` · required
        The provider's own error message, verbatim, or null when the error did not come from a provider. On a document or connection it is removed (null), like provider\_raw, once the retention window ends or by a data-subject erasure.
      - `retryable` · `boolean` · required
        True when the same request may succeed if sent again later.
      - `provider_raw` · `any`
        The provider's error response body as received, or a TruncatedProviderRaw marker when it exceeds 4096 bytes of JSON. Never holds request headers, credentials or the request payload.
    - `classification` · `object` · required
      How the document was classified for myDATA.
      - `source` · `string` · required
        default when any line took Tallio's default, else override when any line took the merchant's override, else line.
        One of: `line`, `override`, `default`
      - `warnings` · `string[]` · required
        What to check before issuing, e.g. that defaults were applied.
    - `external_reference` · `string | null` · required
      Your own reference for the document, or null.
      Default: `null`
    - `metadata` · `object` · required
      Up to 50 key-value pairs of your own (keys up to 40 characters, values up to 500). Do not put personal data in it.
      Default: `{}`
      - `{key}` · `string`
        A value, up to 500 characters.
        1 to 40 characters
    - `original_document` · `string | null` · required
      For a credit note made from a Tallio document: that document (doc\_…). Null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `replaces` · `string | null` · required
      The rejected or failed document this one was issued to replace, or null.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `corrects` · `string | null` · required
      The issued document this one corrects, or null.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `replaced_by` · `string | null` · required
      The document created to replace this rejected or failed one, the live one if there were several; null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `corrected_by` · `string | null` · required
      The document made to correct this one (POST /documents/{id}/correct), the latest if there were several; null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `credit_notes` · `string[]` · required
      Credit notes made from this document, oldest first, at most 100.
      Up to 100 items · Default: `[]`
      Each item: Id of the document (doc\_…).
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `amount_credited` · `object` · required
      What credit notes made from this document take, pending ones included. Zero when there are none.
      Default: `{"net":0,"gross":0}`
      - `net` · `integer` · required
        Net amount credited, in cents.
        From 0 to 9007199254740991
      - `gross` · `integer` · required
        Gross amount credited, in cents.
        From 0 to 9007199254740991
    - `timeline` · `object[]` · required
      The document's events, oldest first, at most 100.
      Up to 100 items
      Each item: One event in a document's history. GET /events/{id} returns the full Event.
      - `id` · `string` · required
        Id of the event (evt\_…).
        Pattern: `^evt_[0-9A-Za-z]{22}$`
      - `type` · `string` · required
        What happened: document.created (Tallio accepted a document), document.issued (the tax system accepted it; in Greece it has a MARK), document.rejected (the provider or the tax system refused it), document.failed (Tallio could not deliver it), merchant.created (a merchant was created), connection.created (a merchant was connected to a provider), connection.verified (the provider accepted its credentials), connection.invalid (the provider refused them), connection.disconnected (it was disconnected), connect\_session.completed (a merchant connected through a hosted connect link), webhook\_endpoint.disabled (Tallio disabled an endpoint failing for days), document.retried (a failed document was queued to be sent again), document.credited (a credit note made from the document was issued), document.cancelled (the document was withdrawn or cancelled), document.corrected (a corrected document was made to replace it), document.replaced (a new document was created to replace a rejected or failed one), connection.deleted (a disconnected connection was deleted from the merchant's list), merchant.archived (a merchant was archived: it issues nothing new), merchant.unarchived (an archived merchant was restored), store\_order.updated (a store order's status, reason, handled mark or document changed), document.lifecycle\_updated (the French platform reported a new lifecycle status for an issued document) and connection.updated (a connection's settings changed).
        One of: `document.created`, `document.issued`, `document.rejected`, `document.failed`, `merchant.created`, `connection.created`, `connection.verified`, `connection.invalid`, `connection.disconnected`, `connect_session.completed`, `webhook_endpoint.disabled`, `document.retried`, `document.credited`, `document.cancelled`, `document.corrected`, `document.replaced`, `connection.deleted`, `merchant.archived`, `merchant.unarchived`, `store_order.updated`, `document.lifecycle_updated`, `connection.updated`
      - `created` · `string` · required
        When the event happened.
        Format: `date-time`
    - `issued_at` · `string | null` · required
      When the document was issued (the tax system accepted it); kept if it is cancelled afterwards, null for a document never issued.
      Format: `date-time`
    - `created` · `string` · required
      When Tallio accepted the document.
      Format: `date-time`
    - `updated` · `string` · required
      When the document last changed.
      Format: `date-time`
  - `warnings` · `object[]` · required
    What the merchant should know about the order's document (a rounding cent, a free line left off, the store's default payment method); empty when there is nothing, or before the order is mapped.
    Each item: Something the merchant should know about the document made for the order; the document was still made.
    - `code` · `string` · required
      What is worth knowing about the document, as a machine code: the store's method used for an unrecognised payment method, a free line left out, a rounding difference, an invoice request not met, or a registered detail not applied.
      One of: `payment_method_default`, `free_line_omitted`, `rounding_difference`, `invoice_requested_invalid_vat`, `invoice_requested_incomplete`, `invoice_customer_is_supplier`, `invoice_request_ambiguous`, `invoice_billing_not_greek`, `invoice_name_from_person`, `invoice_field_truncated`, `invoice_registry_address_not_applied`, `invoice_request_too_late`, `delivery_address_omitted`
    - `detail` · `string` · required
      The warning in a sentence for the merchant.
    - `difference` · `integer | null` · required
      rounding\_difference only: what the customer paid minus the document's gross, in cents (hundredths of the currency), negative when the document is higher; null for every other warning.
      From -9007199254740991 to 9007199254740991
  - `refunds` · `object[]` · required
    The order's refunds sent with POST /store\_orders/{id}/refunds, oldest first, each with its credit note once one was created; empty when there are none.
    Each item: A store order's refund sent to Tallio, and the credit note it became.
    - `id` · `string` · required
      Id of the store refund (ref\_…).
      Pattern: `^ref_[0-9A-Za-z]{22}$`
    - `object` · `string` · required
      Always "store\_refund".
      Always `store_refund`
    - `merchant` · `string` · required
      Id of the merchant (mer\_…).
      Pattern: `^mer_[0-9A-Za-z]{22}$`
    - `store_order` · `string` · required
      The store order it refunds (ord\_…).
      Pattern: `^ord_[0-9A-Za-z]{22}$`
    - `external_id` · `string` · required
      The platform's id of the refund.
    - `status` · `string` · required
      pending (received, or waiting for the order's document to be issued), skipped (it maps to no credit note: see reason), sent (its credit note was created and is on its way to the provider), issued (the credit note was issued), failed (the credit note was rejected, failed or cancelled, or Tallio could not create it: see reason).
      One of: `pending`, `skipped`, `sent`, `issued`, `failed`
    - `reason` · `string | null` · required
      Why the refund is skipped or failed, as a machine code; null otherwise.
    - `detail` · `string | null` · required
      The reason in a sentence for the merchant; null when there is no reason.
    - `document` · `object | null` · required
      The credit note issued for the refund, linked to the order's document, once one was created; null before.
      - `id` · `string` · required
        Id of the document (doc\_…).
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `object` · `string` · required
        Always "document".
        Always `document`
      - `merchant` · `string` · required
        Id of the merchant (mer\_…).
        Pattern: `^mer_[0-9A-Za-z]{22}$`
      - `mode` · `string` · required
        live for a document created with a live key, test for a test key.
        One of: `live`, `test`
      - `provider` · `string` · required
        The licensed e-invoicing provider (a Greek provider, direct myDATA, a French plateforme agréée, Chorus Pro for a French public-sector buyer, or Tallio's sandbox) that issues the document.
        One of: `sandbox`, `mydata`, `wrapp`, `impact`, `epsilon`, `softone`, `prosvasis`, `superpdp`, `choruspro`, `b2brouter`, `oxygen`, `iopole`, `qonto`, `elorus`, `timologisi`
      - `regime` · `string` · required
        Tax regime the document is issued under, by country: GR (Greece, myDATA) or FR (France, e-invoicing through a plateforme agréée).
        One of: `GR`, `FR` · Default: `GR`
      - `type` · `string` · required
        Document type, by regime.
        > **Greece:** An AADE myDATA type (e.g. 1.1).
        
        > **France:** A UNTDID 1001 code (e.g. 380).
        
        One of: `380`, `381`, `384`, `386`, `1.1`, `2.1`, `5.1`, `5.2`, `11.1`, `11.2`, `11.4`, `2.2`, `2.3`
      - `number` · `string | null` · required
        The document's number.
        > **Greece:** The provider's number in its series (e.g. ΕΑΛΠ-1), null until it assigns one: a display label, not unique, so identify a document by its id.
        
        > **France:** The number you assigned (set once issued).
        
        Default: `null`
      - `status` · `string` · required
        Where the document stands: pending (Tallio accepted it; not yet issued, see stage), issued (the tax system accepted it; in Greece it has a MARK), rejected (the provider or the tax system refused it), failed (Tallio could not deliver it to the provider), cancelled (withdrawn before it was sent, or cancelled in myDATA after issue: see mydata.cancellation\_mark).
        One of: `pending`, `issued`, `rejected`, `failed`, `cancelled`
      - `stage` · `string | null` · required
        Where a pending document is (queued, submitting, awaiting\_confirmation, reconciling); null unless status is pending.
        One of: `queued`, `submitting`, `awaiting_confirmation`, `reconciling`
      - `issue_date` · `string` · required
        Issue date, YYYY-MM-DD.
        Format: `date`
      - `currency` · `string` · required
        ISO 4217 currency of the amounts.
        > **Greece:** EUR.
        
        > **France:** Any with cents.
        
        Pattern: `^[A-Z]{3}$`
      - `net` · `integer` · required
        Sum of the lines' net amounts, in minor units, at most 1000000000000000.
        From 0 to 1000000000000000
      - `vat` · `integer` · required
        Sum of the lines' VAT, each line rounded half up to the minor unit, in minor units, at most 1000000000000000.
        From 0 to 1000000000000000
      - `gross` · `integer` · required
        net + vat, in minor units, at most 1250000000000000.
        From 0 to 1250000000000000
      - `provider_reference` · `string | null` · required
        The provider's own reference for the document, once it has taken it; null before.
      - `mydata` · `object | null` · required
        myDATA's identity of the document: an object in GR, null in any other regime.
        - `mark` · `string | null` · required
          MARK (AADE registration number) once issued, as a digit string; null before. A cancelled document keeps the MARK it was issued with (null when it was withdrawn before it was sent).
          Pattern: `^[1-9]\d{0,18}$`
        - `uid` · `string | null` · required
          myDATA uid: the SHA-1 (40 upper-case hex digits) AADE derives from the document's identifiers; null until known.
          Pattern: `^[0-9A-F]{40}$`
        - `qr_url` · `string | null` · required
          URL the document's QR code points to; null until the provider returns one.
          Format: `uri`
        - `cancellation_mark` · `string | null` · required
          The MARK of the cancellation in myDATA, once an issued document is cancelled; null otherwise.
          Pattern: `^[1-9]\d{0,18}$`
      - `ctc` · `object | null` · required
        The French e-invoicing platform's identity of the document: an object in FR, null in any other regime.
        - `platform_id` · `string | null` · required
          The plateforme agréée carrying the document (sandbox in test mode); null until it has taken it.
        - `flow_id` · `string | null` · required
          The platform's id of the flow that carried the document; null until it reports one.
      - `lifecycle` · `object | null` · required
        The tax regime's status for the document once sent.
        > **Greece:** Always null.
        
        > **France:** Null until the platform reports one.
        
        Default: `null`
        - `key` · `string` · required
          Where the document is after issue, in GOBL's bill.Status keys.
          One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
        - `code` · `string` · required
          The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
          1 to 20 characters
        - `at` · `string` · required
          When the regime's platform reported this status.
          Format: `date-time`
      - `lifecycle_history` · `object[]` · required
        Every lifecycle status reported for the document, oldest first, at most the newest 30; the last is lifecycle. Empty in GR. A status after issue (a buyer's 210 Refusée, the platform's 213 Rejetée) never changes status: an issued document stays issued.
        Up to 30 items · Default: `[]`
        Each item: One lifecycle status the tax regime's platform reported for the document.
        - `key` · `string` · required
          Where the document is after issue, in GOBL's bill.Status keys.
          One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
        - `code` · `string` · required
          The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
          1 to 20 characters
        - `at` · `string` · required
          When the regime's platform reported this status.
          Format: `date-time`
        - `provider_status` · `string | null` · required
          The provider's own status the code was read from (e.g. refused, REJETEE, fr:210); null if it gave none.
          1 to 64 characters
          Pattern: `^[A-Za-z0-9_.:-]+$`
        - `reason` · `string | null` · required
          The platform's reason code for a refusal, dispute or rejection, when it reports one; null otherwise. Free-text reasons are not kept.
          1 to 64 characters
          Pattern: `^[A-Za-z0-9_.:-]+$`
      - `error` · `object | null` · required
        Why the document was rejected or failed; null otherwise.
        - `code` · `string` · required
          Stable machine-readable error code. Branch on this, never on `message`.
          One of: `validation_failed`, `unauthorized`, `not_found`, `idempotency_conflict`, `idempotency_in_progress`, `already_exists`, `invalid_grant`, `store_url_mismatch`, `invalid_state`, `already_issued`, `connection_not_disconnected`, `merchant_archived`, `cursor_not_listed`, `payload_too_large`, `unsupported_media_type`, `rate_limited`, `too_many_pending_erasures`, `forbidden`, `restricted_key`, `vendor_suspended`, `subscription_required`, `store_plan_live_only`, `store_unproven`, `not_supported`, `regime_mismatch`, `supplier_mismatch`, `connection_unavailable`, `connection_unconfirmed`, `provider_credentials_invalid`, `provider_rejected`, `balance_exceeded`, `credit_required`, `provider_unavailable`, `pdf_not_ready`, `service_unavailable`, `internal_error`
        - `message` · `string` · required
          Tallio's own explanation, safe to show to a developer; the provider's words are in provider\_message.
        - `provider_code` · `string | null` · required
          The provider's own error code, or null when the error did not come from a provider.
        - `provider_message` · `string | null` · required
          The provider's own error message, verbatim, or null when the error did not come from a provider. On a document or connection it is removed (null), like provider\_raw, once the retention window ends or by a data-subject erasure.
        - `retryable` · `boolean` · required
          True when the same request may succeed if sent again later.
        - `provider_raw` · `any`
          The provider's error response body as received, or a TruncatedProviderRaw marker when it exceeds 4096 bytes of JSON. Never holds request headers, credentials or the request payload.
      - `classification` · `object` · required
        How the document was classified for myDATA.
        - `source` · `string` · required
          default when any line took Tallio's default, else override when any line took the merchant's override, else line.
          One of: `line`, `override`, `default`
        - `warnings` · `string[]` · required
          What to check before issuing, e.g. that defaults were applied.
      - `external_reference` · `string | null` · required
        Your own reference for the document, or null.
        Default: `null`
      - `metadata` · `object` · required
        Up to 50 key-value pairs of your own (keys up to 40 characters, values up to 500). Do not put personal data in it.
        Default: `{}`
        - `{key}` · `string`
          A value, up to 500 characters.
          1 to 40 characters
      - `original_document` · `string | null` · required
        For a credit note made from a Tallio document: that document (doc\_…). Null otherwise.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `replaces` · `string | null` · required
        The rejected or failed document this one was issued to replace, or null.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `corrects` · `string | null` · required
        The issued document this one corrects, or null.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `replaced_by` · `string | null` · required
        The document created to replace this rejected or failed one, the live one if there were several; null otherwise.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `corrected_by` · `string | null` · required
        The document made to correct this one (POST /documents/{id}/correct), the latest if there were several; null otherwise.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `credit_notes` · `string[]` · required
        Credit notes made from this document, oldest first, at most 100.
        Up to 100 items · Default: `[]`
        Each item: Id of the document (doc\_…).
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `amount_credited` · `object` · required
        What credit notes made from this document take, pending ones included. Zero when there are none.
        Default: `{"net":0,"gross":0}`
        - `net` · `integer` · required
          Net amount credited, in cents.
          From 0 to 9007199254740991
        - `gross` · `integer` · required
          Gross amount credited, in cents.
          From 0 to 9007199254740991
      - `timeline` · `object[]` · required
        The document's events, oldest first, at most 100.
        Up to 100 items
        Each item: One event in a document's history. GET /events/{id} returns the full Event.
        - `id` · `string` · required
          Id of the event (evt\_…).
          Pattern: `^evt_[0-9A-Za-z]{22}$`
        - `type` · `string` · required
          What happened: document.created (Tallio accepted a document), document.issued (the tax system accepted it; in Greece it has a MARK), document.rejected (the provider or the tax system refused it), document.failed (Tallio could not deliver it), merchant.created (a merchant was created), connection.created (a merchant was connected to a provider), connection.verified (the provider accepted its credentials), connection.invalid (the provider refused them), connection.disconnected (it was disconnected), connect\_session.completed (a merchant connected through a hosted connect link), webhook\_endpoint.disabled (Tallio disabled an endpoint failing for days), document.retried (a failed document was queued to be sent again), document.credited (a credit note made from the document was issued), document.cancelled (the document was withdrawn or cancelled), document.corrected (a corrected document was made to replace it), document.replaced (a new document was created to replace a rejected or failed one), connection.deleted (a disconnected connection was deleted from the merchant's list), merchant.archived (a merchant was archived: it issues nothing new), merchant.unarchived (an archived merchant was restored), store\_order.updated (a store order's status, reason, handled mark or document changed), document.lifecycle\_updated (the French platform reported a new lifecycle status for an issued document) and connection.updated (a connection's settings changed).
          One of: `document.created`, `document.issued`, `document.rejected`, `document.failed`, `merchant.created`, `connection.created`, `connection.verified`, `connection.invalid`, `connection.disconnected`, `connect_session.completed`, `webhook_endpoint.disabled`, `document.retried`, `document.credited`, `document.cancelled`, `document.corrected`, `document.replaced`, `connection.deleted`, `merchant.archived`, `merchant.unarchived`, `store_order.updated`, `document.lifecycle_updated`, `connection.updated`
        - `created` · `string` · required
          When the event happened.
          Format: `date-time`
      - `issued_at` · `string | null` · required
        When the document was issued (the tax system accepted it); kept if it is cancelled afterwards, null for a document never issued.
        Format: `date-time`
      - `created` · `string` · required
        When Tallio accepted the document.
        Format: `date-time`
      - `updated` · `string` · required
        When the document last changed.
        Format: `date-time`
    - `warnings` · `object[]` · required
      What the merchant should know about the credit note (a rounding cent); empty when there is nothing.
      Each item: Something the merchant should know about the document made for the order; the document was still made.
      - `code` · `string` · required
        What is worth knowing about the document, as a machine code: the store's method used for an unrecognised payment method, a free line left out, a rounding difference, an invoice request not met, or a registered detail not applied.
        One of: `payment_method_default`, `free_line_omitted`, `rounding_difference`, `invoice_requested_invalid_vat`, `invoice_requested_incomplete`, `invoice_customer_is_supplier`, `invoice_request_ambiguous`, `invoice_billing_not_greek`, `invoice_name_from_person`, `invoice_field_truncated`, `invoice_registry_address_not_applied`, `invoice_request_too_late`, `delivery_address_omitted`
      - `detail` · `string` · required
        The warning in a sentence for the merchant.
      - `difference` · `integer | null` · required
        rounding\_difference only: what the customer paid minus the document's gross, in cents (hundredths of the currency), negative when the document is higher; null for every other warning.
        From -9007199254740991 to 9007199254740991
    - `handled` · `string | null` · required
      When the merchant marked the skipped or failed refund handled (POST /store\_orders/{id}/refunds/{refundId}/mark\_handled); null otherwise.
      Format: `date-time`
    - `voided_numbers` · `object[]` · required
      > **Greece:** Always empty.
      
      > **France:** The numbers Tallio numbered the refund's credit note with that no document carries, oldest first, with why; empty otherwise. Each stays a gap in its series, never reused: keep this record of why, since the series must be continuous or each gap justified (CGI ann. II art. 242 nonies A).
      
      Each item: A French number Tallio gave this record that no document carries: kept as a gap in the series.
      - `number` · `string` · required
        The French number left unused.
      - `reason` · `string` · required
        Why the number went unused: handled\_by\_hand (the merchant marked the record handled before an issued document took it: none was made, or the provider rejected the one that carried it), taken (Tallio already held that number for the merchant), not\_issued (the record closed for good, with no document, after it was numbered), replaced (the order was corrected again in place of a correction that was rejected or failed, so never issued under it).
        One of: `handled_by_hand`, `taken`, `not_issued`, `replaced`
    - `action_needed` · `boolean` · required
      Whether the refund waits for the merchant: skipped or failed, not marked handled, and not a skip that needs nothing. A refund waiting for its order's document (original\_not\_issued) is not while the order itself asks; once the order is marked handled it is, and it is credited if the order's document is made.
    - `created` · `string` · required
      When Tallio received the refund.
      Format: `date-time`
  - `handled` · `string | null` · required
    When the merchant marked the skipped or failed order handled (POST /store\_orders/{id}/mark\_handled); null otherwise, and again after a retry.
    Format: `date-time`
  - `voided_numbers` · `object[]` · required
    > **Greece:** Always empty.
    
    > **France:** The numbers Tallio numbered the order's invoice with that no document carries, oldest first, with why; empty otherwise. Each stays a gap in its series, never reused: keep this record of why, since the series must be continuous or each gap justified (CGI ann. II art. 242 nonies A).
    
    Each item: A French number Tallio gave this record that no document carries: kept as a gap in the series.
    - `number` · `string` · required
      The French number left unused.
    - `reason` · `string` · required
      Why the number went unused: handled\_by\_hand (the merchant marked the record handled before an issued document took it: none was made, or the provider rejected the one that carried it), taken (Tallio already held that number for the merchant), not\_issued (the record closed for good, with no document, after it was numbered), replaced (the order was corrected again in place of a correction that was rejected or failed, so never issued under it).
      One of: `handled_by_hand`, `taken`, `not_issued`, `replaced`
  - `action_needed` · `boolean` · required
    Whether the order itself waits for the merchant: skipped or failed, not marked handled, and not a skip that needs nothing (test\_order, no\_lines, sale\_to\_report…). GET /store\_orders?status=action\_needed lists these, and also orders with a refund that waits for the merchant (its own action\_needed).
  - `retryable` · `boolean` · required
    Whether POST /store\_orders/{id}/retry acts on it now: a skip fixed outside the order (provider\_not\_connected, order\_not\_paid, tallio\_refused, number\_taken…), a failed job, or a failed document Tallio can send again, none marked handled. A rejected document is corrected instead.
    > **France:** An invoice held as fr\_numbering\_pending (kept before Tallio numbered store invoices) is retryable even if marked handled: send it again to issue it.
    
  - `correctable` · `boolean` · required
    Whether POST /store\_orders/{id}/correct may act on it now: its document is issued, or was cancelled or credited in full, with no correction yet; or its document is a correction that was rejected or failed (correct again). Not for one partly credited.
    > **France:** Not for an invoice the buyer refused (210) or the platform rejected after issue (213).
    
  - `cancellable` · `boolean` · required
    Whether POST /store\_orders/{id}/cancel may act on it now.
    > **Greece:** Its document is issued, with no correction and no credit note.
    
    > **France:** Never; invoices are never cancelled, only corrected.
    
  - `created` · `string` · required
    When Tallio received the order; a retry of a skip moves it to the retry, since the document is dated by it. A French invoice is dated by the Paris day its number was given instead, which a retry keeps, so the series stays in date order.
    Format: `date-time`

*Example response · 200*

```json
{
  "data": {
    "id": "ord_02y9O8rh7F50tGi0QcWRrx",
    "object": "store_order",
    "merchant": "mer_02y9O8rh7F50tGi0QcWRrx",
    "mode": "live",
    "platform": "shopify",
    "external_id": "1042",
    "number": "1042",
    "status": "pending",
    "reason": null,
    "detail": null,
    "document": {
      "id": "doc_02y9O8rhJKVUXRvojdffcz",
      "object": "document",
      "merchant": "mer_02y9O8rh7F50tGi0QcWRrx",
      "mode": "test",
      "provider": "sandbox",
      "regime": "GR",
      "type": "1.1",
      "number": null,
      "status": "issued",
      "stage": null,
      "issue_date": "2026-10-10",
      "currency": "EUR",
      "net": 2500,
      "vat": 435,
      "gross": 2935,
      "provider_reference": "doc_02y9O8rhJKVUXRvojdffcz",
      "mydata": {
        "mark": "900000000000001",
        "uid": "4E1F0A6C2B9D8E7F6A5B4C3D2E1F0A9B8C7D6E5F",
        "qr_url": "https://sandbox.tallio.invalid/qr/900000000000001",
        "cancellation_mark": null
      },
      "ctc": null,
      "lifecycle": null,
      "lifecycle_history": [],
      "error": null,
      "classification": {
        "source": "default",
        "warnings": [
          "No income classification on line 2; applied the 1.1 default category1_1/E3_561_001. Set it on the line, or as a merchant override, if that is wrong."
        ]
      },
      "external_reference": "#1042",
      "metadata": {
        "order_id": "5520731963508"
      },
      "original_document": null,
      "replaces": null,
      "corrects": null,
      "replaced_by": null,
      "corrected_by": null,
      "credit_notes": [],
      "amount_credited": {
        "net": 0,
        "gross": 0
      },
      "timeline": [
        {
          "id": "evt_02y9O8rhJ2Z2v1fOH2XiSH",
          "type": "document.created",
          "created": "2026-10-11T09:30:00.000Z"
        },
        {
          "id": "evt_02y9O8s1a8ymJqpmAy0nLe",
          "type": "document.issued",
          "created": "2026-10-11T09:30:02.000Z"
        }
      ],
      "issued_at": "2026-10-11T09:30:02.000Z",
      "created": "2026-10-11T09:30:00.000Z",
      "updated": "2026-10-11T09:30:02.000Z"
    },
    "warnings": [],
    "refunds": [],
    "handled": "2026-10-11T09:30:00.000Z",
    "voided_numbers": [],
    "action_needed": false,
    "retryable": false,
    "correctable": false,
    "cancellable": false,
    "created": "2026-10-11T09:30:00.000Z"
  }
}
```

*Response headers*

- `x-request-id` · `string`
  The request's correlation id; quote it when reporting a problem. One of: req\_ plus a uuid (Tallio made it), client: plus the x-request-id you sent (8-128 of A-Z a-z 0-9 . \_ : -), or the hosting platform's id.
  With every response
  Pattern: `^(?:req_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|client:[A-Za-z0-9._:-]{8,128}|[A-Za-z0-9._-]{1,16}::[A-Za-z0-9._:-]{6,110})$`
- `ratelimit-limit` · `integer`
  Requests allowed in the current window for the bucket this request counted against.
  With 200, 400, 404, 409, 413, 415, 429 · At least 1
- `ratelimit-remaining` · `integer`
  Requests left in the current window; 0 means the next one is refused until the window resets.
  With 200, 400, 404, 409, 413, 415, 429 · At least 0
- `ratelimit-reset` · `integer`
  Seconds until the current window resets.
  With 200, 400, 404, 409, 413, 415, 429 · At least 0
- `www-authenticate` · `string`
  The bearer challenge: send a vendor secret key as `Authorization: Bearer <key>`.
  With 401 · Always `Bearer realm="tallio"`
- `retry-after` · `integer`
  Seconds to wait before retrying a request refused with 429 `rate_limited`.
  With 429 · At least 1

*Errors*

| Code | Status | Retryable | Meaning |
| --- | --- | --- | --- |
| `validation_failed` | 400 | No | Request validation failed. |
| `unauthorized` | 401 | No | Authentication is required. |
| `vendor_suspended` | 403 | No | This vendor's access to Tallio is suspended. Its owner can contact Tallio to restore it. |
| `not_found` | 404 | No | The requested resource was not found. |
| `store_url_mismatch` | 409 | No | This store key was granted to another store URL than the one this request names (Tallio-Store-Url). Connect this store again, or confirm that the store moved. |
| `invalid_state` | 409 | No | The object's current state does not allow this request. |
| `merchant_archived` | 409 | No | This merchant is archived: it issues and connects nothing new. Unarchive it first (POST /merchants/{id}/unarchive). |
| `payload_too_large` | 413 | No | The request body is too large. |
| `unsupported_media_type` | 415 | No | The request body must be JSON (Content-Type: application/json). |
| `rate_limited` | 429 | Yes | A rate limit was reached. Retry later. |
| `internal_error` | 500 | No | An unexpected server error occurred. |

## Correct a store order's document

`POST /api/v1/store_orders/{id}/correct`

Replaces the store order's issued document with one mapped from the order you send, as the platform holds it now (edited, or with the buyer's invoice details), dated today, through POST /documents/{id}/correct. The store order then follows the corrected document (pending until the original is taken back) and its later refunds credit it. A correction that was rejected or failed is corrected again the same way, in its place. One correction per document: the same request after a lost answer answers the store order on its correction, and the order's document id in document guards against a stale page. Refused with 409 invalid\_state when correctable is false (not issued yet, partly credited, a French invoice the buyer refused, or the order now maps to no document, the reason in the message). Not counted against a store plan's document limit, but on the Free store plan a live order of a store Tallio has not proven is refused with 403 store\_unproven, as its retry is. Takes no Idempotency-Key: after a lost answer, GET the store order. Recorded in the team's audit log. One correct or cancel runs on an order at a time: another meanwhile is 409 invalid\_state.

> **Greece:** The original is cancelled in myDATA, or credited in full (5.1 or 11.4) where it cannot be cancelled.

> **France:** The original is credited in full with an avoir (381) and a new invoice is issued, both numbered by Tallio from the store settings' prefixes. A number already held in Tallio is 409 already\_exists (it is left unused, and the next request takes the next one).

*Bearer API key*

*Path parameters*

- `id` · `string` · required
  The store order's id (ord\_…).

*Request body*

- `document` · `string` · required
  The document the merchant saw on the order (doc\_…), the order's document now. When the order has moved on to another document since (a correction made meanwhile), 409 invalid\_state, so a stale page never acts on a newer document.
  Pattern: `^doc_[0-9A-Za-z]{22}$`
- `order` · `object` · required
  The order as the platform holds it now, edited, for the same platform and order id: the corrected document is mapped from it, dated today.
  - `platform` · `string` · required
    The platform the order comes from. Not shopify: the Shopify app issues through its own path until it moves onto store orders, so one order is never issued twice.
    One of: `woocommerce`
  - `test` · `boolean` · required
    A test order (a test gateway or test mode): never a fiscal document.
  - `currency` · `string` · required
    ISO 4217 currency of every amount.
    Pattern: `^[A-Z]{3}$`
  - `prices_include_tax` · `boolean` · required
    The store's prices are entered with tax included.
  - `tax_rounding` · `string` · required
    How the platform rounded tax: "line" per line, or "subtotal" once per rate over the order. The total is checked the platform's way: each line's net and tax rounded, or the unrounded lines summed, then rounded.
    One of: `line`, `subtotal`
  - `total` · `string` · required
    The order's total, tax included, at the same moment as its lines: after edits, and (sent to the store orders API) as paid, before any refund. It equals what the lines, shipping and fees add up to with their tax; an order where they differ is refused, never corrected.
    Pattern: `^(0|[1-9]\d{0,12})(\.\d{1,2})?$`
  - `lines` · `object[]` · required
    The products, in the order's order, at the moment total describes.
    Up to 1000 items
    Each item: A product line.
    - `external_id` · `string | null` · required
      The platform's id of the line, which refunds name; null when the platform gave none.
      1 to 64 characters
    - `name` · `string` · required
      The product's name as sold, variation included (Shopify: title - variant).
      Up to 1000 characters
    - `sku` · `string`
      The SKU; describes the line when it has no name.
      Up to 200 characters
    - `product_id` · `string`
      The platform's product id; describes the line when nothing else does.
      Up to 64 characters
    - `quantity` · `string` · required
      Units on the order at the moment the snapshot describes, after edits; 0 for a line edited away. Sent to the store orders API, that moment is the payment: refunds are sent on their own (POST /store\_orders/{id}/refunds).
      Pattern: `^\d{1,9}(\.\d{1,6})?$`
    - `total` · `string` · required
      The line's net amount after discounts, tax excluded.
      Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
    - `taxes` · `object[]` · required
      The line's tax, one share per rate; empty when it is untaxed.
      Up to 10 items
      Each item: One rate's share of a line's tax.
      - `rate_id` · `string` · required
        The platform's id of the tax rate (WooCommerce: the key of the line's taxes; Shopify: the rate).
        1 to 64 characters
      - `rate_percent` · `string` · required
        The rate in percent as text, up to 10 decimals: "24", "5.5". A compound rate is never sent.
        Pattern: `^\d{1,3}(\.\d{1,10})?$`
      - `amount` · `string` · required
        The tax at this rate, unrounded when the platform stores it so; negative only on a negative (discount) line, whose tax WooCommerce stores negative too.
        Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
    - `gift_card` · `boolean` · required
      The line sells a gift card, which is not a sale of goods.
  - `shipping_lines` · `object[]` · required
    The shipping charged after discounts, at the moment total describes.
    Up to 1000 items
    Each item: A shipping line, one unit.
    - `external_id` · `string | null` · required
      The platform's id of the line, which refunds name; null when the platform gave none.
      1 to 64 characters
    - `name` · `string` · required
      The shipping's name as the order shows it.
      Up to 1000 characters
    - `total` · `string` · required
      The shipping's net amount after discounts, tax excluded.
      Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
    - `taxes` · `object[]` · required
      The shipping's tax, one share per rate; empty when it is untaxed.
      Up to 10 items
      Each item: One rate's share of a line's tax.
      - `rate_id` · `string` · required
        The platform's id of the tax rate (WooCommerce: the key of the line's taxes; Shopify: the rate).
        1 to 64 characters
      - `rate_percent` · `string` · required
        The rate in percent as text, up to 10 decimals: "24", "5.5". A compound rate is never sent.
        Pattern: `^\d{1,3}(\.\d{1,10})?$`
      - `amount` · `string` · required
        The tax at this rate, unrounded when the platform stores it so; negative only on a negative (discount) line, whose tax WooCommerce stores negative too.
        Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
  - `fee_lines` · `object[]` · required
    Other charges, such as a cash-on-delivery fee, at the moment total describes.
    Up to 1000 items
    Each item: A fee line, one unit.
    - `external_id` · `string | null` · required
      The platform's id of the line, which refunds name; null when the platform gave none.
      1 to 64 characters
    - `name` · `string` · required
      The fee's name as the order shows it.
      Up to 1000 characters
    - `total` · `string` · required
      The fee's net amount after discounts, tax excluded.
      Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
    - `taxes` · `object[]` · required
      The fee's tax, one share per rate; empty when it is untaxed.
      Up to 10 items
      Each item: One rate's share of a line's tax.
      - `rate_id` · `string` · required
        The platform's id of the tax rate (WooCommerce: the key of the line's taxes; Shopify: the rate).
        1 to 64 characters
      - `rate_percent` · `string` · required
        The rate in percent as text, up to 10 decimals: "24", "5.5". A compound rate is never sent.
        Pattern: `^\d{1,3}(\.\d{1,10})?$`
      - `amount` · `string` · required
        The tax at this rate, unrounded when the platform stores it so; negative only on a negative (discount) line, whose tax WooCommerce stores negative too.
        Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
  - `coupons` · `object[]` · required
    The coupons used, for display only: their discounts are already in the lines' totals.
    Up to 1000 items
    Each item: A coupon.
    - `code` · `string` · required
      The coupon code.
      Up to 200 characters
  - `billing` · `object`
    The billing address: it names and locates an invoice's buyer.
    - `country` · `string`
      ISO 3166-1 alpha-2 country code.
      Pattern: `^[A-Z]{2}$`
    - `address_1` · `string`
      Street and number.
      Up to 500 characters
    - `city` · `string`
      City.
      Up to 200 characters
    - `postcode` · `string`
      Postal code.
      Up to 50 characters
    - `company` · `string`
      Company name.
      Up to 500 characters
    - `name` · `string`
      The billing person's full name, when the platform keeps one.
      Up to 500 characters
    - `first_name` · `string`
      First name.
      Up to 200 characters
    - `last_name` · `string`
      Last name.
      Up to 200 characters
  - `shipping` · `object`
    The shipping address; the sale is taxed in its country, else the billing country.
    - `country` · `string`
      ISO 3166-1 alpha-2 country code.
      Pattern: `^[A-Z]{2}$`
    - `address_1` · `string`
      Street and number.
      Up to 500 characters
    - `city` · `string`
      City.
      Up to 200 characters
    - `postcode` · `string`
      Postal code.
      Up to 50 characters
  - `payment_gateways` · `object[]` · required
    The gateways that took the payment; one for most orders.
    Up to 10 items
    Each item: A payment gateway the order was paid through.
    - `id` · `string` · required
      The gateway's id (WooCommerce: cod, bacs, stripe; Shopify: its gateway name).
      1 to 200 characters
    - `title` · `string` · required
      The gateway's name as the buyer saw it.
      Up to 200 characters
  - `invoice_request` · `object`
    What the checkout captured of a buyer's request for an invoice. A platform that captures each field once sends one value each; Shopify's cart attributes may repeat.
    - `requested` · `string[]` · required
      Every value the checkout captured for "I need an invoice" ("true", "yes", "false"); distinct values disagree, and no invoice is guessed.
      Up to 10 items
      Each item: Up to 200 characters
    - `vat_numbers` · `string[]` · required
      Every value the checkout captured for the buyer's VAT number (ΑΦΜ, SIREN, SIRET or EU VAT number); distinct values disagree, and no invoice is guessed.
      Up to 10 items
      Each item: Up to 200 characters
    - `company_names` · `string[]` · required
      Every value the checkout captured for the buyer's company name; distinct values disagree, and no invoice is guessed.
      Up to 10 items
      Each item: Up to 200 characters
  - `platform_version` · `string` · required
    The platform's version ("11.2.1"), logged, never branched on.
    1 to 50 characters
  - `external_id` · `string` · required
    The platform's order id.
    1 to 64 characters
  - `number` · `string` · required
    The order number the merchant knows it by ("1042", "#1042").
    1 to 64 characters
  - `created_at` · `string` · required
    When the order was placed.
    Format: `date-time`
  - `paid_at` · `string | null` · required
    When it was paid; null while unpaid.
    Format: `date-time`
  - `cancelled` · `boolean` · required
    The order was cancelled: it is kept and skipped as order\_cancelled.
  - `refunded_total` · `string` · required
    What was already refunded on the order when the snapshot was taken ("0" for nothing). An order refunded in part before its document is issued as paid, and each refund is credited after it; one refunded in full is skipped as refunded\_before\_issue (nothing was sold).
    Pattern: `^(0|[1-9]\d{0,12})(\.\d{1,2})?$`

*Request*

*JSON*

```json
{
  "document": "doc_02y9O8rh7F50tGi0QcWRrx",
  "order": {
    "platform": "woocommerce",
    "test": false,
    "currency": "EUR",
    "prices_include_tax": false,
    "tax_rounding": "line",
    "total": "81.41",
    "lines": [],
    "shipping_lines": [],
    "fee_lines": [],
    "coupons": [],
    "payment_gateways": [],
    "platform_version": "string",
    "external_id": "string",
    "number": "string",
    "created_at": "2026-10-11T09:30:00.000Z",
    "paid_at": "2026-10-11T09:31:00.000Z",
    "cancelled": false,
    "refunded_total": "81.41"
  }
}
```

*curl*

```bash
curl -X POST 'https://tallio.dev/api/v1/store_orders/ord_02y9O8rh7F50tGi0QcWRrx/correct' \
  -H "Authorization: Bearer $TALLIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "document": "doc_02y9O8rh7F50tGi0QcWRrx",
  "order": {
    "platform": "woocommerce",
    "test": false,
    "currency": "EUR",
    "prices_include_tax": false,
    "tax_rounding": "line",
    "total": "81.41",
    "lines": [],
    "shipping_lines": [],
    "fee_lines": [],
    "coupons": [],
    "payment_gateways": [],
    "platform_version": "string",
    "external_id": "string",
    "number": "string",
    "created_at": "2026-10-11T09:30:00.000Z",
    "paid_at": "2026-10-11T09:31:00.000Z",
    "cancelled": false,
    "refunded_total": "81.41"
  }
}'
```

*TypeScript SDK*

```ts
import { createTallioClient, unwrap } from "@tallio-dev/sdk";

const tallio = createTallioClient({
  apiKey: process.env.TALLIO_API_KEY!,
  baseUrl: "https://tallio.dev",
});

const result = await unwrap(tallio.http.POST("/api/v1/store_orders/{id}/correct", {
  params: {
    path: {
      id: "ord_02y9O8rh7F50tGi0QcWRrx",
    },
  },
  body: {
    document: "doc_02y9O8rh7F50tGi0QcWRrx",
    order: {
      platform: "woocommerce",
      test: false,
      currency: "EUR",
      prices_include_tax: false,
      tax_rounding: "line",
      total: "81.41",
      lines: [],
      shipping_lines: [],
      fee_lines: [],
      coupons: [],
      payment_gateways: [],
      platform_version: "string",
      external_id: "string",
      number: "string",
      created_at: "2026-10-11T09:30:00.000Z",
      paid_at: "2026-10-11T09:31:00.000Z",
      cancelled: false,
      refunded_total: "81.41",
    },
  },
}));
```

*Responses*

| Status | Description |
| --- | --- |
| `200` | The store order, on its corrected document. |
| 4XX, 5XX | An error: see Errors below. |

*Response body · 200*

- `data` · `object` · required
  A shop order sent to Tallio, and the document it became.
  - `id` · `string` · required
    Id of the store order (ord\_…).
    Pattern: `^ord_[0-9A-Za-z]{22}$`
  - `object` · `string` · required
    Always "store\_order".
    Always `store_order`
  - `merchant` · `string` · required
    Id of the merchant (mer\_…).
    Pattern: `^mer_[0-9A-Za-z]{22}$`
  - `mode` · `string` · required
    live for an order sent with a live key, test for a test key.
    One of: `live`, `test`
  - `platform` · `string` · required
    The platform the order comes from.
    One of: `shopify`, `woocommerce`
  - `external_id` · `string` · required
    The platform's id of the order.
    1 to 64 characters
  - `number` · `string` · required
    The order number the merchant and the buyer see.
  - `status` · `string` · required
    pending (received, not yet mapped), skipped (it maps to no document: see reason), sent (its document was created and is on its way to the provider), issued (the document was issued), failed (the document was rejected, failed or cancelled, or Tallio could not create it: see reason).
    One of: `pending`, `skipped`, `sent`, `issued`, `failed`
  - `reason` · `string | null` · required
    Why the order is skipped or failed, as a machine code; null otherwise.
  - `detail` · `string | null` · required
    The reason in a sentence for the merchant; null when there is no reason.
  - `document` · `object | null` · required
    The document issued for the order, once one was created; null before.
    - `id` · `string` · required
      Id of the document (doc\_…).
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `object` · `string` · required
      Always "document".
      Always `document`
    - `merchant` · `string` · required
      Id of the merchant (mer\_…).
      Pattern: `^mer_[0-9A-Za-z]{22}$`
    - `mode` · `string` · required
      live for a document created with a live key, test for a test key.
      One of: `live`, `test`
    - `provider` · `string` · required
      The licensed e-invoicing provider (a Greek provider, direct myDATA, a French plateforme agréée, Chorus Pro for a French public-sector buyer, or Tallio's sandbox) that issues the document.
      One of: `sandbox`, `mydata`, `wrapp`, `impact`, `epsilon`, `softone`, `prosvasis`, `superpdp`, `choruspro`, `b2brouter`, `oxygen`, `iopole`, `qonto`, `elorus`, `timologisi`
    - `regime` · `string` · required
      Tax regime the document is issued under, by country: GR (Greece, myDATA) or FR (France, e-invoicing through a plateforme agréée).
      One of: `GR`, `FR` · Default: `GR`
    - `type` · `string` · required
      Document type, by regime.
      > **Greece:** An AADE myDATA type (e.g. 1.1).
      
      > **France:** A UNTDID 1001 code (e.g. 380).
      
      One of: `380`, `381`, `384`, `386`, `1.1`, `2.1`, `5.1`, `5.2`, `11.1`, `11.2`, `11.4`, `2.2`, `2.3`
    - `number` · `string | null` · required
      The document's number.
      > **Greece:** The provider's number in its series (e.g. ΕΑΛΠ-1), null until it assigns one: a display label, not unique, so identify a document by its id.
      
      > **France:** The number you assigned (set once issued).
      
      Default: `null`
    - `status` · `string` · required
      Where the document stands: pending (Tallio accepted it; not yet issued, see stage), issued (the tax system accepted it; in Greece it has a MARK), rejected (the provider or the tax system refused it), failed (Tallio could not deliver it to the provider), cancelled (withdrawn before it was sent, or cancelled in myDATA after issue: see mydata.cancellation\_mark).
      One of: `pending`, `issued`, `rejected`, `failed`, `cancelled`
    - `stage` · `string | null` · required
      Where a pending document is (queued, submitting, awaiting\_confirmation, reconciling); null unless status is pending.
      One of: `queued`, `submitting`, `awaiting_confirmation`, `reconciling`
    - `issue_date` · `string` · required
      Issue date, YYYY-MM-DD.
      Format: `date`
    - `currency` · `string` · required
      ISO 4217 currency of the amounts.
      > **Greece:** EUR.
      
      > **France:** Any with cents.
      
      Pattern: `^[A-Z]{3}$`
    - `net` · `integer` · required
      Sum of the lines' net amounts, in minor units, at most 1000000000000000.
      From 0 to 1000000000000000
    - `vat` · `integer` · required
      Sum of the lines' VAT, each line rounded half up to the minor unit, in minor units, at most 1000000000000000.
      From 0 to 1000000000000000
    - `gross` · `integer` · required
      net + vat, in minor units, at most 1250000000000000.
      From 0 to 1250000000000000
    - `provider_reference` · `string | null` · required
      The provider's own reference for the document, once it has taken it; null before.
    - `mydata` · `object | null` · required
      myDATA's identity of the document: an object in GR, null in any other regime.
      - `mark` · `string | null` · required
        MARK (AADE registration number) once issued, as a digit string; null before. A cancelled document keeps the MARK it was issued with (null when it was withdrawn before it was sent).
        Pattern: `^[1-9]\d{0,18}$`
      - `uid` · `string | null` · required
        myDATA uid: the SHA-1 (40 upper-case hex digits) AADE derives from the document's identifiers; null until known.
        Pattern: `^[0-9A-F]{40}$`
      - `qr_url` · `string | null` · required
        URL the document's QR code points to; null until the provider returns one.
        Format: `uri`
      - `cancellation_mark` · `string | null` · required
        The MARK of the cancellation in myDATA, once an issued document is cancelled; null otherwise.
        Pattern: `^[1-9]\d{0,18}$`
    - `ctc` · `object | null` · required
      The French e-invoicing platform's identity of the document: an object in FR, null in any other regime.
      - `platform_id` · `string | null` · required
        The plateforme agréée carrying the document (sandbox in test mode); null until it has taken it.
      - `flow_id` · `string | null` · required
        The platform's id of the flow that carried the document; null until it reports one.
    - `lifecycle` · `object | null` · required
      The tax regime's status for the document once sent.
      > **Greece:** Always null.
      
      > **France:** Null until the platform reports one.
      
      Default: `null`
      - `key` · `string` · required
        Where the document is after issue, in GOBL's bill.Status keys.
        One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
      - `code` · `string` · required
        The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
        1 to 20 characters
      - `at` · `string` · required
        When the regime's platform reported this status.
        Format: `date-time`
    - `lifecycle_history` · `object[]` · required
      Every lifecycle status reported for the document, oldest first, at most the newest 30; the last is lifecycle. Empty in GR. A status after issue (a buyer's 210 Refusée, the platform's 213 Rejetée) never changes status: an issued document stays issued.
      Up to 30 items · Default: `[]`
      Each item: One lifecycle status the tax regime's platform reported for the document.
      - `key` · `string` · required
        Where the document is after issue, in GOBL's bill.Status keys.
        One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
      - `code` · `string` · required
        The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
        1 to 20 characters
      - `at` · `string` · required
        When the regime's platform reported this status.
        Format: `date-time`
      - `provider_status` · `string | null` · required
        The provider's own status the code was read from (e.g. refused, REJETEE, fr:210); null if it gave none.
        1 to 64 characters
        Pattern: `^[A-Za-z0-9_.:-]+$`
      - `reason` · `string | null` · required
        The platform's reason code for a refusal, dispute or rejection, when it reports one; null otherwise. Free-text reasons are not kept.
        1 to 64 characters
        Pattern: `^[A-Za-z0-9_.:-]+$`
    - `error` · `object | null` · required
      Why the document was rejected or failed; null otherwise.
      - `code` · `string` · required
        Stable machine-readable error code. Branch on this, never on `message`.
        One of: `validation_failed`, `unauthorized`, `not_found`, `idempotency_conflict`, `idempotency_in_progress`, `already_exists`, `invalid_grant`, `store_url_mismatch`, `invalid_state`, `already_issued`, `connection_not_disconnected`, `merchant_archived`, `cursor_not_listed`, `payload_too_large`, `unsupported_media_type`, `rate_limited`, `too_many_pending_erasures`, `forbidden`, `restricted_key`, `vendor_suspended`, `subscription_required`, `store_plan_live_only`, `store_unproven`, `not_supported`, `regime_mismatch`, `supplier_mismatch`, `connection_unavailable`, `connection_unconfirmed`, `provider_credentials_invalid`, `provider_rejected`, `balance_exceeded`, `credit_required`, `provider_unavailable`, `pdf_not_ready`, `service_unavailable`, `internal_error`
      - `message` · `string` · required
        Tallio's own explanation, safe to show to a developer; the provider's words are in provider\_message.
      - `provider_code` · `string | null` · required
        The provider's own error code, or null when the error did not come from a provider.
      - `provider_message` · `string | null` · required
        The provider's own error message, verbatim, or null when the error did not come from a provider. On a document or connection it is removed (null), like provider\_raw, once the retention window ends or by a data-subject erasure.
      - `retryable` · `boolean` · required
        True when the same request may succeed if sent again later.
      - `provider_raw` · `any`
        The provider's error response body as received, or a TruncatedProviderRaw marker when it exceeds 4096 bytes of JSON. Never holds request headers, credentials or the request payload.
    - `classification` · `object` · required
      How the document was classified for myDATA.
      - `source` · `string` · required
        default when any line took Tallio's default, else override when any line took the merchant's override, else line.
        One of: `line`, `override`, `default`
      - `warnings` · `string[]` · required
        What to check before issuing, e.g. that defaults were applied.
    - `external_reference` · `string | null` · required
      Your own reference for the document, or null.
      Default: `null`
    - `metadata` · `object` · required
      Up to 50 key-value pairs of your own (keys up to 40 characters, values up to 500). Do not put personal data in it.
      Default: `{}`
      - `{key}` · `string`
        A value, up to 500 characters.
        1 to 40 characters
    - `original_document` · `string | null` · required
      For a credit note made from a Tallio document: that document (doc\_…). Null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `replaces` · `string | null` · required
      The rejected or failed document this one was issued to replace, or null.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `corrects` · `string | null` · required
      The issued document this one corrects, or null.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `replaced_by` · `string | null` · required
      The document created to replace this rejected or failed one, the live one if there were several; null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `corrected_by` · `string | null` · required
      The document made to correct this one (POST /documents/{id}/correct), the latest if there were several; null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `credit_notes` · `string[]` · required
      Credit notes made from this document, oldest first, at most 100.
      Up to 100 items · Default: `[]`
      Each item: Id of the document (doc\_…).
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `amount_credited` · `object` · required
      What credit notes made from this document take, pending ones included. Zero when there are none.
      Default: `{"net":0,"gross":0}`
      - `net` · `integer` · required
        Net amount credited, in cents.
        From 0 to 9007199254740991
      - `gross` · `integer` · required
        Gross amount credited, in cents.
        From 0 to 9007199254740991
    - `timeline` · `object[]` · required
      The document's events, oldest first, at most 100.
      Up to 100 items
      Each item: One event in a document's history. GET /events/{id} returns the full Event.
      - `id` · `string` · required
        Id of the event (evt\_…).
        Pattern: `^evt_[0-9A-Za-z]{22}$`
      - `type` · `string` · required
        What happened: document.created (Tallio accepted a document), document.issued (the tax system accepted it; in Greece it has a MARK), document.rejected (the provider or the tax system refused it), document.failed (Tallio could not deliver it), merchant.created (a merchant was created), connection.created (a merchant was connected to a provider), connection.verified (the provider accepted its credentials), connection.invalid (the provider refused them), connection.disconnected (it was disconnected), connect\_session.completed (a merchant connected through a hosted connect link), webhook\_endpoint.disabled (Tallio disabled an endpoint failing for days), document.retried (a failed document was queued to be sent again), document.credited (a credit note made from the document was issued), document.cancelled (the document was withdrawn or cancelled), document.corrected (a corrected document was made to replace it), document.replaced (a new document was created to replace a rejected or failed one), connection.deleted (a disconnected connection was deleted from the merchant's list), merchant.archived (a merchant was archived: it issues nothing new), merchant.unarchived (an archived merchant was restored), store\_order.updated (a store order's status, reason, handled mark or document changed), document.lifecycle\_updated (the French platform reported a new lifecycle status for an issued document) and connection.updated (a connection's settings changed).
        One of: `document.created`, `document.issued`, `document.rejected`, `document.failed`, `merchant.created`, `connection.created`, `connection.verified`, `connection.invalid`, `connection.disconnected`, `connect_session.completed`, `webhook_endpoint.disabled`, `document.retried`, `document.credited`, `document.cancelled`, `document.corrected`, `document.replaced`, `connection.deleted`, `merchant.archived`, `merchant.unarchived`, `store_order.updated`, `document.lifecycle_updated`, `connection.updated`
      - `created` · `string` · required
        When the event happened.
        Format: `date-time`
    - `issued_at` · `string | null` · required
      When the document was issued (the tax system accepted it); kept if it is cancelled afterwards, null for a document never issued.
      Format: `date-time`
    - `created` · `string` · required
      When Tallio accepted the document.
      Format: `date-time`
    - `updated` · `string` · required
      When the document last changed.
      Format: `date-time`
  - `warnings` · `object[]` · required
    What the merchant should know about the order's document (a rounding cent, a free line left off, the store's default payment method); empty when there is nothing, or before the order is mapped.
    Each item: Something the merchant should know about the document made for the order; the document was still made.
    - `code` · `string` · required
      What is worth knowing about the document, as a machine code: the store's method used for an unrecognised payment method, a free line left out, a rounding difference, an invoice request not met, or a registered detail not applied.
      One of: `payment_method_default`, `free_line_omitted`, `rounding_difference`, `invoice_requested_invalid_vat`, `invoice_requested_incomplete`, `invoice_customer_is_supplier`, `invoice_request_ambiguous`, `invoice_billing_not_greek`, `invoice_name_from_person`, `invoice_field_truncated`, `invoice_registry_address_not_applied`, `invoice_request_too_late`, `delivery_address_omitted`
    - `detail` · `string` · required
      The warning in a sentence for the merchant.
    - `difference` · `integer | null` · required
      rounding\_difference only: what the customer paid minus the document's gross, in cents (hundredths of the currency), negative when the document is higher; null for every other warning.
      From -9007199254740991 to 9007199254740991
  - `refunds` · `object[]` · required
    The order's refunds sent with POST /store\_orders/{id}/refunds, oldest first, each with its credit note once one was created; empty when there are none.
    Each item: A store order's refund sent to Tallio, and the credit note it became.
    - `id` · `string` · required
      Id of the store refund (ref\_…).
      Pattern: `^ref_[0-9A-Za-z]{22}$`
    - `object` · `string` · required
      Always "store\_refund".
      Always `store_refund`
    - `merchant` · `string` · required
      Id of the merchant (mer\_…).
      Pattern: `^mer_[0-9A-Za-z]{22}$`
    - `store_order` · `string` · required
      The store order it refunds (ord\_…).
      Pattern: `^ord_[0-9A-Za-z]{22}$`
    - `external_id` · `string` · required
      The platform's id of the refund.
    - `status` · `string` · required
      pending (received, or waiting for the order's document to be issued), skipped (it maps to no credit note: see reason), sent (its credit note was created and is on its way to the provider), issued (the credit note was issued), failed (the credit note was rejected, failed or cancelled, or Tallio could not create it: see reason).
      One of: `pending`, `skipped`, `sent`, `issued`, `failed`
    - `reason` · `string | null` · required
      Why the refund is skipped or failed, as a machine code; null otherwise.
    - `detail` · `string | null` · required
      The reason in a sentence for the merchant; null when there is no reason.
    - `document` · `object | null` · required
      The credit note issued for the refund, linked to the order's document, once one was created; null before.
      - `id` · `string` · required
        Id of the document (doc\_…).
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `object` · `string` · required
        Always "document".
        Always `document`
      - `merchant` · `string` · required
        Id of the merchant (mer\_…).
        Pattern: `^mer_[0-9A-Za-z]{22}$`
      - `mode` · `string` · required
        live for a document created with a live key, test for a test key.
        One of: `live`, `test`
      - `provider` · `string` · required
        The licensed e-invoicing provider (a Greek provider, direct myDATA, a French plateforme agréée, Chorus Pro for a French public-sector buyer, or Tallio's sandbox) that issues the document.
        One of: `sandbox`, `mydata`, `wrapp`, `impact`, `epsilon`, `softone`, `prosvasis`, `superpdp`, `choruspro`, `b2brouter`, `oxygen`, `iopole`, `qonto`, `elorus`, `timologisi`
      - `regime` · `string` · required
        Tax regime the document is issued under, by country: GR (Greece, myDATA) or FR (France, e-invoicing through a plateforme agréée).
        One of: `GR`, `FR` · Default: `GR`
      - `type` · `string` · required
        Document type, by regime.
        > **Greece:** An AADE myDATA type (e.g. 1.1).
        
        > **France:** A UNTDID 1001 code (e.g. 380).
        
        One of: `380`, `381`, `384`, `386`, `1.1`, `2.1`, `5.1`, `5.2`, `11.1`, `11.2`, `11.4`, `2.2`, `2.3`
      - `number` · `string | null` · required
        The document's number.
        > **Greece:** The provider's number in its series (e.g. ΕΑΛΠ-1), null until it assigns one: a display label, not unique, so identify a document by its id.
        
        > **France:** The number you assigned (set once issued).
        
        Default: `null`
      - `status` · `string` · required
        Where the document stands: pending (Tallio accepted it; not yet issued, see stage), issued (the tax system accepted it; in Greece it has a MARK), rejected (the provider or the tax system refused it), failed (Tallio could not deliver it to the provider), cancelled (withdrawn before it was sent, or cancelled in myDATA after issue: see mydata.cancellation\_mark).
        One of: `pending`, `issued`, `rejected`, `failed`, `cancelled`
      - `stage` · `string | null` · required
        Where a pending document is (queued, submitting, awaiting\_confirmation, reconciling); null unless status is pending.
        One of: `queued`, `submitting`, `awaiting_confirmation`, `reconciling`
      - `issue_date` · `string` · required
        Issue date, YYYY-MM-DD.
        Format: `date`
      - `currency` · `string` · required
        ISO 4217 currency of the amounts.
        > **Greece:** EUR.
        
        > **France:** Any with cents.
        
        Pattern: `^[A-Z]{3}$`
      - `net` · `integer` · required
        Sum of the lines' net amounts, in minor units, at most 1000000000000000.
        From 0 to 1000000000000000
      - `vat` · `integer` · required
        Sum of the lines' VAT, each line rounded half up to the minor unit, in minor units, at most 1000000000000000.
        From 0 to 1000000000000000
      - `gross` · `integer` · required
        net + vat, in minor units, at most 1250000000000000.
        From 0 to 1250000000000000
      - `provider_reference` · `string | null` · required
        The provider's own reference for the document, once it has taken it; null before.
      - `mydata` · `object | null` · required
        myDATA's identity of the document: an object in GR, null in any other regime.
        - `mark` · `string | null` · required
          MARK (AADE registration number) once issued, as a digit string; null before. A cancelled document keeps the MARK it was issued with (null when it was withdrawn before it was sent).
          Pattern: `^[1-9]\d{0,18}$`
        - `uid` · `string | null` · required
          myDATA uid: the SHA-1 (40 upper-case hex digits) AADE derives from the document's identifiers; null until known.
          Pattern: `^[0-9A-F]{40}$`
        - `qr_url` · `string | null` · required
          URL the document's QR code points to; null until the provider returns one.
          Format: `uri`
        - `cancellation_mark` · `string | null` · required
          The MARK of the cancellation in myDATA, once an issued document is cancelled; null otherwise.
          Pattern: `^[1-9]\d{0,18}$`
      - `ctc` · `object | null` · required
        The French e-invoicing platform's identity of the document: an object in FR, null in any other regime.
        - `platform_id` · `string | null` · required
          The plateforme agréée carrying the document (sandbox in test mode); null until it has taken it.
        - `flow_id` · `string | null` · required
          The platform's id of the flow that carried the document; null until it reports one.
      - `lifecycle` · `object | null` · required
        The tax regime's status for the document once sent.
        > **Greece:** Always null.
        
        > **France:** Null until the platform reports one.
        
        Default: `null`
        - `key` · `string` · required
          Where the document is after issue, in GOBL's bill.Status keys.
          One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
        - `code` · `string` · required
          The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
          1 to 20 characters
        - `at` · `string` · required
          When the regime's platform reported this status.
          Format: `date-time`
      - `lifecycle_history` · `object[]` · required
        Every lifecycle status reported for the document, oldest first, at most the newest 30; the last is lifecycle. Empty in GR. A status after issue (a buyer's 210 Refusée, the platform's 213 Rejetée) never changes status: an issued document stays issued.
        Up to 30 items · Default: `[]`
        Each item: One lifecycle status the tax regime's platform reported for the document.
        - `key` · `string` · required
          Where the document is after issue, in GOBL's bill.Status keys.
          One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
        - `code` · `string` · required
          The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
          1 to 20 characters
        - `at` · `string` · required
          When the regime's platform reported this status.
          Format: `date-time`
        - `provider_status` · `string | null` · required
          The provider's own status the code was read from (e.g. refused, REJETEE, fr:210); null if it gave none.
          1 to 64 characters
          Pattern: `^[A-Za-z0-9_.:-]+$`
        - `reason` · `string | null` · required
          The platform's reason code for a refusal, dispute or rejection, when it reports one; null otherwise. Free-text reasons are not kept.
          1 to 64 characters
          Pattern: `^[A-Za-z0-9_.:-]+$`
      - `error` · `object | null` · required
        Why the document was rejected or failed; null otherwise.
        - `code` · `string` · required
          Stable machine-readable error code. Branch on this, never on `message`.
          One of: `validation_failed`, `unauthorized`, `not_found`, `idempotency_conflict`, `idempotency_in_progress`, `already_exists`, `invalid_grant`, `store_url_mismatch`, `invalid_state`, `already_issued`, `connection_not_disconnected`, `merchant_archived`, `cursor_not_listed`, `payload_too_large`, `unsupported_media_type`, `rate_limited`, `too_many_pending_erasures`, `forbidden`, `restricted_key`, `vendor_suspended`, `subscription_required`, `store_plan_live_only`, `store_unproven`, `not_supported`, `regime_mismatch`, `supplier_mismatch`, `connection_unavailable`, `connection_unconfirmed`, `provider_credentials_invalid`, `provider_rejected`, `balance_exceeded`, `credit_required`, `provider_unavailable`, `pdf_not_ready`, `service_unavailable`, `internal_error`
        - `message` · `string` · required
          Tallio's own explanation, safe to show to a developer; the provider's words are in provider\_message.
        - `provider_code` · `string | null` · required
          The provider's own error code, or null when the error did not come from a provider.
        - `provider_message` · `string | null` · required
          The provider's own error message, verbatim, or null when the error did not come from a provider. On a document or connection it is removed (null), like provider\_raw, once the retention window ends or by a data-subject erasure.
        - `retryable` · `boolean` · required
          True when the same request may succeed if sent again later.
        - `provider_raw` · `any`
          The provider's error response body as received, or a TruncatedProviderRaw marker when it exceeds 4096 bytes of JSON. Never holds request headers, credentials or the request payload.
      - `classification` · `object` · required
        How the document was classified for myDATA.
        - `source` · `string` · required
          default when any line took Tallio's default, else override when any line took the merchant's override, else line.
          One of: `line`, `override`, `default`
        - `warnings` · `string[]` · required
          What to check before issuing, e.g. that defaults were applied.
      - `external_reference` · `string | null` · required
        Your own reference for the document, or null.
        Default: `null`
      - `metadata` · `object` · required
        Up to 50 key-value pairs of your own (keys up to 40 characters, values up to 500). Do not put personal data in it.
        Default: `{}`
        - `{key}` · `string`
          A value, up to 500 characters.
          1 to 40 characters
      - `original_document` · `string | null` · required
        For a credit note made from a Tallio document: that document (doc\_…). Null otherwise.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `replaces` · `string | null` · required
        The rejected or failed document this one was issued to replace, or null.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `corrects` · `string | null` · required
        The issued document this one corrects, or null.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `replaced_by` · `string | null` · required
        The document created to replace this rejected or failed one, the live one if there were several; null otherwise.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `corrected_by` · `string | null` · required
        The document made to correct this one (POST /documents/{id}/correct), the latest if there were several; null otherwise.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `credit_notes` · `string[]` · required
        Credit notes made from this document, oldest first, at most 100.
        Up to 100 items · Default: `[]`
        Each item: Id of the document (doc\_…).
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `amount_credited` · `object` · required
        What credit notes made from this document take, pending ones included. Zero when there are none.
        Default: `{"net":0,"gross":0}`
        - `net` · `integer` · required
          Net amount credited, in cents.
          From 0 to 9007199254740991
        - `gross` · `integer` · required
          Gross amount credited, in cents.
          From 0 to 9007199254740991
      - `timeline` · `object[]` · required
        The document's events, oldest first, at most 100.
        Up to 100 items
        Each item: One event in a document's history. GET /events/{id} returns the full Event.
        - `id` · `string` · required
          Id of the event (evt\_…).
          Pattern: `^evt_[0-9A-Za-z]{22}$`
        - `type` · `string` · required
          What happened: document.created (Tallio accepted a document), document.issued (the tax system accepted it; in Greece it has a MARK), document.rejected (the provider or the tax system refused it), document.failed (Tallio could not deliver it), merchant.created (a merchant was created), connection.created (a merchant was connected to a provider), connection.verified (the provider accepted its credentials), connection.invalid (the provider refused them), connection.disconnected (it was disconnected), connect\_session.completed (a merchant connected through a hosted connect link), webhook\_endpoint.disabled (Tallio disabled an endpoint failing for days), document.retried (a failed document was queued to be sent again), document.credited (a credit note made from the document was issued), document.cancelled (the document was withdrawn or cancelled), document.corrected (a corrected document was made to replace it), document.replaced (a new document was created to replace a rejected or failed one), connection.deleted (a disconnected connection was deleted from the merchant's list), merchant.archived (a merchant was archived: it issues nothing new), merchant.unarchived (an archived merchant was restored), store\_order.updated (a store order's status, reason, handled mark or document changed), document.lifecycle\_updated (the French platform reported a new lifecycle status for an issued document) and connection.updated (a connection's settings changed).
          One of: `document.created`, `document.issued`, `document.rejected`, `document.failed`, `merchant.created`, `connection.created`, `connection.verified`, `connection.invalid`, `connection.disconnected`, `connect_session.completed`, `webhook_endpoint.disabled`, `document.retried`, `document.credited`, `document.cancelled`, `document.corrected`, `document.replaced`, `connection.deleted`, `merchant.archived`, `merchant.unarchived`, `store_order.updated`, `document.lifecycle_updated`, `connection.updated`
        - `created` · `string` · required
          When the event happened.
          Format: `date-time`
      - `issued_at` · `string | null` · required
        When the document was issued (the tax system accepted it); kept if it is cancelled afterwards, null for a document never issued.
        Format: `date-time`
      - `created` · `string` · required
        When Tallio accepted the document.
        Format: `date-time`
      - `updated` · `string` · required
        When the document last changed.
        Format: `date-time`
    - `warnings` · `object[]` · required
      What the merchant should know about the credit note (a rounding cent); empty when there is nothing.
      Each item: Something the merchant should know about the document made for the order; the document was still made.
      - `code` · `string` · required
        What is worth knowing about the document, as a machine code: the store's method used for an unrecognised payment method, a free line left out, a rounding difference, an invoice request not met, or a registered detail not applied.
        One of: `payment_method_default`, `free_line_omitted`, `rounding_difference`, `invoice_requested_invalid_vat`, `invoice_requested_incomplete`, `invoice_customer_is_supplier`, `invoice_request_ambiguous`, `invoice_billing_not_greek`, `invoice_name_from_person`, `invoice_field_truncated`, `invoice_registry_address_not_applied`, `invoice_request_too_late`, `delivery_address_omitted`
      - `detail` · `string` · required
        The warning in a sentence for the merchant.
      - `difference` · `integer | null` · required
        rounding\_difference only: what the customer paid minus the document's gross, in cents (hundredths of the currency), negative when the document is higher; null for every other warning.
        From -9007199254740991 to 9007199254740991
    - `handled` · `string | null` · required
      When the merchant marked the skipped or failed refund handled (POST /store\_orders/{id}/refunds/{refundId}/mark\_handled); null otherwise.
      Format: `date-time`
    - `voided_numbers` · `object[]` · required
      > **Greece:** Always empty.
      
      > **France:** The numbers Tallio numbered the refund's credit note with that no document carries, oldest first, with why; empty otherwise. Each stays a gap in its series, never reused: keep this record of why, since the series must be continuous or each gap justified (CGI ann. II art. 242 nonies A).
      
      Each item: A French number Tallio gave this record that no document carries: kept as a gap in the series.
      - `number` · `string` · required
        The French number left unused.
      - `reason` · `string` · required
        Why the number went unused: handled\_by\_hand (the merchant marked the record handled before an issued document took it: none was made, or the provider rejected the one that carried it), taken (Tallio already held that number for the merchant), not\_issued (the record closed for good, with no document, after it was numbered), replaced (the order was corrected again in place of a correction that was rejected or failed, so never issued under it).
        One of: `handled_by_hand`, `taken`, `not_issued`, `replaced`
    - `action_needed` · `boolean` · required
      Whether the refund waits for the merchant: skipped or failed, not marked handled, and not a skip that needs nothing. A refund waiting for its order's document (original\_not\_issued) is not while the order itself asks; once the order is marked handled it is, and it is credited if the order's document is made.
    - `created` · `string` · required
      When Tallio received the refund.
      Format: `date-time`
  - `handled` · `string | null` · required
    When the merchant marked the skipped or failed order handled (POST /store\_orders/{id}/mark\_handled); null otherwise, and again after a retry.
    Format: `date-time`
  - `voided_numbers` · `object[]` · required
    > **Greece:** Always empty.
    
    > **France:** The numbers Tallio numbered the order's invoice with that no document carries, oldest first, with why; empty otherwise. Each stays a gap in its series, never reused: keep this record of why, since the series must be continuous or each gap justified (CGI ann. II art. 242 nonies A).
    
    Each item: A French number Tallio gave this record that no document carries: kept as a gap in the series.
    - `number` · `string` · required
      The French number left unused.
    - `reason` · `string` · required
      Why the number went unused: handled\_by\_hand (the merchant marked the record handled before an issued document took it: none was made, or the provider rejected the one that carried it), taken (Tallio already held that number for the merchant), not\_issued (the record closed for good, with no document, after it was numbered), replaced (the order was corrected again in place of a correction that was rejected or failed, so never issued under it).
      One of: `handled_by_hand`, `taken`, `not_issued`, `replaced`
  - `action_needed` · `boolean` · required
    Whether the order itself waits for the merchant: skipped or failed, not marked handled, and not a skip that needs nothing (test\_order, no\_lines, sale\_to\_report…). GET /store\_orders?status=action\_needed lists these, and also orders with a refund that waits for the merchant (its own action\_needed).
  - `retryable` · `boolean` · required
    Whether POST /store\_orders/{id}/retry acts on it now: a skip fixed outside the order (provider\_not\_connected, order\_not\_paid, tallio\_refused, number\_taken…), a failed job, or a failed document Tallio can send again, none marked handled. A rejected document is corrected instead.
    > **France:** An invoice held as fr\_numbering\_pending (kept before Tallio numbered store invoices) is retryable even if marked handled: send it again to issue it.
    
  - `correctable` · `boolean` · required
    Whether POST /store\_orders/{id}/correct may act on it now: its document is issued, or was cancelled or credited in full, with no correction yet; or its document is a correction that was rejected or failed (correct again). Not for one partly credited.
    > **France:** Not for an invoice the buyer refused (210) or the platform rejected after issue (213).
    
  - `cancellable` · `boolean` · required
    Whether POST /store\_orders/{id}/cancel may act on it now.
    > **Greece:** Its document is issued, with no correction and no credit note.
    
    > **France:** Never; invoices are never cancelled, only corrected.
    
  - `created` · `string` · required
    When Tallio received the order; a retry of a skip moves it to the retry, since the document is dated by it. A French invoice is dated by the Paris day its number was given instead, which a retry keeps, so the series stays in date order.
    Format: `date-time`

*Example response · 200*

```json
{
  "data": {
    "id": "ord_02y9O8rh7F50tGi0QcWRrx",
    "object": "store_order",
    "merchant": "mer_02y9O8rh7F50tGi0QcWRrx",
    "mode": "live",
    "platform": "shopify",
    "external_id": "1042",
    "number": "1042",
    "status": "pending",
    "reason": null,
    "detail": null,
    "document": {
      "id": "doc_02y9O8rhJKVUXRvojdffcz",
      "object": "document",
      "merchant": "mer_02y9O8rh7F50tGi0QcWRrx",
      "mode": "test",
      "provider": "sandbox",
      "regime": "GR",
      "type": "1.1",
      "number": null,
      "status": "issued",
      "stage": null,
      "issue_date": "2026-10-10",
      "currency": "EUR",
      "net": 2500,
      "vat": 435,
      "gross": 2935,
      "provider_reference": "doc_02y9O8rhJKVUXRvojdffcz",
      "mydata": {
        "mark": "900000000000001",
        "uid": "4E1F0A6C2B9D8E7F6A5B4C3D2E1F0A9B8C7D6E5F",
        "qr_url": "https://sandbox.tallio.invalid/qr/900000000000001",
        "cancellation_mark": null
      },
      "ctc": null,
      "lifecycle": null,
      "lifecycle_history": [],
      "error": null,
      "classification": {
        "source": "default",
        "warnings": [
          "No income classification on line 2; applied the 1.1 default category1_1/E3_561_001. Set it on the line, or as a merchant override, if that is wrong."
        ]
      },
      "external_reference": "#1042",
      "metadata": {
        "order_id": "5520731963508"
      },
      "original_document": null,
      "replaces": null,
      "corrects": null,
      "replaced_by": null,
      "corrected_by": null,
      "credit_notes": [],
      "amount_credited": {
        "net": 0,
        "gross": 0
      },
      "timeline": [
        {
          "id": "evt_02y9O8rhJ2Z2v1fOH2XiSH",
          "type": "document.created",
          "created": "2026-10-11T09:30:00.000Z"
        },
        {
          "id": "evt_02y9O8s1a8ymJqpmAy0nLe",
          "type": "document.issued",
          "created": "2026-10-11T09:30:02.000Z"
        }
      ],
      "issued_at": "2026-10-11T09:30:02.000Z",
      "created": "2026-10-11T09:30:00.000Z",
      "updated": "2026-10-11T09:30:02.000Z"
    },
    "warnings": [],
    "refunds": [],
    "handled": "2026-10-11T09:30:00.000Z",
    "voided_numbers": [],
    "action_needed": false,
    "retryable": false,
    "correctable": false,
    "cancellable": false,
    "created": "2026-10-11T09:30:00.000Z"
  }
}
```

*Response headers*

- `x-request-id` · `string`
  The request's correlation id; quote it when reporting a problem. One of: req\_ plus a uuid (Tallio made it), client: plus the x-request-id you sent (8-128 of A-Z a-z 0-9 . \_ : -), or the hosting platform's id.
  With every response
  Pattern: `^(?:req_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|client:[A-Za-z0-9._:-]{8,128}|[A-Za-z0-9._-]{1,16}::[A-Za-z0-9._:-]{6,110})$`
- `ratelimit-limit` · `integer`
  Requests allowed in the current window for the bucket this request counted against.
  With 200, 400, 404, 409, 413, 415, 422, 429, 503 · At least 1
- `ratelimit-remaining` · `integer`
  Requests left in the current window; 0 means the next one is refused until the window resets.
  With 200, 400, 404, 409, 413, 415, 422, 429, 503 · At least 0
- `ratelimit-reset` · `integer`
  Seconds until the current window resets.
  With 200, 400, 404, 409, 413, 415, 422, 429, 503 · At least 0
- `www-authenticate` · `string`
  The bearer challenge: send a vendor secret key as `Authorization: Bearer <key>`.
  With 401 · Always `Bearer realm="tallio"`
- `retry-after` · `integer`
  Seconds to wait before retrying a request refused with 429 `rate_limited`.
  With 429 · At least 1

*Errors*

| Code | Status | Retryable | Meaning |
| --- | --- | --- | --- |
| `validation_failed` | 400 | No | Request validation failed. |
| `unauthorized` | 401 | No | Authentication is required. |
| `vendor_suspended` | 403 | No | This vendor's access to Tallio is suspended. Its owner can contact Tallio to restore it. |
| `subscription_required` | 403 | No | Issuing live documents needs an active Tallio plan. An owner can choose one in the dashboard (Settings, Billing); test mode stays free. |
| `store_unproven` | 403 | No | On the Free store plan, Tallio issues live documents only for a proven store. Update Tallio for WooCommerce and connect the store again so Tallio can confirm its address, or choose a paid store plan. Test mode works with any store. |
| `not_found` | 404 | No | The requested resource was not found. |
| `store_url_mismatch` | 409 | No | This store key was granted to another store URL than the one this request names (Tallio-Store-Url). Connect this store again, or confirm that the store moved. |
| `invalid_state` | 409 | No | The object's current state does not allow this request. |
| `merchant_archived` | 409 | No | This merchant is archived: it issues and connects nothing new. Unarchive it first (POST /merchants/{id}/unarchive). |
| `already_exists` | 409 | No | An object with this identifier already exists; look it up instead of creating it again. |
| `idempotency_conflict` | 409 | No | This idempotency key was already used with a different request. |
| `payload_too_large` | 413 | No | The request body is too large. |
| `unsupported_media_type` | 415 | No | The request body must be JSON (Content-Type: application/json). |
| `balance_exceeded` | 422 | No | The credit notes of this document would exceed its net amount. |
| `regime_mismatch` | 422 | No | The request's regime differs from its merchant's: a document, a setting or a provider of another country. |
| `supplier_mismatch` | 422 | No | The document's supplier is not its merchant. |
| `connection_unavailable` | 422 | No | The merchant has no usable connection to route this document to. |
| `provider_rejected` | 422 | No | The provider rejected the document. |
| `not_supported` | 422 | No | The provider or document type does not support this operation. |
| `rate_limited` | 429 | Yes | A rate limit was reached. Retry later. |
| `internal_error` | 500 | No | An unexpected server error occurred. |
| `provider_unavailable` | 503 | Yes | The provider is temporarily unavailable. |

## Save a buyer's invoice request

`PUT /api/v1/store_orders/{id}/invoice_request`

Saves the invoice a buyer asked for after checkout (on the order-received page or in their account): their ΑΦΜ, SIREN, SIRET or EU VAT number and company name. The order is named by its store order id, or as platform:external\_id when the store may not have sent it yet: the request then waits, and the order reads it when it arrives. It replaces whatever the checkout captured (the order's invoice\_request) whole, and any earlier request; a retry of a skipped order reads it too. Once the order's document was made the request changes nothing: 409 already\_issued, and the merchant corrects the document instead. A number whose shape or check digits fail is 400 validation\_failed. Saving the same request again answers the same; no Idempotency-Key.

*Bearer API key*

*Path parameters*

- `id` · `string` · required
  The store order's id (ord\_…), or, for an order the store may not have sent yet, the platform and its order id as platform:external\_id (woocommerce:1042).

*Request body*

- `merchant` · `string`
  The merchant whose order a platform:external\_id reference names (mer\_…); required then with a secret key. A store key names its own merchant, and a store order id names its own: then it is not read.
  Pattern: `^mer_[0-9A-Za-z]{22}$`
- `vat_number` · `string` · required
  The buyer's number as typed: a Greek ΑΦΜ (EL prefix optional), a SIREN, a SIRET, or an EU VAT number with its country prefix. A label ("ΑΦΜ:", "VAT No."), spaces, dots and hyphens are dropped; a number whose shape or check digits fail is 400 validation\_failed. The merchant's regime decides what it means.
  1 to 100 characters
- `company_name` · `string`
  The buyer's company name; without one, the invoice names the order's billing company, else the billing person.
  Up to 500 characters
- `source` · `string` · required
  Where the buyer asked: thank\_you (the order-received page right after paying) or account (the order in their account, WooCommerce's My Account).
  One of: `thank_you`, `account`

*Request*

*JSON*

```json
{
  "vat_number": "EL666666662",
  "source": "thank_you"
}
```

*curl*

```bash
curl -X PUT 'https://tallio.dev/api/v1/store_orders/woocommerce%3A1042/invoice_request' \
  -H "Authorization: Bearer $TALLIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "vat_number": "EL666666662",
  "source": "thank_you"
}'
```

*TypeScript SDK*

```ts
import { createTallioClient, unwrap } from "@tallio-dev/sdk";

const tallio = createTallioClient({
  apiKey: process.env.TALLIO_API_KEY!,
  baseUrl: "https://tallio.dev",
});

const result = await unwrap(tallio.http.PUT("/api/v1/store_orders/{id}/invoice_request", {
  params: {
    path: {
      id: "woocommerce:1042",
    },
  },
  body: {
    vat_number: "EL666666662",
    source: "thank_you",
  },
}));
```

*Responses*

| Status | Description |
| --- | --- |
| `200` | The saved request. |
| 4XX, 5XX | An error: see Errors below. |

*Response body · 200*

- `data` · `object` · required
  A buyer's request for an invoice on a store order, read when the order is mapped.
  - `object` · `string` · required
    Always "store\_invoice\_request".
    Always `store_invoice_request`
  - `merchant` · `string` · required
    Id of the merchant (mer\_…).
    Pattern: `^mer_[0-9A-Za-z]{22}$`
  - `mode` · `string` · required
    The mode of the key that saved it; only that mode's store order reads it.
    One of: `live`, `test`
  - `platform` · `string` · required
    The platform the order comes from.
    One of: `shopify`, `woocommerce`
  - `external_id` · `string` · required
    The platform's id of the order.
  - `store_order` · `string | null` · required
    The store order it is for, once the store sent the order; null before: the order reads it when it arrives.
    Pattern: `^ord_[0-9A-Za-z]{22}$`
  - `vat_number` · `string` · required
    The number as Tallio keeps it: label and separators dropped, a Greek ΑΦΜ as EL and its 9 digits.
  - `company_name` · `string | null` · required
    The company name given, cleaned; null when none was.
  - `source` · `string` · required
    Where the buyer asked: thank\_you (the order-received page right after paying) or account (the order in their account, WooCommerce's My Account).
    One of: `thank_you`, `account`
  - `requested` · `string` · required
    When the buyer made this request.
    Format: `date-time`

*Example response · 200*

```json
{
  "data": {
    "object": "store_invoice_request",
    "merchant": "mer_02y9O8rh7F50tGi0QcWRrx",
    "mode": "live",
    "platform": "shopify",
    "external_id": "1042",
    "store_order": "ord_02y9O8rh7F50tGi0QcWRrx",
    "vat_number": "EL666666662",
    "company_name": "string",
    "source": "thank_you",
    "requested": "2026-10-11T09:30:00.000Z"
  }
}
```

*Response headers*

- `x-request-id` · `string`
  The request's correlation id; quote it when reporting a problem. One of: req\_ plus a uuid (Tallio made it), client: plus the x-request-id you sent (8-128 of A-Z a-z 0-9 . \_ : -), or the hosting platform's id.
  With every response
  Pattern: `^(?:req_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|client:[A-Za-z0-9._:-]{8,128}|[A-Za-z0-9._-]{1,16}::[A-Za-z0-9._:-]{6,110})$`
- `ratelimit-limit` · `integer`
  Requests allowed in the current window for the bucket this request counted against.
  With 200, 400, 404, 409, 413, 415, 429 · At least 1
- `ratelimit-remaining` · `integer`
  Requests left in the current window; 0 means the next one is refused until the window resets.
  With 200, 400, 404, 409, 413, 415, 429 · At least 0
- `ratelimit-reset` · `integer`
  Seconds until the current window resets.
  With 200, 400, 404, 409, 413, 415, 429 · At least 0
- `www-authenticate` · `string`
  The bearer challenge: send a vendor secret key as `Authorization: Bearer <key>`.
  With 401 · Always `Bearer realm="tallio"`
- `retry-after` · `integer`
  Seconds to wait before retrying a request refused with 429 `rate_limited`.
  With 429 · At least 1

*Errors*

| Code | Status | Retryable | Meaning |
| --- | --- | --- | --- |
| `validation_failed` | 400 | No | Request validation failed. |
| `unauthorized` | 401 | No | Authentication is required. |
| `vendor_suspended` | 403 | No | This vendor's access to Tallio is suspended. Its owner can contact Tallio to restore it. |
| `not_found` | 404 | No | The requested resource was not found. |
| `store_url_mismatch` | 409 | No | This store key was granted to another store URL than the one this request names (Tallio-Store-Url). Connect this store again, or confirm that the store moved. |
| `already_issued` | 409 | No | The order's document was already made, so this request can no longer change it. The merchant corrects the document instead. |
| `payload_too_large` | 413 | No | The request body is too large. |
| `unsupported_media_type` | 415 | No | The request body must be JSON (Content-Type: application/json). |
| `rate_limited` | 429 | Yes | A rate limit was reached. Retry later. |
| `internal_error` | 500 | No | An unexpected server error occurred. |

## Review a waiting invoice

`POST /api/v1/store_orders/{id}/invoice_review`

For a store order skipped as invoice\_awaiting\_confirmation (a Greek invoice whose buyer's registered name differs, is withheld, or that the store confirms every time): maps the order you send again and returns the buyer as the invoice names them beside the VAT registry's answer, read now. Changes nothing and stores nothing; show both to the merchant, then, when registry.confirmable is true, confirm with registry.hash. A number the registry does not register, or names no one for, cannot be issued with registered details: confirmable is false, and the merchant issues the document by hand and marks the order handled. Any other store order is 409 invalid\_state, as is an order that no longer maps to an invoice for a Greek business. When the registry is unavailable the answer is 503 service\_unavailable (Retry-After); lookups draw on the vendor's lookup budget, shared with Tallio's own checks before issuing, and may reuse an answer up to a day old (registry.checked\_at).

*Bearer API key*

*Path parameters*

- `id` · `string` · required
  The store order's id (ord\_…).

*Request body*

- `order` · `object` · required
  The order as the platform holds it now, for the same platform and order id: Tallio keeps no snapshot once an order is mapped, and the invoice is mapped again from this one.
  - `platform` · `string` · required
    The platform the order comes from. Not shopify: the Shopify app issues through its own path until it moves onto store orders, so one order is never issued twice.
    One of: `woocommerce`
  - `test` · `boolean` · required
    A test order (a test gateway or test mode): never a fiscal document.
  - `currency` · `string` · required
    ISO 4217 currency of every amount.
    Pattern: `^[A-Z]{3}$`
  - `prices_include_tax` · `boolean` · required
    The store's prices are entered with tax included.
  - `tax_rounding` · `string` · required
    How the platform rounded tax: "line" per line, or "subtotal" once per rate over the order. The total is checked the platform's way: each line's net and tax rounded, or the unrounded lines summed, then rounded.
    One of: `line`, `subtotal`
  - `total` · `string` · required
    The order's total, tax included, at the same moment as its lines: after edits, and (sent to the store orders API) as paid, before any refund. It equals what the lines, shipping and fees add up to with their tax; an order where they differ is refused, never corrected.
    Pattern: `^(0|[1-9]\d{0,12})(\.\d{1,2})?$`
  - `lines` · `object[]` · required
    The products, in the order's order, at the moment total describes.
    Up to 1000 items
    Each item: A product line.
    - `external_id` · `string | null` · required
      The platform's id of the line, which refunds name; null when the platform gave none.
      1 to 64 characters
    - `name` · `string` · required
      The product's name as sold, variation included (Shopify: title - variant).
      Up to 1000 characters
    - `sku` · `string`
      The SKU; describes the line when it has no name.
      Up to 200 characters
    - `product_id` · `string`
      The platform's product id; describes the line when nothing else does.
      Up to 64 characters
    - `quantity` · `string` · required
      Units on the order at the moment the snapshot describes, after edits; 0 for a line edited away. Sent to the store orders API, that moment is the payment: refunds are sent on their own (POST /store\_orders/{id}/refunds).
      Pattern: `^\d{1,9}(\.\d{1,6})?$`
    - `total` · `string` · required
      The line's net amount after discounts, tax excluded.
      Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
    - `taxes` · `object[]` · required
      The line's tax, one share per rate; empty when it is untaxed.
      Up to 10 items
      Each item: One rate's share of a line's tax.
      - `rate_id` · `string` · required
        The platform's id of the tax rate (WooCommerce: the key of the line's taxes; Shopify: the rate).
        1 to 64 characters
      - `rate_percent` · `string` · required
        The rate in percent as text, up to 10 decimals: "24", "5.5". A compound rate is never sent.
        Pattern: `^\d{1,3}(\.\d{1,10})?$`
      - `amount` · `string` · required
        The tax at this rate, unrounded when the platform stores it so; negative only on a negative (discount) line, whose tax WooCommerce stores negative too.
        Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
    - `gift_card` · `boolean` · required
      The line sells a gift card, which is not a sale of goods.
  - `shipping_lines` · `object[]` · required
    The shipping charged after discounts, at the moment total describes.
    Up to 1000 items
    Each item: A shipping line, one unit.
    - `external_id` · `string | null` · required
      The platform's id of the line, which refunds name; null when the platform gave none.
      1 to 64 characters
    - `name` · `string` · required
      The shipping's name as the order shows it.
      Up to 1000 characters
    - `total` · `string` · required
      The shipping's net amount after discounts, tax excluded.
      Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
    - `taxes` · `object[]` · required
      The shipping's tax, one share per rate; empty when it is untaxed.
      Up to 10 items
      Each item: One rate's share of a line's tax.
      - `rate_id` · `string` · required
        The platform's id of the tax rate (WooCommerce: the key of the line's taxes; Shopify: the rate).
        1 to 64 characters
      - `rate_percent` · `string` · required
        The rate in percent as text, up to 10 decimals: "24", "5.5". A compound rate is never sent.
        Pattern: `^\d{1,3}(\.\d{1,10})?$`
      - `amount` · `string` · required
        The tax at this rate, unrounded when the platform stores it so; negative only on a negative (discount) line, whose tax WooCommerce stores negative too.
        Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
  - `fee_lines` · `object[]` · required
    Other charges, such as a cash-on-delivery fee, at the moment total describes.
    Up to 1000 items
    Each item: A fee line, one unit.
    - `external_id` · `string | null` · required
      The platform's id of the line, which refunds name; null when the platform gave none.
      1 to 64 characters
    - `name` · `string` · required
      The fee's name as the order shows it.
      Up to 1000 characters
    - `total` · `string` · required
      The fee's net amount after discounts, tax excluded.
      Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
    - `taxes` · `object[]` · required
      The fee's tax, one share per rate; empty when it is untaxed.
      Up to 10 items
      Each item: One rate's share of a line's tax.
      - `rate_id` · `string` · required
        The platform's id of the tax rate (WooCommerce: the key of the line's taxes; Shopify: the rate).
        1 to 64 characters
      - `rate_percent` · `string` · required
        The rate in percent as text, up to 10 decimals: "24", "5.5". A compound rate is never sent.
        Pattern: `^\d{1,3}(\.\d{1,10})?$`
      - `amount` · `string` · required
        The tax at this rate, unrounded when the platform stores it so; negative only on a negative (discount) line, whose tax WooCommerce stores negative too.
        Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
  - `coupons` · `object[]` · required
    The coupons used, for display only: their discounts are already in the lines' totals.
    Up to 1000 items
    Each item: A coupon.
    - `code` · `string` · required
      The coupon code.
      Up to 200 characters
  - `billing` · `object`
    The billing address: it names and locates an invoice's buyer.
    - `country` · `string`
      ISO 3166-1 alpha-2 country code.
      Pattern: `^[A-Z]{2}$`
    - `address_1` · `string`
      Street and number.
      Up to 500 characters
    - `city` · `string`
      City.
      Up to 200 characters
    - `postcode` · `string`
      Postal code.
      Up to 50 characters
    - `company` · `string`
      Company name.
      Up to 500 characters
    - `name` · `string`
      The billing person's full name, when the platform keeps one.
      Up to 500 characters
    - `first_name` · `string`
      First name.
      Up to 200 characters
    - `last_name` · `string`
      Last name.
      Up to 200 characters
  - `shipping` · `object`
    The shipping address; the sale is taxed in its country, else the billing country.
    - `country` · `string`
      ISO 3166-1 alpha-2 country code.
      Pattern: `^[A-Z]{2}$`
    - `address_1` · `string`
      Street and number.
      Up to 500 characters
    - `city` · `string`
      City.
      Up to 200 characters
    - `postcode` · `string`
      Postal code.
      Up to 50 characters
  - `payment_gateways` · `object[]` · required
    The gateways that took the payment; one for most orders.
    Up to 10 items
    Each item: A payment gateway the order was paid through.
    - `id` · `string` · required
      The gateway's id (WooCommerce: cod, bacs, stripe; Shopify: its gateway name).
      1 to 200 characters
    - `title` · `string` · required
      The gateway's name as the buyer saw it.
      Up to 200 characters
  - `invoice_request` · `object`
    What the checkout captured of a buyer's request for an invoice. A platform that captures each field once sends one value each; Shopify's cart attributes may repeat.
    - `requested` · `string[]` · required
      Every value the checkout captured for "I need an invoice" ("true", "yes", "false"); distinct values disagree, and no invoice is guessed.
      Up to 10 items
      Each item: Up to 200 characters
    - `vat_numbers` · `string[]` · required
      Every value the checkout captured for the buyer's VAT number (ΑΦΜ, SIREN, SIRET or EU VAT number); distinct values disagree, and no invoice is guessed.
      Up to 10 items
      Each item: Up to 200 characters
    - `company_names` · `string[]` · required
      Every value the checkout captured for the buyer's company name; distinct values disagree, and no invoice is guessed.
      Up to 10 items
      Each item: Up to 200 characters
  - `platform_version` · `string` · required
    The platform's version ("11.2.1"), logged, never branched on.
    1 to 50 characters
  - `external_id` · `string` · required
    The platform's order id.
    1 to 64 characters
  - `number` · `string` · required
    The order number the merchant knows it by ("1042", "#1042").
    1 to 64 characters
  - `created_at` · `string` · required
    When the order was placed.
    Format: `date-time`
  - `paid_at` · `string | null` · required
    When it was paid; null while unpaid.
    Format: `date-time`
  - `cancelled` · `boolean` · required
    The order was cancelled: it is kept and skipped as order\_cancelled.
  - `refunded_total` · `string` · required
    What was already refunded on the order when the snapshot was taken ("0" for nothing). An order refunded in part before its document is issued as paid, and each refund is credited after it; one refunded in full is skipped as refunded\_before\_issue (nothing was sold).
    Pattern: `^(0|[1-9]\d{0,12})(\.\d{1,2})?$`

*Request*

*JSON*

```json
{
  "order": {
    "platform": "woocommerce",
    "test": false,
    "currency": "EUR",
    "prices_include_tax": false,
    "tax_rounding": "line",
    "total": "81.41",
    "lines": [],
    "shipping_lines": [],
    "fee_lines": [],
    "coupons": [],
    "payment_gateways": [],
    "platform_version": "string",
    "external_id": "string",
    "number": "string",
    "created_at": "2026-10-11T09:30:00.000Z",
    "paid_at": "2026-10-11T09:31:00.000Z",
    "cancelled": false,
    "refunded_total": "81.41"
  }
}
```

*curl*

```bash
curl -X POST 'https://tallio.dev/api/v1/store_orders/ord_02y9O8rh7F50tGi0QcWRrx/invoice_review' \
  -H "Authorization: Bearer $TALLIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "order": {
    "platform": "woocommerce",
    "test": false,
    "currency": "EUR",
    "prices_include_tax": false,
    "tax_rounding": "line",
    "total": "81.41",
    "lines": [],
    "shipping_lines": [],
    "fee_lines": [],
    "coupons": [],
    "payment_gateways": [],
    "platform_version": "string",
    "external_id": "string",
    "number": "string",
    "created_at": "2026-10-11T09:30:00.000Z",
    "paid_at": "2026-10-11T09:31:00.000Z",
    "cancelled": false,
    "refunded_total": "81.41"
  }
}'
```

*TypeScript SDK*

```ts
import { createTallioClient, unwrap } from "@tallio-dev/sdk";

const tallio = createTallioClient({
  apiKey: process.env.TALLIO_API_KEY!,
  baseUrl: "https://tallio.dev",
});

const result = await unwrap(tallio.http.POST("/api/v1/store_orders/{id}/invoice_review", {
  params: {
    path: {
      id: "ord_02y9O8rh7F50tGi0QcWRrx",
    },
  },
  body: {
    order: {
      platform: "woocommerce",
      test: false,
      currency: "EUR",
      prices_include_tax: false,
      tax_rounding: "line",
      total: "81.41",
      lines: [],
      shipping_lines: [],
      fee_lines: [],
      coupons: [],
      payment_gateways: [],
      platform_version: "string",
      external_id: "string",
      number: "string",
      created_at: "2026-10-11T09:30:00.000Z",
      paid_at: "2026-10-11T09:31:00.000Z",
      cancelled: false,
      refunded_total: "81.41",
    },
  },
}));
```

*Responses*

| Status | Description |
| --- | --- |
| `200` | The buyer and the registry's answer. |
| 4XX, 5XX | An error: see Errors below. |

*Response body · 200*

- `data` · `object` · required
  A waiting Greek invoice's buyer beside the VAT registry's answer, for the merchant to compare before confirming.
  - `object` · `string` · required
    Always "store\_order\_invoice\_review".
    Always `store_order_invoice_review`
  - `store_order` · `string` · required
    Id of the store order (ord\_…).
    Pattern: `^ord_[0-9A-Za-z]{22}$`
  - `buyer` · `object` · required
    The buyer as the order names them, mapped as the invoice would be.
    - `vat_number` · `string` · required
      The buyer's ΑΦΜ the invoice names, normalised.
    - `name` · `string | null` · required
      The name the invoice would carry without the registry's; null for none.
    - `address` · `string | null` · required
      The address the invoice would carry without the registry's, as one line; null for none.
  - `registry` · `object` · required
    The VAT registry's answer for the buyer's number, as the lookup gives it (reused up to a day, see checked\_at); Tallio stores none of it.
    - `valid` · `boolean` · required
      Whether the registry reports the number as an active VAT registration.
    - `name` · `string | null` · required
      The registered name as the registry gives it; null when it shares none or the number is not valid.
    - `address` · `string | null` · required
      The registered address as one line, as the registry gives it; null when it shares none.
    - `source` · `string` · required
      Who answered: vies (the EU VAT Information Exchange System) or sandbox (test keys).
      One of: `vies`, `sandbox`
    - `checked_at` · `string` · required
      When the registry answered; a repeat lookup within a day may reuse that answer.
      Format: `date-time`
    - `hash` · `string` · required
      The hash of this name and address: send it as registry\_hash to POST /store\_orders/{id}/confirm\_invoice.
      Pattern: `^[0-9a-f]{64}$`
    - `confirmable` · `boolean` · required
      Whether confirm\_invoice can issue with this answer: false when the number is not registered or the registry names no one, which no confirmation changes.

*Example response · 200*

```json
{
  "data": {
    "object": "store_order_invoice_review",
    "store_order": "ord_02y9O8rh7F50tGi0QcWRrx",
    "buyer": {
      "vat_number": "666666662",
      "name": "Kafeneio Lemonia",
      "address": "1 Example Street, 10431 Athens"
    },
    "registry": {
      "valid": true,
      "name": "Kafeneio Lemonia IKE",
      "address": null,
      "source": "sandbox",
      "checked_at": "2026-10-13T17:20:42.364Z",
      "hash": "9f2b7c1e4a5d6f708192a3b4c5d6e7f8091a2b3c4d5e6f708192a3b4c5d6e7f8",
      "confirmable": true
    }
  }
}
```

*Response headers*

- `x-request-id` · `string`
  The request's correlation id; quote it when reporting a problem. One of: req\_ plus a uuid (Tallio made it), client: plus the x-request-id you sent (8-128 of A-Z a-z 0-9 . \_ : -), or the hosting platform's id.
  With every response
  Pattern: `^(?:req_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|client:[A-Za-z0-9._:-]{8,128}|[A-Za-z0-9._-]{1,16}::[A-Za-z0-9._:-]{6,110})$`
- `ratelimit-limit` · `integer`
  Requests allowed in the current window for the bucket this request counted against.
  With 200, 400, 404, 409, 413, 415, 429, 503 · At least 1
- `ratelimit-remaining` · `integer`
  Requests left in the current window; 0 means the next one is refused until the window resets.
  With 200, 400, 404, 409, 413, 415, 429, 503 · At least 0
- `ratelimit-reset` · `integer`
  Seconds until the current window resets.
  With 200, 400, 404, 409, 413, 415, 429, 503 · At least 0
- `www-authenticate` · `string`
  The bearer challenge: send a vendor secret key as `Authorization: Bearer <key>`.
  With 401 · Always `Bearer realm="tallio"`
- `retry-after` · `integer`
  Seconds to wait before retrying a request refused with 429 `rate_limited`.
  With 429 · At least 1

*Errors*

| Code | Status | Retryable | Meaning |
| --- | --- | --- | --- |
| `validation_failed` | 400 | No | Request validation failed. |
| `unauthorized` | 401 | No | Authentication is required. |
| `vendor_suspended` | 403 | No | This vendor's access to Tallio is suspended. Its owner can contact Tallio to restore it. |
| `not_found` | 404 | No | The requested resource was not found. |
| `store_url_mismatch` | 409 | No | This store key was granted to another store URL than the one this request names (Tallio-Store-Url). Connect this store again, or confirm that the store moved. |
| `invalid_state` | 409 | No | The object's current state does not allow this request. |
| `payload_too_large` | 413 | No | The request body is too large. |
| `unsupported_media_type` | 415 | No | The request body must be JSON (Content-Type: application/json). |
| `rate_limited` | 429 | Yes | A rate limit was reached. Retry later. |
| `internal_error` | 500 | No | An unexpected server error occurred. |
| `service_unavailable` | 503 | Yes | A service Tallio depends on is temporarily unavailable. |

## Mark a store order handled

`POST /api/v1/store_orders/{id}/mark_handled`

Records that the merchant dealt with a skipped or failed store order by hand, which takes it off status=action\_needed; the order and its reason stay. Marking one already handled answers it as it is. Anything else, or a reason that changed since the merchant saw it, is 409 invalid\_state. Recorded in the team's audit log.

*Bearer API key*

*Path parameters*

- `id` · `string` · required
  The store order's id (ord\_…).

*Request body*

- `reason` · `string`
  The reason code the merchant saw. When given and the order's reason has changed since, 409 invalid\_state, so a newer outcome is never hidden unread.
  1 to 64 characters

*Request*

*JSON*

```json
{}
```

*curl*

```bash
curl -X POST 'https://tallio.dev/api/v1/store_orders/ord_02y9O8rh7F50tGi0QcWRrx/mark_handled' \
  -H "Authorization: Bearer $TALLIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

*TypeScript SDK*

```ts
import { createTallioClient, unwrap } from "@tallio-dev/sdk";

const tallio = createTallioClient({
  apiKey: process.env.TALLIO_API_KEY!,
  baseUrl: "https://tallio.dev",
});

const result = await unwrap(tallio.http.POST("/api/v1/store_orders/{id}/mark_handled", {
  params: {
    path: {
      id: "ord_02y9O8rh7F50tGi0QcWRrx",
    },
  },
  body: {},
}));
```

*Responses*

| Status | Description |
| --- | --- |
| `200` | The store order, marked handled. |
| 4XX, 5XX | An error: see Errors below. |

*Response body · 200*

- `data` · `object` · required
  A shop order sent to Tallio, and the document it became.
  - `id` · `string` · required
    Id of the store order (ord\_…).
    Pattern: `^ord_[0-9A-Za-z]{22}$`
  - `object` · `string` · required
    Always "store\_order".
    Always `store_order`
  - `merchant` · `string` · required
    Id of the merchant (mer\_…).
    Pattern: `^mer_[0-9A-Za-z]{22}$`
  - `mode` · `string` · required
    live for an order sent with a live key, test for a test key.
    One of: `live`, `test`
  - `platform` · `string` · required
    The platform the order comes from.
    One of: `shopify`, `woocommerce`
  - `external_id` · `string` · required
    The platform's id of the order.
    1 to 64 characters
  - `number` · `string` · required
    The order number the merchant and the buyer see.
  - `status` · `string` · required
    pending (received, not yet mapped), skipped (it maps to no document: see reason), sent (its document was created and is on its way to the provider), issued (the document was issued), failed (the document was rejected, failed or cancelled, or Tallio could not create it: see reason).
    One of: `pending`, `skipped`, `sent`, `issued`, `failed`
  - `reason` · `string | null` · required
    Why the order is skipped or failed, as a machine code; null otherwise.
  - `detail` · `string | null` · required
    The reason in a sentence for the merchant; null when there is no reason.
  - `document` · `object | null` · required
    The document issued for the order, once one was created; null before.
    - `id` · `string` · required
      Id of the document (doc\_…).
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `object` · `string` · required
      Always "document".
      Always `document`
    - `merchant` · `string` · required
      Id of the merchant (mer\_…).
      Pattern: `^mer_[0-9A-Za-z]{22}$`
    - `mode` · `string` · required
      live for a document created with a live key, test for a test key.
      One of: `live`, `test`
    - `provider` · `string` · required
      The licensed e-invoicing provider (a Greek provider, direct myDATA, a French plateforme agréée, Chorus Pro for a French public-sector buyer, or Tallio's sandbox) that issues the document.
      One of: `sandbox`, `mydata`, `wrapp`, `impact`, `epsilon`, `softone`, `prosvasis`, `superpdp`, `choruspro`, `b2brouter`, `oxygen`, `iopole`, `qonto`, `elorus`, `timologisi`
    - `regime` · `string` · required
      Tax regime the document is issued under, by country: GR (Greece, myDATA) or FR (France, e-invoicing through a plateforme agréée).
      One of: `GR`, `FR` · Default: `GR`
    - `type` · `string` · required
      Document type, by regime.
      > **Greece:** An AADE myDATA type (e.g. 1.1).
      
      > **France:** A UNTDID 1001 code (e.g. 380).
      
      One of: `380`, `381`, `384`, `386`, `1.1`, `2.1`, `5.1`, `5.2`, `11.1`, `11.2`, `11.4`, `2.2`, `2.3`
    - `number` · `string | null` · required
      The document's number.
      > **Greece:** The provider's number in its series (e.g. ΕΑΛΠ-1), null until it assigns one: a display label, not unique, so identify a document by its id.
      
      > **France:** The number you assigned (set once issued).
      
      Default: `null`
    - `status` · `string` · required
      Where the document stands: pending (Tallio accepted it; not yet issued, see stage), issued (the tax system accepted it; in Greece it has a MARK), rejected (the provider or the tax system refused it), failed (Tallio could not deliver it to the provider), cancelled (withdrawn before it was sent, or cancelled in myDATA after issue: see mydata.cancellation\_mark).
      One of: `pending`, `issued`, `rejected`, `failed`, `cancelled`
    - `stage` · `string | null` · required
      Where a pending document is (queued, submitting, awaiting\_confirmation, reconciling); null unless status is pending.
      One of: `queued`, `submitting`, `awaiting_confirmation`, `reconciling`
    - `issue_date` · `string` · required
      Issue date, YYYY-MM-DD.
      Format: `date`
    - `currency` · `string` · required
      ISO 4217 currency of the amounts.
      > **Greece:** EUR.
      
      > **France:** Any with cents.
      
      Pattern: `^[A-Z]{3}$`
    - `net` · `integer` · required
      Sum of the lines' net amounts, in minor units, at most 1000000000000000.
      From 0 to 1000000000000000
    - `vat` · `integer` · required
      Sum of the lines' VAT, each line rounded half up to the minor unit, in minor units, at most 1000000000000000.
      From 0 to 1000000000000000
    - `gross` · `integer` · required
      net + vat, in minor units, at most 1250000000000000.
      From 0 to 1250000000000000
    - `provider_reference` · `string | null` · required
      The provider's own reference for the document, once it has taken it; null before.
    - `mydata` · `object | null` · required
      myDATA's identity of the document: an object in GR, null in any other regime.
      - `mark` · `string | null` · required
        MARK (AADE registration number) once issued, as a digit string; null before. A cancelled document keeps the MARK it was issued with (null when it was withdrawn before it was sent).
        Pattern: `^[1-9]\d{0,18}$`
      - `uid` · `string | null` · required
        myDATA uid: the SHA-1 (40 upper-case hex digits) AADE derives from the document's identifiers; null until known.
        Pattern: `^[0-9A-F]{40}$`
      - `qr_url` · `string | null` · required
        URL the document's QR code points to; null until the provider returns one.
        Format: `uri`
      - `cancellation_mark` · `string | null` · required
        The MARK of the cancellation in myDATA, once an issued document is cancelled; null otherwise.
        Pattern: `^[1-9]\d{0,18}$`
    - `ctc` · `object | null` · required
      The French e-invoicing platform's identity of the document: an object in FR, null in any other regime.
      - `platform_id` · `string | null` · required
        The plateforme agréée carrying the document (sandbox in test mode); null until it has taken it.
      - `flow_id` · `string | null` · required
        The platform's id of the flow that carried the document; null until it reports one.
    - `lifecycle` · `object | null` · required
      The tax regime's status for the document once sent.
      > **Greece:** Always null.
      
      > **France:** Null until the platform reports one.
      
      Default: `null`
      - `key` · `string` · required
        Where the document is after issue, in GOBL's bill.Status keys.
        One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
      - `code` · `string` · required
        The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
        1 to 20 characters
      - `at` · `string` · required
        When the regime's platform reported this status.
        Format: `date-time`
    - `lifecycle_history` · `object[]` · required
      Every lifecycle status reported for the document, oldest first, at most the newest 30; the last is lifecycle. Empty in GR. A status after issue (a buyer's 210 Refusée, the platform's 213 Rejetée) never changes status: an issued document stays issued.
      Up to 30 items · Default: `[]`
      Each item: One lifecycle status the tax regime's platform reported for the document.
      - `key` · `string` · required
        Where the document is after issue, in GOBL's bill.Status keys.
        One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
      - `code` · `string` · required
        The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
        1 to 20 characters
      - `at` · `string` · required
        When the regime's platform reported this status.
        Format: `date-time`
      - `provider_status` · `string | null` · required
        The provider's own status the code was read from (e.g. refused, REJETEE, fr:210); null if it gave none.
        1 to 64 characters
        Pattern: `^[A-Za-z0-9_.:-]+$`
      - `reason` · `string | null` · required
        The platform's reason code for a refusal, dispute or rejection, when it reports one; null otherwise. Free-text reasons are not kept.
        1 to 64 characters
        Pattern: `^[A-Za-z0-9_.:-]+$`
    - `error` · `object | null` · required
      Why the document was rejected or failed; null otherwise.
      - `code` · `string` · required
        Stable machine-readable error code. Branch on this, never on `message`.
        One of: `validation_failed`, `unauthorized`, `not_found`, `idempotency_conflict`, `idempotency_in_progress`, `already_exists`, `invalid_grant`, `store_url_mismatch`, `invalid_state`, `already_issued`, `connection_not_disconnected`, `merchant_archived`, `cursor_not_listed`, `payload_too_large`, `unsupported_media_type`, `rate_limited`, `too_many_pending_erasures`, `forbidden`, `restricted_key`, `vendor_suspended`, `subscription_required`, `store_plan_live_only`, `store_unproven`, `not_supported`, `regime_mismatch`, `supplier_mismatch`, `connection_unavailable`, `connection_unconfirmed`, `provider_credentials_invalid`, `provider_rejected`, `balance_exceeded`, `credit_required`, `provider_unavailable`, `pdf_not_ready`, `service_unavailable`, `internal_error`
      - `message` · `string` · required
        Tallio's own explanation, safe to show to a developer; the provider's words are in provider\_message.
      - `provider_code` · `string | null` · required
        The provider's own error code, or null when the error did not come from a provider.
      - `provider_message` · `string | null` · required
        The provider's own error message, verbatim, or null when the error did not come from a provider. On a document or connection it is removed (null), like provider\_raw, once the retention window ends or by a data-subject erasure.
      - `retryable` · `boolean` · required
        True when the same request may succeed if sent again later.
      - `provider_raw` · `any`
        The provider's error response body as received, or a TruncatedProviderRaw marker when it exceeds 4096 bytes of JSON. Never holds request headers, credentials or the request payload.
    - `classification` · `object` · required
      How the document was classified for myDATA.
      - `source` · `string` · required
        default when any line took Tallio's default, else override when any line took the merchant's override, else line.
        One of: `line`, `override`, `default`
      - `warnings` · `string[]` · required
        What to check before issuing, e.g. that defaults were applied.
    - `external_reference` · `string | null` · required
      Your own reference for the document, or null.
      Default: `null`
    - `metadata` · `object` · required
      Up to 50 key-value pairs of your own (keys up to 40 characters, values up to 500). Do not put personal data in it.
      Default: `{}`
      - `{key}` · `string`
        A value, up to 500 characters.
        1 to 40 characters
    - `original_document` · `string | null` · required
      For a credit note made from a Tallio document: that document (doc\_…). Null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `replaces` · `string | null` · required
      The rejected or failed document this one was issued to replace, or null.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `corrects` · `string | null` · required
      The issued document this one corrects, or null.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `replaced_by` · `string | null` · required
      The document created to replace this rejected or failed one, the live one if there were several; null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `corrected_by` · `string | null` · required
      The document made to correct this one (POST /documents/{id}/correct), the latest if there were several; null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `credit_notes` · `string[]` · required
      Credit notes made from this document, oldest first, at most 100.
      Up to 100 items · Default: `[]`
      Each item: Id of the document (doc\_…).
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `amount_credited` · `object` · required
      What credit notes made from this document take, pending ones included. Zero when there are none.
      Default: `{"net":0,"gross":0}`
      - `net` · `integer` · required
        Net amount credited, in cents.
        From 0 to 9007199254740991
      - `gross` · `integer` · required
        Gross amount credited, in cents.
        From 0 to 9007199254740991
    - `timeline` · `object[]` · required
      The document's events, oldest first, at most 100.
      Up to 100 items
      Each item: One event in a document's history. GET /events/{id} returns the full Event.
      - `id` · `string` · required
        Id of the event (evt\_…).
        Pattern: `^evt_[0-9A-Za-z]{22}$`
      - `type` · `string` · required
        What happened: document.created (Tallio accepted a document), document.issued (the tax system accepted it; in Greece it has a MARK), document.rejected (the provider or the tax system refused it), document.failed (Tallio could not deliver it), merchant.created (a merchant was created), connection.created (a merchant was connected to a provider), connection.verified (the provider accepted its credentials), connection.invalid (the provider refused them), connection.disconnected (it was disconnected), connect\_session.completed (a merchant connected through a hosted connect link), webhook\_endpoint.disabled (Tallio disabled an endpoint failing for days), document.retried (a failed document was queued to be sent again), document.credited (a credit note made from the document was issued), document.cancelled (the document was withdrawn or cancelled), document.corrected (a corrected document was made to replace it), document.replaced (a new document was created to replace a rejected or failed one), connection.deleted (a disconnected connection was deleted from the merchant's list), merchant.archived (a merchant was archived: it issues nothing new), merchant.unarchived (an archived merchant was restored), store\_order.updated (a store order's status, reason, handled mark or document changed), document.lifecycle\_updated (the French platform reported a new lifecycle status for an issued document) and connection.updated (a connection's settings changed).
        One of: `document.created`, `document.issued`, `document.rejected`, `document.failed`, `merchant.created`, `connection.created`, `connection.verified`, `connection.invalid`, `connection.disconnected`, `connect_session.completed`, `webhook_endpoint.disabled`, `document.retried`, `document.credited`, `document.cancelled`, `document.corrected`, `document.replaced`, `connection.deleted`, `merchant.archived`, `merchant.unarchived`, `store_order.updated`, `document.lifecycle_updated`, `connection.updated`
      - `created` · `string` · required
        When the event happened.
        Format: `date-time`
    - `issued_at` · `string | null` · required
      When the document was issued (the tax system accepted it); kept if it is cancelled afterwards, null for a document never issued.
      Format: `date-time`
    - `created` · `string` · required
      When Tallio accepted the document.
      Format: `date-time`
    - `updated` · `string` · required
      When the document last changed.
      Format: `date-time`
  - `warnings` · `object[]` · required
    What the merchant should know about the order's document (a rounding cent, a free line left off, the store's default payment method); empty when there is nothing, or before the order is mapped.
    Each item: Something the merchant should know about the document made for the order; the document was still made.
    - `code` · `string` · required
      What is worth knowing about the document, as a machine code: the store's method used for an unrecognised payment method, a free line left out, a rounding difference, an invoice request not met, or a registered detail not applied.
      One of: `payment_method_default`, `free_line_omitted`, `rounding_difference`, `invoice_requested_invalid_vat`, `invoice_requested_incomplete`, `invoice_customer_is_supplier`, `invoice_request_ambiguous`, `invoice_billing_not_greek`, `invoice_name_from_person`, `invoice_field_truncated`, `invoice_registry_address_not_applied`, `invoice_request_too_late`, `delivery_address_omitted`
    - `detail` · `string` · required
      The warning in a sentence for the merchant.
    - `difference` · `integer | null` · required
      rounding\_difference only: what the customer paid minus the document's gross, in cents (hundredths of the currency), negative when the document is higher; null for every other warning.
      From -9007199254740991 to 9007199254740991
  - `refunds` · `object[]` · required
    The order's refunds sent with POST /store\_orders/{id}/refunds, oldest first, each with its credit note once one was created; empty when there are none.
    Each item: A store order's refund sent to Tallio, and the credit note it became.
    - `id` · `string` · required
      Id of the store refund (ref\_…).
      Pattern: `^ref_[0-9A-Za-z]{22}$`
    - `object` · `string` · required
      Always "store\_refund".
      Always `store_refund`
    - `merchant` · `string` · required
      Id of the merchant (mer\_…).
      Pattern: `^mer_[0-9A-Za-z]{22}$`
    - `store_order` · `string` · required
      The store order it refunds (ord\_…).
      Pattern: `^ord_[0-9A-Za-z]{22}$`
    - `external_id` · `string` · required
      The platform's id of the refund.
    - `status` · `string` · required
      pending (received, or waiting for the order's document to be issued), skipped (it maps to no credit note: see reason), sent (its credit note was created and is on its way to the provider), issued (the credit note was issued), failed (the credit note was rejected, failed or cancelled, or Tallio could not create it: see reason).
      One of: `pending`, `skipped`, `sent`, `issued`, `failed`
    - `reason` · `string | null` · required
      Why the refund is skipped or failed, as a machine code; null otherwise.
    - `detail` · `string | null` · required
      The reason in a sentence for the merchant; null when there is no reason.
    - `document` · `object | null` · required
      The credit note issued for the refund, linked to the order's document, once one was created; null before.
      - `id` · `string` · required
        Id of the document (doc\_…).
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `object` · `string` · required
        Always "document".
        Always `document`
      - `merchant` · `string` · required
        Id of the merchant (mer\_…).
        Pattern: `^mer_[0-9A-Za-z]{22}$`
      - `mode` · `string` · required
        live for a document created with a live key, test for a test key.
        One of: `live`, `test`
      - `provider` · `string` · required
        The licensed e-invoicing provider (a Greek provider, direct myDATA, a French plateforme agréée, Chorus Pro for a French public-sector buyer, or Tallio's sandbox) that issues the document.
        One of: `sandbox`, `mydata`, `wrapp`, `impact`, `epsilon`, `softone`, `prosvasis`, `superpdp`, `choruspro`, `b2brouter`, `oxygen`, `iopole`, `qonto`, `elorus`, `timologisi`
      - `regime` · `string` · required
        Tax regime the document is issued under, by country: GR (Greece, myDATA) or FR (France, e-invoicing through a plateforme agréée).
        One of: `GR`, `FR` · Default: `GR`
      - `type` · `string` · required
        Document type, by regime.
        > **Greece:** An AADE myDATA type (e.g. 1.1).
        
        > **France:** A UNTDID 1001 code (e.g. 380).
        
        One of: `380`, `381`, `384`, `386`, `1.1`, `2.1`, `5.1`, `5.2`, `11.1`, `11.2`, `11.4`, `2.2`, `2.3`
      - `number` · `string | null` · required
        The document's number.
        > **Greece:** The provider's number in its series (e.g. ΕΑΛΠ-1), null until it assigns one: a display label, not unique, so identify a document by its id.
        
        > **France:** The number you assigned (set once issued).
        
        Default: `null`
      - `status` · `string` · required
        Where the document stands: pending (Tallio accepted it; not yet issued, see stage), issued (the tax system accepted it; in Greece it has a MARK), rejected (the provider or the tax system refused it), failed (Tallio could not deliver it to the provider), cancelled (withdrawn before it was sent, or cancelled in myDATA after issue: see mydata.cancellation\_mark).
        One of: `pending`, `issued`, `rejected`, `failed`, `cancelled`
      - `stage` · `string | null` · required
        Where a pending document is (queued, submitting, awaiting\_confirmation, reconciling); null unless status is pending.
        One of: `queued`, `submitting`, `awaiting_confirmation`, `reconciling`
      - `issue_date` · `string` · required
        Issue date, YYYY-MM-DD.
        Format: `date`
      - `currency` · `string` · required
        ISO 4217 currency of the amounts.
        > **Greece:** EUR.
        
        > **France:** Any with cents.
        
        Pattern: `^[A-Z]{3}$`
      - `net` · `integer` · required
        Sum of the lines' net amounts, in minor units, at most 1000000000000000.
        From 0 to 1000000000000000
      - `vat` · `integer` · required
        Sum of the lines' VAT, each line rounded half up to the minor unit, in minor units, at most 1000000000000000.
        From 0 to 1000000000000000
      - `gross` · `integer` · required
        net + vat, in minor units, at most 1250000000000000.
        From 0 to 1250000000000000
      - `provider_reference` · `string | null` · required
        The provider's own reference for the document, once it has taken it; null before.
      - `mydata` · `object | null` · required
        myDATA's identity of the document: an object in GR, null in any other regime.
        - `mark` · `string | null` · required
          MARK (AADE registration number) once issued, as a digit string; null before. A cancelled document keeps the MARK it was issued with (null when it was withdrawn before it was sent).
          Pattern: `^[1-9]\d{0,18}$`
        - `uid` · `string | null` · required
          myDATA uid: the SHA-1 (40 upper-case hex digits) AADE derives from the document's identifiers; null until known.
          Pattern: `^[0-9A-F]{40}$`
        - `qr_url` · `string | null` · required
          URL the document's QR code points to; null until the provider returns one.
          Format: `uri`
        - `cancellation_mark` · `string | null` · required
          The MARK of the cancellation in myDATA, once an issued document is cancelled; null otherwise.
          Pattern: `^[1-9]\d{0,18}$`
      - `ctc` · `object | null` · required
        The French e-invoicing platform's identity of the document: an object in FR, null in any other regime.
        - `platform_id` · `string | null` · required
          The plateforme agréée carrying the document (sandbox in test mode); null until it has taken it.
        - `flow_id` · `string | null` · required
          The platform's id of the flow that carried the document; null until it reports one.
      - `lifecycle` · `object | null` · required
        The tax regime's status for the document once sent.
        > **Greece:** Always null.
        
        > **France:** Null until the platform reports one.
        
        Default: `null`
        - `key` · `string` · required
          Where the document is after issue, in GOBL's bill.Status keys.
          One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
        - `code` · `string` · required
          The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
          1 to 20 characters
        - `at` · `string` · required
          When the regime's platform reported this status.
          Format: `date-time`
      - `lifecycle_history` · `object[]` · required
        Every lifecycle status reported for the document, oldest first, at most the newest 30; the last is lifecycle. Empty in GR. A status after issue (a buyer's 210 Refusée, the platform's 213 Rejetée) never changes status: an issued document stays issued.
        Up to 30 items · Default: `[]`
        Each item: One lifecycle status the tax regime's platform reported for the document.
        - `key` · `string` · required
          Where the document is after issue, in GOBL's bill.Status keys.
          One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
        - `code` · `string` · required
          The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
          1 to 20 characters
        - `at` · `string` · required
          When the regime's platform reported this status.
          Format: `date-time`
        - `provider_status` · `string | null` · required
          The provider's own status the code was read from (e.g. refused, REJETEE, fr:210); null if it gave none.
          1 to 64 characters
          Pattern: `^[A-Za-z0-9_.:-]+$`
        - `reason` · `string | null` · required
          The platform's reason code for a refusal, dispute or rejection, when it reports one; null otherwise. Free-text reasons are not kept.
          1 to 64 characters
          Pattern: `^[A-Za-z0-9_.:-]+$`
      - `error` · `object | null` · required
        Why the document was rejected or failed; null otherwise.
        - `code` · `string` · required
          Stable machine-readable error code. Branch on this, never on `message`.
          One of: `validation_failed`, `unauthorized`, `not_found`, `idempotency_conflict`, `idempotency_in_progress`, `already_exists`, `invalid_grant`, `store_url_mismatch`, `invalid_state`, `already_issued`, `connection_not_disconnected`, `merchant_archived`, `cursor_not_listed`, `payload_too_large`, `unsupported_media_type`, `rate_limited`, `too_many_pending_erasures`, `forbidden`, `restricted_key`, `vendor_suspended`, `subscription_required`, `store_plan_live_only`, `store_unproven`, `not_supported`, `regime_mismatch`, `supplier_mismatch`, `connection_unavailable`, `connection_unconfirmed`, `provider_credentials_invalid`, `provider_rejected`, `balance_exceeded`, `credit_required`, `provider_unavailable`, `pdf_not_ready`, `service_unavailable`, `internal_error`
        - `message` · `string` · required
          Tallio's own explanation, safe to show to a developer; the provider's words are in provider\_message.
        - `provider_code` · `string | null` · required
          The provider's own error code, or null when the error did not come from a provider.
        - `provider_message` · `string | null` · required
          The provider's own error message, verbatim, or null when the error did not come from a provider. On a document or connection it is removed (null), like provider\_raw, once the retention window ends or by a data-subject erasure.
        - `retryable` · `boolean` · required
          True when the same request may succeed if sent again later.
        - `provider_raw` · `any`
          The provider's error response body as received, or a TruncatedProviderRaw marker when it exceeds 4096 bytes of JSON. Never holds request headers, credentials or the request payload.
      - `classification` · `object` · required
        How the document was classified for myDATA.
        - `source` · `string` · required
          default when any line took Tallio's default, else override when any line took the merchant's override, else line.
          One of: `line`, `override`, `default`
        - `warnings` · `string[]` · required
          What to check before issuing, e.g. that defaults were applied.
      - `external_reference` · `string | null` · required
        Your own reference for the document, or null.
        Default: `null`
      - `metadata` · `object` · required
        Up to 50 key-value pairs of your own (keys up to 40 characters, values up to 500). Do not put personal data in it.
        Default: `{}`
        - `{key}` · `string`
          A value, up to 500 characters.
          1 to 40 characters
      - `original_document` · `string | null` · required
        For a credit note made from a Tallio document: that document (doc\_…). Null otherwise.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `replaces` · `string | null` · required
        The rejected or failed document this one was issued to replace, or null.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `corrects` · `string | null` · required
        The issued document this one corrects, or null.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `replaced_by` · `string | null` · required
        The document created to replace this rejected or failed one, the live one if there were several; null otherwise.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `corrected_by` · `string | null` · required
        The document made to correct this one (POST /documents/{id}/correct), the latest if there were several; null otherwise.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `credit_notes` · `string[]` · required
        Credit notes made from this document, oldest first, at most 100.
        Up to 100 items · Default: `[]`
        Each item: Id of the document (doc\_…).
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `amount_credited` · `object` · required
        What credit notes made from this document take, pending ones included. Zero when there are none.
        Default: `{"net":0,"gross":0}`
        - `net` · `integer` · required
          Net amount credited, in cents.
          From 0 to 9007199254740991
        - `gross` · `integer` · required
          Gross amount credited, in cents.
          From 0 to 9007199254740991
      - `timeline` · `object[]` · required
        The document's events, oldest first, at most 100.
        Up to 100 items
        Each item: One event in a document's history. GET /events/{id} returns the full Event.
        - `id` · `string` · required
          Id of the event (evt\_…).
          Pattern: `^evt_[0-9A-Za-z]{22}$`
        - `type` · `string` · required
          What happened: document.created (Tallio accepted a document), document.issued (the tax system accepted it; in Greece it has a MARK), document.rejected (the provider or the tax system refused it), document.failed (Tallio could not deliver it), merchant.created (a merchant was created), connection.created (a merchant was connected to a provider), connection.verified (the provider accepted its credentials), connection.invalid (the provider refused them), connection.disconnected (it was disconnected), connect\_session.completed (a merchant connected through a hosted connect link), webhook\_endpoint.disabled (Tallio disabled an endpoint failing for days), document.retried (a failed document was queued to be sent again), document.credited (a credit note made from the document was issued), document.cancelled (the document was withdrawn or cancelled), document.corrected (a corrected document was made to replace it), document.replaced (a new document was created to replace a rejected or failed one), connection.deleted (a disconnected connection was deleted from the merchant's list), merchant.archived (a merchant was archived: it issues nothing new), merchant.unarchived (an archived merchant was restored), store\_order.updated (a store order's status, reason, handled mark or document changed), document.lifecycle\_updated (the French platform reported a new lifecycle status for an issued document) and connection.updated (a connection's settings changed).
          One of: `document.created`, `document.issued`, `document.rejected`, `document.failed`, `merchant.created`, `connection.created`, `connection.verified`, `connection.invalid`, `connection.disconnected`, `connect_session.completed`, `webhook_endpoint.disabled`, `document.retried`, `document.credited`, `document.cancelled`, `document.corrected`, `document.replaced`, `connection.deleted`, `merchant.archived`, `merchant.unarchived`, `store_order.updated`, `document.lifecycle_updated`, `connection.updated`
        - `created` · `string` · required
          When the event happened.
          Format: `date-time`
      - `issued_at` · `string | null` · required
        When the document was issued (the tax system accepted it); kept if it is cancelled afterwards, null for a document never issued.
        Format: `date-time`
      - `created` · `string` · required
        When Tallio accepted the document.
        Format: `date-time`
      - `updated` · `string` · required
        When the document last changed.
        Format: `date-time`
    - `warnings` · `object[]` · required
      What the merchant should know about the credit note (a rounding cent); empty when there is nothing.
      Each item: Something the merchant should know about the document made for the order; the document was still made.
      - `code` · `string` · required
        What is worth knowing about the document, as a machine code: the store's method used for an unrecognised payment method, a free line left out, a rounding difference, an invoice request not met, or a registered detail not applied.
        One of: `payment_method_default`, `free_line_omitted`, `rounding_difference`, `invoice_requested_invalid_vat`, `invoice_requested_incomplete`, `invoice_customer_is_supplier`, `invoice_request_ambiguous`, `invoice_billing_not_greek`, `invoice_name_from_person`, `invoice_field_truncated`, `invoice_registry_address_not_applied`, `invoice_request_too_late`, `delivery_address_omitted`
      - `detail` · `string` · required
        The warning in a sentence for the merchant.
      - `difference` · `integer | null` · required
        rounding\_difference only: what the customer paid minus the document's gross, in cents (hundredths of the currency), negative when the document is higher; null for every other warning.
        From -9007199254740991 to 9007199254740991
    - `handled` · `string | null` · required
      When the merchant marked the skipped or failed refund handled (POST /store\_orders/{id}/refunds/{refundId}/mark\_handled); null otherwise.
      Format: `date-time`
    - `voided_numbers` · `object[]` · required
      > **Greece:** Always empty.
      
      > **France:** The numbers Tallio numbered the refund's credit note with that no document carries, oldest first, with why; empty otherwise. Each stays a gap in its series, never reused: keep this record of why, since the series must be continuous or each gap justified (CGI ann. II art. 242 nonies A).
      
      Each item: A French number Tallio gave this record that no document carries: kept as a gap in the series.
      - `number` · `string` · required
        The French number left unused.
      - `reason` · `string` · required
        Why the number went unused: handled\_by\_hand (the merchant marked the record handled before an issued document took it: none was made, or the provider rejected the one that carried it), taken (Tallio already held that number for the merchant), not\_issued (the record closed for good, with no document, after it was numbered), replaced (the order was corrected again in place of a correction that was rejected or failed, so never issued under it).
        One of: `handled_by_hand`, `taken`, `not_issued`, `replaced`
    - `action_needed` · `boolean` · required
      Whether the refund waits for the merchant: skipped or failed, not marked handled, and not a skip that needs nothing. A refund waiting for its order's document (original\_not\_issued) is not while the order itself asks; once the order is marked handled it is, and it is credited if the order's document is made.
    - `created` · `string` · required
      When Tallio received the refund.
      Format: `date-time`
  - `handled` · `string | null` · required
    When the merchant marked the skipped or failed order handled (POST /store\_orders/{id}/mark\_handled); null otherwise, and again after a retry.
    Format: `date-time`
  - `voided_numbers` · `object[]` · required
    > **Greece:** Always empty.
    
    > **France:** The numbers Tallio numbered the order's invoice with that no document carries, oldest first, with why; empty otherwise. Each stays a gap in its series, never reused: keep this record of why, since the series must be continuous or each gap justified (CGI ann. II art. 242 nonies A).
    
    Each item: A French number Tallio gave this record that no document carries: kept as a gap in the series.
    - `number` · `string` · required
      The French number left unused.
    - `reason` · `string` · required
      Why the number went unused: handled\_by\_hand (the merchant marked the record handled before an issued document took it: none was made, or the provider rejected the one that carried it), taken (Tallio already held that number for the merchant), not\_issued (the record closed for good, with no document, after it was numbered), replaced (the order was corrected again in place of a correction that was rejected or failed, so never issued under it).
      One of: `handled_by_hand`, `taken`, `not_issued`, `replaced`
  - `action_needed` · `boolean` · required
    Whether the order itself waits for the merchant: skipped or failed, not marked handled, and not a skip that needs nothing (test\_order, no\_lines, sale\_to\_report…). GET /store\_orders?status=action\_needed lists these, and also orders with a refund that waits for the merchant (its own action\_needed).
  - `retryable` · `boolean` · required
    Whether POST /store\_orders/{id}/retry acts on it now: a skip fixed outside the order (provider\_not\_connected, order\_not\_paid, tallio\_refused, number\_taken…), a failed job, or a failed document Tallio can send again, none marked handled. A rejected document is corrected instead.
    > **France:** An invoice held as fr\_numbering\_pending (kept before Tallio numbered store invoices) is retryable even if marked handled: send it again to issue it.
    
  - `correctable` · `boolean` · required
    Whether POST /store\_orders/{id}/correct may act on it now: its document is issued, or was cancelled or credited in full, with no correction yet; or its document is a correction that was rejected or failed (correct again). Not for one partly credited.
    > **France:** Not for an invoice the buyer refused (210) or the platform rejected after issue (213).
    
  - `cancellable` · `boolean` · required
    Whether POST /store\_orders/{id}/cancel may act on it now.
    > **Greece:** Its document is issued, with no correction and no credit note.
    
    > **France:** Never; invoices are never cancelled, only corrected.
    
  - `created` · `string` · required
    When Tallio received the order; a retry of a skip moves it to the retry, since the document is dated by it. A French invoice is dated by the Paris day its number was given instead, which a retry keeps, so the series stays in date order.
    Format: `date-time`

*Example response · 200*

```json
{
  "data": {
    "id": "ord_02y9O8rh7F50tGi0QcWRrx",
    "object": "store_order",
    "merchant": "mer_02y9O8rh7F50tGi0QcWRrx",
    "mode": "live",
    "platform": "shopify",
    "external_id": "1042",
    "number": "1042",
    "status": "pending",
    "reason": null,
    "detail": null,
    "document": {
      "id": "doc_02y9O8rhJKVUXRvojdffcz",
      "object": "document",
      "merchant": "mer_02y9O8rh7F50tGi0QcWRrx",
      "mode": "test",
      "provider": "sandbox",
      "regime": "GR",
      "type": "1.1",
      "number": null,
      "status": "issued",
      "stage": null,
      "issue_date": "2026-10-10",
      "currency": "EUR",
      "net": 2500,
      "vat": 435,
      "gross": 2935,
      "provider_reference": "doc_02y9O8rhJKVUXRvojdffcz",
      "mydata": {
        "mark": "900000000000001",
        "uid": "4E1F0A6C2B9D8E7F6A5B4C3D2E1F0A9B8C7D6E5F",
        "qr_url": "https://sandbox.tallio.invalid/qr/900000000000001",
        "cancellation_mark": null
      },
      "ctc": null,
      "lifecycle": null,
      "lifecycle_history": [],
      "error": null,
      "classification": {
        "source": "default",
        "warnings": [
          "No income classification on line 2; applied the 1.1 default category1_1/E3_561_001. Set it on the line, or as a merchant override, if that is wrong."
        ]
      },
      "external_reference": "#1042",
      "metadata": {
        "order_id": "5520731963508"
      },
      "original_document": null,
      "replaces": null,
      "corrects": null,
      "replaced_by": null,
      "corrected_by": null,
      "credit_notes": [],
      "amount_credited": {
        "net": 0,
        "gross": 0
      },
      "timeline": [
        {
          "id": "evt_02y9O8rhJ2Z2v1fOH2XiSH",
          "type": "document.created",
          "created": "2026-10-11T09:30:00.000Z"
        },
        {
          "id": "evt_02y9O8s1a8ymJqpmAy0nLe",
          "type": "document.issued",
          "created": "2026-10-11T09:30:02.000Z"
        }
      ],
      "issued_at": "2026-10-11T09:30:02.000Z",
      "created": "2026-10-11T09:30:00.000Z",
      "updated": "2026-10-11T09:30:02.000Z"
    },
    "warnings": [],
    "refunds": [],
    "handled": "2026-10-11T09:30:00.000Z",
    "voided_numbers": [],
    "action_needed": false,
    "retryable": false,
    "correctable": false,
    "cancellable": false,
    "created": "2026-10-11T09:30:00.000Z"
  }
}
```

*Response headers*

- `x-request-id` · `string`
  The request's correlation id; quote it when reporting a problem. One of: req\_ plus a uuid (Tallio made it), client: plus the x-request-id you sent (8-128 of A-Z a-z 0-9 . \_ : -), or the hosting platform's id.
  With every response
  Pattern: `^(?:req_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|client:[A-Za-z0-9._:-]{8,128}|[A-Za-z0-9._-]{1,16}::[A-Za-z0-9._:-]{6,110})$`
- `ratelimit-limit` · `integer`
  Requests allowed in the current window for the bucket this request counted against.
  With 200, 400, 404, 409, 413, 415, 429 · At least 1
- `ratelimit-remaining` · `integer`
  Requests left in the current window; 0 means the next one is refused until the window resets.
  With 200, 400, 404, 409, 413, 415, 429 · At least 0
- `ratelimit-reset` · `integer`
  Seconds until the current window resets.
  With 200, 400, 404, 409, 413, 415, 429 · At least 0
- `www-authenticate` · `string`
  The bearer challenge: send a vendor secret key as `Authorization: Bearer <key>`.
  With 401 · Always `Bearer realm="tallio"`
- `retry-after` · `integer`
  Seconds to wait before retrying a request refused with 429 `rate_limited`.
  With 429 · At least 1

*Errors*

| Code | Status | Retryable | Meaning |
| --- | --- | --- | --- |
| `validation_failed` | 400 | No | Request validation failed. |
| `unauthorized` | 401 | No | Authentication is required. |
| `vendor_suspended` | 403 | No | This vendor's access to Tallio is suspended. Its owner can contact Tallio to restore it. |
| `not_found` | 404 | No | The requested resource was not found. |
| `store_url_mismatch` | 409 | No | This store key was granted to another store URL than the one this request names (Tallio-Store-Url). Connect this store again, or confirm that the store moved. |
| `invalid_state` | 409 | No | The object's current state does not allow this request. |
| `payload_too_large` | 413 | No | The request body is too large. |
| `unsupported_media_type` | 415 | No | The request body must be JSON (Content-Type: application/json). |
| `rate_limited` | 429 | Yes | A rate limit was reached. Retry later. |
| `internal_error` | 500 | No | An unexpected server error occurred. |

## Send a refund of a store order

`POST /api/v1/store_orders/{id}/refunds`

Sends a refund of a store order (a WooCommerce refund, say). Tallio credits exactly what was refunded with a credit note linked to the order's document: the whole sale, its lines, or an amount on a single-rate sale. A refund that arrives before the order's document is issued waits for it; one Tallio cannot match is skipped with a reason and waits for the merchant (action\_needed). Credit notes are never counted against a plan's document limit. One store refund per order and platform refund: sending a refund Tallio already holds answers that store refund (200) and credits nothing again, whatever the key. Use a key per refund, such as woo:{site}:refund:{id}. A new refund is 409 invalid\_state once the order holds 100 refunds, or once its document is credited in full: credit it by hand. A refund still waiting for an order with no document is skipped as refund\_expired after the retention window, or once the order is skipped for good. A store key acts on its own merchant only.

*Bearer API key · Idempotency-Key required*

*Path parameters*

- `id` · `string` · required
  The store order's id (ord\_…).

*Header parameters*

- `idempotency-key` · `string` · required
  A key you choose (1-255 printable ASCII characters, e.g. a UUID) that makes a create request safe to retry: the same key with the same body returns the first result instead of creating a second document. Keys starting with `store_order:`, `store_refund:`, `correction:`, `correction_credit:`, `credit_note:` are reserved for Tallio's own documents and refused.
  1 to 255 characters
  Pattern: `^[\x21-\x7E]*$`

*Request body*

- `refund` · `object` · required
  The refund as the platform holds it (StoreRefundSnapshot), amounts positive; Tallio plans the credit, never the store.
  - `amount` · `string` · required
    The money refunded, in the order's currency.
    Pattern: `^(0|[1-9]\d{0,12})(\.\d{1,2})?$`
  - `pending` · `boolean` · required
    The refund's money has not settled yet; the credit waits for it.
  - `test` · `boolean` · required
    A test refund: never a fiscal document.
  - `order_adjustment` · `boolean` · required
    The refund carries an amount not tied to any line (Shopify order adjustments).
  - `order_refunded_total` · `string | null` · required
    Everything refunded on the order so far, this refund included; null when the platform does not say.
    Pattern: `^(0|[1-9]\d{0,12})(\.\d{1,2})?$`
  - `lines` · `object[]` · required
    The lines refunded; empty for an amount-only refund.
    Up to 1000 items
    Each item: What a refund credits on one order line, positive.
    - `kind` · `string` · required
      What the line credits: an item, shipping or a fee.
      One of: `item`, `shipping`, `fee`
    - `line_external_id` · `string | null` · required
      The external\_id of the order line it credits; null when unknown.
      1 to 64 characters
    - `name` · `string` · required
      The credited line's name.
      Up to 1000 characters
    - `sku` · `string`
      The item's SKU.
      Up to 200 characters
    - `product_id` · `string`
      The item's product id.
      Up to 64 characters
    - `gift_card` · `boolean` · required
      The credited item is a gift card.
    - `quantity` · `string` · required
      Units refunded; 0 for an amount refunded on a line, shipping or a fee.
      Pattern: `^\d{1,9}(\.\d{1,6})?$`
    - `total` · `string` · required
      The refunded line's net amount after discounts, tax excluded.
      Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
    - `taxes` · `object[]` · required
      The refunded line's tax, one share per rate; empty when it is untaxed.
      Up to 10 items
      Each item: One rate's share of a line's tax.
      - `rate_id` · `string` · required
        The platform's id of the tax rate (WooCommerce: the key of the line's taxes; Shopify: the rate).
        1 to 64 characters
      - `rate_percent` · `string` · required
        The rate in percent as text, up to 10 decimals: "24", "5.5". A compound rate is never sent.
        Pattern: `^\d{1,3}(\.\d{1,10})?$`
      - `amount` · `string` · required
        The tax at this rate, unrounded when the platform stores it so; negative only on a negative (discount) line, whose tax WooCommerce stores negative too.
        Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
  - `external_id` · `string` · required
    The platform's refund id.
    1 to 64 characters
  - `created_at` · `string` · required
    When the refund was made.
    Format: `date-time`
  - `refunded_payment` · `boolean` · required
    The money went back through the gateway; false for "refund manually". Logged only.

*Request*

*JSON*

```json
{
  "refund": {
    "amount": "81.41",
    "pending": false,
    "test": false,
    "order_adjustment": false,
    "order_refunded_total": "81.41",
    "lines": [],
    "external_id": "string",
    "created_at": "2026-10-12T10:00:00.000Z",
    "refunded_payment": false
  }
}
```

*curl*

```bash
curl -X POST 'https://tallio.dev/api/v1/store_orders/ord_02y9O8rh7F50tGi0QcWRrx/refunds' \
  -H "Authorization: Bearer $TALLIO_API_KEY" \
  -H 'Idempotency-Key: order-1042' \
  -H "Content-Type: application/json" \
  -d '{
  "refund": {
    "amount": "81.41",
    "pending": false,
    "test": false,
    "order_adjustment": false,
    "order_refunded_total": "81.41",
    "lines": [],
    "external_id": "string",
    "created_at": "2026-10-12T10:00:00.000Z",
    "refunded_payment": false
  }
}'
```

*TypeScript SDK*

```ts
import { createTallioClient, unwrap } from "@tallio-dev/sdk";

const tallio = createTallioClient({
  apiKey: process.env.TALLIO_API_KEY!,
  baseUrl: "https://tallio.dev",
});

const result = await unwrap(tallio.http.POST("/api/v1/store_orders/{id}/refunds", {
  params: {
    path: {
      id: "ord_02y9O8rh7F50tGi0QcWRrx",
    },
  },
  body: {
    refund: {
      amount: "81.41",
      pending: false,
      test: false,
      order_adjustment: false,
      order_refunded_total: "81.41",
      lines: [],
      external_id: "string",
      created_at: "2026-10-12T10:00:00.000Z",
      refunded_payment: false,
    },
  },
}));
```

*Responses*

| Status | Description |
| --- | --- |
| `200` | The store refund Tallio already held for this refund. |
| `201` | The store refund, pending. A replay returns the first answer. |
| 4XX, 5XX | An error: see Errors below. |

*Response body · 200*

- `data` · `object` · required
  A store order's refund sent to Tallio, and the credit note it became.
  - `id` · `string` · required
    Id of the store refund (ref\_…).
    Pattern: `^ref_[0-9A-Za-z]{22}$`
  - `object` · `string` · required
    Always "store\_refund".
    Always `store_refund`
  - `merchant` · `string` · required
    Id of the merchant (mer\_…).
    Pattern: `^mer_[0-9A-Za-z]{22}$`
  - `store_order` · `string` · required
    The store order it refunds (ord\_…).
    Pattern: `^ord_[0-9A-Za-z]{22}$`
  - `external_id` · `string` · required
    The platform's id of the refund.
  - `status` · `string` · required
    pending (received, or waiting for the order's document to be issued), skipped (it maps to no credit note: see reason), sent (its credit note was created and is on its way to the provider), issued (the credit note was issued), failed (the credit note was rejected, failed or cancelled, or Tallio could not create it: see reason).
    One of: `pending`, `skipped`, `sent`, `issued`, `failed`
  - `reason` · `string | null` · required
    Why the refund is skipped or failed, as a machine code; null otherwise.
  - `detail` · `string | null` · required
    The reason in a sentence for the merchant; null when there is no reason.
  - `document` · `object | null` · required
    The credit note issued for the refund, linked to the order's document, once one was created; null before.
    - `id` · `string` · required
      Id of the document (doc\_…).
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `object` · `string` · required
      Always "document".
      Always `document`
    - `merchant` · `string` · required
      Id of the merchant (mer\_…).
      Pattern: `^mer_[0-9A-Za-z]{22}$`
    - `mode` · `string` · required
      live for a document created with a live key, test for a test key.
      One of: `live`, `test`
    - `provider` · `string` · required
      The licensed e-invoicing provider (a Greek provider, direct myDATA, a French plateforme agréée, Chorus Pro for a French public-sector buyer, or Tallio's sandbox) that issues the document.
      One of: `sandbox`, `mydata`, `wrapp`, `impact`, `epsilon`, `softone`, `prosvasis`, `superpdp`, `choruspro`, `b2brouter`, `oxygen`, `iopole`, `qonto`, `elorus`, `timologisi`
    - `regime` · `string` · required
      Tax regime the document is issued under, by country: GR (Greece, myDATA) or FR (France, e-invoicing through a plateforme agréée).
      One of: `GR`, `FR` · Default: `GR`
    - `type` · `string` · required
      Document type, by regime.
      > **Greece:** An AADE myDATA type (e.g. 1.1).
      
      > **France:** A UNTDID 1001 code (e.g. 380).
      
      One of: `380`, `381`, `384`, `386`, `1.1`, `2.1`, `5.1`, `5.2`, `11.1`, `11.2`, `11.4`, `2.2`, `2.3`
    - `number` · `string | null` · required
      The document's number.
      > **Greece:** The provider's number in its series (e.g. ΕΑΛΠ-1), null until it assigns one: a display label, not unique, so identify a document by its id.
      
      > **France:** The number you assigned (set once issued).
      
      Default: `null`
    - `status` · `string` · required
      Where the document stands: pending (Tallio accepted it; not yet issued, see stage), issued (the tax system accepted it; in Greece it has a MARK), rejected (the provider or the tax system refused it), failed (Tallio could not deliver it to the provider), cancelled (withdrawn before it was sent, or cancelled in myDATA after issue: see mydata.cancellation\_mark).
      One of: `pending`, `issued`, `rejected`, `failed`, `cancelled`
    - `stage` · `string | null` · required
      Where a pending document is (queued, submitting, awaiting\_confirmation, reconciling); null unless status is pending.
      One of: `queued`, `submitting`, `awaiting_confirmation`, `reconciling`
    - `issue_date` · `string` · required
      Issue date, YYYY-MM-DD.
      Format: `date`
    - `currency` · `string` · required
      ISO 4217 currency of the amounts.
      > **Greece:** EUR.
      
      > **France:** Any with cents.
      
      Pattern: `^[A-Z]{3}$`
    - `net` · `integer` · required
      Sum of the lines' net amounts, in minor units, at most 1000000000000000.
      From 0 to 1000000000000000
    - `vat` · `integer` · required
      Sum of the lines' VAT, each line rounded half up to the minor unit, in minor units, at most 1000000000000000.
      From 0 to 1000000000000000
    - `gross` · `integer` · required
      net + vat, in minor units, at most 1250000000000000.
      From 0 to 1250000000000000
    - `provider_reference` · `string | null` · required
      The provider's own reference for the document, once it has taken it; null before.
    - `mydata` · `object | null` · required
      myDATA's identity of the document: an object in GR, null in any other regime.
      - `mark` · `string | null` · required
        MARK (AADE registration number) once issued, as a digit string; null before. A cancelled document keeps the MARK it was issued with (null when it was withdrawn before it was sent).
        Pattern: `^[1-9]\d{0,18}$`
      - `uid` · `string | null` · required
        myDATA uid: the SHA-1 (40 upper-case hex digits) AADE derives from the document's identifiers; null until known.
        Pattern: `^[0-9A-F]{40}$`
      - `qr_url` · `string | null` · required
        URL the document's QR code points to; null until the provider returns one.
        Format: `uri`
      - `cancellation_mark` · `string | null` · required
        The MARK of the cancellation in myDATA, once an issued document is cancelled; null otherwise.
        Pattern: `^[1-9]\d{0,18}$`
    - `ctc` · `object | null` · required
      The French e-invoicing platform's identity of the document: an object in FR, null in any other regime.
      - `platform_id` · `string | null` · required
        The plateforme agréée carrying the document (sandbox in test mode); null until it has taken it.
      - `flow_id` · `string | null` · required
        The platform's id of the flow that carried the document; null until it reports one.
    - `lifecycle` · `object | null` · required
      The tax regime's status for the document once sent.
      > **Greece:** Always null.
      
      > **France:** Null until the platform reports one.
      
      Default: `null`
      - `key` · `string` · required
        Where the document is after issue, in GOBL's bill.Status keys.
        One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
      - `code` · `string` · required
        The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
        1 to 20 characters
      - `at` · `string` · required
        When the regime's platform reported this status.
        Format: `date-time`
    - `lifecycle_history` · `object[]` · required
      Every lifecycle status reported for the document, oldest first, at most the newest 30; the last is lifecycle. Empty in GR. A status after issue (a buyer's 210 Refusée, the platform's 213 Rejetée) never changes status: an issued document stays issued.
      Up to 30 items · Default: `[]`
      Each item: One lifecycle status the tax regime's platform reported for the document.
      - `key` · `string` · required
        Where the document is after issue, in GOBL's bill.Status keys.
        One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
      - `code` · `string` · required
        The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
        1 to 20 characters
      - `at` · `string` · required
        When the regime's platform reported this status.
        Format: `date-time`
      - `provider_status` · `string | null` · required
        The provider's own status the code was read from (e.g. refused, REJETEE, fr:210); null if it gave none.
        1 to 64 characters
        Pattern: `^[A-Za-z0-9_.:-]+$`
      - `reason` · `string | null` · required
        The platform's reason code for a refusal, dispute or rejection, when it reports one; null otherwise. Free-text reasons are not kept.
        1 to 64 characters
        Pattern: `^[A-Za-z0-9_.:-]+$`
    - `error` · `object | null` · required
      Why the document was rejected or failed; null otherwise.
      - `code` · `string` · required
        Stable machine-readable error code. Branch on this, never on `message`.
        One of: `validation_failed`, `unauthorized`, `not_found`, `idempotency_conflict`, `idempotency_in_progress`, `already_exists`, `invalid_grant`, `store_url_mismatch`, `invalid_state`, `already_issued`, `connection_not_disconnected`, `merchant_archived`, `cursor_not_listed`, `payload_too_large`, `unsupported_media_type`, `rate_limited`, `too_many_pending_erasures`, `forbidden`, `restricted_key`, `vendor_suspended`, `subscription_required`, `store_plan_live_only`, `store_unproven`, `not_supported`, `regime_mismatch`, `supplier_mismatch`, `connection_unavailable`, `connection_unconfirmed`, `provider_credentials_invalid`, `provider_rejected`, `balance_exceeded`, `credit_required`, `provider_unavailable`, `pdf_not_ready`, `service_unavailable`, `internal_error`
      - `message` · `string` · required
        Tallio's own explanation, safe to show to a developer; the provider's words are in provider\_message.
      - `provider_code` · `string | null` · required
        The provider's own error code, or null when the error did not come from a provider.
      - `provider_message` · `string | null` · required
        The provider's own error message, verbatim, or null when the error did not come from a provider. On a document or connection it is removed (null), like provider\_raw, once the retention window ends or by a data-subject erasure.
      - `retryable` · `boolean` · required
        True when the same request may succeed if sent again later.
      - `provider_raw` · `any`
        The provider's error response body as received, or a TruncatedProviderRaw marker when it exceeds 4096 bytes of JSON. Never holds request headers, credentials or the request payload.
    - `classification` · `object` · required
      How the document was classified for myDATA.
      - `source` · `string` · required
        default when any line took Tallio's default, else override when any line took the merchant's override, else line.
        One of: `line`, `override`, `default`
      - `warnings` · `string[]` · required
        What to check before issuing, e.g. that defaults were applied.
    - `external_reference` · `string | null` · required
      Your own reference for the document, or null.
      Default: `null`
    - `metadata` · `object` · required
      Up to 50 key-value pairs of your own (keys up to 40 characters, values up to 500). Do not put personal data in it.
      Default: `{}`
      - `{key}` · `string`
        A value, up to 500 characters.
        1 to 40 characters
    - `original_document` · `string | null` · required
      For a credit note made from a Tallio document: that document (doc\_…). Null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `replaces` · `string | null` · required
      The rejected or failed document this one was issued to replace, or null.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `corrects` · `string | null` · required
      The issued document this one corrects, or null.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `replaced_by` · `string | null` · required
      The document created to replace this rejected or failed one, the live one if there were several; null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `corrected_by` · `string | null` · required
      The document made to correct this one (POST /documents/{id}/correct), the latest if there were several; null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `credit_notes` · `string[]` · required
      Credit notes made from this document, oldest first, at most 100.
      Up to 100 items · Default: `[]`
      Each item: Id of the document (doc\_…).
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `amount_credited` · `object` · required
      What credit notes made from this document take, pending ones included. Zero when there are none.
      Default: `{"net":0,"gross":0}`
      - `net` · `integer` · required
        Net amount credited, in cents.
        From 0 to 9007199254740991
      - `gross` · `integer` · required
        Gross amount credited, in cents.
        From 0 to 9007199254740991
    - `timeline` · `object[]` · required
      The document's events, oldest first, at most 100.
      Up to 100 items
      Each item: One event in a document's history. GET /events/{id} returns the full Event.
      - `id` · `string` · required
        Id of the event (evt\_…).
        Pattern: `^evt_[0-9A-Za-z]{22}$`
      - `type` · `string` · required
        What happened: document.created (Tallio accepted a document), document.issued (the tax system accepted it; in Greece it has a MARK), document.rejected (the provider or the tax system refused it), document.failed (Tallio could not deliver it), merchant.created (a merchant was created), connection.created (a merchant was connected to a provider), connection.verified (the provider accepted its credentials), connection.invalid (the provider refused them), connection.disconnected (it was disconnected), connect\_session.completed (a merchant connected through a hosted connect link), webhook\_endpoint.disabled (Tallio disabled an endpoint failing for days), document.retried (a failed document was queued to be sent again), document.credited (a credit note made from the document was issued), document.cancelled (the document was withdrawn or cancelled), document.corrected (a corrected document was made to replace it), document.replaced (a new document was created to replace a rejected or failed one), connection.deleted (a disconnected connection was deleted from the merchant's list), merchant.archived (a merchant was archived: it issues nothing new), merchant.unarchived (an archived merchant was restored), store\_order.updated (a store order's status, reason, handled mark or document changed), document.lifecycle\_updated (the French platform reported a new lifecycle status for an issued document) and connection.updated (a connection's settings changed).
        One of: `document.created`, `document.issued`, `document.rejected`, `document.failed`, `merchant.created`, `connection.created`, `connection.verified`, `connection.invalid`, `connection.disconnected`, `connect_session.completed`, `webhook_endpoint.disabled`, `document.retried`, `document.credited`, `document.cancelled`, `document.corrected`, `document.replaced`, `connection.deleted`, `merchant.archived`, `merchant.unarchived`, `store_order.updated`, `document.lifecycle_updated`, `connection.updated`
      - `created` · `string` · required
        When the event happened.
        Format: `date-time`
    - `issued_at` · `string | null` · required
      When the document was issued (the tax system accepted it); kept if it is cancelled afterwards, null for a document never issued.
      Format: `date-time`
    - `created` · `string` · required
      When Tallio accepted the document.
      Format: `date-time`
    - `updated` · `string` · required
      When the document last changed.
      Format: `date-time`
  - `warnings` · `object[]` · required
    What the merchant should know about the credit note (a rounding cent); empty when there is nothing.
    Each item: Something the merchant should know about the document made for the order; the document was still made.
    - `code` · `string` · required
      What is worth knowing about the document, as a machine code: the store's method used for an unrecognised payment method, a free line left out, a rounding difference, an invoice request not met, or a registered detail not applied.
      One of: `payment_method_default`, `free_line_omitted`, `rounding_difference`, `invoice_requested_invalid_vat`, `invoice_requested_incomplete`, `invoice_customer_is_supplier`, `invoice_request_ambiguous`, `invoice_billing_not_greek`, `invoice_name_from_person`, `invoice_field_truncated`, `invoice_registry_address_not_applied`, `invoice_request_too_late`, `delivery_address_omitted`
    - `detail` · `string` · required
      The warning in a sentence for the merchant.
    - `difference` · `integer | null` · required
      rounding\_difference only: what the customer paid minus the document's gross, in cents (hundredths of the currency), negative when the document is higher; null for every other warning.
      From -9007199254740991 to 9007199254740991
  - `handled` · `string | null` · required
    When the merchant marked the skipped or failed refund handled (POST /store\_orders/{id}/refunds/{refundId}/mark\_handled); null otherwise.
    Format: `date-time`
  - `voided_numbers` · `object[]` · required
    > **Greece:** Always empty.
    
    > **France:** The numbers Tallio numbered the refund's credit note with that no document carries, oldest first, with why; empty otherwise. Each stays a gap in its series, never reused: keep this record of why, since the series must be continuous or each gap justified (CGI ann. II art. 242 nonies A).
    
    Each item: A French number Tallio gave this record that no document carries: kept as a gap in the series.
    - `number` · `string` · required
      The French number left unused.
    - `reason` · `string` · required
      Why the number went unused: handled\_by\_hand (the merchant marked the record handled before an issued document took it: none was made, or the provider rejected the one that carried it), taken (Tallio already held that number for the merchant), not\_issued (the record closed for good, with no document, after it was numbered), replaced (the order was corrected again in place of a correction that was rejected or failed, so never issued under it).
      One of: `handled_by_hand`, `taken`, `not_issued`, `replaced`
  - `action_needed` · `boolean` · required
    Whether the refund waits for the merchant: skipped or failed, not marked handled, and not a skip that needs nothing. A refund waiting for its order's document (original\_not\_issued) is not while the order itself asks; once the order is marked handled it is, and it is credited if the order's document is made.
  - `created` · `string` · required
    When Tallio received the refund.
    Format: `date-time`

*Example response · 200*

```json
{
  "data": {
    "id": "ref_02y9O8rh7F50tGi0QcWRrx",
    "object": "store_refund",
    "merchant": "mer_02y9O8rh7F50tGi0QcWRrx",
    "store_order": "ord_02y9O8rh7F50tGi0QcWRrx",
    "external_id": "1043",
    "status": "pending",
    "reason": null,
    "detail": null,
    "document": {
      "id": "doc_02y9O8rhJKVUXRvojdffcz",
      "object": "document",
      "merchant": "mer_02y9O8rh7F50tGi0QcWRrx",
      "mode": "test",
      "provider": "sandbox",
      "regime": "GR",
      "type": "1.1",
      "number": null,
      "status": "issued",
      "stage": null,
      "issue_date": "2026-10-10",
      "currency": "EUR",
      "net": 2500,
      "vat": 435,
      "gross": 2935,
      "provider_reference": "doc_02y9O8rhJKVUXRvojdffcz",
      "mydata": {
        "mark": "900000000000001",
        "uid": "4E1F0A6C2B9D8E7F6A5B4C3D2E1F0A9B8C7D6E5F",
        "qr_url": "https://sandbox.tallio.invalid/qr/900000000000001",
        "cancellation_mark": null
      },
      "ctc": null,
      "lifecycle": null,
      "lifecycle_history": [],
      "error": null,
      "classification": {
        "source": "default",
        "warnings": [
          "No income classification on line 2; applied the 1.1 default category1_1/E3_561_001. Set it on the line, or as a merchant override, if that is wrong."
        ]
      },
      "external_reference": "#1042",
      "metadata": {
        "order_id": "5520731963508"
      },
      "original_document": null,
      "replaces": null,
      "corrects": null,
      "replaced_by": null,
      "corrected_by": null,
      "credit_notes": [],
      "amount_credited": {
        "net": 0,
        "gross": 0
      },
      "timeline": [
        {
          "id": "evt_02y9O8rhJ2Z2v1fOH2XiSH",
          "type": "document.created",
          "created": "2026-10-11T09:30:00.000Z"
        },
        {
          "id": "evt_02y9O8s1a8ymJqpmAy0nLe",
          "type": "document.issued",
          "created": "2026-10-11T09:30:02.000Z"
        }
      ],
      "issued_at": "2026-10-11T09:30:02.000Z",
      "created": "2026-10-11T09:30:00.000Z",
      "updated": "2026-10-11T09:30:02.000Z"
    },
    "warnings": [],
    "handled": "2026-10-11T09:30:00.000Z",
    "voided_numbers": [],
    "action_needed": false,
    "created": "2026-10-11T09:30:00.000Z"
  }
}
```

*Response body · 201*

- `data` · `object` · required
  A store order's refund sent to Tallio, and the credit note it became.
  - `id` · `string` · required
    Id of the store refund (ref\_…).
    Pattern: `^ref_[0-9A-Za-z]{22}$`
  - `object` · `string` · required
    Always "store\_refund".
    Always `store_refund`
  - `merchant` · `string` · required
    Id of the merchant (mer\_…).
    Pattern: `^mer_[0-9A-Za-z]{22}$`
  - `store_order` · `string` · required
    The store order it refunds (ord\_…).
    Pattern: `^ord_[0-9A-Za-z]{22}$`
  - `external_id` · `string` · required
    The platform's id of the refund.
  - `status` · `string` · required
    pending (received, or waiting for the order's document to be issued), skipped (it maps to no credit note: see reason), sent (its credit note was created and is on its way to the provider), issued (the credit note was issued), failed (the credit note was rejected, failed or cancelled, or Tallio could not create it: see reason).
    One of: `pending`, `skipped`, `sent`, `issued`, `failed`
  - `reason` · `string | null` · required
    Why the refund is skipped or failed, as a machine code; null otherwise.
  - `detail` · `string | null` · required
    The reason in a sentence for the merchant; null when there is no reason.
  - `document` · `object | null` · required
    The credit note issued for the refund, linked to the order's document, once one was created; null before.
    - `id` · `string` · required
      Id of the document (doc\_…).
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `object` · `string` · required
      Always "document".
      Always `document`
    - `merchant` · `string` · required
      Id of the merchant (mer\_…).
      Pattern: `^mer_[0-9A-Za-z]{22}$`
    - `mode` · `string` · required
      live for a document created with a live key, test for a test key.
      One of: `live`, `test`
    - `provider` · `string` · required
      The licensed e-invoicing provider (a Greek provider, direct myDATA, a French plateforme agréée, Chorus Pro for a French public-sector buyer, or Tallio's sandbox) that issues the document.
      One of: `sandbox`, `mydata`, `wrapp`, `impact`, `epsilon`, `softone`, `prosvasis`, `superpdp`, `choruspro`, `b2brouter`, `oxygen`, `iopole`, `qonto`, `elorus`, `timologisi`
    - `regime` · `string` · required
      Tax regime the document is issued under, by country: GR (Greece, myDATA) or FR (France, e-invoicing through a plateforme agréée).
      One of: `GR`, `FR` · Default: `GR`
    - `type` · `string` · required
      Document type, by regime.
      > **Greece:** An AADE myDATA type (e.g. 1.1).
      
      > **France:** A UNTDID 1001 code (e.g. 380).
      
      One of: `380`, `381`, `384`, `386`, `1.1`, `2.1`, `5.1`, `5.2`, `11.1`, `11.2`, `11.4`, `2.2`, `2.3`
    - `number` · `string | null` · required
      The document's number.
      > **Greece:** The provider's number in its series (e.g. ΕΑΛΠ-1), null until it assigns one: a display label, not unique, so identify a document by its id.
      
      > **France:** The number you assigned (set once issued).
      
      Default: `null`
    - `status` · `string` · required
      Where the document stands: pending (Tallio accepted it; not yet issued, see stage), issued (the tax system accepted it; in Greece it has a MARK), rejected (the provider or the tax system refused it), failed (Tallio could not deliver it to the provider), cancelled (withdrawn before it was sent, or cancelled in myDATA after issue: see mydata.cancellation\_mark).
      One of: `pending`, `issued`, `rejected`, `failed`, `cancelled`
    - `stage` · `string | null` · required
      Where a pending document is (queued, submitting, awaiting\_confirmation, reconciling); null unless status is pending.
      One of: `queued`, `submitting`, `awaiting_confirmation`, `reconciling`
    - `issue_date` · `string` · required
      Issue date, YYYY-MM-DD.
      Format: `date`
    - `currency` · `string` · required
      ISO 4217 currency of the amounts.
      > **Greece:** EUR.
      
      > **France:** Any with cents.
      
      Pattern: `^[A-Z]{3}$`
    - `net` · `integer` · required
      Sum of the lines' net amounts, in minor units, at most 1000000000000000.
      From 0 to 1000000000000000
    - `vat` · `integer` · required
      Sum of the lines' VAT, each line rounded half up to the minor unit, in minor units, at most 1000000000000000.
      From 0 to 1000000000000000
    - `gross` · `integer` · required
      net + vat, in minor units, at most 1250000000000000.
      From 0 to 1250000000000000
    - `provider_reference` · `string | null` · required
      The provider's own reference for the document, once it has taken it; null before.
    - `mydata` · `object | null` · required
      myDATA's identity of the document: an object in GR, null in any other regime.
      - `mark` · `string | null` · required
        MARK (AADE registration number) once issued, as a digit string; null before. A cancelled document keeps the MARK it was issued with (null when it was withdrawn before it was sent).
        Pattern: `^[1-9]\d{0,18}$`
      - `uid` · `string | null` · required
        myDATA uid: the SHA-1 (40 upper-case hex digits) AADE derives from the document's identifiers; null until known.
        Pattern: `^[0-9A-F]{40}$`
      - `qr_url` · `string | null` · required
        URL the document's QR code points to; null until the provider returns one.
        Format: `uri`
      - `cancellation_mark` · `string | null` · required
        The MARK of the cancellation in myDATA, once an issued document is cancelled; null otherwise.
        Pattern: `^[1-9]\d{0,18}$`
    - `ctc` · `object | null` · required
      The French e-invoicing platform's identity of the document: an object in FR, null in any other regime.
      - `platform_id` · `string | null` · required
        The plateforme agréée carrying the document (sandbox in test mode); null until it has taken it.
      - `flow_id` · `string | null` · required
        The platform's id of the flow that carried the document; null until it reports one.
    - `lifecycle` · `object | null` · required
      The tax regime's status for the document once sent.
      > **Greece:** Always null.
      
      > **France:** Null until the platform reports one.
      
      Default: `null`
      - `key` · `string` · required
        Where the document is after issue, in GOBL's bill.Status keys.
        One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
      - `code` · `string` · required
        The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
        1 to 20 characters
      - `at` · `string` · required
        When the regime's platform reported this status.
        Format: `date-time`
    - `lifecycle_history` · `object[]` · required
      Every lifecycle status reported for the document, oldest first, at most the newest 30; the last is lifecycle. Empty in GR. A status after issue (a buyer's 210 Refusée, the platform's 213 Rejetée) never changes status: an issued document stays issued.
      Up to 30 items · Default: `[]`
      Each item: One lifecycle status the tax regime's platform reported for the document.
      - `key` · `string` · required
        Where the document is after issue, in GOBL's bill.Status keys.
        One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
      - `code` · `string` · required
        The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
        1 to 20 characters
      - `at` · `string` · required
        When the regime's platform reported this status.
        Format: `date-time`
      - `provider_status` · `string | null` · required
        The provider's own status the code was read from (e.g. refused, REJETEE, fr:210); null if it gave none.
        1 to 64 characters
        Pattern: `^[A-Za-z0-9_.:-]+$`
      - `reason` · `string | null` · required
        The platform's reason code for a refusal, dispute or rejection, when it reports one; null otherwise. Free-text reasons are not kept.
        1 to 64 characters
        Pattern: `^[A-Za-z0-9_.:-]+$`
    - `error` · `object | null` · required
      Why the document was rejected or failed; null otherwise.
      - `code` · `string` · required
        Stable machine-readable error code. Branch on this, never on `message`.
        One of: `validation_failed`, `unauthorized`, `not_found`, `idempotency_conflict`, `idempotency_in_progress`, `already_exists`, `invalid_grant`, `store_url_mismatch`, `invalid_state`, `already_issued`, `connection_not_disconnected`, `merchant_archived`, `cursor_not_listed`, `payload_too_large`, `unsupported_media_type`, `rate_limited`, `too_many_pending_erasures`, `forbidden`, `restricted_key`, `vendor_suspended`, `subscription_required`, `store_plan_live_only`, `store_unproven`, `not_supported`, `regime_mismatch`, `supplier_mismatch`, `connection_unavailable`, `connection_unconfirmed`, `provider_credentials_invalid`, `provider_rejected`, `balance_exceeded`, `credit_required`, `provider_unavailable`, `pdf_not_ready`, `service_unavailable`, `internal_error`
      - `message` · `string` · required
        Tallio's own explanation, safe to show to a developer; the provider's words are in provider\_message.
      - `provider_code` · `string | null` · required
        The provider's own error code, or null when the error did not come from a provider.
      - `provider_message` · `string | null` · required
        The provider's own error message, verbatim, or null when the error did not come from a provider. On a document or connection it is removed (null), like provider\_raw, once the retention window ends or by a data-subject erasure.
      - `retryable` · `boolean` · required
        True when the same request may succeed if sent again later.
      - `provider_raw` · `any`
        The provider's error response body as received, or a TruncatedProviderRaw marker when it exceeds 4096 bytes of JSON. Never holds request headers, credentials or the request payload.
    - `classification` · `object` · required
      How the document was classified for myDATA.
      - `source` · `string` · required
        default when any line took Tallio's default, else override when any line took the merchant's override, else line.
        One of: `line`, `override`, `default`
      - `warnings` · `string[]` · required
        What to check before issuing, e.g. that defaults were applied.
    - `external_reference` · `string | null` · required
      Your own reference for the document, or null.
      Default: `null`
    - `metadata` · `object` · required
      Up to 50 key-value pairs of your own (keys up to 40 characters, values up to 500). Do not put personal data in it.
      Default: `{}`
      - `{key}` · `string`
        A value, up to 500 characters.
        1 to 40 characters
    - `original_document` · `string | null` · required
      For a credit note made from a Tallio document: that document (doc\_…). Null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `replaces` · `string | null` · required
      The rejected or failed document this one was issued to replace, or null.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `corrects` · `string | null` · required
      The issued document this one corrects, or null.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `replaced_by` · `string | null` · required
      The document created to replace this rejected or failed one, the live one if there were several; null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `corrected_by` · `string | null` · required
      The document made to correct this one (POST /documents/{id}/correct), the latest if there were several; null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `credit_notes` · `string[]` · required
      Credit notes made from this document, oldest first, at most 100.
      Up to 100 items · Default: `[]`
      Each item: Id of the document (doc\_…).
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `amount_credited` · `object` · required
      What credit notes made from this document take, pending ones included. Zero when there are none.
      Default: `{"net":0,"gross":0}`
      - `net` · `integer` · required
        Net amount credited, in cents.
        From 0 to 9007199254740991
      - `gross` · `integer` · required
        Gross amount credited, in cents.
        From 0 to 9007199254740991
    - `timeline` · `object[]` · required
      The document's events, oldest first, at most 100.
      Up to 100 items
      Each item: One event in a document's history. GET /events/{id} returns the full Event.
      - `id` · `string` · required
        Id of the event (evt\_…).
        Pattern: `^evt_[0-9A-Za-z]{22}$`
      - `type` · `string` · required
        What happened: document.created (Tallio accepted a document), document.issued (the tax system accepted it; in Greece it has a MARK), document.rejected (the provider or the tax system refused it), document.failed (Tallio could not deliver it), merchant.created (a merchant was created), connection.created (a merchant was connected to a provider), connection.verified (the provider accepted its credentials), connection.invalid (the provider refused them), connection.disconnected (it was disconnected), connect\_session.completed (a merchant connected through a hosted connect link), webhook\_endpoint.disabled (Tallio disabled an endpoint failing for days), document.retried (a failed document was queued to be sent again), document.credited (a credit note made from the document was issued), document.cancelled (the document was withdrawn or cancelled), document.corrected (a corrected document was made to replace it), document.replaced (a new document was created to replace a rejected or failed one), connection.deleted (a disconnected connection was deleted from the merchant's list), merchant.archived (a merchant was archived: it issues nothing new), merchant.unarchived (an archived merchant was restored), store\_order.updated (a store order's status, reason, handled mark or document changed), document.lifecycle\_updated (the French platform reported a new lifecycle status for an issued document) and connection.updated (a connection's settings changed).
        One of: `document.created`, `document.issued`, `document.rejected`, `document.failed`, `merchant.created`, `connection.created`, `connection.verified`, `connection.invalid`, `connection.disconnected`, `connect_session.completed`, `webhook_endpoint.disabled`, `document.retried`, `document.credited`, `document.cancelled`, `document.corrected`, `document.replaced`, `connection.deleted`, `merchant.archived`, `merchant.unarchived`, `store_order.updated`, `document.lifecycle_updated`, `connection.updated`
      - `created` · `string` · required
        When the event happened.
        Format: `date-time`
    - `issued_at` · `string | null` · required
      When the document was issued (the tax system accepted it); kept if it is cancelled afterwards, null for a document never issued.
      Format: `date-time`
    - `created` · `string` · required
      When Tallio accepted the document.
      Format: `date-time`
    - `updated` · `string` · required
      When the document last changed.
      Format: `date-time`
  - `warnings` · `object[]` · required
    What the merchant should know about the credit note (a rounding cent); empty when there is nothing.
    Each item: Something the merchant should know about the document made for the order; the document was still made.
    - `code` · `string` · required
      What is worth knowing about the document, as a machine code: the store's method used for an unrecognised payment method, a free line left out, a rounding difference, an invoice request not met, or a registered detail not applied.
      One of: `payment_method_default`, `free_line_omitted`, `rounding_difference`, `invoice_requested_invalid_vat`, `invoice_requested_incomplete`, `invoice_customer_is_supplier`, `invoice_request_ambiguous`, `invoice_billing_not_greek`, `invoice_name_from_person`, `invoice_field_truncated`, `invoice_registry_address_not_applied`, `invoice_request_too_late`, `delivery_address_omitted`
    - `detail` · `string` · required
      The warning in a sentence for the merchant.
    - `difference` · `integer | null` · required
      rounding\_difference only: what the customer paid minus the document's gross, in cents (hundredths of the currency), negative when the document is higher; null for every other warning.
      From -9007199254740991 to 9007199254740991
  - `handled` · `string | null` · required
    When the merchant marked the skipped or failed refund handled (POST /store\_orders/{id}/refunds/{refundId}/mark\_handled); null otherwise.
    Format: `date-time`
  - `voided_numbers` · `object[]` · required
    > **Greece:** Always empty.
    
    > **France:** The numbers Tallio numbered the refund's credit note with that no document carries, oldest first, with why; empty otherwise. Each stays a gap in its series, never reused: keep this record of why, since the series must be continuous or each gap justified (CGI ann. II art. 242 nonies A).
    
    Each item: A French number Tallio gave this record that no document carries: kept as a gap in the series.
    - `number` · `string` · required
      The French number left unused.
    - `reason` · `string` · required
      Why the number went unused: handled\_by\_hand (the merchant marked the record handled before an issued document took it: none was made, or the provider rejected the one that carried it), taken (Tallio already held that number for the merchant), not\_issued (the record closed for good, with no document, after it was numbered), replaced (the order was corrected again in place of a correction that was rejected or failed, so never issued under it).
      One of: `handled_by_hand`, `taken`, `not_issued`, `replaced`
  - `action_needed` · `boolean` · required
    Whether the refund waits for the merchant: skipped or failed, not marked handled, and not a skip that needs nothing. A refund waiting for its order's document (original\_not\_issued) is not while the order itself asks; once the order is marked handled it is, and it is credited if the order's document is made.
  - `created` · `string` · required
    When Tallio received the refund.
    Format: `date-time`

*Example response · 201*

```json
{
  "data": {
    "id": "ref_02y9O8rh7F50tGi0QcWRrx",
    "object": "store_refund",
    "merchant": "mer_02y9O8rh7F50tGi0QcWRrx",
    "store_order": "ord_02y9O8rh7F50tGi0QcWRrx",
    "external_id": "1043",
    "status": "pending",
    "reason": null,
    "detail": null,
    "document": {
      "id": "doc_02y9O8rhJKVUXRvojdffcz",
      "object": "document",
      "merchant": "mer_02y9O8rh7F50tGi0QcWRrx",
      "mode": "test",
      "provider": "sandbox",
      "regime": "GR",
      "type": "1.1",
      "number": null,
      "status": "issued",
      "stage": null,
      "issue_date": "2026-10-10",
      "currency": "EUR",
      "net": 2500,
      "vat": 435,
      "gross": 2935,
      "provider_reference": "doc_02y9O8rhJKVUXRvojdffcz",
      "mydata": {
        "mark": "900000000000001",
        "uid": "4E1F0A6C2B9D8E7F6A5B4C3D2E1F0A9B8C7D6E5F",
        "qr_url": "https://sandbox.tallio.invalid/qr/900000000000001",
        "cancellation_mark": null
      },
      "ctc": null,
      "lifecycle": null,
      "lifecycle_history": [],
      "error": null,
      "classification": {
        "source": "default",
        "warnings": [
          "No income classification on line 2; applied the 1.1 default category1_1/E3_561_001. Set it on the line, or as a merchant override, if that is wrong."
        ]
      },
      "external_reference": "#1042",
      "metadata": {
        "order_id": "5520731963508"
      },
      "original_document": null,
      "replaces": null,
      "corrects": null,
      "replaced_by": null,
      "corrected_by": null,
      "credit_notes": [],
      "amount_credited": {
        "net": 0,
        "gross": 0
      },
      "timeline": [
        {
          "id": "evt_02y9O8rhJ2Z2v1fOH2XiSH",
          "type": "document.created",
          "created": "2026-10-11T09:30:00.000Z"
        },
        {
          "id": "evt_02y9O8s1a8ymJqpmAy0nLe",
          "type": "document.issued",
          "created": "2026-10-11T09:30:02.000Z"
        }
      ],
      "issued_at": "2026-10-11T09:30:02.000Z",
      "created": "2026-10-11T09:30:00.000Z",
      "updated": "2026-10-11T09:30:02.000Z"
    },
    "warnings": [],
    "handled": "2026-10-11T09:30:00.000Z",
    "voided_numbers": [],
    "action_needed": false,
    "created": "2026-10-11T09:30:00.000Z"
  }
}
```

*Response headers*

- `x-request-id` · `string`
  The request's correlation id; quote it when reporting a problem. One of: req\_ plus a uuid (Tallio made it), client: plus the x-request-id you sent (8-128 of A-Z a-z 0-9 . \_ : -), or the hosting platform's id.
  With every response
  Pattern: `^(?:req_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|client:[A-Za-z0-9._:-]{8,128}|[A-Za-z0-9._-]{1,16}::[A-Za-z0-9._:-]{6,110})$`
- `ratelimit-limit` · `integer`
  Requests allowed in the current window for the bucket this request counted against.
  With 200, 201, 400, 404, 409, 413, 415, 429 · At least 1
- `ratelimit-remaining` · `integer`
  Requests left in the current window; 0 means the next one is refused until the window resets.
  With 200, 201, 400, 404, 409, 413, 415, 429 · At least 0
- `ratelimit-reset` · `integer`
  Seconds until the current window resets.
  With 200, 201, 400, 404, 409, 413, 415, 429 · At least 0
- `idempotent-replayed` · `string`
  true when this answer replays an earlier request with the same Idempotency-Key (nothing new was created); absent on the request that created it.
  With 200, 201 · Always `true`
- `www-authenticate` · `string`
  The bearer challenge: send a vendor secret key as `Authorization: Bearer <key>`.
  With 401 · Always `Bearer realm="tallio"`
- `retry-after` · `integer`
  Seconds to wait before retrying a request refused with 429 `rate_limited`.
  With 429 · At least 1

*Errors*

| Code | Status | Retryable | Meaning |
| --- | --- | --- | --- |
| `validation_failed` | 400 | No | Request validation failed. |
| `unauthorized` | 401 | No | Authentication is required. |
| `vendor_suspended` | 403 | No | This vendor's access to Tallio is suspended. Its owner can contact Tallio to restore it. |
| `not_found` | 404 | No | The requested resource was not found. |
| `store_url_mismatch` | 409 | No | This store key was granted to another store URL than the one this request names (Tallio-Store-Url). Connect this store again, or confirm that the store moved. |
| `idempotency_conflict` | 409 | No | This idempotency key was already used with a different request. |
| `idempotency_in_progress` | 409 | Yes | A request with this idempotency key is still in progress; retry it after Retry-After to get its answer. |
| `merchant_archived` | 409 | No | This merchant is archived: it issues and connects nothing new. Unarchive it first (POST /merchants/{id}/unarchive). |
| `invalid_state` | 409 | No | The object's current state does not allow this request. |
| `payload_too_large` | 413 | No | The request body is too large. |
| `unsupported_media_type` | 415 | No | The request body must be JSON (Content-Type: application/json). |
| `rate_limited` | 429 | Yes | A rate limit was reached. Retry later. |
| `internal_error` | 500 | No | An unexpected server error occurred. |

## Mark a store refund handled

`POST /api/v1/store_orders/{id}/refunds/{refundId}/mark_handled`

Records that the merchant credited a skipped or failed store refund by hand, which takes it (and its order, when nothing else waits) off status=action\_needed; the refund and its reason stay. Marking one already handled answers it as it is. Anything else, or a reason that changed since the merchant saw it, is 409 invalid\_state. Recorded in the team's audit log.

*Bearer API key*

*Path parameters*

- `id` · `string` · required
  The store order's id (ord\_…).
- `refundId` · `string` · required
  The store refund's id (ref\_…).

*Request body*

- `reason` · `string`
  The reason code the merchant saw. When given and the refund's reason has changed since, 409 invalid\_state, so a newer outcome is never hidden unread.
  1 to 64 characters

*Request*

*JSON*

```json
{}
```

*curl*

```bash
curl -X POST 'https://tallio.dev/api/v1/store_orders/ord_02y9O8rh7F50tGi0QcWRrx/refunds/ref_02y9O8rh7F50tGi0QcWRry/mark_handled' \
  -H "Authorization: Bearer $TALLIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

*TypeScript SDK*

```ts
import { createTallioClient, unwrap } from "@tallio-dev/sdk";

const tallio = createTallioClient({
  apiKey: process.env.TALLIO_API_KEY!,
  baseUrl: "https://tallio.dev",
});

const result = await unwrap(tallio.http.POST("/api/v1/store_orders/{id}/refunds/{refundId}/mark_handled", {
  params: {
    path: {
      id: "ord_02y9O8rh7F50tGi0QcWRrx",
      refundId: "ref_02y9O8rh7F50tGi0QcWRry",
    },
  },
  body: {},
}));
```

*Responses*

| Status | Description |
| --- | --- |
| `200` | The store refund, marked handled. |
| 4XX, 5XX | An error: see Errors below. |

*Response body · 200*

- `data` · `object` · required
  A store order's refund sent to Tallio, and the credit note it became.
  - `id` · `string` · required
    Id of the store refund (ref\_…).
    Pattern: `^ref_[0-9A-Za-z]{22}$`
  - `object` · `string` · required
    Always "store\_refund".
    Always `store_refund`
  - `merchant` · `string` · required
    Id of the merchant (mer\_…).
    Pattern: `^mer_[0-9A-Za-z]{22}$`
  - `store_order` · `string` · required
    The store order it refunds (ord\_…).
    Pattern: `^ord_[0-9A-Za-z]{22}$`
  - `external_id` · `string` · required
    The platform's id of the refund.
  - `status` · `string` · required
    pending (received, or waiting for the order's document to be issued), skipped (it maps to no credit note: see reason), sent (its credit note was created and is on its way to the provider), issued (the credit note was issued), failed (the credit note was rejected, failed or cancelled, or Tallio could not create it: see reason).
    One of: `pending`, `skipped`, `sent`, `issued`, `failed`
  - `reason` · `string | null` · required
    Why the refund is skipped or failed, as a machine code; null otherwise.
  - `detail` · `string | null` · required
    The reason in a sentence for the merchant; null when there is no reason.
  - `document` · `object | null` · required
    The credit note issued for the refund, linked to the order's document, once one was created; null before.
    - `id` · `string` · required
      Id of the document (doc\_…).
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `object` · `string` · required
      Always "document".
      Always `document`
    - `merchant` · `string` · required
      Id of the merchant (mer\_…).
      Pattern: `^mer_[0-9A-Za-z]{22}$`
    - `mode` · `string` · required
      live for a document created with a live key, test for a test key.
      One of: `live`, `test`
    - `provider` · `string` · required
      The licensed e-invoicing provider (a Greek provider, direct myDATA, a French plateforme agréée, Chorus Pro for a French public-sector buyer, or Tallio's sandbox) that issues the document.
      One of: `sandbox`, `mydata`, `wrapp`, `impact`, `epsilon`, `softone`, `prosvasis`, `superpdp`, `choruspro`, `b2brouter`, `oxygen`, `iopole`, `qonto`, `elorus`, `timologisi`
    - `regime` · `string` · required
      Tax regime the document is issued under, by country: GR (Greece, myDATA) or FR (France, e-invoicing through a plateforme agréée).
      One of: `GR`, `FR` · Default: `GR`
    - `type` · `string` · required
      Document type, by regime.
      > **Greece:** An AADE myDATA type (e.g. 1.1).
      
      > **France:** A UNTDID 1001 code (e.g. 380).
      
      One of: `380`, `381`, `384`, `386`, `1.1`, `2.1`, `5.1`, `5.2`, `11.1`, `11.2`, `11.4`, `2.2`, `2.3`
    - `number` · `string | null` · required
      The document's number.
      > **Greece:** The provider's number in its series (e.g. ΕΑΛΠ-1), null until it assigns one: a display label, not unique, so identify a document by its id.
      
      > **France:** The number you assigned (set once issued).
      
      Default: `null`
    - `status` · `string` · required
      Where the document stands: pending (Tallio accepted it; not yet issued, see stage), issued (the tax system accepted it; in Greece it has a MARK), rejected (the provider or the tax system refused it), failed (Tallio could not deliver it to the provider), cancelled (withdrawn before it was sent, or cancelled in myDATA after issue: see mydata.cancellation\_mark).
      One of: `pending`, `issued`, `rejected`, `failed`, `cancelled`
    - `stage` · `string | null` · required
      Where a pending document is (queued, submitting, awaiting\_confirmation, reconciling); null unless status is pending.
      One of: `queued`, `submitting`, `awaiting_confirmation`, `reconciling`
    - `issue_date` · `string` · required
      Issue date, YYYY-MM-DD.
      Format: `date`
    - `currency` · `string` · required
      ISO 4217 currency of the amounts.
      > **Greece:** EUR.
      
      > **France:** Any with cents.
      
      Pattern: `^[A-Z]{3}$`
    - `net` · `integer` · required
      Sum of the lines' net amounts, in minor units, at most 1000000000000000.
      From 0 to 1000000000000000
    - `vat` · `integer` · required
      Sum of the lines' VAT, each line rounded half up to the minor unit, in minor units, at most 1000000000000000.
      From 0 to 1000000000000000
    - `gross` · `integer` · required
      net + vat, in minor units, at most 1250000000000000.
      From 0 to 1250000000000000
    - `provider_reference` · `string | null` · required
      The provider's own reference for the document, once it has taken it; null before.
    - `mydata` · `object | null` · required
      myDATA's identity of the document: an object in GR, null in any other regime.
      - `mark` · `string | null` · required
        MARK (AADE registration number) once issued, as a digit string; null before. A cancelled document keeps the MARK it was issued with (null when it was withdrawn before it was sent).
        Pattern: `^[1-9]\d{0,18}$`
      - `uid` · `string | null` · required
        myDATA uid: the SHA-1 (40 upper-case hex digits) AADE derives from the document's identifiers; null until known.
        Pattern: `^[0-9A-F]{40}$`
      - `qr_url` · `string | null` · required
        URL the document's QR code points to; null until the provider returns one.
        Format: `uri`
      - `cancellation_mark` · `string | null` · required
        The MARK of the cancellation in myDATA, once an issued document is cancelled; null otherwise.
        Pattern: `^[1-9]\d{0,18}$`
    - `ctc` · `object | null` · required
      The French e-invoicing platform's identity of the document: an object in FR, null in any other regime.
      - `platform_id` · `string | null` · required
        The plateforme agréée carrying the document (sandbox in test mode); null until it has taken it.
      - `flow_id` · `string | null` · required
        The platform's id of the flow that carried the document; null until it reports one.
    - `lifecycle` · `object | null` · required
      The tax regime's status for the document once sent.
      > **Greece:** Always null.
      
      > **France:** Null until the platform reports one.
      
      Default: `null`
      - `key` · `string` · required
        Where the document is after issue, in GOBL's bill.Status keys.
        One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
      - `code` · `string` · required
        The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
        1 to 20 characters
      - `at` · `string` · required
        When the regime's platform reported this status.
        Format: `date-time`
    - `lifecycle_history` · `object[]` · required
      Every lifecycle status reported for the document, oldest first, at most the newest 30; the last is lifecycle. Empty in GR. A status after issue (a buyer's 210 Refusée, the platform's 213 Rejetée) never changes status: an issued document stays issued.
      Up to 30 items · Default: `[]`
      Each item: One lifecycle status the tax regime's platform reported for the document.
      - `key` · `string` · required
        Where the document is after issue, in GOBL's bill.Status keys.
        One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
      - `code` · `string` · required
        The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
        1 to 20 characters
      - `at` · `string` · required
        When the regime's platform reported this status.
        Format: `date-time`
      - `provider_status` · `string | null` · required
        The provider's own status the code was read from (e.g. refused, REJETEE, fr:210); null if it gave none.
        1 to 64 characters
        Pattern: `^[A-Za-z0-9_.:-]+$`
      - `reason` · `string | null` · required
        The platform's reason code for a refusal, dispute or rejection, when it reports one; null otherwise. Free-text reasons are not kept.
        1 to 64 characters
        Pattern: `^[A-Za-z0-9_.:-]+$`
    - `error` · `object | null` · required
      Why the document was rejected or failed; null otherwise.
      - `code` · `string` · required
        Stable machine-readable error code. Branch on this, never on `message`.
        One of: `validation_failed`, `unauthorized`, `not_found`, `idempotency_conflict`, `idempotency_in_progress`, `already_exists`, `invalid_grant`, `store_url_mismatch`, `invalid_state`, `already_issued`, `connection_not_disconnected`, `merchant_archived`, `cursor_not_listed`, `payload_too_large`, `unsupported_media_type`, `rate_limited`, `too_many_pending_erasures`, `forbidden`, `restricted_key`, `vendor_suspended`, `subscription_required`, `store_plan_live_only`, `store_unproven`, `not_supported`, `regime_mismatch`, `supplier_mismatch`, `connection_unavailable`, `connection_unconfirmed`, `provider_credentials_invalid`, `provider_rejected`, `balance_exceeded`, `credit_required`, `provider_unavailable`, `pdf_not_ready`, `service_unavailable`, `internal_error`
      - `message` · `string` · required
        Tallio's own explanation, safe to show to a developer; the provider's words are in provider\_message.
      - `provider_code` · `string | null` · required
        The provider's own error code, or null when the error did not come from a provider.
      - `provider_message` · `string | null` · required
        The provider's own error message, verbatim, or null when the error did not come from a provider. On a document or connection it is removed (null), like provider\_raw, once the retention window ends or by a data-subject erasure.
      - `retryable` · `boolean` · required
        True when the same request may succeed if sent again later.
      - `provider_raw` · `any`
        The provider's error response body as received, or a TruncatedProviderRaw marker when it exceeds 4096 bytes of JSON. Never holds request headers, credentials or the request payload.
    - `classification` · `object` · required
      How the document was classified for myDATA.
      - `source` · `string` · required
        default when any line took Tallio's default, else override when any line took the merchant's override, else line.
        One of: `line`, `override`, `default`
      - `warnings` · `string[]` · required
        What to check before issuing, e.g. that defaults were applied.
    - `external_reference` · `string | null` · required
      Your own reference for the document, or null.
      Default: `null`
    - `metadata` · `object` · required
      Up to 50 key-value pairs of your own (keys up to 40 characters, values up to 500). Do not put personal data in it.
      Default: `{}`
      - `{key}` · `string`
        A value, up to 500 characters.
        1 to 40 characters
    - `original_document` · `string | null` · required
      For a credit note made from a Tallio document: that document (doc\_…). Null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `replaces` · `string | null` · required
      The rejected or failed document this one was issued to replace, or null.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `corrects` · `string | null` · required
      The issued document this one corrects, or null.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `replaced_by` · `string | null` · required
      The document created to replace this rejected or failed one, the live one if there were several; null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `corrected_by` · `string | null` · required
      The document made to correct this one (POST /documents/{id}/correct), the latest if there were several; null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `credit_notes` · `string[]` · required
      Credit notes made from this document, oldest first, at most 100.
      Up to 100 items · Default: `[]`
      Each item: Id of the document (doc\_…).
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `amount_credited` · `object` · required
      What credit notes made from this document take, pending ones included. Zero when there are none.
      Default: `{"net":0,"gross":0}`
      - `net` · `integer` · required
        Net amount credited, in cents.
        From 0 to 9007199254740991
      - `gross` · `integer` · required
        Gross amount credited, in cents.
        From 0 to 9007199254740991
    - `timeline` · `object[]` · required
      The document's events, oldest first, at most 100.
      Up to 100 items
      Each item: One event in a document's history. GET /events/{id} returns the full Event.
      - `id` · `string` · required
        Id of the event (evt\_…).
        Pattern: `^evt_[0-9A-Za-z]{22}$`
      - `type` · `string` · required
        What happened: document.created (Tallio accepted a document), document.issued (the tax system accepted it; in Greece it has a MARK), document.rejected (the provider or the tax system refused it), document.failed (Tallio could not deliver it), merchant.created (a merchant was created), connection.created (a merchant was connected to a provider), connection.verified (the provider accepted its credentials), connection.invalid (the provider refused them), connection.disconnected (it was disconnected), connect\_session.completed (a merchant connected through a hosted connect link), webhook\_endpoint.disabled (Tallio disabled an endpoint failing for days), document.retried (a failed document was queued to be sent again), document.credited (a credit note made from the document was issued), document.cancelled (the document was withdrawn or cancelled), document.corrected (a corrected document was made to replace it), document.replaced (a new document was created to replace a rejected or failed one), connection.deleted (a disconnected connection was deleted from the merchant's list), merchant.archived (a merchant was archived: it issues nothing new), merchant.unarchived (an archived merchant was restored), store\_order.updated (a store order's status, reason, handled mark or document changed), document.lifecycle\_updated (the French platform reported a new lifecycle status for an issued document) and connection.updated (a connection's settings changed).
        One of: `document.created`, `document.issued`, `document.rejected`, `document.failed`, `merchant.created`, `connection.created`, `connection.verified`, `connection.invalid`, `connection.disconnected`, `connect_session.completed`, `webhook_endpoint.disabled`, `document.retried`, `document.credited`, `document.cancelled`, `document.corrected`, `document.replaced`, `connection.deleted`, `merchant.archived`, `merchant.unarchived`, `store_order.updated`, `document.lifecycle_updated`, `connection.updated`
      - `created` · `string` · required
        When the event happened.
        Format: `date-time`
    - `issued_at` · `string | null` · required
      When the document was issued (the tax system accepted it); kept if it is cancelled afterwards, null for a document never issued.
      Format: `date-time`
    - `created` · `string` · required
      When Tallio accepted the document.
      Format: `date-time`
    - `updated` · `string` · required
      When the document last changed.
      Format: `date-time`
  - `warnings` · `object[]` · required
    What the merchant should know about the credit note (a rounding cent); empty when there is nothing.
    Each item: Something the merchant should know about the document made for the order; the document was still made.
    - `code` · `string` · required
      What is worth knowing about the document, as a machine code: the store's method used for an unrecognised payment method, a free line left out, a rounding difference, an invoice request not met, or a registered detail not applied.
      One of: `payment_method_default`, `free_line_omitted`, `rounding_difference`, `invoice_requested_invalid_vat`, `invoice_requested_incomplete`, `invoice_customer_is_supplier`, `invoice_request_ambiguous`, `invoice_billing_not_greek`, `invoice_name_from_person`, `invoice_field_truncated`, `invoice_registry_address_not_applied`, `invoice_request_too_late`, `delivery_address_omitted`
    - `detail` · `string` · required
      The warning in a sentence for the merchant.
    - `difference` · `integer | null` · required
      rounding\_difference only: what the customer paid minus the document's gross, in cents (hundredths of the currency), negative when the document is higher; null for every other warning.
      From -9007199254740991 to 9007199254740991
  - `handled` · `string | null` · required
    When the merchant marked the skipped or failed refund handled (POST /store\_orders/{id}/refunds/{refundId}/mark\_handled); null otherwise.
    Format: `date-time`
  - `voided_numbers` · `object[]` · required
    > **Greece:** Always empty.
    
    > **France:** The numbers Tallio numbered the refund's credit note with that no document carries, oldest first, with why; empty otherwise. Each stays a gap in its series, never reused: keep this record of why, since the series must be continuous or each gap justified (CGI ann. II art. 242 nonies A).
    
    Each item: A French number Tallio gave this record that no document carries: kept as a gap in the series.
    - `number` · `string` · required
      The French number left unused.
    - `reason` · `string` · required
      Why the number went unused: handled\_by\_hand (the merchant marked the record handled before an issued document took it: none was made, or the provider rejected the one that carried it), taken (Tallio already held that number for the merchant), not\_issued (the record closed for good, with no document, after it was numbered), replaced (the order was corrected again in place of a correction that was rejected or failed, so never issued under it).
      One of: `handled_by_hand`, `taken`, `not_issued`, `replaced`
  - `action_needed` · `boolean` · required
    Whether the refund waits for the merchant: skipped or failed, not marked handled, and not a skip that needs nothing. A refund waiting for its order's document (original\_not\_issued) is not while the order itself asks; once the order is marked handled it is, and it is credited if the order's document is made.
  - `created` · `string` · required
    When Tallio received the refund.
    Format: `date-time`

*Example response · 200*

```json
{
  "data": {
    "id": "ref_02y9O8rh7F50tGi0QcWRrx",
    "object": "store_refund",
    "merchant": "mer_02y9O8rh7F50tGi0QcWRrx",
    "store_order": "ord_02y9O8rh7F50tGi0QcWRrx",
    "external_id": "1043",
    "status": "pending",
    "reason": null,
    "detail": null,
    "document": {
      "id": "doc_02y9O8rhJKVUXRvojdffcz",
      "object": "document",
      "merchant": "mer_02y9O8rh7F50tGi0QcWRrx",
      "mode": "test",
      "provider": "sandbox",
      "regime": "GR",
      "type": "1.1",
      "number": null,
      "status": "issued",
      "stage": null,
      "issue_date": "2026-10-10",
      "currency": "EUR",
      "net": 2500,
      "vat": 435,
      "gross": 2935,
      "provider_reference": "doc_02y9O8rhJKVUXRvojdffcz",
      "mydata": {
        "mark": "900000000000001",
        "uid": "4E1F0A6C2B9D8E7F6A5B4C3D2E1F0A9B8C7D6E5F",
        "qr_url": "https://sandbox.tallio.invalid/qr/900000000000001",
        "cancellation_mark": null
      },
      "ctc": null,
      "lifecycle": null,
      "lifecycle_history": [],
      "error": null,
      "classification": {
        "source": "default",
        "warnings": [
          "No income classification on line 2; applied the 1.1 default category1_1/E3_561_001. Set it on the line, or as a merchant override, if that is wrong."
        ]
      },
      "external_reference": "#1042",
      "metadata": {
        "order_id": "5520731963508"
      },
      "original_document": null,
      "replaces": null,
      "corrects": null,
      "replaced_by": null,
      "corrected_by": null,
      "credit_notes": [],
      "amount_credited": {
        "net": 0,
        "gross": 0
      },
      "timeline": [
        {
          "id": "evt_02y9O8rhJ2Z2v1fOH2XiSH",
          "type": "document.created",
          "created": "2026-10-11T09:30:00.000Z"
        },
        {
          "id": "evt_02y9O8s1a8ymJqpmAy0nLe",
          "type": "document.issued",
          "created": "2026-10-11T09:30:02.000Z"
        }
      ],
      "issued_at": "2026-10-11T09:30:02.000Z",
      "created": "2026-10-11T09:30:00.000Z",
      "updated": "2026-10-11T09:30:02.000Z"
    },
    "warnings": [],
    "handled": "2026-10-11T09:30:00.000Z",
    "voided_numbers": [],
    "action_needed": false,
    "created": "2026-10-11T09:30:00.000Z"
  }
}
```

*Response headers*

- `x-request-id` · `string`
  The request's correlation id; quote it when reporting a problem. One of: req\_ plus a uuid (Tallio made it), client: plus the x-request-id you sent (8-128 of A-Z a-z 0-9 . \_ : -), or the hosting platform's id.
  With every response
  Pattern: `^(?:req_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|client:[A-Za-z0-9._:-]{8,128}|[A-Za-z0-9._-]{1,16}::[A-Za-z0-9._:-]{6,110})$`
- `ratelimit-limit` · `integer`
  Requests allowed in the current window for the bucket this request counted against.
  With 200, 400, 404, 409, 413, 415, 429 · At least 1
- `ratelimit-remaining` · `integer`
  Requests left in the current window; 0 means the next one is refused until the window resets.
  With 200, 400, 404, 409, 413, 415, 429 · At least 0
- `ratelimit-reset` · `integer`
  Seconds until the current window resets.
  With 200, 400, 404, 409, 413, 415, 429 · At least 0
- `www-authenticate` · `string`
  The bearer challenge: send a vendor secret key as `Authorization: Bearer <key>`.
  With 401 · Always `Bearer realm="tallio"`
- `retry-after` · `integer`
  Seconds to wait before retrying a request refused with 429 `rate_limited`.
  With 429 · At least 1

*Errors*

| Code | Status | Retryable | Meaning |
| --- | --- | --- | --- |
| `validation_failed` | 400 | No | Request validation failed. |
| `unauthorized` | 401 | No | Authentication is required. |
| `vendor_suspended` | 403 | No | This vendor's access to Tallio is suspended. Its owner can contact Tallio to restore it. |
| `not_found` | 404 | No | The requested resource was not found. |
| `store_url_mismatch` | 409 | No | This store key was granted to another store URL than the one this request names (Tallio-Store-Url). Connect this store again, or confirm that the store moved. |
| `invalid_state` | 409 | No | The object's current state does not allow this request. |
| `payload_too_large` | 413 | No | The request body is too large. |
| `unsupported_media_type` | 415 | No | The request body must be JSON (Content-Type: application/json). |
| `rate_limited` | 429 | Yes | A rate limit was reached. Retry later. |
| `internal_error` | 500 | No | An unexpected server error occurred. |

## Retry a store order

`POST /api/v1/store_orders/{id}/retry`

Tries a skipped or failed store order again once its cause is fixed (retryable: true). A skip or a failed job is mapped again from the order you send in order, as the platform holds it now; a failed document is sent again through POST /documents/{id}/retry. Never a second document: the order's document is created under the same key every time, and a document that key already holds is linked instead of mapped. Anything else is 409 invalid\_state (a rejected document is corrected instead). Takes no Idempotency-Key: after a lost answer, GET the store order.

*Bearer API key*

*Path parameters*

- `id` · `string` · required
  The store order's id (ord\_…).

*Request body*

- `order` · `object`
  The order as the platform holds it now, for the same platform and order id. Required to retry an order with no document (a skip or a failed job): Tallio keeps no snapshot once an order is mapped. Not read when a failed document is sent again, which resends that document's own request.
  - `platform` · `string` · required
    The platform the order comes from. Not shopify: the Shopify app issues through its own path until it moves onto store orders, so one order is never issued twice.
    One of: `woocommerce`
  - `test` · `boolean` · required
    A test order (a test gateway or test mode): never a fiscal document.
  - `currency` · `string` · required
    ISO 4217 currency of every amount.
    Pattern: `^[A-Z]{3}$`
  - `prices_include_tax` · `boolean` · required
    The store's prices are entered with tax included.
  - `tax_rounding` · `string` · required
    How the platform rounded tax: "line" per line, or "subtotal" once per rate over the order. The total is checked the platform's way: each line's net and tax rounded, or the unrounded lines summed, then rounded.
    One of: `line`, `subtotal`
  - `total` · `string` · required
    The order's total, tax included, at the same moment as its lines: after edits, and (sent to the store orders API) as paid, before any refund. It equals what the lines, shipping and fees add up to with their tax; an order where they differ is refused, never corrected.
    Pattern: `^(0|[1-9]\d{0,12})(\.\d{1,2})?$`
  - `lines` · `object[]` · required
    The products, in the order's order, at the moment total describes.
    Up to 1000 items
    Each item: A product line.
    - `external_id` · `string | null` · required
      The platform's id of the line, which refunds name; null when the platform gave none.
      1 to 64 characters
    - `name` · `string` · required
      The product's name as sold, variation included (Shopify: title - variant).
      Up to 1000 characters
    - `sku` · `string`
      The SKU; describes the line when it has no name.
      Up to 200 characters
    - `product_id` · `string`
      The platform's product id; describes the line when nothing else does.
      Up to 64 characters
    - `quantity` · `string` · required
      Units on the order at the moment the snapshot describes, after edits; 0 for a line edited away. Sent to the store orders API, that moment is the payment: refunds are sent on their own (POST /store\_orders/{id}/refunds).
      Pattern: `^\d{1,9}(\.\d{1,6})?$`
    - `total` · `string` · required
      The line's net amount after discounts, tax excluded.
      Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
    - `taxes` · `object[]` · required
      The line's tax, one share per rate; empty when it is untaxed.
      Up to 10 items
      Each item: One rate's share of a line's tax.
      - `rate_id` · `string` · required
        The platform's id of the tax rate (WooCommerce: the key of the line's taxes; Shopify: the rate).
        1 to 64 characters
      - `rate_percent` · `string` · required
        The rate in percent as text, up to 10 decimals: "24", "5.5". A compound rate is never sent.
        Pattern: `^\d{1,3}(\.\d{1,10})?$`
      - `amount` · `string` · required
        The tax at this rate, unrounded when the platform stores it so; negative only on a negative (discount) line, whose tax WooCommerce stores negative too.
        Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
    - `gift_card` · `boolean` · required
      The line sells a gift card, which is not a sale of goods.
  - `shipping_lines` · `object[]` · required
    The shipping charged after discounts, at the moment total describes.
    Up to 1000 items
    Each item: A shipping line, one unit.
    - `external_id` · `string | null` · required
      The platform's id of the line, which refunds name; null when the platform gave none.
      1 to 64 characters
    - `name` · `string` · required
      The shipping's name as the order shows it.
      Up to 1000 characters
    - `total` · `string` · required
      The shipping's net amount after discounts, tax excluded.
      Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
    - `taxes` · `object[]` · required
      The shipping's tax, one share per rate; empty when it is untaxed.
      Up to 10 items
      Each item: One rate's share of a line's tax.
      - `rate_id` · `string` · required
        The platform's id of the tax rate (WooCommerce: the key of the line's taxes; Shopify: the rate).
        1 to 64 characters
      - `rate_percent` · `string` · required
        The rate in percent as text, up to 10 decimals: "24", "5.5". A compound rate is never sent.
        Pattern: `^\d{1,3}(\.\d{1,10})?$`
      - `amount` · `string` · required
        The tax at this rate, unrounded when the platform stores it so; negative only on a negative (discount) line, whose tax WooCommerce stores negative too.
        Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
  - `fee_lines` · `object[]` · required
    Other charges, such as a cash-on-delivery fee, at the moment total describes.
    Up to 1000 items
    Each item: A fee line, one unit.
    - `external_id` · `string | null` · required
      The platform's id of the line, which refunds name; null when the platform gave none.
      1 to 64 characters
    - `name` · `string` · required
      The fee's name as the order shows it.
      Up to 1000 characters
    - `total` · `string` · required
      The fee's net amount after discounts, tax excluded.
      Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
    - `taxes` · `object[]` · required
      The fee's tax, one share per rate; empty when it is untaxed.
      Up to 10 items
      Each item: One rate's share of a line's tax.
      - `rate_id` · `string` · required
        The platform's id of the tax rate (WooCommerce: the key of the line's taxes; Shopify: the rate).
        1 to 64 characters
      - `rate_percent` · `string` · required
        The rate in percent as text, up to 10 decimals: "24", "5.5". A compound rate is never sent.
        Pattern: `^\d{1,3}(\.\d{1,10})?$`
      - `amount` · `string` · required
        The tax at this rate, unrounded when the platform stores it so; negative only on a negative (discount) line, whose tax WooCommerce stores negative too.
        Pattern: `^-?\d{1,13}(\.\d{1,10})?$`
  - `coupons` · `object[]` · required
    The coupons used, for display only: their discounts are already in the lines' totals.
    Up to 1000 items
    Each item: A coupon.
    - `code` · `string` · required
      The coupon code.
      Up to 200 characters
  - `billing` · `object`
    The billing address: it names and locates an invoice's buyer.
    - `country` · `string`
      ISO 3166-1 alpha-2 country code.
      Pattern: `^[A-Z]{2}$`
    - `address_1` · `string`
      Street and number.
      Up to 500 characters
    - `city` · `string`
      City.
      Up to 200 characters
    - `postcode` · `string`
      Postal code.
      Up to 50 characters
    - `company` · `string`
      Company name.
      Up to 500 characters
    - `name` · `string`
      The billing person's full name, when the platform keeps one.
      Up to 500 characters
    - `first_name` · `string`
      First name.
      Up to 200 characters
    - `last_name` · `string`
      Last name.
      Up to 200 characters
  - `shipping` · `object`
    The shipping address; the sale is taxed in its country, else the billing country.
    - `country` · `string`
      ISO 3166-1 alpha-2 country code.
      Pattern: `^[A-Z]{2}$`
    - `address_1` · `string`
      Street and number.
      Up to 500 characters
    - `city` · `string`
      City.
      Up to 200 characters
    - `postcode` · `string`
      Postal code.
      Up to 50 characters
  - `payment_gateways` · `object[]` · required
    The gateways that took the payment; one for most orders.
    Up to 10 items
    Each item: A payment gateway the order was paid through.
    - `id` · `string` · required
      The gateway's id (WooCommerce: cod, bacs, stripe; Shopify: its gateway name).
      1 to 200 characters
    - `title` · `string` · required
      The gateway's name as the buyer saw it.
      Up to 200 characters
  - `invoice_request` · `object`
    What the checkout captured of a buyer's request for an invoice. A platform that captures each field once sends one value each; Shopify's cart attributes may repeat.
    - `requested` · `string[]` · required
      Every value the checkout captured for "I need an invoice" ("true", "yes", "false"); distinct values disagree, and no invoice is guessed.
      Up to 10 items
      Each item: Up to 200 characters
    - `vat_numbers` · `string[]` · required
      Every value the checkout captured for the buyer's VAT number (ΑΦΜ, SIREN, SIRET or EU VAT number); distinct values disagree, and no invoice is guessed.
      Up to 10 items
      Each item: Up to 200 characters
    - `company_names` · `string[]` · required
      Every value the checkout captured for the buyer's company name; distinct values disagree, and no invoice is guessed.
      Up to 10 items
      Each item: Up to 200 characters
  - `platform_version` · `string` · required
    The platform's version ("11.2.1"), logged, never branched on.
    1 to 50 characters
  - `external_id` · `string` · required
    The platform's order id.
    1 to 64 characters
  - `number` · `string` · required
    The order number the merchant knows it by ("1042", "#1042").
    1 to 64 characters
  - `created_at` · `string` · required
    When the order was placed.
    Format: `date-time`
  - `paid_at` · `string | null` · required
    When it was paid; null while unpaid.
    Format: `date-time`
  - `cancelled` · `boolean` · required
    The order was cancelled: it is kept and skipped as order\_cancelled.
  - `refunded_total` · `string` · required
    What was already refunded on the order when the snapshot was taken ("0" for nothing). An order refunded in part before its document is issued as paid, and each refund is credited after it; one refunded in full is skipped as refunded\_before\_issue (nothing was sold).
    Pattern: `^(0|[1-9]\d{0,12})(\.\d{1,2})?$`

*Request*

*JSON*

```json
{}
```

*curl*

```bash
curl -X POST 'https://tallio.dev/api/v1/store_orders/ord_02y9O8rh7F50tGi0QcWRrx/retry' \
  -H "Authorization: Bearer $TALLIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

*TypeScript SDK*

```ts
import { createTallioClient, unwrap } from "@tallio-dev/sdk";

const tallio = createTallioClient({
  apiKey: process.env.TALLIO_API_KEY!,
  baseUrl: "https://tallio.dev",
});

const result = await unwrap(tallio.http.POST("/api/v1/store_orders/{id}/retry", {
  params: {
    path: {
      id: "ord_02y9O8rh7F50tGi0QcWRrx",
    },
  },
  body: {},
}));
```

*Responses*

| Status | Description |
| --- | --- |
| `200` | The store order, pending or sent again. |
| 4XX, 5XX | An error: see Errors below. |

*Response body · 200*

- `data` · `object` · required
  A shop order sent to Tallio, and the document it became.
  - `id` · `string` · required
    Id of the store order (ord\_…).
    Pattern: `^ord_[0-9A-Za-z]{22}$`
  - `object` · `string` · required
    Always "store\_order".
    Always `store_order`
  - `merchant` · `string` · required
    Id of the merchant (mer\_…).
    Pattern: `^mer_[0-9A-Za-z]{22}$`
  - `mode` · `string` · required
    live for an order sent with a live key, test for a test key.
    One of: `live`, `test`
  - `platform` · `string` · required
    The platform the order comes from.
    One of: `shopify`, `woocommerce`
  - `external_id` · `string` · required
    The platform's id of the order.
    1 to 64 characters
  - `number` · `string` · required
    The order number the merchant and the buyer see.
  - `status` · `string` · required
    pending (received, not yet mapped), skipped (it maps to no document: see reason), sent (its document was created and is on its way to the provider), issued (the document was issued), failed (the document was rejected, failed or cancelled, or Tallio could not create it: see reason).
    One of: `pending`, `skipped`, `sent`, `issued`, `failed`
  - `reason` · `string | null` · required
    Why the order is skipped or failed, as a machine code; null otherwise.
  - `detail` · `string | null` · required
    The reason in a sentence for the merchant; null when there is no reason.
  - `document` · `object | null` · required
    The document issued for the order, once one was created; null before.
    - `id` · `string` · required
      Id of the document (doc\_…).
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `object` · `string` · required
      Always "document".
      Always `document`
    - `merchant` · `string` · required
      Id of the merchant (mer\_…).
      Pattern: `^mer_[0-9A-Za-z]{22}$`
    - `mode` · `string` · required
      live for a document created with a live key, test for a test key.
      One of: `live`, `test`
    - `provider` · `string` · required
      The licensed e-invoicing provider (a Greek provider, direct myDATA, a French plateforme agréée, Chorus Pro for a French public-sector buyer, or Tallio's sandbox) that issues the document.
      One of: `sandbox`, `mydata`, `wrapp`, `impact`, `epsilon`, `softone`, `prosvasis`, `superpdp`, `choruspro`, `b2brouter`, `oxygen`, `iopole`, `qonto`, `elorus`, `timologisi`
    - `regime` · `string` · required
      Tax regime the document is issued under, by country: GR (Greece, myDATA) or FR (France, e-invoicing through a plateforme agréée).
      One of: `GR`, `FR` · Default: `GR`
    - `type` · `string` · required
      Document type, by regime.
      > **Greece:** An AADE myDATA type (e.g. 1.1).
      
      > **France:** A UNTDID 1001 code (e.g. 380).
      
      One of: `380`, `381`, `384`, `386`, `1.1`, `2.1`, `5.1`, `5.2`, `11.1`, `11.2`, `11.4`, `2.2`, `2.3`
    - `number` · `string | null` · required
      The document's number.
      > **Greece:** The provider's number in its series (e.g. ΕΑΛΠ-1), null until it assigns one: a display label, not unique, so identify a document by its id.
      
      > **France:** The number you assigned (set once issued).
      
      Default: `null`
    - `status` · `string` · required
      Where the document stands: pending (Tallio accepted it; not yet issued, see stage), issued (the tax system accepted it; in Greece it has a MARK), rejected (the provider or the tax system refused it), failed (Tallio could not deliver it to the provider), cancelled (withdrawn before it was sent, or cancelled in myDATA after issue: see mydata.cancellation\_mark).
      One of: `pending`, `issued`, `rejected`, `failed`, `cancelled`
    - `stage` · `string | null` · required
      Where a pending document is (queued, submitting, awaiting\_confirmation, reconciling); null unless status is pending.
      One of: `queued`, `submitting`, `awaiting_confirmation`, `reconciling`
    - `issue_date` · `string` · required
      Issue date, YYYY-MM-DD.
      Format: `date`
    - `currency` · `string` · required
      ISO 4217 currency of the amounts.
      > **Greece:** EUR.
      
      > **France:** Any with cents.
      
      Pattern: `^[A-Z]{3}$`
    - `net` · `integer` · required
      Sum of the lines' net amounts, in minor units, at most 1000000000000000.
      From 0 to 1000000000000000
    - `vat` · `integer` · required
      Sum of the lines' VAT, each line rounded half up to the minor unit, in minor units, at most 1000000000000000.
      From 0 to 1000000000000000
    - `gross` · `integer` · required
      net + vat, in minor units, at most 1250000000000000.
      From 0 to 1250000000000000
    - `provider_reference` · `string | null` · required
      The provider's own reference for the document, once it has taken it; null before.
    - `mydata` · `object | null` · required
      myDATA's identity of the document: an object in GR, null in any other regime.
      - `mark` · `string | null` · required
        MARK (AADE registration number) once issued, as a digit string; null before. A cancelled document keeps the MARK it was issued with (null when it was withdrawn before it was sent).
        Pattern: `^[1-9]\d{0,18}$`
      - `uid` · `string | null` · required
        myDATA uid: the SHA-1 (40 upper-case hex digits) AADE derives from the document's identifiers; null until known.
        Pattern: `^[0-9A-F]{40}$`
      - `qr_url` · `string | null` · required
        URL the document's QR code points to; null until the provider returns one.
        Format: `uri`
      - `cancellation_mark` · `string | null` · required
        The MARK of the cancellation in myDATA, once an issued document is cancelled; null otherwise.
        Pattern: `^[1-9]\d{0,18}$`
    - `ctc` · `object | null` · required
      The French e-invoicing platform's identity of the document: an object in FR, null in any other regime.
      - `platform_id` · `string | null` · required
        The plateforme agréée carrying the document (sandbox in test mode); null until it has taken it.
      - `flow_id` · `string | null` · required
        The platform's id of the flow that carried the document; null until it reports one.
    - `lifecycle` · `object | null` · required
      The tax regime's status for the document once sent.
      > **Greece:** Always null.
      
      > **France:** Null until the platform reports one.
      
      Default: `null`
      - `key` · `string` · required
        Where the document is after issue, in GOBL's bill.Status keys.
        One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
      - `code` · `string` · required
        The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
        1 to 20 characters
      - `at` · `string` · required
        When the regime's platform reported this status.
        Format: `date-time`
    - `lifecycle_history` · `object[]` · required
      Every lifecycle status reported for the document, oldest first, at most the newest 30; the last is lifecycle. Empty in GR. A status after issue (a buyer's 210 Refusée, the platform's 213 Rejetée) never changes status: an issued document stays issued.
      Up to 30 items · Default: `[]`
      Each item: One lifecycle status the tax regime's platform reported for the document.
      - `key` · `string` · required
        Where the document is after issue, in GOBL's bill.Status keys.
        One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
      - `code` · `string` · required
        The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
        1 to 20 characters
      - `at` · `string` · required
        When the regime's platform reported this status.
        Format: `date-time`
      - `provider_status` · `string | null` · required
        The provider's own status the code was read from (e.g. refused, REJETEE, fr:210); null if it gave none.
        1 to 64 characters
        Pattern: `^[A-Za-z0-9_.:-]+$`
      - `reason` · `string | null` · required
        The platform's reason code for a refusal, dispute or rejection, when it reports one; null otherwise. Free-text reasons are not kept.
        1 to 64 characters
        Pattern: `^[A-Za-z0-9_.:-]+$`
    - `error` · `object | null` · required
      Why the document was rejected or failed; null otherwise.
      - `code` · `string` · required
        Stable machine-readable error code. Branch on this, never on `message`.
        One of: `validation_failed`, `unauthorized`, `not_found`, `idempotency_conflict`, `idempotency_in_progress`, `already_exists`, `invalid_grant`, `store_url_mismatch`, `invalid_state`, `already_issued`, `connection_not_disconnected`, `merchant_archived`, `cursor_not_listed`, `payload_too_large`, `unsupported_media_type`, `rate_limited`, `too_many_pending_erasures`, `forbidden`, `restricted_key`, `vendor_suspended`, `subscription_required`, `store_plan_live_only`, `store_unproven`, `not_supported`, `regime_mismatch`, `supplier_mismatch`, `connection_unavailable`, `connection_unconfirmed`, `provider_credentials_invalid`, `provider_rejected`, `balance_exceeded`, `credit_required`, `provider_unavailable`, `pdf_not_ready`, `service_unavailable`, `internal_error`
      - `message` · `string` · required
        Tallio's own explanation, safe to show to a developer; the provider's words are in provider\_message.
      - `provider_code` · `string | null` · required
        The provider's own error code, or null when the error did not come from a provider.
      - `provider_message` · `string | null` · required
        The provider's own error message, verbatim, or null when the error did not come from a provider. On a document or connection it is removed (null), like provider\_raw, once the retention window ends or by a data-subject erasure.
      - `retryable` · `boolean` · required
        True when the same request may succeed if sent again later.
      - `provider_raw` · `any`
        The provider's error response body as received, or a TruncatedProviderRaw marker when it exceeds 4096 bytes of JSON. Never holds request headers, credentials or the request payload.
    - `classification` · `object` · required
      How the document was classified for myDATA.
      - `source` · `string` · required
        default when any line took Tallio's default, else override when any line took the merchant's override, else line.
        One of: `line`, `override`, `default`
      - `warnings` · `string[]` · required
        What to check before issuing, e.g. that defaults were applied.
    - `external_reference` · `string | null` · required
      Your own reference for the document, or null.
      Default: `null`
    - `metadata` · `object` · required
      Up to 50 key-value pairs of your own (keys up to 40 characters, values up to 500). Do not put personal data in it.
      Default: `{}`
      - `{key}` · `string`
        A value, up to 500 characters.
        1 to 40 characters
    - `original_document` · `string | null` · required
      For a credit note made from a Tallio document: that document (doc\_…). Null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `replaces` · `string | null` · required
      The rejected or failed document this one was issued to replace, or null.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `corrects` · `string | null` · required
      The issued document this one corrects, or null.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `replaced_by` · `string | null` · required
      The document created to replace this rejected or failed one, the live one if there were several; null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `corrected_by` · `string | null` · required
      The document made to correct this one (POST /documents/{id}/correct), the latest if there were several; null otherwise.
      Default: `null`
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `credit_notes` · `string[]` · required
      Credit notes made from this document, oldest first, at most 100.
      Up to 100 items · Default: `[]`
      Each item: Id of the document (doc\_…).
      Pattern: `^doc_[0-9A-Za-z]{22}$`
    - `amount_credited` · `object` · required
      What credit notes made from this document take, pending ones included. Zero when there are none.
      Default: `{"net":0,"gross":0}`
      - `net` · `integer` · required
        Net amount credited, in cents.
        From 0 to 9007199254740991
      - `gross` · `integer` · required
        Gross amount credited, in cents.
        From 0 to 9007199254740991
    - `timeline` · `object[]` · required
      The document's events, oldest first, at most 100.
      Up to 100 items
      Each item: One event in a document's history. GET /events/{id} returns the full Event.
      - `id` · `string` · required
        Id of the event (evt\_…).
        Pattern: `^evt_[0-9A-Za-z]{22}$`
      - `type` · `string` · required
        What happened: document.created (Tallio accepted a document), document.issued (the tax system accepted it; in Greece it has a MARK), document.rejected (the provider or the tax system refused it), document.failed (Tallio could not deliver it), merchant.created (a merchant was created), connection.created (a merchant was connected to a provider), connection.verified (the provider accepted its credentials), connection.invalid (the provider refused them), connection.disconnected (it was disconnected), connect\_session.completed (a merchant connected through a hosted connect link), webhook\_endpoint.disabled (Tallio disabled an endpoint failing for days), document.retried (a failed document was queued to be sent again), document.credited (a credit note made from the document was issued), document.cancelled (the document was withdrawn or cancelled), document.corrected (a corrected document was made to replace it), document.replaced (a new document was created to replace a rejected or failed one), connection.deleted (a disconnected connection was deleted from the merchant's list), merchant.archived (a merchant was archived: it issues nothing new), merchant.unarchived (an archived merchant was restored), store\_order.updated (a store order's status, reason, handled mark or document changed), document.lifecycle\_updated (the French platform reported a new lifecycle status for an issued document) and connection.updated (a connection's settings changed).
        One of: `document.created`, `document.issued`, `document.rejected`, `document.failed`, `merchant.created`, `connection.created`, `connection.verified`, `connection.invalid`, `connection.disconnected`, `connect_session.completed`, `webhook_endpoint.disabled`, `document.retried`, `document.credited`, `document.cancelled`, `document.corrected`, `document.replaced`, `connection.deleted`, `merchant.archived`, `merchant.unarchived`, `store_order.updated`, `document.lifecycle_updated`, `connection.updated`
      - `created` · `string` · required
        When the event happened.
        Format: `date-time`
    - `issued_at` · `string | null` · required
      When the document was issued (the tax system accepted it); kept if it is cancelled afterwards, null for a document never issued.
      Format: `date-time`
    - `created` · `string` · required
      When Tallio accepted the document.
      Format: `date-time`
    - `updated` · `string` · required
      When the document last changed.
      Format: `date-time`
  - `warnings` · `object[]` · required
    What the merchant should know about the order's document (a rounding cent, a free line left off, the store's default payment method); empty when there is nothing, or before the order is mapped.
    Each item: Something the merchant should know about the document made for the order; the document was still made.
    - `code` · `string` · required
      What is worth knowing about the document, as a machine code: the store's method used for an unrecognised payment method, a free line left out, a rounding difference, an invoice request not met, or a registered detail not applied.
      One of: `payment_method_default`, `free_line_omitted`, `rounding_difference`, `invoice_requested_invalid_vat`, `invoice_requested_incomplete`, `invoice_customer_is_supplier`, `invoice_request_ambiguous`, `invoice_billing_not_greek`, `invoice_name_from_person`, `invoice_field_truncated`, `invoice_registry_address_not_applied`, `invoice_request_too_late`, `delivery_address_omitted`
    - `detail` · `string` · required
      The warning in a sentence for the merchant.
    - `difference` · `integer | null` · required
      rounding\_difference only: what the customer paid minus the document's gross, in cents (hundredths of the currency), negative when the document is higher; null for every other warning.
      From -9007199254740991 to 9007199254740991
  - `refunds` · `object[]` · required
    The order's refunds sent with POST /store\_orders/{id}/refunds, oldest first, each with its credit note once one was created; empty when there are none.
    Each item: A store order's refund sent to Tallio, and the credit note it became.
    - `id` · `string` · required
      Id of the store refund (ref\_…).
      Pattern: `^ref_[0-9A-Za-z]{22}$`
    - `object` · `string` · required
      Always "store\_refund".
      Always `store_refund`
    - `merchant` · `string` · required
      Id of the merchant (mer\_…).
      Pattern: `^mer_[0-9A-Za-z]{22}$`
    - `store_order` · `string` · required
      The store order it refunds (ord\_…).
      Pattern: `^ord_[0-9A-Za-z]{22}$`
    - `external_id` · `string` · required
      The platform's id of the refund.
    - `status` · `string` · required
      pending (received, or waiting for the order's document to be issued), skipped (it maps to no credit note: see reason), sent (its credit note was created and is on its way to the provider), issued (the credit note was issued), failed (the credit note was rejected, failed or cancelled, or Tallio could not create it: see reason).
      One of: `pending`, `skipped`, `sent`, `issued`, `failed`
    - `reason` · `string | null` · required
      Why the refund is skipped or failed, as a machine code; null otherwise.
    - `detail` · `string | null` · required
      The reason in a sentence for the merchant; null when there is no reason.
    - `document` · `object | null` · required
      The credit note issued for the refund, linked to the order's document, once one was created; null before.
      - `id` · `string` · required
        Id of the document (doc\_…).
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `object` · `string` · required
        Always "document".
        Always `document`
      - `merchant` · `string` · required
        Id of the merchant (mer\_…).
        Pattern: `^mer_[0-9A-Za-z]{22}$`
      - `mode` · `string` · required
        live for a document created with a live key, test for a test key.
        One of: `live`, `test`
      - `provider` · `string` · required
        The licensed e-invoicing provider (a Greek provider, direct myDATA, a French plateforme agréée, Chorus Pro for a French public-sector buyer, or Tallio's sandbox) that issues the document.
        One of: `sandbox`, `mydata`, `wrapp`, `impact`, `epsilon`, `softone`, `prosvasis`, `superpdp`, `choruspro`, `b2brouter`, `oxygen`, `iopole`, `qonto`, `elorus`, `timologisi`
      - `regime` · `string` · required
        Tax regime the document is issued under, by country: GR (Greece, myDATA) or FR (France, e-invoicing through a plateforme agréée).
        One of: `GR`, `FR` · Default: `GR`
      - `type` · `string` · required
        Document type, by regime.
        > **Greece:** An AADE myDATA type (e.g. 1.1).
        
        > **France:** A UNTDID 1001 code (e.g. 380).
        
        One of: `380`, `381`, `384`, `386`, `1.1`, `2.1`, `5.1`, `5.2`, `11.1`, `11.2`, `11.4`, `2.2`, `2.3`
      - `number` · `string | null` · required
        The document's number.
        > **Greece:** The provider's number in its series (e.g. ΕΑΛΠ-1), null until it assigns one: a display label, not unique, so identify a document by its id.
        
        > **France:** The number you assigned (set once issued).
        
        Default: `null`
      - `status` · `string` · required
        Where the document stands: pending (Tallio accepted it; not yet issued, see stage), issued (the tax system accepted it; in Greece it has a MARK), rejected (the provider or the tax system refused it), failed (Tallio could not deliver it to the provider), cancelled (withdrawn before it was sent, or cancelled in myDATA after issue: see mydata.cancellation\_mark).
        One of: `pending`, `issued`, `rejected`, `failed`, `cancelled`
      - `stage` · `string | null` · required
        Where a pending document is (queued, submitting, awaiting\_confirmation, reconciling); null unless status is pending.
        One of: `queued`, `submitting`, `awaiting_confirmation`, `reconciling`
      - `issue_date` · `string` · required
        Issue date, YYYY-MM-DD.
        Format: `date`
      - `currency` · `string` · required
        ISO 4217 currency of the amounts.
        > **Greece:** EUR.
        
        > **France:** Any with cents.
        
        Pattern: `^[A-Z]{3}$`
      - `net` · `integer` · required
        Sum of the lines' net amounts, in minor units, at most 1000000000000000.
        From 0 to 1000000000000000
      - `vat` · `integer` · required
        Sum of the lines' VAT, each line rounded half up to the minor unit, in minor units, at most 1000000000000000.
        From 0 to 1000000000000000
      - `gross` · `integer` · required
        net + vat, in minor units, at most 1250000000000000.
        From 0 to 1250000000000000
      - `provider_reference` · `string | null` · required
        The provider's own reference for the document, once it has taken it; null before.
      - `mydata` · `object | null` · required
        myDATA's identity of the document: an object in GR, null in any other regime.
        - `mark` · `string | null` · required
          MARK (AADE registration number) once issued, as a digit string; null before. A cancelled document keeps the MARK it was issued with (null when it was withdrawn before it was sent).
          Pattern: `^[1-9]\d{0,18}$`
        - `uid` · `string | null` · required
          myDATA uid: the SHA-1 (40 upper-case hex digits) AADE derives from the document's identifiers; null until known.
          Pattern: `^[0-9A-F]{40}$`
        - `qr_url` · `string | null` · required
          URL the document's QR code points to; null until the provider returns one.
          Format: `uri`
        - `cancellation_mark` · `string | null` · required
          The MARK of the cancellation in myDATA, once an issued document is cancelled; null otherwise.
          Pattern: `^[1-9]\d{0,18}$`
      - `ctc` · `object | null` · required
        The French e-invoicing platform's identity of the document: an object in FR, null in any other regime.
        - `platform_id` · `string | null` · required
          The plateforme agréée carrying the document (sandbox in test mode); null until it has taken it.
        - `flow_id` · `string | null` · required
          The platform's id of the flow that carried the document; null until it reports one.
      - `lifecycle` · `object | null` · required
        The tax regime's status for the document once sent.
        > **Greece:** Always null.
        
        > **France:** Null until the platform reports one.
        
        Default: `null`
        - `key` · `string` · required
          Where the document is after issue, in GOBL's bill.Status keys.
          One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
        - `code` · `string` · required
          The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
          1 to 20 characters
        - `at` · `string` · required
          When the regime's platform reported this status.
          Format: `date-time`
      - `lifecycle_history` · `object[]` · required
        Every lifecycle status reported for the document, oldest first, at most the newest 30; the last is lifecycle. Empty in GR. A status after issue (a buyer's 210 Refusée, the platform's 213 Rejetée) never changes status: an issued document stays issued.
        Up to 30 items · Default: `[]`
        Each item: One lifecycle status the tax regime's platform reported for the document.
        - `key` · `string` · required
          Where the document is after issue, in GOBL's bill.Status keys.
          One of: `issued`, `acknowledged`, `processing`, `querying`, `rejected`, `accepted`, `paid`, `error`, `other`
        - `code` · `string` · required
          The regime's own status code, e.g. 200 (Déposée) or 213 (Rejetée) in France.
          1 to 20 characters
        - `at` · `string` · required
          When the regime's platform reported this status.
          Format: `date-time`
        - `provider_status` · `string | null` · required
          The provider's own status the code was read from (e.g. refused, REJETEE, fr:210); null if it gave none.
          1 to 64 characters
          Pattern: `^[A-Za-z0-9_.:-]+$`
        - `reason` · `string | null` · required
          The platform's reason code for a refusal, dispute or rejection, when it reports one; null otherwise. Free-text reasons are not kept.
          1 to 64 characters
          Pattern: `^[A-Za-z0-9_.:-]+$`
      - `error` · `object | null` · required
        Why the document was rejected or failed; null otherwise.
        - `code` · `string` · required
          Stable machine-readable error code. Branch on this, never on `message`.
          One of: `validation_failed`, `unauthorized`, `not_found`, `idempotency_conflict`, `idempotency_in_progress`, `already_exists`, `invalid_grant`, `store_url_mismatch`, `invalid_state`, `already_issued`, `connection_not_disconnected`, `merchant_archived`, `cursor_not_listed`, `payload_too_large`, `unsupported_media_type`, `rate_limited`, `too_many_pending_erasures`, `forbidden`, `restricted_key`, `vendor_suspended`, `subscription_required`, `store_plan_live_only`, `store_unproven`, `not_supported`, `regime_mismatch`, `supplier_mismatch`, `connection_unavailable`, `connection_unconfirmed`, `provider_credentials_invalid`, `provider_rejected`, `balance_exceeded`, `credit_required`, `provider_unavailable`, `pdf_not_ready`, `service_unavailable`, `internal_error`
        - `message` · `string` · required
          Tallio's own explanation, safe to show to a developer; the provider's words are in provider\_message.
        - `provider_code` · `string | null` · required
          The provider's own error code, or null when the error did not come from a provider.
        - `provider_message` · `string | null` · required
          The provider's own error message, verbatim, or null when the error did not come from a provider. On a document or connection it is removed (null), like provider\_raw, once the retention window ends or by a data-subject erasure.
        - `retryable` · `boolean` · required
          True when the same request may succeed if sent again later.
        - `provider_raw` · `any`
          The provider's error response body as received, or a TruncatedProviderRaw marker when it exceeds 4096 bytes of JSON. Never holds request headers, credentials or the request payload.
      - `classification` · `object` · required
        How the document was classified for myDATA.
        - `source` · `string` · required
          default when any line took Tallio's default, else override when any line took the merchant's override, else line.
          One of: `line`, `override`, `default`
        - `warnings` · `string[]` · required
          What to check before issuing, e.g. that defaults were applied.
      - `external_reference` · `string | null` · required
        Your own reference for the document, or null.
        Default: `null`
      - `metadata` · `object` · required
        Up to 50 key-value pairs of your own (keys up to 40 characters, values up to 500). Do not put personal data in it.
        Default: `{}`
        - `{key}` · `string`
          A value, up to 500 characters.
          1 to 40 characters
      - `original_document` · `string | null` · required
        For a credit note made from a Tallio document: that document (doc\_…). Null otherwise.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `replaces` · `string | null` · required
        The rejected or failed document this one was issued to replace, or null.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `corrects` · `string | null` · required
        The issued document this one corrects, or null.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `replaced_by` · `string | null` · required
        The document created to replace this rejected or failed one, the live one if there were several; null otherwise.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `corrected_by` · `string | null` · required
        The document made to correct this one (POST /documents/{id}/correct), the latest if there were several; null otherwise.
        Default: `null`
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `credit_notes` · `string[]` · required
        Credit notes made from this document, oldest first, at most 100.
        Up to 100 items · Default: `[]`
        Each item: Id of the document (doc\_…).
        Pattern: `^doc_[0-9A-Za-z]{22}$`
      - `amount_credited` · `object` · required
        What credit notes made from this document take, pending ones included. Zero when there are none.
        Default: `{"net":0,"gross":0}`
        - `net` · `integer` · required
          Net amount credited, in cents.
          From 0 to 9007199254740991
        - `gross` · `integer` · required
          Gross amount credited, in cents.
          From 0 to 9007199254740991
      - `timeline` · `object[]` · required
        The document's events, oldest first, at most 100.
        Up to 100 items
        Each item: One event in a document's history. GET /events/{id} returns the full Event.
        - `id` · `string` · required
          Id of the event (evt\_…).
          Pattern: `^evt_[0-9A-Za-z]{22}$`
        - `type` · `string` · required
          What happened: document.created (Tallio accepted a document), document.issued (the tax system accepted it; in Greece it has a MARK), document.rejected (the provider or the tax system refused it), document.failed (Tallio could not deliver it), merchant.created (a merchant was created), connection.created (a merchant was connected to a provider), connection.verified (the provider accepted its credentials), connection.invalid (the provider refused them), connection.disconnected (it was disconnected), connect\_session.completed (a merchant connected through a hosted connect link), webhook\_endpoint.disabled (Tallio disabled an endpoint failing for days), document.retried (a failed document was queued to be sent again), document.credited (a credit note made from the document was issued), document.cancelled (the document was withdrawn or cancelled), document.corrected (a corrected document was made to replace it), document.replaced (a new document was created to replace a rejected or failed one), connection.deleted (a disconnected connection was deleted from the merchant's list), merchant.archived (a merchant was archived: it issues nothing new), merchant.unarchived (an archived merchant was restored), store\_order.updated (a store order's status, reason, handled mark or document changed), document.lifecycle\_updated (the French platform reported a new lifecycle status for an issued document) and connection.updated (a connection's settings changed).
          One of: `document.created`, `document.issued`, `document.rejected`, `document.failed`, `merchant.created`, `connection.created`, `connection.verified`, `connection.invalid`, `connection.disconnected`, `connect_session.completed`, `webhook_endpoint.disabled`, `document.retried`, `document.credited`, `document.cancelled`, `document.corrected`, `document.replaced`, `connection.deleted`, `merchant.archived`, `merchant.unarchived`, `store_order.updated`, `document.lifecycle_updated`, `connection.updated`
        - `created` · `string` · required
          When the event happened.
          Format: `date-time`
      - `issued_at` · `string | null` · required
        When the document was issued (the tax system accepted it); kept if it is cancelled afterwards, null for a document never issued.
        Format: `date-time`
      - `created` · `string` · required
        When Tallio accepted the document.
        Format: `date-time`
      - `updated` · `string` · required
        When the document last changed.
        Format: `date-time`
    - `warnings` · `object[]` · required
      What the merchant should know about the credit note (a rounding cent); empty when there is nothing.
      Each item: Something the merchant should know about the document made for the order; the document was still made.
      - `code` · `string` · required
        What is worth knowing about the document, as a machine code: the store's method used for an unrecognised payment method, a free line left out, a rounding difference, an invoice request not met, or a registered detail not applied.
        One of: `payment_method_default`, `free_line_omitted`, `rounding_difference`, `invoice_requested_invalid_vat`, `invoice_requested_incomplete`, `invoice_customer_is_supplier`, `invoice_request_ambiguous`, `invoice_billing_not_greek`, `invoice_name_from_person`, `invoice_field_truncated`, `invoice_registry_address_not_applied`, `invoice_request_too_late`, `delivery_address_omitted`
      - `detail` · `string` · required
        The warning in a sentence for the merchant.
      - `difference` · `integer | null` · required
        rounding\_difference only: what the customer paid minus the document's gross, in cents (hundredths of the currency), negative when the document is higher; null for every other warning.
        From -9007199254740991 to 9007199254740991
    - `handled` · `string | null` · required
      When the merchant marked the skipped or failed refund handled (POST /store\_orders/{id}/refunds/{refundId}/mark\_handled); null otherwise.
      Format: `date-time`
    - `voided_numbers` · `object[]` · required
      > **Greece:** Always empty.
      
      > **France:** The numbers Tallio numbered the refund's credit note with that no document carries, oldest first, with why; empty otherwise. Each stays a gap in its series, never reused: keep this record of why, since the series must be continuous or each gap justified (CGI ann. II art. 242 nonies A).
      
      Each item: A French number Tallio gave this record that no document carries: kept as a gap in the series.
      - `number` · `string` · required
        The French number left unused.
      - `reason` · `string` · required
        Why the number went unused: handled\_by\_hand (the merchant marked the record handled before an issued document took it: none was made, or the provider rejected the one that carried it), taken (Tallio already held that number for the merchant), not\_issued (the record closed for good, with no document, after it was numbered), replaced (the order was corrected again in place of a correction that was rejected or failed, so never issued under it).
        One of: `handled_by_hand`, `taken`, `not_issued`, `replaced`
    - `action_needed` · `boolean` · required
      Whether the refund waits for the merchant: skipped or failed, not marked handled, and not a skip that needs nothing. A refund waiting for its order's document (original\_not\_issued) is not while the order itself asks; once the order is marked handled it is, and it is credited if the order's document is made.
    - `created` · `string` · required
      When Tallio received the refund.
      Format: `date-time`
  - `handled` · `string | null` · required
    When the merchant marked the skipped or failed order handled (POST /store\_orders/{id}/mark\_handled); null otherwise, and again after a retry.
    Format: `date-time`
  - `voided_numbers` · `object[]` · required
    > **Greece:** Always empty.
    
    > **France:** The numbers Tallio numbered the order's invoice with that no document carries, oldest first, with why; empty otherwise. Each stays a gap in its series, never reused: keep this record of why, since the series must be continuous or each gap justified (CGI ann. II art. 242 nonies A).
    
    Each item: A French number Tallio gave this record that no document carries: kept as a gap in the series.
    - `number` · `string` · required
      The French number left unused.
    - `reason` · `string` · required
      Why the number went unused: handled\_by\_hand (the merchant marked the record handled before an issued document took it: none was made, or the provider rejected the one that carried it), taken (Tallio already held that number for the merchant), not\_issued (the record closed for good, with no document, after it was numbered), replaced (the order was corrected again in place of a correction that was rejected or failed, so never issued under it).
      One of: `handled_by_hand`, `taken`, `not_issued`, `replaced`
  - `action_needed` · `boolean` · required
    Whether the order itself waits for the merchant: skipped or failed, not marked handled, and not a skip that needs nothing (test\_order, no\_lines, sale\_to\_report…). GET /store\_orders?status=action\_needed lists these, and also orders with a refund that waits for the merchant (its own action\_needed).
  - `retryable` · `boolean` · required
    Whether POST /store\_orders/{id}/retry acts on it now: a skip fixed outside the order (provider\_not\_connected, order\_not\_paid, tallio\_refused, number\_taken…), a failed job, or a failed document Tallio can send again, none marked handled. A rejected document is corrected instead.
    > **France:** An invoice held as fr\_numbering\_pending (kept before Tallio numbered store invoices) is retryable even if marked handled: send it again to issue it.
    
  - `correctable` · `boolean` · required
    Whether POST /store\_orders/{id}/correct may act on it now: its document is issued, or was cancelled or credited in full, with no correction yet; or its document is a correction that was rejected or failed (correct again). Not for one partly credited.
    > **France:** Not for an invoice the buyer refused (210) or the platform rejected after issue (213).
    
  - `cancellable` · `boolean` · required
    Whether POST /store\_orders/{id}/cancel may act on it now.
    > **Greece:** Its document is issued, with no correction and no credit note.
    
    > **France:** Never; invoices are never cancelled, only corrected.
    
  - `created` · `string` · required
    When Tallio received the order; a retry of a skip moves it to the retry, since the document is dated by it. A French invoice is dated by the Paris day its number was given instead, which a retry keeps, so the series stays in date order.
    Format: `date-time`

*Example response · 200*

```json
{
  "data": {
    "id": "ord_02y9O8rh7F50tGi0QcWRrx",
    "object": "store_order",
    "merchant": "mer_02y9O8rh7F50tGi0QcWRrx",
    "mode": "live",
    "platform": "shopify",
    "external_id": "1042",
    "number": "1042",
    "status": "pending",
    "reason": null,
    "detail": null,
    "document": {
      "id": "doc_02y9O8rhJKVUXRvojdffcz",
      "object": "document",
      "merchant": "mer_02y9O8rh7F50tGi0QcWRrx",
      "mode": "test",
      "provider": "sandbox",
      "regime": "GR",
      "type": "1.1",
      "number": null,
      "status": "issued",
      "stage": null,
      "issue_date": "2026-10-10",
      "currency": "EUR",
      "net": 2500,
      "vat": 435,
      "gross": 2935,
      "provider_reference": "doc_02y9O8rhJKVUXRvojdffcz",
      "mydata": {
        "mark": "900000000000001",
        "uid": "4E1F0A6C2B9D8E7F6A5B4C3D2E1F0A9B8C7D6E5F",
        "qr_url": "https://sandbox.tallio.invalid/qr/900000000000001",
        "cancellation_mark": null
      },
      "ctc": null,
      "lifecycle": null,
      "lifecycle_history": [],
      "error": null,
      "classification": {
        "source": "default",
        "warnings": [
          "No income classification on line 2; applied the 1.1 default category1_1/E3_561_001. Set it on the line, or as a merchant override, if that is wrong."
        ]
      },
      "external_reference": "#1042",
      "metadata": {
        "order_id": "5520731963508"
      },
      "original_document": null,
      "replaces": null,
      "corrects": null,
      "replaced_by": null,
      "corrected_by": null,
      "credit_notes": [],
      "amount_credited": {
        "net": 0,
        "gross": 0
      },
      "timeline": [
        {
          "id": "evt_02y9O8rhJ2Z2v1fOH2XiSH",
          "type": "document.created",
          "created": "2026-10-11T09:30:00.000Z"
        },
        {
          "id": "evt_02y9O8s1a8ymJqpmAy0nLe",
          "type": "document.issued",
          "created": "2026-10-11T09:30:02.000Z"
        }
      ],
      "issued_at": "2026-10-11T09:30:02.000Z",
      "created": "2026-10-11T09:30:00.000Z",
      "updated": "2026-10-11T09:30:02.000Z"
    },
    "warnings": [],
    "refunds": [],
    "handled": "2026-10-11T09:30:00.000Z",
    "voided_numbers": [],
    "action_needed": false,
    "retryable": false,
    "correctable": false,
    "cancellable": false,
    "created": "2026-10-11T09:30:00.000Z"
  }
}
```

*Response headers*

- `x-request-id` · `string`
  The request's correlation id; quote it when reporting a problem. One of: req\_ plus a uuid (Tallio made it), client: plus the x-request-id you sent (8-128 of A-Z a-z 0-9 . \_ : -), or the hosting platform's id.
  With every response
  Pattern: `^(?:req_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|client:[A-Za-z0-9._:-]{8,128}|[A-Za-z0-9._-]{1,16}::[A-Za-z0-9._:-]{6,110})$`
- `ratelimit-limit` · `integer`
  Requests allowed in the current window for the bucket this request counted against.
  With 200, 400, 404, 409, 413, 415, 429 · At least 1
- `ratelimit-remaining` · `integer`
  Requests left in the current window; 0 means the next one is refused until the window resets.
  With 200, 400, 404, 409, 413, 415, 429 · At least 0
- `ratelimit-reset` · `integer`
  Seconds until the current window resets.
  With 200, 400, 404, 409, 413, 415, 429 · At least 0
- `www-authenticate` · `string`
  The bearer challenge: send a vendor secret key as `Authorization: Bearer <key>`.
  With 401 · Always `Bearer realm="tallio"`
- `retry-after` · `integer`
  Seconds to wait before retrying a request refused with 429 `rate_limited`.
  With 429 · At least 1

*Errors*

| Code | Status | Retryable | Meaning |
| --- | --- | --- | --- |
| `validation_failed` | 400 | No | Request validation failed. |
| `unauthorized` | 401 | No | Authentication is required. |
| `vendor_suspended` | 403 | No | This vendor's access to Tallio is suspended. Its owner can contact Tallio to restore it. |
| `subscription_required` | 403 | No | Issuing live documents needs an active Tallio plan. An owner can choose one in the dashboard (Settings, Billing); test mode stays free. |
| `store_unproven` | 403 | No | On the Free store plan, Tallio issues live documents only for a proven store. Update Tallio for WooCommerce and connect the store again so Tallio can confirm its address, or choose a paid store plan. Test mode works with any store. |
| `not_found` | 404 | No | The requested resource was not found. |
| `store_url_mismatch` | 409 | No | This store key was granted to another store URL than the one this request names (Tallio-Store-Url). Connect this store again, or confirm that the store moved. |
| `invalid_state` | 409 | No | The object's current state does not allow this request. |
| `merchant_archived` | 409 | No | This merchant is archived: it issues and connects nothing new. Unarchive it first (POST /merchants/{id}/unarchive). |
| `already_exists` | 409 | No | An object with this identifier already exists; look it up instead of creating it again. |
| `payload_too_large` | 413 | No | The request body is too large. |
| `unsupported_media_type` | 415 | No | The request body must be JSON (Content-Type: application/json). |
| `rate_limited` | 429 | Yes | A rate limit was reached. Retry later. |
| `internal_error` | 500 | No | An unexpected server error occurred. |

## Retrieve the store plan's usage

`GET /api/v1/store_usage`

Returns your team's store plan and its live documents this period against the plan's cap, with the link to the dashboard page where an owner changes the plan. Any key of the team reads it, in either mode; the count is always of live orders. A team that is not a store team (no store connected, an API plan) is 409 invalid\_state.

*Bearer API key*

*Request*

*curl*

```bash
curl -X GET 'https://tallio.dev/api/v1/store_usage' \
  -H "Authorization: Bearer $TALLIO_API_KEY"
```

*TypeScript SDK*

```ts
import { createTallioClient, unwrap } from "@tallio-dev/sdk";

const tallio = createTallioClient({
  apiKey: process.env.TALLIO_API_KEY!,
  baseUrl: "https://tallio.dev",
});

const result = await unwrap(tallio.http.GET("/api/v1/store_usage"));
```

*Responses*

| Status | Description |
| --- | --- |
| `200` | The team's store plan and usage. |
| 4XX, 5XX | An error: see Errors below. |

*Response body · 200*

- `data` · `object` · required
  A store team's plan and its live documents this period against the plan's cap.
  - `object` · `string` · required
    Always "store\_usage".
    Always `store_usage`
  - `plan` · `object` · required
    The plan whose cap applies now: a paid plan that is paying (or in its payment grace), else Free.
    - `id` · `string | null` · required
      The paid plan, or null on the Free plan.
      One of: `store_starter`, `store_growth`, `store_scale`
    - `name` · `string` · required
      The plan's name, the same in every language.
    - `interval` · `string | null` · required
      How the plan is billed; null on the free plan.
      One of: `month`, `year`
    - `trial_ends` · `string | null` · required
      When a trial ends and the first charge is made; null outside one.
      Format: `date-time`
  - `status` · `string` · required
    allowed: under 80% of the cap; near\_cap: at or past it; in\_grace: past the cap but inside its 10% grace, still issuing; over\_cap: at the limit, new orders wait under Action needed as plan\_cap\_reached until the plan changes or the period ends, then Retry.
    One of: `allowed`, `near_cap`, `in_grace`, `over_cap`
  - `capped` · `boolean` · required
    Whether the cap applies; false for a team Tallio exempts from billing, which never stops.
  - `unproven` · `boolean` · required
    Whether live orders are refused with 403 store\_unproven: on the Free plan, while Tallio has proven neither the store's address (connected with a plugin that answers Tallio's check) nor its business's tax id (through a provider). Connect the store again with an up-to-date plugin, or choose a paid plan.
  - `cap` · `integer` · required
    Documents a period the plan covers, as sold.
    From 0 to 9007199254740991
  - `limit` · `integer` · required
    Where issuing stops: the cap plus 10%, rounded up.
    From 0 to 9007199254740991
  - `used` · `integer` · required
    Store orders that took a place under the cap this period: live, with a document or being issued. Credit notes and corrections never count.
    From 0 to 9007199254740991
  - `remaining` · `integer` · required
    Left under the cap (not the limit).
    From 0 to 9007199254740991
  - `period` · `object` · required
    The month counted: a paid plan's billing month, else the calendar month (UTC).
    - `start` · `string` · required
      The first moment counted.
      Format: `date-time`
    - `end` · `string` · required
      The period's end, exclusive: the count starts again from here.
      Format: `date-time`
  - `change_plan_url` · `string` · required
    The team's billing page in the Tallio dashboard, where an owner changes the plan.
    Format: `uri`

*Example response · 200*

```json
{
  "data": {
    "object": "store_usage",
    "plan": {
      "id": "store_starter",
      "name": "Starter",
      "interval": "month",
      "trial_ends": "2026-10-11T09:30:00.000Z"
    },
    "status": "allowed",
    "capped": false,
    "unproven": false,
    "cap": 0,
    "limit": 0,
    "used": 0,
    "remaining": 0,
    "period": {
      "start": "2026-10-11T09:30:00.000Z",
      "end": "2026-10-11T09:30:00.000Z"
    },
    "change_plan_url": "https://example.com"
  }
}
```

*Response headers*

- `x-request-id` · `string`
  The request's correlation id; quote it when reporting a problem. One of: req\_ plus a uuid (Tallio made it), client: plus the x-request-id you sent (8-128 of A-Z a-z 0-9 . \_ : -), or the hosting platform's id.
  With every response
  Pattern: `^(?:req_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|client:[A-Za-z0-9._:-]{8,128}|[A-Za-z0-9._-]{1,16}::[A-Za-z0-9._:-]{6,110})$`
- `ratelimit-limit` · `integer`
  Requests allowed in the current window for the bucket this request counted against.
  With 200, 409, 429 · At least 1
- `ratelimit-remaining` · `integer`
  Requests left in the current window; 0 means the next one is refused until the window resets.
  With 200, 409, 429 · At least 0
- `ratelimit-reset` · `integer`
  Seconds until the current window resets.
  With 200, 409, 429 · At least 0
- `www-authenticate` · `string`
  The bearer challenge: send a vendor secret key as `Authorization: Bearer <key>`.
  With 401 · Always `Bearer realm="tallio"`
- `retry-after` · `integer`
  Seconds to wait before retrying a request refused with 429 `rate_limited`.
  With 429 · At least 1

*Errors*

| Code | Status | Retryable | Meaning |
| --- | --- | --- | --- |
| `unauthorized` | 401 | No | Authentication is required. |
| `vendor_suspended` | 403 | No | This vendor's access to Tallio is suspended. Its owner can contact Tallio to restore it. |
| `store_url_mismatch` | 409 | No | This store key was granted to another store URL than the one this request names (Tallio-Store-Url). Connect this store again, or confirm that the store moved. |
| `invalid_state` | 409 | No | The object's current state does not allow this request. |
| `rate_limited` | 429 | Yes | A rate limit was reached. Retry later. |
| `internal_error` | 500 | No | An unexpected server error occurred. |
